nextroute 1.8.0.dev0__tar.gz → 1.8.0.dev2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/.github/workflows/release.yml +15 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/.nextmv/check_header.py +1 -1
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/PKG-INFO +1 -1
- nextroute-1.8.0.dev2/VERSION +1 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/nextroute/__about__.py +1 -1
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/nextroute/__init__.py +5 -0
- nextroute-1.8.0.dev2/nextroute/bin/nextroute-darwin-amd64 +0 -0
- nextroute-1.8.0.dev2/nextroute/bin/nextroute-darwin-arm64 +0 -0
- nextroute-1.8.0.dev2/nextroute/bin/nextroute-linux-amd64 +0 -0
- nextroute-1.8.0.dev2/nextroute/bin/nextroute-linux-arm64 +0 -0
- nextroute-1.8.0.dev2/nextroute/bin/nextroute-windows-amd64 +0 -0
- nextroute-1.8.0.dev2/nextroute/bin/nextroute-windows-arm64 +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/nextroute/check/__init__.py +2 -0
- nextroute-1.8.0.dev2/nextroute/check/options.py +31 -0
- nextroute-1.8.0.dev2/nextroute/factory/__init__.py +16 -0
- nextroute-1.8.0.dev2/nextroute/factory/options.py +146 -0
- nextroute-1.8.0.dev2/nextroute/options.py +151 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/nextroute/schema/output.py +2 -2
- nextroute-1.8.0.dev2/nextroute/solve.py +150 -0
- nextroute-1.8.0.dev2/tests/nextroute_python/test_options.py +141 -0
- nextroute-1.8.0.dev0/VERSION +0 -1
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/.github/workflows/go-test-lint.yml +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/.github/workflows/header.yml +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/.github/workflows/json-lint.yml +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/.github/workflows/markdown-lint.yml +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/.github/workflows/python-lint.yml +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/.github/workflows/python-test.yml +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/.gitignore +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/.golangci.yml +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/.nextmv/add_header.py +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/.prettierrc.yml +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/LICENSE +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/README.md +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/check/check.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/check/doc.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/check/format.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/check/observer.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/check/options.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/check/schema/schema.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/check/schema.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/cmd/.gitignore +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/cmd/input.json +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/cmd/main.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/common/alias.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/common/alias_test.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/common/boundingbox.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/common/boundingbox_test.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/common/distance.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/common/duration.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/common/errors/errors.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/common/fast_haversine.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/common/haversine.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/common/intersect.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/common/location.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/common/location_test.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/common/nsmallest.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/common/nsmallest_test.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/common/rangecheck.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/common/rangecheck_test.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/common/slices.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/common/speed.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/common/statistics.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/common/statistics_test.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/common/utils.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/common/utils_test.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/doc.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/factory/alternates.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/factory/constraint_attributes.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/factory/constraint_capacity.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/factory/constraint_capacity_test.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/factory/constraint_cluster.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/factory/constraint_distance_limit.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/factory/constraint_max_duration.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/factory/constraint_max_stops.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/factory/constraint_max_wait_stop.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/factory/constraint_max_wait_vehicle.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/factory/constraint_no_mix.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/factory/constraint_shift.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/factory/constraint_start_timewindows.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/factory/construction.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/factory/data.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/factory/defaults.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/factory/defaults_test.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/factory/doc.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/factory/duration_groups_expression.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/factory/factory.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/factory/format.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/factory/group.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/factory/initialsolution.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/factory/model.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/factory/objective_activation.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/factory/objective_capacity.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/factory/objective_cluster.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/factory/objective_earliness_lateness.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/factory/objective_min_stops.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/factory/objective_travel_duration.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/factory/objective_unplanned.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/factory/objective_vehicles_duration.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/factory/plan_units.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/factory/precedence.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/factory/services.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/factory/stops.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/factory/validate.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/factory/vehicles.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/go.mod +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/go.sum +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/model.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/model_checkedat.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/model_cluster.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/model_complexity.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/model_constraint.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/model_constraint_attributes.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/model_constraint_attributes_test.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/model_constraint_cluster_test.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/model_constraint_maximum_duration.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/model_constraint_maximum_duration_test.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/model_constraint_maximum_stops.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/model_constraint_maximum_stops_test.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/model_constraint_maximum_test.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/model_constraint_maximum_travel_duration.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/model_constraint_maximum_wait_stop.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/model_constraint_maximum_wait_stop_test.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/model_constraint_maximum_wait_vehicle.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/model_constraint_maximum_wait_vehicle_test.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/model_constraint_no_mix.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/model_constraint_no_mix_test.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/model_constraint_successor_test.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/model_constraint_successors.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/model_data.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/model_directed_acyclic_graph.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/model_directed_acyclic_graph_test.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/model_expression.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/model_expression_binary.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/model_expression_composed.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/model_expression_custom.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/model_expression_duration.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/model_expression_haversine.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/model_expression_measure_byindex.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/model_expression_measure_bypoint.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/model_expression_sum.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/model_expression_time.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/model_expression_time_dependent.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/model_expression_time_dependent_test.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/model_expression_unary.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/model_haversine.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/model_identifier.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/model_latest.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/model_latest_test.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/model_maximum.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/model_objective.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/model_objective_cluster_test.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/model_objective_earliness.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/model_objective_earliness_test.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/model_objective_expression.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/model_objective_expression_test.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/model_objective_min_stops.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/model_objective_term.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/model_objective_travelduration.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/model_objective_travelduration_test.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/model_objective_unplanned.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/model_objective_vehicles.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/model_objective_vehicles_duration.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/model_plan_stops_unit.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/model_plan_stops_unit_test.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/model_plan_unit.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/model_plan_units_unit.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/model_plan_units_unit_test.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/model_statistics.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/model_stop.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/model_stop_test.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/model_stops_distance_queries.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/model_stops_distance_queries_test.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/model_test.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/model_vehicle.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/model_vehicle_test.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/model_vehicle_type.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/nextroute/base_model.py +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/nextroute/check/schema.py +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/nextroute/schema/__init__.py +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/nextroute/schema/input.py +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/nextroute/schema/location.py +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/nextroute/schema/statistics.py +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/nextroute/schema/stop.py +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/nextroute/schema/vehicle.py +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/nextroute.code-workspace +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/observers/doc.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/observers/performance_observer.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/observers/solve_observer.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/observers/solve_performance_observer.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/pyproject.toml +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/requirements.txt +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/schema/custom_data.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/schema/custom_data_test.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/schema/input.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/schema/output.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/solution.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/solution_construcation_sweep_test.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/solution_construction_random.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/solution_construction_sweep.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/solution_format.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/solution_initial_observer.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/solution_initial_stops_test.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/solution_move.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/solution_move_stops.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/solution_move_stops_generator.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/solution_move_stops_generator_test.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/solution_move_stops_test.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/solution_move_test.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/solution_move_units.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/solution_observer.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/solution_plan_stops_unit.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/solution_plan_unit.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/solution_plan_unit_collection.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/solution_plan_unit_collection_test.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/solution_plan_units_unit.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/solution_position_hint.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/solution_sequence_generator.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/solution_sequence_generator_test.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/solution_stop.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/solution_stop_generator.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/solution_stop_generator_test.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/solution_stop_position.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/solution_test.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/solution_unplan.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/solution_vehicle.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/solution_vehicle_test.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/solve_events.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/solve_information.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/solve_operator.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/solve_operator_and.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/solve_operator_or.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/solve_operator_plan.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/solve_operator_restart.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/solve_operator_unplan.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/solve_operator_unplan_clusters.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/solve_operator_unplan_location.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/solve_operator_unplan_vehicles.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/solve_parallel_events.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/solve_parameters.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/solve_progressioner.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/solve_solution_channel.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/solve_solver.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/solve_solver_parallel.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/solver.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/solver_parallel.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/__init__.py +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/check/input.json +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/check/input.json.golden +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/check/main.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/check/main_test.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/custom_constraint/input.json +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/custom_constraint/input.json.golden +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/custom_constraint/main.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/custom_constraint/main_test.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/custom_matrices/input.json +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/custom_matrices/input.json.golden +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/custom_matrices/main.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/custom_matrices/main_test.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/custom_objective/input.json +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/custom_objective/input.json.golden +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/custom_objective/main.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/custom_objective/main_test.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/custom_operators/input.json +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/custom_operators/input.json.golden +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/custom_operators/main.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/custom_operators/main_test.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/custom_output/input.json +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/custom_output/input.json.golden +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/custom_output/main.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/custom_output/main_test.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/golden/benchmark_test.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/golden/main_test.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/golden/testdata/activation_penalty.json +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/golden/testdata/activation_penalty.json.golden +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/golden/testdata/alternates.json +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/golden/testdata/alternates.json.golden +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/golden/testdata/basic.json +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/golden/testdata/basic.json.golden +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/golden/testdata/capacity.json +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/golden/testdata/capacity.json.golden +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/golden/testdata/compatibility_attributes.json +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/golden/testdata/compatibility_attributes.json.golden +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/golden/testdata/complex_precedence.json +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/golden/testdata/complex_precedence.json.golden +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/golden/testdata/custom_data.json +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/golden/testdata/custom_data.json.golden +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/golden/testdata/defaults.json +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/golden/testdata/defaults.json.golden +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/golden/testdata/direct_precedence.json +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/golden/testdata/direct_precedence.json.golden +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/golden/testdata/direct_precedence_linked.json +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/golden/testdata/direct_precedence_linked.json.golden +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/golden/testdata/distance_matrix.json +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/golden/testdata/distance_matrix.json.golden +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/golden/testdata/duration_groups.json +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/golden/testdata/duration_groups.json.golden +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/golden/testdata/duration_groups_with_stop_multiplier.json +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/golden/testdata/duration_groups_with_stop_multiplier.json.golden +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/golden/testdata/duration_matrix.json +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/golden/testdata/duration_matrix.json.golden +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/golden/testdata/early_arrival_penalty.json +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/golden/testdata/early_arrival_penalty.json.golden +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/golden/testdata/initial_stops.json +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/golden/testdata/initial_stops.json.golden +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/golden/testdata/initial_stops_infeasible_compatibility.json +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/golden/testdata/initial_stops_infeasible_compatibility.json.golden +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/golden/testdata/initial_stops_infeasible_compatibility.md +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/golden/testdata/initial_stops_infeasible_max_duration.json +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/golden/testdata/initial_stops_infeasible_max_duration.json.golden +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/golden/testdata/initial_stops_infeasible_max_duration.md +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/golden/testdata/initial_stops_infeasible_remove_all.json +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/golden/testdata/initial_stops_infeasible_remove_all.json.golden +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/golden/testdata/initial_stops_infeasible_remove_all.md +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/golden/testdata/initial_stops_infeasible_temporal.json +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/golden/testdata/initial_stops_infeasible_temporal.json.golden +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/golden/testdata/initial_stops_infeasible_temporal.md +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/golden/testdata/initial_stops_infeasible_tuple.json +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/golden/testdata/initial_stops_infeasible_tuple.json.golden +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/golden/testdata/initial_stops_infeasible_tuple.md +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/golden/testdata/late_arrival_penalty.json +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/golden/testdata/late_arrival_penalty.json.golden +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/golden/testdata/max_distance.json +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/golden/testdata/max_distance.json.golden +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/golden/testdata/max_duration.json +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/golden/testdata/max_duration.json.golden +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/golden/testdata/max_stops.json +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/golden/testdata/max_stops.json.golden +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/golden/testdata/max_wait_stop.json +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/golden/testdata/max_wait_stop.json.golden +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/golden/testdata/max_wait_stop.md +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/golden/testdata/max_wait_vehicle.json +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/golden/testdata/max_wait_vehicle.json.golden +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/golden/testdata/max_wait_vehicle.md +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/golden/testdata/min_stops.json +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/golden/testdata/min_stops.json.golden +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/golden/testdata/multi_window.json +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/golden/testdata/multi_window.json.golden +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/golden/testdata/multi_window.md +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/golden/testdata/no_mix.json +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/golden/testdata/no_mix.json.golden +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/golden/testdata/no_mix_null.json +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/golden/testdata/no_mix_null.json.golden +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/golden/testdata/no_mix_null.md +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/golden/testdata/precedence.json +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/golden/testdata/precedence.json.golden +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/golden/testdata/precedence_pathologic.json +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/golden/testdata/precedence_pathologic.json.golden +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/golden/testdata/start_level.json +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/golden/testdata/start_level.json.golden +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/golden/testdata/start_level.md +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/golden/testdata/start_time_window.json +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/golden/testdata/start_time_window.json.golden +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/golden/testdata/stop_duration.json +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/golden/testdata/stop_duration.json.golden +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/golden/testdata/stop_duration_multiplier.json +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/golden/testdata/stop_duration_multiplier.json.golden +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/golden/testdata/stop_groups.json +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/golden/testdata/stop_groups.json.golden +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/golden/testdata/template_input.json +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/golden/testdata/template_input.json.golden +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/golden/testdata/unplanned_penalty.json +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/golden/testdata/unplanned_penalty.json.golden +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/golden/testdata/vehicle_start_end_location.json +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/golden/testdata/vehicle_start_end_location.json.golden +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/golden/testdata/vehicle_start_end_time.json +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/golden/testdata/vehicle_start_end_time.json.golden +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/golden/testdata/vehicles_duration_objective.json +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/golden/testdata/vehicles_duration_objective.json.golden +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/inline_options/input.json +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/inline_options/input.json.golden +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/inline_options/main.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/inline_options/main_test.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/nextroute_python/__init__.py +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/nextroute_python/schema/__init__.py +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/nextroute_python/schema/input.json +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/nextroute_python/schema/output.json +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/nextroute_python/schema/output_with_check.json +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/nextroute_python/schema/test_input.py +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/nextroute_python/schema/test_output.py +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/output_options/main.sh +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/output_options/main.sh.golden +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/tests/output_options/main_test.go +0 -0
- {nextroute-1.8.0.dev0 → nextroute-1.8.0.dev2}/version.go +0 -0
|
@@ -23,6 +23,21 @@ jobs:
|
|
|
23
23
|
permissions:
|
|
24
24
|
contents: write
|
|
25
25
|
steps:
|
|
26
|
+
- name: ensure proper tagging
|
|
27
|
+
run: |
|
|
28
|
+
echo "If it's a pre-release, the version should contain a hyphen"
|
|
29
|
+
if [ ${{ inputs.IS_PRE_RELEASE }} = true ]; then
|
|
30
|
+
if [[ $VERSION != *-* ]]; then
|
|
31
|
+
echo "Pre-release versions should contain a hyphen"
|
|
32
|
+
exit 1
|
|
33
|
+
fi
|
|
34
|
+
else
|
|
35
|
+
if [[ $VERSION == *-* ]]; then
|
|
36
|
+
echo "Release versions should not contain a hyphen"
|
|
37
|
+
exit 1
|
|
38
|
+
fi
|
|
39
|
+
fi
|
|
40
|
+
|
|
26
41
|
- name: ensure version is not already released
|
|
27
42
|
run: |
|
|
28
43
|
if git ls-remote --tags origin | grep -q "refs/tags/$VERSION"; then
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: nextroute
|
|
3
|
-
Version: 1.8.0.
|
|
3
|
+
Version: 1.8.0.dev2
|
|
4
4
|
Summary: Nextroute is an engine for solving Vehicle Routing Problems (VRPs).
|
|
5
5
|
Project-URL: Homepage, https://www.nextmv.io
|
|
6
6
|
Project-URL: Documentation, https://www.nextmv.io/docs/vehicle-routing
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
v1.8.0-dev.2
|
|
@@ -9,6 +9,11 @@ to it.
|
|
|
9
9
|
"""
|
|
10
10
|
|
|
11
11
|
from .__about__ import __version__
|
|
12
|
+
from .options import DisableFormatOptions as DisableFormatOptions
|
|
13
|
+
from .options import FormatOptions as FormatOptions
|
|
14
|
+
from .options import Options as Options
|
|
15
|
+
from .options import ParallelSolveOptions as ParallelSolveOptions
|
|
16
|
+
from .solve import solve as solve
|
|
12
17
|
|
|
13
18
|
VERSION = __version__
|
|
14
19
|
"""The version of the Nextroute Python package."""
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -19,6 +19,8 @@ solution. If the check is invoked on a solution, it is executed on the
|
|
|
19
19
|
unplanned plan units of the solution.
|
|
20
20
|
"""
|
|
21
21
|
|
|
22
|
+
from .options import Options as Options
|
|
23
|
+
from .options import Verbosity as Verbosity
|
|
22
24
|
from .schema import Objective as Objective
|
|
23
25
|
from .schema import ObjectiveTerm as ObjectiveTerm
|
|
24
26
|
from .schema import Output as Output
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# © 2019-present nextmv.io inc
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Options for the Nextroute check engine.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from enum import Enum
|
|
8
|
+
|
|
9
|
+
from nextroute.base_model import BaseModel
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class Verbosity(str, Enum):
|
|
13
|
+
"""Format of an `Input`."""
|
|
14
|
+
|
|
15
|
+
OFF = "off"
|
|
16
|
+
"""The check engine is not run."""
|
|
17
|
+
LOW = "low"
|
|
18
|
+
"""Low verbosity for the check engine."""
|
|
19
|
+
MEDIUM = "medium"
|
|
20
|
+
"""Medium verbosity for the check engine."""
|
|
21
|
+
HIGH = "high"
|
|
22
|
+
"""High verbosity for the check engine."""
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class Options(BaseModel):
|
|
26
|
+
"""Options for the Nextroute check engine."""
|
|
27
|
+
|
|
28
|
+
duration: float = 30
|
|
29
|
+
"""Maximum duration of the check, in seconds."""
|
|
30
|
+
verbosity: Verbosity = Verbosity.OFF
|
|
31
|
+
"""Verbosity of the check engine."""
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# © 2019-present nextmv.io inc
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Functionality for creating a ready-to-go Nextroute model.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from .options import Constraints as Constraints
|
|
8
|
+
from .options import DisableConstraints as DisableConstraints
|
|
9
|
+
from .options import DisableProperties as DisableProperties
|
|
10
|
+
from .options import DisableValidate as DisableValidate
|
|
11
|
+
from .options import EnableConstraints as EnableConstraints
|
|
12
|
+
from .options import EnableValidate as EnableValidate
|
|
13
|
+
from .options import Objectives as Objectives
|
|
14
|
+
from .options import Options as Options
|
|
15
|
+
from .options import Properties as Properties
|
|
16
|
+
from .options import Validate as Validate
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
# © 2019-present nextmv.io inc
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Options for the Nextroute factory.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from typing import List
|
|
8
|
+
|
|
9
|
+
from pydantic import Field
|
|
10
|
+
|
|
11
|
+
from nextroute.base_model import BaseModel
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class DisableConstraints(BaseModel):
|
|
15
|
+
"""Options for disabling specific constraints."""
|
|
16
|
+
|
|
17
|
+
attributes: bool = False
|
|
18
|
+
"""Ignore the compatibility attributes constraint."""
|
|
19
|
+
capacity: bool = False
|
|
20
|
+
"""Ignore the capacity constraint for all resources."""
|
|
21
|
+
capacities: List[str] = Field(default_factory=list)
|
|
22
|
+
"""Ignore the capacity constraint for the given resource names."""
|
|
23
|
+
distance_limit: bool = False
|
|
24
|
+
"""Ignore the distance limit constraint."""
|
|
25
|
+
groups: bool = False
|
|
26
|
+
"""Ignore the groups constraint."""
|
|
27
|
+
maximum_duration: bool = False
|
|
28
|
+
"""Ignore the maximum duration constraint."""
|
|
29
|
+
maximum_stops: bool = False
|
|
30
|
+
"""Ignore the maximum stops constraint."""
|
|
31
|
+
maximum_wait_stop: bool = False
|
|
32
|
+
"""Ignore the maximum stop wait constraint."""
|
|
33
|
+
maximum_wait_vehicle: bool = False
|
|
34
|
+
"""Ignore the maximum vehicle wait constraint."""
|
|
35
|
+
mixing_items: bool = False
|
|
36
|
+
"""Ignore the do not mix items constraint."""
|
|
37
|
+
precedence: bool = False
|
|
38
|
+
"""Ignore the precedence (pickups & deliveries) constraint."""
|
|
39
|
+
vehicle_start_time: bool = False
|
|
40
|
+
"""Ignore the vehicle start time constraint."""
|
|
41
|
+
vehicle_end_time: bool = False
|
|
42
|
+
"""Ignore the vehicle end time constraint."""
|
|
43
|
+
start_time_windows: bool = False
|
|
44
|
+
"""Ignore the start time windows constraint."""
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
class EnableConstraints(BaseModel):
|
|
48
|
+
"""Options for enabling specific constraints."""
|
|
49
|
+
|
|
50
|
+
cluster: bool = False
|
|
51
|
+
"""Enable the cluster constraint."""
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
class Constraints(BaseModel):
|
|
55
|
+
"""Options for configuring constraints."""
|
|
56
|
+
|
|
57
|
+
disable: DisableConstraints = Field(default_factory=DisableConstraints)
|
|
58
|
+
"""Options for disabling specific constraints."""
|
|
59
|
+
enable: EnableConstraints = Field(default_factory=EnableConstraints)
|
|
60
|
+
"""Options for enabling specific constraints."""
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
class Objectives(BaseModel):
|
|
64
|
+
"""Options for configuring objectives."""
|
|
65
|
+
|
|
66
|
+
capacities: str = ""
|
|
67
|
+
"""
|
|
68
|
+
Capacity objective, provide triple for each resource
|
|
69
|
+
`name:default;factor:1.0;offset;0.0`.
|
|
70
|
+
"""
|
|
71
|
+
min_stops: float = 1.0
|
|
72
|
+
"""Factor to weigh the min stops objective."""
|
|
73
|
+
early_arrival_penalty: float = 1.0
|
|
74
|
+
"""Factor to weigh the early arrival objective."""
|
|
75
|
+
late_arrival_penalty: float = 1.0
|
|
76
|
+
"""Factor to weigh the late arrival objective."""
|
|
77
|
+
vehicle_activation_penalty: float = 1.0
|
|
78
|
+
"""Factor to weigh the vehicle activation objective."""
|
|
79
|
+
travel_duration: float = 0.0
|
|
80
|
+
"""Factor to weigh the travel duration objective."""
|
|
81
|
+
vehicles_duration: float = 1.0
|
|
82
|
+
"""Factor to weigh the vehicles duration objective."""
|
|
83
|
+
unplanned_penalty: float = 1.0
|
|
84
|
+
"""Factor to weigh the unplanned objective."""
|
|
85
|
+
cluster: float = 0.0
|
|
86
|
+
"""Factor to weigh the cluster objective."""
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
class DisableProperties(BaseModel):
|
|
90
|
+
"""Options for disabling specific properties."""
|
|
91
|
+
|
|
92
|
+
durations: bool = False
|
|
93
|
+
"""Ignore the durations of stops."""
|
|
94
|
+
stop_duration_multipliers: bool = False
|
|
95
|
+
"""Ignore the stop duration multipliers defined on vehicles."""
|
|
96
|
+
duration_groups: bool = False
|
|
97
|
+
"""Ignore the durations groups of stops."""
|
|
98
|
+
initial_solution: bool = False
|
|
99
|
+
"""Ignore the initial solution."""
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
class Properties(BaseModel):
|
|
103
|
+
"""Options for configuring properties."""
|
|
104
|
+
|
|
105
|
+
disable: DisableProperties = Field(default_factory=DisableProperties)
|
|
106
|
+
"""Options for disabling specific properties."""
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
class DisableValidate(BaseModel):
|
|
110
|
+
"""Options for disabling specific validations."""
|
|
111
|
+
|
|
112
|
+
start_time: bool = False
|
|
113
|
+
"""Disable the start time validation."""
|
|
114
|
+
resources: bool = False
|
|
115
|
+
"""Disable the resources validation."""
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
class EnableValidate(BaseModel):
|
|
119
|
+
"""Options for enabling specific validations."""
|
|
120
|
+
|
|
121
|
+
matrix: bool = False
|
|
122
|
+
"""Enable matrix validation."""
|
|
123
|
+
matrix_asymmetry_tolerance: int = 20
|
|
124
|
+
"""Percentage of acceptable matrix asymmetry, requires matrix validation enabled."""
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
class Validate(BaseModel):
|
|
128
|
+
"""Options for configuring validations."""
|
|
129
|
+
|
|
130
|
+
disable: DisableValidate = Field(default_factory=DisableValidate)
|
|
131
|
+
"""Options for disabling specific validations"""
|
|
132
|
+
enable: EnableValidate = Field(default_factory=EnableValidate)
|
|
133
|
+
"""Options for enabling specific validations"""
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
class Options(BaseModel):
|
|
137
|
+
"""Options that configure how a Nextroute model is built."""
|
|
138
|
+
|
|
139
|
+
constraints: Constraints = Field(default_factory=Constraints)
|
|
140
|
+
"""Options for configuring constraints."""
|
|
141
|
+
objectives: Objectives = Field(default_factory=Objectives)
|
|
142
|
+
"""Options for configuring objectives."""
|
|
143
|
+
properties: Properties = Field(default_factory=Properties)
|
|
144
|
+
"""Options for configuring properties."""
|
|
145
|
+
validate_options: Validate = Field(default_factory=Validate, alias="validate")
|
|
146
|
+
"""Options for configuring validations."""
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
# © 2019-present nextmv.io inc
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Options for working with the Nextroute engine.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
import json
|
|
8
|
+
from typing import Any, Dict, List
|
|
9
|
+
|
|
10
|
+
from pydantic import Field
|
|
11
|
+
|
|
12
|
+
from nextroute.base_model import BaseModel
|
|
13
|
+
from nextroute.check.options import Options as CheckOptions
|
|
14
|
+
from nextroute.factory.options import Options as FactoryOptions
|
|
15
|
+
|
|
16
|
+
_DURATIONS_ARGS = [
|
|
17
|
+
"-check.duration",
|
|
18
|
+
"-solve.duration",
|
|
19
|
+
]
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
class ParallelSolveOptions(BaseModel):
|
|
23
|
+
"""Options for the parallel solver."""
|
|
24
|
+
|
|
25
|
+
iterations: int = -1
|
|
26
|
+
"""
|
|
27
|
+
Maximum number of iterations, -1 assumes no limit; iterations are counted
|
|
28
|
+
after start solutions are generated.
|
|
29
|
+
"""
|
|
30
|
+
duration: float = 5
|
|
31
|
+
"""Maximum duration, in seconds, of the solver."""
|
|
32
|
+
parallel_runs: int = -1
|
|
33
|
+
"""
|
|
34
|
+
Maximum number of parallel runs, -1 results in using all available
|
|
35
|
+
resources.
|
|
36
|
+
"""
|
|
37
|
+
start_solutions: int = -1
|
|
38
|
+
"""
|
|
39
|
+
Number of solutions to generate on top of those passed in; one solution
|
|
40
|
+
generated with sweep algorithm, the rest generated randomly.
|
|
41
|
+
"""
|
|
42
|
+
run_deterministically: bool = False
|
|
43
|
+
"""Run the parallel solver deterministically."""
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
class DisableFormatOptions(BaseModel):
|
|
47
|
+
"""Options for disabling/enabling the progression series."""
|
|
48
|
+
|
|
49
|
+
progression: bool = False
|
|
50
|
+
"""Whether to disable the progression series."""
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
class FormatOptions(BaseModel):
|
|
54
|
+
"""Options for formatting the output of the solver."""
|
|
55
|
+
|
|
56
|
+
disable: DisableFormatOptions = Field(default_factory=DisableFormatOptions)
|
|
57
|
+
"""Options for disabling/enabling the progression series."""
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
class Options(BaseModel):
|
|
61
|
+
"""Options for using Nextroute."""
|
|
62
|
+
|
|
63
|
+
check: CheckOptions = Field(default_factory=CheckOptions)
|
|
64
|
+
"""Options for enabling the check engine."""
|
|
65
|
+
format: FormatOptions = Field(default_factory=FormatOptions)
|
|
66
|
+
"""Options for the output format."""
|
|
67
|
+
model: FactoryOptions = Field(default_factory=FactoryOptions)
|
|
68
|
+
"""Options for the ready-to-go model."""
|
|
69
|
+
solve: ParallelSolveOptions = Field(default_factory=ParallelSolveOptions)
|
|
70
|
+
"""Options for the parallel solver."""
|
|
71
|
+
|
|
72
|
+
def to_args(self) -> List[str]:
|
|
73
|
+
"""
|
|
74
|
+
Convert the options to command-line arguments.
|
|
75
|
+
|
|
76
|
+
Returns
|
|
77
|
+
----------
|
|
78
|
+
List[str]
|
|
79
|
+
The flattened options as a list of strings.
|
|
80
|
+
"""
|
|
81
|
+
|
|
82
|
+
opt_dict = self.to_dict()
|
|
83
|
+
flattened = _flatten(opt_dict)
|
|
84
|
+
|
|
85
|
+
default_options = Options()
|
|
86
|
+
default_options_dict = default_options.to_dict()
|
|
87
|
+
default_flattened = _flatten(default_options_dict)
|
|
88
|
+
|
|
89
|
+
args = []
|
|
90
|
+
for key, value in flattened.items():
|
|
91
|
+
# We only care about custom options, so we skip the default ones.
|
|
92
|
+
default_value = default_flattened.get(key)
|
|
93
|
+
if value == default_value:
|
|
94
|
+
continue
|
|
95
|
+
|
|
96
|
+
key = key.replace("_", "")
|
|
97
|
+
|
|
98
|
+
str_value = json.dumps(value)
|
|
99
|
+
if key in _DURATIONS_ARGS:
|
|
100
|
+
str_value = str_value + "s" # Transforms into seconds.
|
|
101
|
+
|
|
102
|
+
if str_value.startswith('"') and str_value.endswith('"'):
|
|
103
|
+
str_value = str_value[1:-1]
|
|
104
|
+
|
|
105
|
+
# Nextroute’s Go implementation does not support boolean flags with
|
|
106
|
+
# values. If the value is a boolean, then we only append the key if
|
|
107
|
+
# the value is True.
|
|
108
|
+
should_append_value = True
|
|
109
|
+
if isinstance(value, bool):
|
|
110
|
+
if not value:
|
|
111
|
+
continue
|
|
112
|
+
|
|
113
|
+
should_append_value = False
|
|
114
|
+
|
|
115
|
+
args.append(key)
|
|
116
|
+
if should_append_value:
|
|
117
|
+
args.append(str_value)
|
|
118
|
+
|
|
119
|
+
return args
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
def _flatten(nested: Dict[str, Any]) -> Dict[str, Any]:
|
|
123
|
+
"""Flatten a nested dict."""
|
|
124
|
+
|
|
125
|
+
flattened = {}
|
|
126
|
+
for child_key, child_value in nested.items():
|
|
127
|
+
root_key = f"-{child_key}"
|
|
128
|
+
__set_children(flattened, root_key, child_value)
|
|
129
|
+
|
|
130
|
+
return flattened
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
def __set_children(flattened: Dict[str, Any], parent_key: str, parent_value: Any):
|
|
134
|
+
"""Helper function for `__flatten`. it is invoked recursively on a child
|
|
135
|
+
value. If the child is not a dict, then the value is simply set on the
|
|
136
|
+
flattened dict. If the child is a dict, then the function is invoked
|
|
137
|
+
recursively on the child’s values, unitl a non-dict values is hit."""
|
|
138
|
+
|
|
139
|
+
new_key = parent_key
|
|
140
|
+
|
|
141
|
+
if parent_value is None:
|
|
142
|
+
flattened[new_key] = parent_value
|
|
143
|
+
return
|
|
144
|
+
|
|
145
|
+
if isinstance(parent_value, dict):
|
|
146
|
+
for child_key, child_value in parent_value.items():
|
|
147
|
+
new_key = f"{parent_key}.{child_key}"
|
|
148
|
+
__set_children(flattened, new_key, child_value)
|
|
149
|
+
return
|
|
150
|
+
|
|
151
|
+
flattened[new_key] = parent_value
|
|
@@ -8,7 +8,7 @@ from datetime import datetime
|
|
|
8
8
|
from typing import Any, Dict, List, Optional
|
|
9
9
|
|
|
10
10
|
from nextroute.base_model import BaseModel
|
|
11
|
-
from nextroute.check import Output as
|
|
11
|
+
from nextroute.check.schema import Output as CheckOutput
|
|
12
12
|
from nextroute.schema.location import Location
|
|
13
13
|
from nextroute.schema.statistics import Statistics
|
|
14
14
|
|
|
@@ -122,7 +122,7 @@ class Solution(BaseModel):
|
|
|
122
122
|
"""List of vehicles in the solution."""
|
|
123
123
|
objective: Optional[ObjectiveOutput] = None
|
|
124
124
|
"""Information of the objective (value function)."""
|
|
125
|
-
check: Optional[
|
|
125
|
+
check: Optional[CheckOutput] = None
|
|
126
126
|
"""Check of the solution, if enabled."""
|
|
127
127
|
|
|
128
128
|
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
# © 2019-present nextmv.io inc
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Methods for solving a Vehicle Routing Problem with Nextroute.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
import json
|
|
8
|
+
import os
|
|
9
|
+
import subprocess
|
|
10
|
+
from typing import Any, Dict, Union
|
|
11
|
+
|
|
12
|
+
from nextroute.options import Options
|
|
13
|
+
from nextroute.schema.input import Input
|
|
14
|
+
from nextroute.schema.output import Output
|
|
15
|
+
|
|
16
|
+
SUPPORTED_OS = ["linux", "windows", "darwin"]
|
|
17
|
+
"""The operating systems supported by the Nextroute engine."""
|
|
18
|
+
SUPPORTED_ARCHITECTURES = ["x86_64", "arm64", "aarch64"]
|
|
19
|
+
"""The architectures supported by the Nextroute engine."""
|
|
20
|
+
|
|
21
|
+
_ARCHITECTURE_TRANSLATION = {
|
|
22
|
+
"x86_64": "amd64",
|
|
23
|
+
"arm64": "arm64",
|
|
24
|
+
"aarch64": "arm64",
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
def solve(
|
|
29
|
+
input: Union[Input, Dict[str, Any]],
|
|
30
|
+
options: Union[Options, Dict[str, Any]],
|
|
31
|
+
) -> Output:
|
|
32
|
+
"""
|
|
33
|
+
Solve a Vehicle Routing Problem (VRP) using the Nextroute engine. The input
|
|
34
|
+
and options are passed to the engine, and the output is returned. The input
|
|
35
|
+
and options can be provided as dictionaries or as objects, although the
|
|
36
|
+
recommended way is to use the classes, as they provide validation.
|
|
37
|
+
|
|
38
|
+
Example:
|
|
39
|
+
|
|
40
|
+
* Using default options to load an input from a file.
|
|
41
|
+
```python
|
|
42
|
+
import json
|
|
43
|
+
|
|
44
|
+
import nextroute
|
|
45
|
+
|
|
46
|
+
with open("input.json") as f:
|
|
47
|
+
data = json.load(f)
|
|
48
|
+
|
|
49
|
+
input = nextroute.schema.Input.from_dict(data)
|
|
50
|
+
options = nextroute.Options()
|
|
51
|
+
output = nextroute.solve(input, options)
|
|
52
|
+
print(output)
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
* Using custom options to load an input from a file.
|
|
56
|
+
```python
|
|
57
|
+
import json
|
|
58
|
+
|
|
59
|
+
import nextroute
|
|
60
|
+
|
|
61
|
+
with open("input.json") as f:
|
|
62
|
+
data = json.load(f)
|
|
63
|
+
|
|
64
|
+
input = nextroute.schema.Input.from_dict(data)
|
|
65
|
+
options = nextroute.Options(
|
|
66
|
+
solve=nextroute.ParallelSolveOptions(duration=2),
|
|
67
|
+
)
|
|
68
|
+
output = nextroute.solve(input, options)
|
|
69
|
+
print(output)
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
* Using custom dict options to load an input from a file.
|
|
73
|
+
```python
|
|
74
|
+
import json
|
|
75
|
+
|
|
76
|
+
import nextroute
|
|
77
|
+
|
|
78
|
+
with open("input.json") as f:
|
|
79
|
+
data = json.load(f)
|
|
80
|
+
|
|
81
|
+
input = nextroute.schema.Input.from_dict(data)
|
|
82
|
+
options = {
|
|
83
|
+
"solve": {
|
|
84
|
+
"duration": 2,
|
|
85
|
+
},
|
|
86
|
+
}
|
|
87
|
+
output = nextroute.solve(input, options)
|
|
88
|
+
print(output)
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
Parameters
|
|
93
|
+
----------
|
|
94
|
+
input : Union[schema.Input, Dict[str, Any]]
|
|
95
|
+
The input to the Nextroute engine. If a dictionary is provided, it will
|
|
96
|
+
be converted to an Input object to validate it.
|
|
97
|
+
options : Union[Options, Dict[str, Any]]
|
|
98
|
+
The options for the Nextroute engine. If a dictionary is provided, it
|
|
99
|
+
will be converted to an Options object.
|
|
100
|
+
|
|
101
|
+
Returns
|
|
102
|
+
-------
|
|
103
|
+
schema.Output
|
|
104
|
+
The output of the Nextroute engine. You can call the `to_dict` method
|
|
105
|
+
on this object to get a dictionary representation of the output.
|
|
106
|
+
"""
|
|
107
|
+
|
|
108
|
+
if isinstance(input, dict):
|
|
109
|
+
input = Input.from_dict(input)
|
|
110
|
+
|
|
111
|
+
input_stream = json.dumps(input.to_dict())
|
|
112
|
+
|
|
113
|
+
if isinstance(options, dict):
|
|
114
|
+
options = Options.from_dict(options)
|
|
115
|
+
|
|
116
|
+
os_name = os.uname().sysname.lower()
|
|
117
|
+
if os_name not in SUPPORTED_OS:
|
|
118
|
+
raise Exception(f'unsupported operating system: "{os_name}", supported os are: {", ".join(SUPPORTED_OS)}')
|
|
119
|
+
|
|
120
|
+
architecture = os.uname().machine.lower()
|
|
121
|
+
if architecture not in SUPPORTED_ARCHITECTURES:
|
|
122
|
+
raise Exception(
|
|
123
|
+
f'unsupported architecture: "{architecture}", supported arch are: {", ".join(SUPPORTED_ARCHITECTURES)}'
|
|
124
|
+
)
|
|
125
|
+
|
|
126
|
+
binary_name = f"nextroute-{os_name}-{_ARCHITECTURE_TRANSLATION[architecture]}"
|
|
127
|
+
executable = os.path.join(os.path.dirname(__file__), "bin", binary_name)
|
|
128
|
+
if not os.path.exists(executable):
|
|
129
|
+
raise Exception(f"missing Nextroute binary: {executable}")
|
|
130
|
+
|
|
131
|
+
option_args = options.to_args()
|
|
132
|
+
args = [executable] + option_args
|
|
133
|
+
|
|
134
|
+
try:
|
|
135
|
+
result = subprocess.run(
|
|
136
|
+
args,
|
|
137
|
+
env=os.environ,
|
|
138
|
+
check=True,
|
|
139
|
+
text=True,
|
|
140
|
+
capture_output=True,
|
|
141
|
+
input=input_stream,
|
|
142
|
+
)
|
|
143
|
+
|
|
144
|
+
except subprocess.CalledProcessError as e:
|
|
145
|
+
raise Exception(f"error running Nextroute binary: {e.stderr}") from e
|
|
146
|
+
|
|
147
|
+
raw_output = result.stdout
|
|
148
|
+
output = Output.from_dict(json.loads(raw_output))
|
|
149
|
+
|
|
150
|
+
return output
|