Skip to content

Commit 396cde4

Browse files
WIP: Commit progress on rosomaxa crate
1 parent aade69a commit 396cde4

File tree

16 files changed

+461
-465
lines changed

16 files changed

+461
-465
lines changed

examples/data/config/config.full.json

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -361,11 +361,6 @@
361361
"isGlobal": true
362362
}
363363
},
364-
"processing": [
365-
{ "type": "vicinity-clustering" },
366-
{ "type": "advance-departure" },
367-
{ "type": "unassignment-reason" }
368-
],
369364
"telemetry": {
370365
"progress": {
371366
"enabled": true,

examples/json-pragmatic/src/main.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ use std::sync::Arc;
66
use vrp_pragmatic::checker::CheckerContext;
77
use vrp_pragmatic::core::models::{Problem as CoreProblem, Solution as CoreSolution};
88
use vrp_pragmatic::core::prelude::*;
9-
use vrp_pragmatic::core::solver::SolverBuilder;
109
use vrp_pragmatic::format::problem::{deserialize_matrix, deserialize_problem, Matrix, PragmaticProblem, Problem};
1110
use vrp_pragmatic::format::solution::{deserialize_solution, PragmaticSolution, Solution};
1211
use vrp_pragmatic::format::FormatError;
@@ -60,10 +59,11 @@ fn run_examples(base_path: &str) {
6059
panic!("cannot read pragmatic problem: {}", FormatError::format_many(errors.as_slice(), "\t\n"))
6160
}));
6261

63-
let (solution, cost, _) = SolverBuilder::new(core_problem.clone(), environment)
62+
let config = create_default_config_builder(core_problem.clone(), environment)
6463
.with_max_generations(Some(100))
6564
.build()
66-
.unwrap_or_else(|err| panic!("cannot build solver: {}", err))
65+
.unwrap_or_else(|err| panic!("cannot build default solver configuration: {}", err));
66+
let (solution, cost, _) = Solver::new(core_problem.clone(), config)
6767
.solve()
6868
.unwrap_or_else(|err| panic!("cannot solver problem: {}", err));
6969

0 commit comments

Comments
 (0)