Class SolutionSpecMaterializer
java.lang.Object
com.graphhopper.jsprit.core.problem.solution.spec.SolutionSpecMaterializer
Materializes a
SolutionSpec into a VehicleRoutingProblemSolution.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordResult of validating a spec against a VRP. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionmaterialize(SolutionSpec spec) Materializes a spec into a solution.validate(SolutionSpec spec) Validates a spec against the VRP.
-
Constructor Details
-
SolutionSpecMaterializer
-
-
Method Details
-
validate
Validates a spec against the VRP.- Parameters:
spec- the solution spec to validate- Returns:
- validation result with details about any missing vehicles or jobs
-
materialize
Materializes a spec into a solution.Call
validate(SolutionSpec)first to check for errors.- Parameters:
spec- the solution spec to materialize- Returns:
- the materialized solution
- Throws:
IllegalArgumentException- if the spec references missing vehicles or jobs
-