nextroute 1.8.0.dev27__cp312-cp312-macosx_13_0_x86_64.whl → 1.9.0__cp312-cp312-macosx_13_0_x86_64.whl

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.

Potentially problematic release.


This version of nextroute might be problematic. Click here for more details.

nextroute/__about__.py CHANGED
@@ -1,3 +1,3 @@
1
1
  # © 2019-present nextmv.io inc
2
2
 
3
- __version__ = "v1.8.0.dev27"
3
+ __version__ = "v1.9.0"
Binary file
nextroute/schema/input.py CHANGED
@@ -4,7 +4,8 @@
4
4
  Defines the input class.
5
5
  """
6
6
 
7
- from typing import Any, List, Optional
7
+ from datetime import datetime
8
+ from typing import Any, List, Optional, Union
8
9
 
9
10
  from nextroute.base_model import BaseModel
10
11
  from nextroute.schema.stop import AlternateStop, Stop, StopDefaults
@@ -29,6 +30,26 @@ class DurationGroup(BaseModel):
29
30
  group: List[str]
30
31
  """Stop IDs contained in the group."""
31
32
 
33
+ class MatrixTimeFrame(BaseModel):
34
+ """Represents a time-dependent duration matrix or scaling factor."""
35
+ start_time: datetime
36
+ """Start time of the time frame."""
37
+ end_time: datetime
38
+ """End time of the time frame."""
39
+ matrix: Optional[List[List[float]]] = None
40
+ """Duration matrix for the time frame."""
41
+ scaling_factor: Optional[float] = None
42
+ """Scaling factor for the time frame."""
43
+
44
+ class TimeDependentMatrix(BaseModel):
45
+ """Represents time-dependent duration matrices."""
46
+ vehicle_ids: Optional[List[str]] = None
47
+ """Vehicle IDs for which the duration matrix is defined."""
48
+ default_matrix: List[List[float]]
49
+ """Default duration matrix."""
50
+ matrix_time_frames: Optional[List[MatrixTimeFrame]] = None
51
+ """Time-dependent duration matrices."""
52
+
32
53
 
33
54
  class Input(BaseModel):
34
55
  """Input schema for Nextroute."""
@@ -48,8 +69,8 @@ class Input(BaseModel):
48
69
  """Matrix of travel distances in meters between stops."""
49
70
  duratrion_groups: Optional[List[DurationGroup]] = None
50
71
  """Duration in seconds added when approaching the group."""
51
- duration_matrix: Optional[List[List[float]]] = None
52
- """Matrix of travel durations in seconds between stops."""
72
+ duration_matrix: Optional[Union[List[List[float]], TimeDependentMatrix, List[TimeDependentMatrix]]] = None
73
+ """Matrix of travel durations in seconds between stops as a single matrix or duration matrices."""
53
74
  options: Optional[Any] = None
54
75
  """Arbitrary options."""
55
76
  stop_groups: Optional[List[List[str]]] = None
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: nextroute
3
- Version: 1.8.0.dev27
3
+ Version: 1.9.0
4
4
  Summary: Nextroute is an engine for solving Vehicle Routing Problems (VRPs).
5
5
  Author-email: Nextmv <tech@nextmv.io>
6
6
  Maintainer-email: Nextmv <tech@nextmv.io>
@@ -197,7 +197,7 @@ file.
197
197
 
198
198
  For further information on how to get started, features, deployment, etc.,
199
199
  please refer to the [official
200
- documentation](https://www.nextmv.io/docs/vehicle-routing).
200
+ documentation](https://www.nextmv.io/docs/vehicle-routing/get-started).
201
201
 
202
202
  ### Go
203
203
 
@@ -233,12 +233,7 @@ with open("cmd/input.json") as f:
233
233
  data = json.load(f)
234
234
 
235
235
  input = nextroute.schema.Input.from_dict(data)
236
- options = nextroute.Options(
237
- solve=nextroute.ParallelSolveOptions(
238
- duration=5,
239
- ),
240
- )
241
-
236
+ options = nextroute.Options(SOLVE_DURATION=5)
242
237
  output = nextroute.solve(input, options)
243
238
  print(json.dumps(output.to_dict(), indent=2))
244
239
  ```
@@ -1,8 +1,3 @@
1
- nextroute-1.8.0.dev27.dist-info/RECORD,,
2
- nextroute-1.8.0.dev27.dist-info/LICENSE,sha256=ElKAl6B15yj4LTFL_Dh1hje431kMHut2urxo5nheRWs,4107
3
- nextroute-1.8.0.dev27.dist-info/WHEEL,sha256=kEDwEAybh1yMTwMF4usCWe2WGZj5bJzouP4ddPUefKc,111
4
- nextroute-1.8.0.dev27.dist-info/top_level.txt,sha256=KNsuo1j7tr-QvBFS_ELmo68OmJ-orEZiOXqstGLJDXA,16
5
- nextroute-1.8.0.dev27.dist-info/METADATA,sha256=855-TZghvvWXc72xXyw_W-EqzoYPNPvILyOuDABMKR8,15587
6
1
  tests/solve_golden/__init__.py,sha256=MRZbyX5fYnxsXV0YP6lf32c5YYMo3NsEFqPwdwf5W18,32
7
2
  tests/solve_golden/main.py,sha256=N8QTju8Iq2ip6XVn1PxcoaVY1N-GzOJUhDH31blV2Ro,1545
8
3
  tests/schema/test_input.py,sha256=kNIlUFqCkvvQieuJIo7-6C_NB9PZqZ72NpGwUWtDZcA,1851
@@ -12,15 +7,20 @@ nextroute/options.py,sha256=a6tiIWWmLSgGjQKVA2ASPMzDEQl9G6Dx6jp4lbRy_kQ,7541
12
7
  nextroute/version.py,sha256=aA_wmIifNRCzxBigX4cSz1Y2CdXvuBNIiY7Nem5UqRA,325
13
8
  nextroute/__init__.py,sha256=wBHS73T_Mm2MfcEx4chZCI1QMbV-a1D7bw7megFLgb4,529
14
9
  nextroute/base_model.py,sha256=Jl205oJZvndkY8rIomZD2k5YhlGgRBn_2I1BKwQ8Vkk,541
15
- nextroute/__about__.py,sha256=KrL6fYgcn3e65TDss40FHRZBvLRRkzguGI5PBae3cX8,62
10
+ nextroute/__about__.py,sha256=U1pxvyLFkD4O3VhTgUaCG7UfPqZfRGr_Wpa7eY5Fah0,56
16
11
  nextroute/solve.py,sha256=It1kDEdFk_AXX-gEUjvQbc7C-0ma9bEPRbnC_bHMsUU,4192
17
- nextroute/bin/nextroute.exe,sha256=56XhyhXkvKgOirQyz8WA9oCceRnlDJkQQDCzk4FUaH4,13296048
12
+ nextroute/bin/nextroute.exe,sha256=UwXRBVRGjMBocK0YSBxRpVuvj64R51Kk1kZa7gTTbyE,14077856
18
13
  nextroute/schema/stop.py,sha256=leKhNC0rcEo64NMNofDuVYnfDNLaqfLZ-mSxUEAwoZk,2199
19
14
  nextroute/schema/vehicle.py,sha256=0W3q-upCn5yEUDX2BBeq5TkOCsrlLsk3Wao-T74nDmU,2535
20
15
  nextroute/schema/__init__.py,sha256=KSlnpJQMnCDq5IXyiltt9CiafcxUH40B3FdE1fc5wdI,1167
21
16
  nextroute/schema/location.py,sha256=hihllMU3IXxQHugGC4Wn_TzDPr5zm4xqVqRsKanwrmA,301
22
- nextroute/schema/input.py,sha256=8_-xi-P2t-A6mObLscKavT-Ro0td9VECp2pZOQ1dWmo,1863
17
+ nextroute/schema/input.py,sha256=-WhVr1ZOCPMMJlXSjyohgY4UMFxmjoKCyyEpF4ZZ0o8,2792
23
18
  nextroute/schema/statistics.py,sha256=lNlb1mcpR6xWQclG-fkDMnFoy-sEKpXKk80zU1TKrpQ,3600
24
19
  nextroute/schema/output.py,sha256=rJv_PpP0X0MdLTRa2tbDsLLbGhTRi43hGmMNmzvNZEw,4810
25
20
  nextroute/check/__init__.py,sha256=Hrw5LUqdMeaBEsoIrJmWDhmAKAzGuzDnoBExwNWJvlU,1303
26
21
  nextroute/check/schema.py,sha256=hBC0Usw4_rEJHsWDxDtIi0-d6byXt8f9eYqBE9hqiCc,5853
22
+ nextroute-1.9.0.dist-info/RECORD,,
23
+ nextroute-1.9.0.dist-info/LICENSE,sha256=ElKAl6B15yj4LTFL_Dh1hje431kMHut2urxo5nheRWs,4107
24
+ nextroute-1.9.0.dist-info/WHEEL,sha256=kEDwEAybh1yMTwMF4usCWe2WGZj5bJzouP4ddPUefKc,111
25
+ nextroute-1.9.0.dist-info/top_level.txt,sha256=KNsuo1j7tr-QvBFS_ELmo68OmJ-orEZiOXqstGLJDXA,16
26
+ nextroute-1.9.0.dist-info/METADATA,sha256=YV29GK35MXcrw9crImKN_atP-oq4I1yg7ZqYB2OfNNk,15538