Skip to main content

solver_vrp/
lib.rs

1// This crate is WIP.
2//
3// Notes:
4//   - Manage stop assignments in `Model`.
5//   - Store references to `Stop`s in `Model`. `PlanUnit` and `Vehicle` shouldn't need copies of each `Stop` if they aren't modified.
6//   - Implement traits for interfaces like `PlanUnit`s with different implementations, operators, expressions, etc.
7//   - Reference parsed input data directly in `Input`.
8//   - Only ["stop-id"] single-precedence inputs for stops.
9//   - Only {"dimension": f64} quantity inputs for stops.
10//   - Only f64 location coordinate precision inputs for stops.
11//   - Only `u64` [epoch seconds, epoch seconds] as a fixed start and end time for start time window inputs for stops.
12//   - Only f64 distance matrix inputs.
13//   - Only inputs without options used.
14//   - Include vehicle type data.
15
16use model::Model;
17use solution::Solution;
18
19mod model;
20mod schema;
21mod solution;
22
23type Id = String;
24type Index = usize;
25
26struct Solver {
27    model: Model,
28}
29
30impl Solver {
31    fn new() -> Self {
32        Self {
33            model: Model::new(),
34        }
35    }
36
37    fn solve(&self) -> Solution {
38        todo!()
39    }
40
41    fn model(&self) -> &Model {
42        &self.model
43    }
44}