nextroute 1.8.0.dev0__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.
Files changed (370) hide show
  1. nextroute-1.8.0.dev0/.github/workflows/go-test-lint.yml +33 -0
  2. nextroute-1.8.0.dev0/.github/workflows/header.yml +21 -0
  3. nextroute-1.8.0.dev0/.github/workflows/json-lint.yml +19 -0
  4. nextroute-1.8.0.dev0/.github/workflows/markdown-lint.yml +12 -0
  5. nextroute-1.8.0.dev0/.github/workflows/python-lint.yml +25 -0
  6. nextroute-1.8.0.dev0/.github/workflows/python-test.yml +25 -0
  7. nextroute-1.8.0.dev0/.github/workflows/release.yml +159 -0
  8. nextroute-1.8.0.dev0/.gitignore +166 -0
  9. nextroute-1.8.0.dev0/.golangci.yml +322 -0
  10. nextroute-1.8.0.dev0/.nextmv/add_header.py +27 -0
  11. nextroute-1.8.0.dev0/.nextmv/check_header.py +61 -0
  12. nextroute-1.8.0.dev0/.prettierrc.yml +1 -0
  13. nextroute-1.8.0.dev0/LICENSE +87 -0
  14. nextroute-1.8.0.dev0/PKG-INFO +245 -0
  15. nextroute-1.8.0.dev0/README.md +135 -0
  16. nextroute-1.8.0.dev0/VERSION +1 -0
  17. nextroute-1.8.0.dev0/check/check.go +413 -0
  18. nextroute-1.8.0.dev0/check/doc.go +21 -0
  19. nextroute-1.8.0.dev0/check/format.go +43 -0
  20. nextroute-1.8.0.dev0/check/observer.go +111 -0
  21. nextroute-1.8.0.dev0/check/options.go +11 -0
  22. nextroute-1.8.0.dev0/check/schema/schema.go +175 -0
  23. nextroute-1.8.0.dev0/check/schema.go +60 -0
  24. nextroute-1.8.0.dev0/cmd/.gitignore +6 -0
  25. nextroute-1.8.0.dev0/cmd/input.json +263 -0
  26. nextroute-1.8.0.dev0/cmd/main.go +71 -0
  27. nextroute-1.8.0.dev0/common/alias.go +127 -0
  28. nextroute-1.8.0.dev0/common/alias_test.go +53 -0
  29. nextroute-1.8.0.dev0/common/boundingbox.go +106 -0
  30. nextroute-1.8.0.dev0/common/boundingbox_test.go +118 -0
  31. nextroute-1.8.0.dev0/common/distance.go +78 -0
  32. nextroute-1.8.0.dev0/common/duration.go +71 -0
  33. nextroute-1.8.0.dev0/common/errors/errors.go +64 -0
  34. nextroute-1.8.0.dev0/common/fast_haversine.go +62 -0
  35. nextroute-1.8.0.dev0/common/haversine.go +50 -0
  36. nextroute-1.8.0.dev0/common/intersect.go +34 -0
  37. nextroute-1.8.0.dev0/common/location.go +121 -0
  38. nextroute-1.8.0.dev0/common/location_test.go +102 -0
  39. nextroute-1.8.0.dev0/common/nsmallest.go +74 -0
  40. nextroute-1.8.0.dev0/common/nsmallest_test.go +76 -0
  41. nextroute-1.8.0.dev0/common/rangecheck.go +186 -0
  42. nextroute-1.8.0.dev0/common/rangecheck_test.go +147 -0
  43. nextroute-1.8.0.dev0/common/slices.go +13 -0
  44. nextroute-1.8.0.dev0/common/speed.go +101 -0
  45. nextroute-1.8.0.dev0/common/statistics.go +134 -0
  46. nextroute-1.8.0.dev0/common/statistics_test.go +199 -0
  47. nextroute-1.8.0.dev0/common/utils.go +435 -0
  48. nextroute-1.8.0.dev0/common/utils_test.go +36 -0
  49. nextroute-1.8.0.dev0/doc.go +4 -0
  50. nextroute-1.8.0.dev0/factory/alternates.go +88 -0
  51. nextroute-1.8.0.dev0/factory/constraint_attributes.go +57 -0
  52. nextroute-1.8.0.dev0/factory/constraint_capacity.go +423 -0
  53. nextroute-1.8.0.dev0/factory/constraint_capacity_test.go +283 -0
  54. nextroute-1.8.0.dev0/factory/constraint_cluster.go +26 -0
  55. nextroute-1.8.0.dev0/factory/constraint_distance_limit.go +79 -0
  56. nextroute-1.8.0.dev0/factory/constraint_max_duration.go +52 -0
  57. nextroute-1.8.0.dev0/factory/constraint_max_stops.go +54 -0
  58. nextroute-1.8.0.dev0/factory/constraint_max_wait_stop.go +109 -0
  59. nextroute-1.8.0.dev0/factory/constraint_max_wait_vehicle.go +50 -0
  60. nextroute-1.8.0.dev0/factory/constraint_no_mix.go +143 -0
  61. nextroute-1.8.0.dev0/factory/constraint_shift.go +49 -0
  62. nextroute-1.8.0.dev0/factory/constraint_start_timewindows.go +249 -0
  63. nextroute-1.8.0.dev0/factory/construction.go +970 -0
  64. nextroute-1.8.0.dev0/factory/data.go +210 -0
  65. nextroute-1.8.0.dev0/factory/defaults.go +82 -0
  66. nextroute-1.8.0.dev0/factory/defaults_test.go +358 -0
  67. nextroute-1.8.0.dev0/factory/doc.go +13 -0
  68. nextroute-1.8.0.dev0/factory/duration_groups_expression.go +198 -0
  69. nextroute-1.8.0.dev0/factory/factory.go +170 -0
  70. nextroute-1.8.0.dev0/factory/format.go +304 -0
  71. nextroute-1.8.0.dev0/factory/group.go +43 -0
  72. nextroute-1.8.0.dev0/factory/initialsolution.go +68 -0
  73. nextroute-1.8.0.dev0/factory/model.go +59 -0
  74. nextroute-1.8.0.dev0/factory/objective_activation.go +42 -0
  75. nextroute-1.8.0.dev0/factory/objective_capacity.go +262 -0
  76. nextroute-1.8.0.dev0/factory/objective_cluster.go +24 -0
  77. nextroute-1.8.0.dev0/factory/objective_earliness_lateness.go +285 -0
  78. nextroute-1.8.0.dev0/factory/objective_min_stops.go +53 -0
  79. nextroute-1.8.0.dev0/factory/objective_travel_duration.go +23 -0
  80. nextroute-1.8.0.dev0/factory/objective_unplanned.go +110 -0
  81. nextroute-1.8.0.dev0/factory/objective_vehicles_duration.go +24 -0
  82. nextroute-1.8.0.dev0/factory/plan_units.go +255 -0
  83. nextroute-1.8.0.dev0/factory/precedence.go +160 -0
  84. nextroute-1.8.0.dev0/factory/services.go +255 -0
  85. nextroute-1.8.0.dev0/factory/stops.go +42 -0
  86. nextroute-1.8.0.dev0/factory/validate.go +939 -0
  87. nextroute-1.8.0.dev0/factory/vehicles.go +211 -0
  88. nextroute-1.8.0.dev0/go.mod +22 -0
  89. nextroute-1.8.0.dev0/go.sum +828 -0
  90. nextroute-1.8.0.dev0/model.go +814 -0
  91. nextroute-1.8.0.dev0/model_checkedat.go +55 -0
  92. nextroute-1.8.0.dev0/model_cluster.go +295 -0
  93. nextroute-1.8.0.dev0/model_complexity.go +53 -0
  94. nextroute-1.8.0.dev0/model_constraint.go +154 -0
  95. nextroute-1.8.0.dev0/model_constraint_attributes.go +176 -0
  96. nextroute-1.8.0.dev0/model_constraint_attributes_test.go +591 -0
  97. nextroute-1.8.0.dev0/model_constraint_cluster_test.go +278 -0
  98. nextroute-1.8.0.dev0/model_constraint_maximum_duration.go +106 -0
  99. nextroute-1.8.0.dev0/model_constraint_maximum_duration_test.go +173 -0
  100. nextroute-1.8.0.dev0/model_constraint_maximum_stops.go +80 -0
  101. nextroute-1.8.0.dev0/model_constraint_maximum_stops_test.go +299 -0
  102. nextroute-1.8.0.dev0/model_constraint_maximum_test.go +634 -0
  103. nextroute-1.8.0.dev0/model_constraint_maximum_travel_duration.go +103 -0
  104. nextroute-1.8.0.dev0/model_constraint_maximum_wait_stop.go +114 -0
  105. nextroute-1.8.0.dev0/model_constraint_maximum_wait_stop_test.go +174 -0
  106. nextroute-1.8.0.dev0/model_constraint_maximum_wait_vehicle.go +149 -0
  107. nextroute-1.8.0.dev0/model_constraint_maximum_wait_vehicle_test.go +168 -0
  108. nextroute-1.8.0.dev0/model_constraint_no_mix.go +412 -0
  109. nextroute-1.8.0.dev0/model_constraint_no_mix_test.go +892 -0
  110. nextroute-1.8.0.dev0/model_constraint_successor_test.go +492 -0
  111. nextroute-1.8.0.dev0/model_constraint_successors.go +101 -0
  112. nextroute-1.8.0.dev0/model_data.go +30 -0
  113. nextroute-1.8.0.dev0/model_directed_acyclic_graph.go +354 -0
  114. nextroute-1.8.0.dev0/model_directed_acyclic_graph_test.go +407 -0
  115. nextroute-1.8.0.dev0/model_expression.go +41 -0
  116. nextroute-1.8.0.dev0/model_expression_binary.go +97 -0
  117. nextroute-1.8.0.dev0/model_expression_composed.go +126 -0
  118. nextroute-1.8.0.dev0/model_expression_custom.go +830 -0
  119. nextroute-1.8.0.dev0/model_expression_duration.go +518 -0
  120. nextroute-1.8.0.dev0/model_expression_haversine.go +66 -0
  121. nextroute-1.8.0.dev0/model_expression_measure_byindex.go +59 -0
  122. nextroute-1.8.0.dev0/model_expression_measure_bypoint.go +61 -0
  123. nextroute-1.8.0.dev0/model_expression_sum.go +104 -0
  124. nextroute-1.8.0.dev0/model_expression_time.go +212 -0
  125. nextroute-1.8.0.dev0/model_expression_time_dependent.go +597 -0
  126. nextroute-1.8.0.dev0/model_expression_time_dependent_test.go +319 -0
  127. nextroute-1.8.0.dev0/model_expression_unary.go +88 -0
  128. nextroute-1.8.0.dev0/model_haversine.go +23 -0
  129. nextroute-1.8.0.dev0/model_identifier.go +11 -0
  130. nextroute-1.8.0.dev0/model_latest.go +332 -0
  131. nextroute-1.8.0.dev0/model_latest_test.go +324 -0
  132. nextroute-1.8.0.dev0/model_maximum.go +438 -0
  133. nextroute-1.8.0.dev0/model_objective.go +185 -0
  134. nextroute-1.8.0.dev0/model_objective_cluster_test.go +179 -0
  135. nextroute-1.8.0.dev0/model_objective_earliness.go +223 -0
  136. nextroute-1.8.0.dev0/model_objective_earliness_test.go +63 -0
  137. nextroute-1.8.0.dev0/model_objective_expression.go +89 -0
  138. nextroute-1.8.0.dev0/model_objective_expression_test.go +159 -0
  139. nextroute-1.8.0.dev0/model_objective_min_stops.go +73 -0
  140. nextroute-1.8.0.dev0/model_objective_term.go +34 -0
  141. nextroute-1.8.0.dev0/model_objective_travelduration.go +38 -0
  142. nextroute-1.8.0.dev0/model_objective_travelduration_test.go +48 -0
  143. nextroute-1.8.0.dev0/model_objective_unplanned.go +96 -0
  144. nextroute-1.8.0.dev0/model_objective_vehicles.go +66 -0
  145. nextroute-1.8.0.dev0/model_objective_vehicles_duration.go +125 -0
  146. nextroute-1.8.0.dev0/model_plan_stops_unit.go +196 -0
  147. nextroute-1.8.0.dev0/model_plan_stops_unit_test.go +155 -0
  148. nextroute-1.8.0.dev0/model_plan_unit.go +25 -0
  149. nextroute-1.8.0.dev0/model_plan_units_unit.go +148 -0
  150. nextroute-1.8.0.dev0/model_plan_units_unit_test.go +386 -0
  151. nextroute-1.8.0.dev0/model_statistics.go +288 -0
  152. nextroute-1.8.0.dev0/model_stop.go +322 -0
  153. nextroute-1.8.0.dev0/model_stop_test.go +64 -0
  154. nextroute-1.8.0.dev0/model_stops_distance_queries.go +198 -0
  155. nextroute-1.8.0.dev0/model_stops_distance_queries_test.go +187 -0
  156. nextroute-1.8.0.dev0/model_test.go +457 -0
  157. nextroute-1.8.0.dev0/model_vehicle.go +193 -0
  158. nextroute-1.8.0.dev0/model_vehicle_test.go +56 -0
  159. nextroute-1.8.0.dev0/model_vehicle_type.go +160 -0
  160. nextroute-1.8.0.dev0/nextroute/__about__.py +3 -0
  161. nextroute-1.8.0.dev0/nextroute/__init__.py +14 -0
  162. nextroute-1.8.0.dev0/nextroute/base_model.py +24 -0
  163. nextroute-1.8.0.dev0/nextroute/check/__init__.py +28 -0
  164. nextroute-1.8.0.dev0/nextroute/check/schema.py +145 -0
  165. nextroute-1.8.0.dev0/nextroute/schema/__init__.py +29 -0
  166. nextroute-1.8.0.dev0/nextroute/schema/input.py +56 -0
  167. nextroute-1.8.0.dev0/nextroute/schema/location.py +16 -0
  168. nextroute-1.8.0.dev0/nextroute/schema/output.py +140 -0
  169. nextroute-1.8.0.dev0/nextroute/schema/statistics.py +149 -0
  170. nextroute-1.8.0.dev0/nextroute/schema/stop.py +65 -0
  171. nextroute-1.8.0.dev0/nextroute/schema/vehicle.py +72 -0
  172. nextroute-1.8.0.dev0/nextroute.code-workspace +33 -0
  173. nextroute-1.8.0.dev0/observers/doc.go +7 -0
  174. nextroute-1.8.0.dev0/observers/performance_observer.go +473 -0
  175. nextroute-1.8.0.dev0/observers/solve_observer.go +487 -0
  176. nextroute-1.8.0.dev0/observers/solve_performance_observer.go +150 -0
  177. nextroute-1.8.0.dev0/pyproject.toml +63 -0
  178. nextroute-1.8.0.dev0/requirements.txt +4 -0
  179. nextroute-1.8.0.dev0/schema/custom_data.go +39 -0
  180. nextroute-1.8.0.dev0/schema/custom_data_test.go +49 -0
  181. nextroute-1.8.0.dev0/schema/input.go +243 -0
  182. nextroute-1.8.0.dev0/schema/output.go +132 -0
  183. nextroute-1.8.0.dev0/solution.go +1363 -0
  184. nextroute-1.8.0.dev0/solution_construcation_sweep_test.go +71 -0
  185. nextroute-1.8.0.dev0/solution_construction_random.go +91 -0
  186. nextroute-1.8.0.dev0/solution_construction_sweep.go +110 -0
  187. nextroute-1.8.0.dev0/solution_format.go +127 -0
  188. nextroute-1.8.0.dev0/solution_initial_observer.go +107 -0
  189. nextroute-1.8.0.dev0/solution_initial_stops_test.go +243 -0
  190. nextroute-1.8.0.dev0/solution_move.go +166 -0
  191. nextroute-1.8.0.dev0/solution_move_stops.go +638 -0
  192. nextroute-1.8.0.dev0/solution_move_stops_generator.go +274 -0
  193. nextroute-1.8.0.dev0/solution_move_stops_generator_test.go +879 -0
  194. nextroute-1.8.0.dev0/solution_move_stops_test.go +125 -0
  195. nextroute-1.8.0.dev0/solution_move_test.go +274 -0
  196. nextroute-1.8.0.dev0/solution_move_units.go +150 -0
  197. nextroute-1.8.0.dev0/solution_observer.go +380 -0
  198. nextroute-1.8.0.dev0/solution_plan_stops_unit.go +234 -0
  199. nextroute-1.8.0.dev0/solution_plan_unit.go +85 -0
  200. nextroute-1.8.0.dev0/solution_plan_unit_collection.go +164 -0
  201. nextroute-1.8.0.dev0/solution_plan_unit_collection_test.go +74 -0
  202. nextroute-1.8.0.dev0/solution_plan_units_unit.go +150 -0
  203. nextroute-1.8.0.dev0/solution_position_hint.go +104 -0
  204. nextroute-1.8.0.dev0/solution_sequence_generator.go +145 -0
  205. nextroute-1.8.0.dev0/solution_sequence_generator_test.go +315 -0
  206. nextroute-1.8.0.dev0/solution_stop.go +368 -0
  207. nextroute-1.8.0.dev0/solution_stop_generator.go +155 -0
  208. nextroute-1.8.0.dev0/solution_stop_generator_test.go +822 -0
  209. nextroute-1.8.0.dev0/solution_stop_position.go +107 -0
  210. nextroute-1.8.0.dev0/solution_test.go +76 -0
  211. nextroute-1.8.0.dev0/solution_unplan.go +79 -0
  212. nextroute-1.8.0.dev0/solution_vehicle.go +634 -0
  213. nextroute-1.8.0.dev0/solution_vehicle_test.go +88 -0
  214. nextroute-1.8.0.dev0/solve_events.go +131 -0
  215. nextroute-1.8.0.dev0/solve_information.go +52 -0
  216. nextroute-1.8.0.dev0/solve_operator.go +116 -0
  217. nextroute-1.8.0.dev0/solve_operator_and.go +118 -0
  218. nextroute-1.8.0.dev0/solve_operator_or.go +120 -0
  219. nextroute-1.8.0.dev0/solve_operator_plan.go +98 -0
  220. nextroute-1.8.0.dev0/solve_operator_restart.go +70 -0
  221. nextroute-1.8.0.dev0/solve_operator_unplan.go +273 -0
  222. nextroute-1.8.0.dev0/solve_operator_unplan_clusters.go +87 -0
  223. nextroute-1.8.0.dev0/solve_operator_unplan_location.go +103 -0
  224. nextroute-1.8.0.dev0/solve_operator_unplan_vehicles.go +105 -0
  225. nextroute-1.8.0.dev0/solve_parallel_events.go +35 -0
  226. nextroute-1.8.0.dev0/solve_parameters.go +146 -0
  227. nextroute-1.8.0.dev0/solve_progressioner.go +17 -0
  228. nextroute-1.8.0.dev0/solve_solution_channel.go +36 -0
  229. nextroute-1.8.0.dev0/solve_solver.go +320 -0
  230. nextroute-1.8.0.dev0/solve_solver_parallel.go +479 -0
  231. nextroute-1.8.0.dev0/solver.go +233 -0
  232. nextroute-1.8.0.dev0/solver_parallel.go +142 -0
  233. nextroute-1.8.0.dev0/tests/__init__.py +1 -0
  234. nextroute-1.8.0.dev0/tests/check/input.json +39 -0
  235. nextroute-1.8.0.dev0/tests/check/input.json.golden +529 -0
  236. nextroute-1.8.0.dev0/tests/check/main.go +69 -0
  237. nextroute-1.8.0.dev0/tests/check/main_test.go +45 -0
  238. nextroute-1.8.0.dev0/tests/custom_constraint/input.json +68 -0
  239. nextroute-1.8.0.dev0/tests/custom_constraint/input.json.golden +270 -0
  240. nextroute-1.8.0.dev0/tests/custom_constraint/main.go +117 -0
  241. nextroute-1.8.0.dev0/tests/custom_constraint/main_test.go +44 -0
  242. nextroute-1.8.0.dev0/tests/custom_matrices/input.json +49 -0
  243. nextroute-1.8.0.dev0/tests/custom_matrices/input.json.golden +271 -0
  244. nextroute-1.8.0.dev0/tests/custom_matrices/main.go +119 -0
  245. nextroute-1.8.0.dev0/tests/custom_matrices/main_test.go +45 -0
  246. nextroute-1.8.0.dev0/tests/custom_objective/input.json +50 -0
  247. nextroute-1.8.0.dev0/tests/custom_objective/input.json.golden +251 -0
  248. nextroute-1.8.0.dev0/tests/custom_objective/main.go +174 -0
  249. nextroute-1.8.0.dev0/tests/custom_objective/main_test.go +44 -0
  250. nextroute-1.8.0.dev0/tests/custom_operators/input.json +49 -0
  251. nextroute-1.8.0.dev0/tests/custom_operators/input.json.golden +257 -0
  252. nextroute-1.8.0.dev0/tests/custom_operators/main.go +188 -0
  253. nextroute-1.8.0.dev0/tests/custom_operators/main_test.go +45 -0
  254. nextroute-1.8.0.dev0/tests/custom_output/input.json +49 -0
  255. nextroute-1.8.0.dev0/tests/custom_output/input.json.golden +4 -0
  256. nextroute-1.8.0.dev0/tests/custom_output/main.go +74 -0
  257. nextroute-1.8.0.dev0/tests/custom_output/main_test.go +45 -0
  258. nextroute-1.8.0.dev0/tests/golden/benchmark_test.go +71 -0
  259. nextroute-1.8.0.dev0/tests/golden/main_test.go +56 -0
  260. nextroute-1.8.0.dev0/tests/golden/testdata/activation_penalty.json +47 -0
  261. nextroute-1.8.0.dev0/tests/golden/testdata/activation_penalty.json.golden +239 -0
  262. nextroute-1.8.0.dev0/tests/golden/testdata/alternates.json +56 -0
  263. nextroute-1.8.0.dev0/tests/golden/testdata/alternates.json.golden +278 -0
  264. nextroute-1.8.0.dev0/tests/golden/testdata/basic.json +39 -0
  265. nextroute-1.8.0.dev0/tests/golden/testdata/basic.json.golden +228 -0
  266. nextroute-1.8.0.dev0/tests/golden/testdata/capacity.json +76 -0
  267. nextroute-1.8.0.dev0/tests/golden/testdata/capacity.json.golden +245 -0
  268. nextroute-1.8.0.dev0/tests/golden/testdata/compatibility_attributes.json +62 -0
  269. nextroute-1.8.0.dev0/tests/golden/testdata/compatibility_attributes.json.golden +265 -0
  270. nextroute-1.8.0.dev0/tests/golden/testdata/complex_precedence.json +274 -0
  271. nextroute-1.8.0.dev0/tests/golden/testdata/complex_precedence.json.golden +474 -0
  272. nextroute-1.8.0.dev0/tests/golden/testdata/custom_data.json +67 -0
  273. nextroute-1.8.0.dev0/tests/golden/testdata/custom_data.json.golden +256 -0
  274. nextroute-1.8.0.dev0/tests/golden/testdata/defaults.json +79 -0
  275. nextroute-1.8.0.dev0/tests/golden/testdata/defaults.json.golden +420 -0
  276. nextroute-1.8.0.dev0/tests/golden/testdata/direct_precedence.json +45 -0
  277. nextroute-1.8.0.dev0/tests/golden/testdata/direct_precedence.json.golden +217 -0
  278. nextroute-1.8.0.dev0/tests/golden/testdata/direct_precedence_linked.json +46 -0
  279. nextroute-1.8.0.dev0/tests/golden/testdata/direct_precedence_linked.json.golden +217 -0
  280. nextroute-1.8.0.dev0/tests/golden/testdata/distance_matrix.json +35 -0
  281. nextroute-1.8.0.dev0/tests/golden/testdata/distance_matrix.json.golden +170 -0
  282. nextroute-1.8.0.dev0/tests/golden/testdata/duration_groups.json +60 -0
  283. nextroute-1.8.0.dev0/tests/golden/testdata/duration_groups.json.golden +232 -0
  284. nextroute-1.8.0.dev0/tests/golden/testdata/duration_groups_with_stop_multiplier.json +61 -0
  285. nextroute-1.8.0.dev0/tests/golden/testdata/duration_groups_with_stop_multiplier.json.golden +232 -0
  286. nextroute-1.8.0.dev0/tests/golden/testdata/duration_matrix.json +28 -0
  287. nextroute-1.8.0.dev0/tests/golden/testdata/duration_matrix.json.golden +165 -0
  288. nextroute-1.8.0.dev0/tests/golden/testdata/early_arrival_penalty.json +57 -0
  289. nextroute-1.8.0.dev0/tests/golden/testdata/early_arrival_penalty.json.golden +259 -0
  290. nextroute-1.8.0.dev0/tests/golden/testdata/initial_stops.json +59 -0
  291. nextroute-1.8.0.dev0/tests/golden/testdata/initial_stops.json.golden +245 -0
  292. nextroute-1.8.0.dev0/tests/golden/testdata/initial_stops_infeasible_compatibility.json +60 -0
  293. nextroute-1.8.0.dev0/tests/golden/testdata/initial_stops_infeasible_compatibility.json.golden +240 -0
  294. nextroute-1.8.0.dev0/tests/golden/testdata/initial_stops_infeasible_compatibility.md +13 -0
  295. nextroute-1.8.0.dev0/tests/golden/testdata/initial_stops_infeasible_max_duration.json +46 -0
  296. nextroute-1.8.0.dev0/tests/golden/testdata/initial_stops_infeasible_max_duration.json.golden +210 -0
  297. nextroute-1.8.0.dev0/tests/golden/testdata/initial_stops_infeasible_max_duration.md +13 -0
  298. nextroute-1.8.0.dev0/tests/golden/testdata/initial_stops_infeasible_remove_all.json +32 -0
  299. nextroute-1.8.0.dev0/tests/golden/testdata/initial_stops_infeasible_remove_all.json.golden +148 -0
  300. nextroute-1.8.0.dev0/tests/golden/testdata/initial_stops_infeasible_remove_all.md +10 -0
  301. nextroute-1.8.0.dev0/tests/golden/testdata/initial_stops_infeasible_temporal.json +51 -0
  302. nextroute-1.8.0.dev0/tests/golden/testdata/initial_stops_infeasible_temporal.json.golden +236 -0
  303. nextroute-1.8.0.dev0/tests/golden/testdata/initial_stops_infeasible_temporal.md +18 -0
  304. nextroute-1.8.0.dev0/tests/golden/testdata/initial_stops_infeasible_tuple.json +50 -0
  305. nextroute-1.8.0.dev0/tests/golden/testdata/initial_stops_infeasible_tuple.json.golden +190 -0
  306. nextroute-1.8.0.dev0/tests/golden/testdata/initial_stops_infeasible_tuple.md +13 -0
  307. nextroute-1.8.0.dev0/tests/golden/testdata/late_arrival_penalty.json +58 -0
  308. nextroute-1.8.0.dev0/tests/golden/testdata/late_arrival_penalty.json.golden +269 -0
  309. nextroute-1.8.0.dev0/tests/golden/testdata/max_distance.json +50 -0
  310. nextroute-1.8.0.dev0/tests/golden/testdata/max_distance.json.golden +207 -0
  311. nextroute-1.8.0.dev0/tests/golden/testdata/max_duration.json +52 -0
  312. nextroute-1.8.0.dev0/tests/golden/testdata/max_duration.json.golden +235 -0
  313. nextroute-1.8.0.dev0/tests/golden/testdata/max_stops.json +50 -0
  314. nextroute-1.8.0.dev0/tests/golden/testdata/max_stops.json.golden +213 -0
  315. nextroute-1.8.0.dev0/tests/golden/testdata/max_wait_stop.json +41 -0
  316. nextroute-1.8.0.dev0/tests/golden/testdata/max_wait_stop.json.golden +176 -0
  317. nextroute-1.8.0.dev0/tests/golden/testdata/max_wait_stop.md +23 -0
  318. nextroute-1.8.0.dev0/tests/golden/testdata/max_wait_vehicle.json +58 -0
  319. nextroute-1.8.0.dev0/tests/golden/testdata/max_wait_vehicle.json.golden +228 -0
  320. nextroute-1.8.0.dev0/tests/golden/testdata/max_wait_vehicle.md +27 -0
  321. nextroute-1.8.0.dev0/tests/golden/testdata/min_stops.json +74 -0
  322. nextroute-1.8.0.dev0/tests/golden/testdata/min_stops.json.golden +228 -0
  323. nextroute-1.8.0.dev0/tests/golden/testdata/multi_window.json +36 -0
  324. nextroute-1.8.0.dev0/tests/golden/testdata/multi_window.json.golden +175 -0
  325. nextroute-1.8.0.dev0/tests/golden/testdata/multi_window.md +17 -0
  326. nextroute-1.8.0.dev0/tests/golden/testdata/no_mix.json +77 -0
  327. nextroute-1.8.0.dev0/tests/golden/testdata/no_mix.json.golden +259 -0
  328. nextroute-1.8.0.dev0/tests/golden/testdata/no_mix_null.json +96 -0
  329. nextroute-1.8.0.dev0/tests/golden/testdata/no_mix_null.json.golden +278 -0
  330. nextroute-1.8.0.dev0/tests/golden/testdata/no_mix_null.md +19 -0
  331. nextroute-1.8.0.dev0/tests/golden/testdata/precedence.json +45 -0
  332. nextroute-1.8.0.dev0/tests/golden/testdata/precedence.json.golden +217 -0
  333. nextroute-1.8.0.dev0/tests/golden/testdata/precedence_pathologic.json +74 -0
  334. nextroute-1.8.0.dev0/tests/golden/testdata/precedence_pathologic.json.golden +292 -0
  335. nextroute-1.8.0.dev0/tests/golden/testdata/start_level.json +54 -0
  336. nextroute-1.8.0.dev0/tests/golden/testdata/start_level.json.golden +230 -0
  337. nextroute-1.8.0.dev0/tests/golden/testdata/start_level.md +13 -0
  338. nextroute-1.8.0.dev0/tests/golden/testdata/start_time_window.json +56 -0
  339. nextroute-1.8.0.dev0/tests/golden/testdata/start_time_window.json.golden +258 -0
  340. nextroute-1.8.0.dev0/tests/golden/testdata/stop_duration.json +44 -0
  341. nextroute-1.8.0.dev0/tests/golden/testdata/stop_duration.json.golden +257 -0
  342. nextroute-1.8.0.dev0/tests/golden/testdata/stop_duration_multiplier.json +45 -0
  343. nextroute-1.8.0.dev0/tests/golden/testdata/stop_duration_multiplier.json.golden +257 -0
  344. nextroute-1.8.0.dev0/tests/golden/testdata/stop_groups.json +65 -0
  345. nextroute-1.8.0.dev0/tests/golden/testdata/stop_groups.json.golden +262 -0
  346. nextroute-1.8.0.dev0/tests/golden/testdata/template_input.json +263 -0
  347. nextroute-1.8.0.dev0/tests/golden/testdata/template_input.json.golden +627 -0
  348. nextroute-1.8.0.dev0/tests/golden/testdata/unplanned_penalty.json +52 -0
  349. nextroute-1.8.0.dev0/tests/golden/testdata/unplanned_penalty.json.golden +206 -0
  350. nextroute-1.8.0.dev0/tests/golden/testdata/vehicle_start_end_location.json +63 -0
  351. nextroute-1.8.0.dev0/tests/golden/testdata/vehicle_start_end_location.json.golden +269 -0
  352. nextroute-1.8.0.dev0/tests/golden/testdata/vehicle_start_end_time.json +75 -0
  353. nextroute-1.8.0.dev0/tests/golden/testdata/vehicle_start_end_time.json.golden +317 -0
  354. nextroute-1.8.0.dev0/tests/golden/testdata/vehicles_duration_objective.json +26 -0
  355. nextroute-1.8.0.dev0/tests/golden/testdata/vehicles_duration_objective.json.golden +179 -0
  356. nextroute-1.8.0.dev0/tests/inline_options/input.json +39 -0
  357. nextroute-1.8.0.dev0/tests/inline_options/input.json.golden +234 -0
  358. nextroute-1.8.0.dev0/tests/inline_options/main.go +75 -0
  359. nextroute-1.8.0.dev0/tests/inline_options/main_test.go +44 -0
  360. nextroute-1.8.0.dev0/tests/nextroute_python/__init__.py +1 -0
  361. nextroute-1.8.0.dev0/tests/nextroute_python/schema/__init__.py +1 -0
  362. nextroute-1.8.0.dev0/tests/nextroute_python/schema/input.json +263 -0
  363. nextroute-1.8.0.dev0/tests/nextroute_python/schema/output.json +851 -0
  364. nextroute-1.8.0.dev0/tests/nextroute_python/schema/output_with_check.json +954 -0
  365. nextroute-1.8.0.dev0/tests/nextroute_python/schema/test_input.py +59 -0
  366. nextroute-1.8.0.dev0/tests/nextroute_python/schema/test_output.py +318 -0
  367. nextroute-1.8.0.dev0/tests/output_options/main.sh +8 -0
  368. nextroute-1.8.0.dev0/tests/output_options/main.sh.golden +70 -0
  369. nextroute-1.8.0.dev0/tests/output_options/main_test.go +35 -0
  370. nextroute-1.8.0.dev0/version.go +16 -0
@@ -0,0 +1,33 @@
1
+ name: go
2
+ on: [push]
3
+
4
+ env:
5
+ GO_VERSION: 1.22.0
6
+
7
+ jobs:
8
+ # Job for running go linter
9
+ go-lint:
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - name: git clone
13
+ uses: actions/checkout@v4
14
+ - name: set up go
15
+ uses: actions/setup-go@v5
16
+ with:
17
+ go-version: ${{ env.GO_VERSION }}
18
+ - name: golangci-lint
19
+ uses: golangci/golangci-lint-action@v4
20
+ with:
21
+ version: v1.56.2
22
+ # Job for running tests
23
+ go-test:
24
+ runs-on: ubuntu-latest
25
+ steps:
26
+ - name: git clone
27
+ uses: actions/checkout@v4
28
+ - name: set up go
29
+ uses: actions/setup-go@v5
30
+ with:
31
+ go-version: ${{ env.GO_VERSION }}
32
+ - name: go test
33
+ run: go test ./...
@@ -0,0 +1,21 @@
1
+ name: header
2
+ on: [push]
3
+ jobs:
4
+ check-header:
5
+ runs-on: ubuntu-latest
6
+ strategy:
7
+ fail-fast: false
8
+ matrix:
9
+ language: ["go", "python"]
10
+ steps:
11
+ - name: git clone
12
+ uses: actions/checkout@v4
13
+
14
+ - name: set up Python
15
+ uses: actions/setup-python@v5
16
+ with:
17
+ python-version: "3.12"
18
+
19
+ - name: check header in ${{ matrix.language }} files
20
+ run: |
21
+ HEADER_CHECK_LANGUAGE=${{ matrix.language }} python .nextmv/check_header.py
@@ -0,0 +1,19 @@
1
+ name: json
2
+ on: [push]
3
+ jobs:
4
+ json-lint:
5
+ runs-on: ubuntu-latest
6
+ steps:
7
+ - name: git clone
8
+ uses: actions/checkout@v4
9
+
10
+ - name: set up node
11
+ uses: actions/setup-node@v4
12
+ with:
13
+ node-version: 18.8
14
+
15
+ - name: install prettier
16
+ run: npm install prettier@v2.7.1 --global
17
+
18
+ - name: lint .json files with prettier
19
+ run: prettier -c "**/*.json"
@@ -0,0 +1,12 @@
1
+ name: markdown
2
+ on: [push]
3
+ jobs:
4
+ markdown-lint:
5
+ runs-on: ubuntu-latest
6
+ steps:
7
+ - name: git clone
8
+ uses: actions/checkout@v4
9
+
10
+ - uses: DavidAnson/markdownlint-cli2-action@v7
11
+ with:
12
+ globs: "**/*.md"
@@ -0,0 +1,25 @@
1
+ name: python lint
2
+ on: [push]
3
+ jobs:
4
+ python-lint:
5
+ runs-on: ubuntu-latest
6
+ strategy:
7
+ fail-fast: false
8
+ matrix:
9
+ python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
10
+ steps:
11
+ - name: git clone
12
+ uses: actions/checkout@v4
13
+
14
+ - name: set up Python ${{ matrix.python-version }}
15
+ uses: actions/setup-python@v5
16
+ with:
17
+ python-version: ${{ matrix.python-version }}
18
+
19
+ - name: install dependencies
20
+ run: |
21
+ python -m pip install --upgrade pip
22
+ pip install -r requirements.txt
23
+
24
+ - name: lint with ruff
25
+ run: ruff check --output-format=github .
@@ -0,0 +1,25 @@
1
+ name: python test
2
+ on: [push]
3
+ jobs:
4
+ python-test:
5
+ runs-on: ubuntu-latest
6
+ strategy:
7
+ fail-fast: false
8
+ matrix:
9
+ python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
10
+ steps:
11
+ - name: git clone
12
+ uses: actions/checkout@v4
13
+
14
+ - name: set up Python ${{ matrix.python-version }}
15
+ uses: actions/setup-python@v5
16
+ with:
17
+ python-version: ${{ matrix.python-version }}
18
+
19
+ - name: install dependencies
20
+ run: |
21
+ python -m pip install --upgrade pip
22
+ pip install -r requirements.txt
23
+
24
+ - name: unit tests
25
+ run: python -m unittest
@@ -0,0 +1,159 @@
1
+ name: release
2
+ run-name: Release ${{ inputs.VERSION }} (pre-release - ${{ inputs.IS_PRE_RELEASE }}) by @${{ github.actor }} from ${{ github.ref_name }}
3
+
4
+ on:
5
+ workflow_dispatch:
6
+ inputs:
7
+ VERSION:
8
+ description: "The version to release"
9
+ required: true
10
+ IS_PRE_RELEASE:
11
+ description: "It IS a pre-release"
12
+ required: true
13
+ default: true
14
+ type: boolean
15
+
16
+ jobs:
17
+ bump:
18
+ runs-on: ubuntu-latest
19
+ env:
20
+ VERSION: ${{ inputs.VERSION }}
21
+ GH_TOKEN: ${{ github.token }}
22
+ SSH_AUTH_SOCK: /tmp/ssh_agent.sock
23
+ permissions:
24
+ contents: write
25
+ steps:
26
+ - name: ensure version is not already released
27
+ run: |
28
+ if git ls-remote --tags origin | grep -q "refs/tags/$VERSION"; then
29
+ echo "Version $VERSION already exists"
30
+ exit 1
31
+ fi
32
+
33
+ - name: set up Python
34
+ uses: actions/setup-python@v5
35
+ with:
36
+ python-version: "3.12"
37
+
38
+ - name: install dependencies
39
+ run: |
40
+ pip install --upgrade pip
41
+ pip install build hatch
42
+
43
+ - name: configure git with the bot credentials
44
+ run: |
45
+ mkdir -p ~/.ssh
46
+ ssh-keyscan github.com >> ~/.ssh/known_hosts
47
+ ssh-agent -a $SSH_AUTH_SOCK > /dev/null
48
+ ssh-add - <<< "${{ secrets.NEXTMVBOT_SSH_KEY }}"
49
+
50
+ echo "${{ secrets.NEXTMVBOT_SIGNING_KEY }}" > ~/.ssh/signing.key
51
+ chmod 600 ~/.ssh/signing.key
52
+
53
+ git config --global user.name "nextmv-bot"
54
+ git config --global user.email "tech+gh-nextmv-bot@nextmv.io"
55
+ git config --global gpg.format ssh
56
+ git config --global user.signingkey ~/.ssh/signing.key
57
+
58
+ git clone git@github.com:nextmv-io/nextroute.git
59
+
60
+ cd nextroute
61
+ git checkout ${{ github.ref_name }}
62
+
63
+ git rev-parse --short HEAD
64
+
65
+ - name: bump version in version file for Go
66
+ run: |
67
+ echo $VERSION > VERSION
68
+ working-directory: ./nextroute
69
+
70
+ - name: upgrade version with hatch for Python
71
+ run: hatch version ${{ env.VERSION }}
72
+ working-directory: ./nextroute
73
+
74
+ - name: commit version bump
75
+ run: |
76
+ git add VERSION
77
+ git add nextroute/__about__.py
78
+
79
+ git commit -S -m "Bump version to $VERSION"
80
+ git push
81
+
82
+ git tag $VERSION
83
+ git push origin $VERSION
84
+ working-directory: ./nextroute
85
+
86
+ - name: create release
87
+ run: |
88
+ PRERELEASE_FLAG=""
89
+ if [ ${{ inputs.IS_PRE_RELEASE }} = true ]; then
90
+ PRERELEASE_FLAG="--prerelease"
91
+ fi
92
+
93
+ gh release create $VERSION \
94
+ --verify-tag \
95
+ --generate-notes \
96
+ --title $VERSION $PRERELEASE_FLAG
97
+ working-directory: ./nextroute
98
+
99
+ - name: ensure passing build for Python
100
+ run: python -m build
101
+ working-directory: ./nextroute
102
+
103
+ release: # This job is used to publish the release to PyPI/TestPyPI
104
+ runs-on: ubuntu-latest
105
+ needs: bump
106
+ strategy:
107
+ matrix:
108
+ include:
109
+ - target-env: pypi
110
+ target-url: https://pypi.org/p/nextroute
111
+ - target-env: testpypi
112
+ target-url: https://test.pypi.org/p/nextroute
113
+ environment:
114
+ name: ${{ matrix.target-env }}
115
+ url: ${{ matrix.target-url }}
116
+ permissions:
117
+ contents: read
118
+ id-token: write # This is required for trusted publishing to PyPI
119
+ steps:
120
+ - name: git clone ${{ github.ref_name }}
121
+ uses: actions/checkout@v4
122
+ with:
123
+ ref: ${{ github.ref_name }}
124
+
125
+ - name: set up Python
126
+ uses: actions/setup-python@v5
127
+ with:
128
+ python-version: "3.12"
129
+
130
+ - name: install dependencies
131
+ run: |
132
+ pip install --upgrade pip
133
+ pip install build hatch
134
+
135
+ - name: build binary wheel and source tarball
136
+ run: python -m build
137
+
138
+ - name: Publish package distributions to PyPI
139
+ if: ${{ matrix.target-env == 'pypi' }}
140
+ uses: pypa/gh-action-pypi-publish@release/v1
141
+ with:
142
+ packages-dir: ./dist
143
+
144
+ - name: Publish package distributions to TestPyPI
145
+ if: ${{ matrix.target-env == 'testpypi' }}
146
+ uses: pypa/gh-action-pypi-publish@release/v1
147
+ with:
148
+ repository-url: https://test.pypi.org/legacy/
149
+ packages-dir: ./dist
150
+
151
+ notify:
152
+ runs-on: ubuntu-latest
153
+ needs: release
154
+ if: ${{ needs.release.result == 'success' && inputs.IS_PRE_RELEASE == false }}
155
+ steps:
156
+ - name: notify slack
157
+ run: |
158
+ export DATA="{\"text\":\"Release notification - nextroute ${{ inputs.VERSION }} (see <https://github.com/nextmv-io/nextroute/releases/${{ inputs.VERSION }}|release notes> / <https://pypi.org/project/nextroute|PyPI>)\"}"
159
+ curl -X POST -H 'Content-type: application/json' --data "$DATA" ${{ secrets.SLACK_URL_MISSION_CONTROL }}
@@ -0,0 +1,166 @@
1
+ *.html
2
+ *.png
3
+
4
+ # Byte-compiled / optimized / DLL files
5
+ __pycache__/
6
+ *.py[cod]
7
+ *$py.class
8
+
9
+ # C extensions
10
+ *.so
11
+
12
+ # Distribution / packaging
13
+ .Python
14
+ build/
15
+ develop-eggs/
16
+ dist/
17
+ downloads/
18
+ eggs/
19
+ .eggs/
20
+ lib/
21
+ lib64/
22
+ parts/
23
+ sdist/
24
+ var/
25
+ wheels/
26
+ share/python-wheels/
27
+ *.egg-info/
28
+ .installed.cfg
29
+ *.egg
30
+ MANIFEST
31
+
32
+ # PyInstaller
33
+ # Usually these files are written by a python script from a template
34
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
35
+ *.manifest
36
+ *.spec
37
+
38
+ # Installer logs
39
+ pip-log.txt
40
+ pip-delete-this-directory.txt
41
+
42
+ # Unit test / coverage reports
43
+ htmlcov/
44
+ .tox/
45
+ .nox/
46
+ .coverage
47
+ .coverage.*
48
+ .cache
49
+ nosetests.xml
50
+ coverage.xml
51
+ *.cover
52
+ *.py,cover
53
+ .hypothesis/
54
+ .pytest_cache/
55
+ cover/
56
+
57
+ # Translations
58
+ *.mo
59
+ *.pot
60
+
61
+ # Django stuff:
62
+ *.log
63
+ local_settings.py
64
+ db.sqlite3
65
+ db.sqlite3-journal
66
+
67
+ # Flask stuff:
68
+ instance/
69
+ .webassets-cache
70
+
71
+ # Scrapy stuff:
72
+ .scrapy
73
+
74
+ # Sphinx documentation
75
+ docs/_build/
76
+
77
+ # PyBuilder
78
+ .pybuilder/
79
+ target/
80
+
81
+ # Jupyter Notebook
82
+ .ipynb_checkpoints
83
+
84
+ # IPython
85
+ profile_default/
86
+ ipython_config.py
87
+
88
+ # pyenv
89
+ # For a library or package, you might want to ignore these files since the code is
90
+ # intended to run in multiple environments; otherwise, check them in:
91
+ # .python-version
92
+
93
+ # pipenv
94
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
95
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
96
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
97
+ # install all needed dependencies.
98
+ #Pipfile.lock
99
+
100
+ # poetry
101
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
102
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
103
+ # commonly ignored for libraries.
104
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
105
+ #poetry.lock
106
+
107
+ # pdm
108
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
109
+ #pdm.lock
110
+ # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
111
+ # in version control.
112
+ # https://pdm.fming.dev/#use-with-ide
113
+ .pdm.toml
114
+
115
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
116
+ __pypackages__/
117
+
118
+ # Celery stuff
119
+ celerybeat-schedule
120
+ celerybeat.pid
121
+
122
+ # SageMath parsed files
123
+ *.sage.py
124
+
125
+ # Environments
126
+ .env
127
+ .venv
128
+ env/
129
+ venv*/
130
+ ENV/
131
+ env.bak/
132
+ venv.bak/
133
+
134
+ # Spyder project settings
135
+ .spyderproject
136
+ .spyproject
137
+
138
+ # Rope project settings
139
+ .ropeproject
140
+
141
+ # mkdocs documentation
142
+ /site
143
+
144
+ # mypy
145
+ .mypy_cache/
146
+ .dmypy.json
147
+ dmypy.json
148
+
149
+ # Pyre type checker
150
+ .pyre/
151
+
152
+ # pytype static type analyzer
153
+ .pytype/
154
+
155
+ # Cython debug symbols
156
+ cython_debug/
157
+
158
+ # PyCharm
159
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
160
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
161
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
162
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
163
+ #.idea/
164
+
165
+ # VSCode
166
+ .vscode/