nextmv 0.10.3.dev0__py3-none-any.whl → 0.35.0__py3-none-any.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.
- nextmv/__about__.py +1 -1
- nextmv/__entrypoint__.py +39 -0
- nextmv/__init__.py +57 -0
- nextmv/_serialization.py +96 -0
- nextmv/base_model.py +79 -9
- nextmv/cloud/__init__.py +71 -10
- nextmv/cloud/acceptance_test.py +888 -17
- nextmv/cloud/account.py +154 -10
- nextmv/cloud/application.py +3644 -437
- nextmv/cloud/batch_experiment.py +292 -33
- nextmv/cloud/client.py +354 -53
- nextmv/cloud/ensemble.py +247 -0
- nextmv/cloud/input_set.py +121 -4
- nextmv/cloud/instance.py +125 -0
- nextmv/cloud/package.py +474 -0
- nextmv/cloud/scenario.py +410 -0
- nextmv/cloud/secrets.py +234 -0
- nextmv/cloud/url.py +73 -0
- nextmv/cloud/version.py +174 -0
- nextmv/default_app/.gitignore +1 -0
- nextmv/default_app/README.md +32 -0
- nextmv/default_app/app.yaml +12 -0
- nextmv/default_app/input.json +5 -0
- nextmv/default_app/main.py +37 -0
- nextmv/default_app/requirements.txt +2 -0
- nextmv/default_app/src/__init__.py +0 -0
- nextmv/default_app/src/main.py +37 -0
- nextmv/default_app/src/visuals.py +36 -0
- nextmv/deprecated.py +47 -0
- nextmv/input.py +883 -78
- nextmv/local/__init__.py +5 -0
- nextmv/local/application.py +1263 -0
- nextmv/local/executor.py +1040 -0
- nextmv/local/geojson_handler.py +323 -0
- nextmv/local/local.py +97 -0
- nextmv/local/plotly_handler.py +61 -0
- nextmv/local/runner.py +274 -0
- nextmv/logger.py +80 -9
- nextmv/manifest.py +1472 -0
- nextmv/model.py +431 -0
- nextmv/options.py +968 -78
- nextmv/output.py +1363 -231
- nextmv/polling.py +287 -0
- nextmv/run.py +1623 -0
- nextmv/safe.py +145 -0
- nextmv/status.py +122 -0
- {nextmv-0.10.3.dev0.dist-info → nextmv-0.35.0.dist-info}/METADATA +51 -288
- nextmv-0.35.0.dist-info/RECORD +50 -0
- {nextmv-0.10.3.dev0.dist-info → nextmv-0.35.0.dist-info}/WHEEL +1 -1
- nextmv/cloud/status.py +0 -29
- nextmv/nextroute/__init__.py +0 -2
- nextmv/nextroute/check/__init__.py +0 -26
- nextmv/nextroute/check/schema.py +0 -141
- nextmv/nextroute/schema/__init__.py +0 -19
- nextmv/nextroute/schema/input.py +0 -52
- nextmv/nextroute/schema/location.py +0 -13
- nextmv/nextroute/schema/output.py +0 -136
- nextmv/nextroute/schema/stop.py +0 -61
- nextmv/nextroute/schema/vehicle.py +0 -68
- nextmv-0.10.3.dev0.dist-info/RECORD +0 -28
- {nextmv-0.10.3.dev0.dist-info → nextmv-0.35.0.dist-info}/licenses/LICENSE +0 -0
nextmv/cloud/status.py
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
from enum import Enum
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
class Status(str, Enum):
|
|
5
|
-
"""Status of a run. Deprecated: use StatusV2."""
|
|
6
|
-
|
|
7
|
-
failed = "failed"
|
|
8
|
-
"""Run failed."""
|
|
9
|
-
running = "running"
|
|
10
|
-
"""Run is running."""
|
|
11
|
-
succeeded = "succeeded"
|
|
12
|
-
"""Run succeeded."""
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
class StatusV2(str, Enum):
|
|
16
|
-
"""Status of a run."""
|
|
17
|
-
|
|
18
|
-
canceled = "canceled"
|
|
19
|
-
"""Run was canceled."""
|
|
20
|
-
failed = "failed"
|
|
21
|
-
"""Run failed."""
|
|
22
|
-
none = "none"
|
|
23
|
-
"""Run has no status."""
|
|
24
|
-
queued = "queued"
|
|
25
|
-
"""Run is queued."""
|
|
26
|
-
running = "running"
|
|
27
|
-
"""Run is running."""
|
|
28
|
-
succeeded = "succeeded"
|
|
29
|
-
"""Run succeeded."""
|
nextmv/nextroute/__init__.py
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"""
|
|
2
|
-
Check provides a plugin that allows you to check models and solutions.
|
|
3
|
-
|
|
4
|
-
Checking a model or a solution checks the unplanned plan units. It checks each
|
|
5
|
-
individual plan unit if it can be added to the solution. If the plan unit can
|
|
6
|
-
be added to the solution, the report will include on how many vehicles and
|
|
7
|
-
what the impact would be on the objective value. If the plan unit cannot be
|
|
8
|
-
added to the solution, the report will include the reason why it cannot be
|
|
9
|
-
added to the solution.
|
|
10
|
-
|
|
11
|
-
The check can be invoked on a nextroute.Model or a nextroute.Solution. If the
|
|
12
|
-
check is invoked on a model, an empty solution is created and the check is
|
|
13
|
-
executed on this empty solution. An empty solution is a solution with all the
|
|
14
|
-
initial stops that are fixed, initial stops that are not fixed are not added
|
|
15
|
-
to the solution. The check is executed on the unplanned plan units of the
|
|
16
|
-
solution. If the check is invoked on a solution, it is executed on the
|
|
17
|
-
unplanned plan units of the solution.
|
|
18
|
-
"""
|
|
19
|
-
|
|
20
|
-
from .schema import Objective as Objective
|
|
21
|
-
from .schema import ObjectiveTerm as ObjectiveTerm
|
|
22
|
-
from .schema import Output as Output
|
|
23
|
-
from .schema import PlanUnit as PlanUnit
|
|
24
|
-
from .schema import Solution as Solution
|
|
25
|
-
from .schema import Summary as Summary
|
|
26
|
-
from .schema import Vehicle as Vehicle
|
nextmv/nextroute/check/schema.py
DELETED
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
"""This module contains definitions for the schema in the Nextroute check."""
|
|
2
|
-
|
|
3
|
-
from typing import Dict, List, Optional
|
|
4
|
-
|
|
5
|
-
from nextmv.base_model import BaseModel
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
class ObjectiveTerm(BaseModel):
|
|
9
|
-
"""Check of the individual terms of the objective for a move."""
|
|
10
|
-
|
|
11
|
-
base: Optional[float] = None
|
|
12
|
-
"""Base of the objective term."""
|
|
13
|
-
factor: Optional[float] = None
|
|
14
|
-
"""Factor of the objective term."""
|
|
15
|
-
name: Optional[str] = None
|
|
16
|
-
"""Name of the objective term."""
|
|
17
|
-
value: Optional[float] = None
|
|
18
|
-
"""Value of the objective term, which is equivalent to `self.base *
|
|
19
|
-
self.factor`."""
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
class Objective(BaseModel):
|
|
23
|
-
"""Estimate of an objective of a move."""
|
|
24
|
-
|
|
25
|
-
terms: Optional[List[ObjectiveTerm]] = None
|
|
26
|
-
"""Check of the individual terms of the objective."""
|
|
27
|
-
value: Optional[float] = None
|
|
28
|
-
"""Value of the objective."""
|
|
29
|
-
vehicle: Optional[str] = None
|
|
30
|
-
"""ID of the vehicle for which it reports the objective."""
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
class Solution(BaseModel):
|
|
34
|
-
"""Solution that the check has been executed on."""
|
|
35
|
-
|
|
36
|
-
objective: Optional[Objective] = None
|
|
37
|
-
"""Objective of the start solution."""
|
|
38
|
-
plan_units_planned: Optional[int] = None
|
|
39
|
-
"""Number of plan units planned in the start solution."""
|
|
40
|
-
plan_units_unplanned: Optional[int] = None
|
|
41
|
-
"""Number of plan units unplanned in the start solution."""
|
|
42
|
-
stops_planned: Optional[int] = None
|
|
43
|
-
"""Number of stops planned in the start solution."""
|
|
44
|
-
vehicles_not_used: Optional[int] = None
|
|
45
|
-
"""Number of vehicles not used in the start solution."""
|
|
46
|
-
vehicles_used: Optional[int] = None
|
|
47
|
-
"""Number of vehicles used in the start solution."""
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
class Summary(BaseModel):
|
|
51
|
-
"""Summary of the check."""
|
|
52
|
-
|
|
53
|
-
moves_failed: Optional[int] = None
|
|
54
|
-
"""number of moves that failed. A move can fail if the estimate of a
|
|
55
|
-
constraint is incorrect. A constraint is incorrect if `ModelConstraint.
|
|
56
|
-
EstimateIsViolated` returns true and one of the violation checks returns
|
|
57
|
-
false. Violation checks are implementations of one or more of the
|
|
58
|
-
interfaces [SolutionStopViolationCheck], [SolutionVehicleViolationCheck] or
|
|
59
|
-
[SolutionViolationCheck] on the same constraint. Most constraints do not
|
|
60
|
-
need and do not have violation checks as the estimate is perfect. The
|
|
61
|
-
number of moves failed can be more than one per plan unit as we continue to
|
|
62
|
-
try moves on different vehicles until we find a move that is executable or
|
|
63
|
-
all vehicles have been visited."""
|
|
64
|
-
plan_units_best_move_failed: Optional[int] = None
|
|
65
|
-
"""Number of plan units for which the best move can not be planned. This
|
|
66
|
-
should not happen if all the constraints are implemented correct."""
|
|
67
|
-
plan_units_best_move_found: Optional[int] = None
|
|
68
|
-
"""Number of plan units for which at least one move has been found and the
|
|
69
|
-
move is executable."""
|
|
70
|
-
plan_units_best_move_increases_objective: Optional[int] = None
|
|
71
|
-
"""Number of plan units for which the best move is executable but would
|
|
72
|
-
increase the objective value instead of decreasing it."""
|
|
73
|
-
plan_units_checked: Optional[int] = None
|
|
74
|
-
"""Number of plan units that have been checked. If this is less than
|
|
75
|
-
`self.plan_units_to_be_checked` the check timed out."""
|
|
76
|
-
plan_units_have_no_move: Optional[int] = None
|
|
77
|
-
"""Number of plan units for which no feasible move has been found. This
|
|
78
|
-
implies there is no move that can be executed without violating a
|
|
79
|
-
constraint."""
|
|
80
|
-
plan_units_to_be_checked: Optional[int] = None
|
|
81
|
-
"""Number of plan units to be checked."""
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
class PlanUnit(BaseModel):
|
|
85
|
-
"""Check of a plan unit."""
|
|
86
|
-
|
|
87
|
-
best_move_failed: Optional[bool] = None
|
|
88
|
-
"""True if the plan unit's best move failed to execute."""
|
|
89
|
-
best_move_increases_objective: Optional[bool] = None
|
|
90
|
-
"""True if the best move for the plan unit increases the objective."""
|
|
91
|
-
best_move_objective: Optional[Objective] = None
|
|
92
|
-
"""Estimate of the objective of the best move if the plan unit has a best
|
|
93
|
-
move."""
|
|
94
|
-
constraints: Optional[Dict[str, int]] = None
|
|
95
|
-
"""Constraints that are violated for the plan unit."""
|
|
96
|
-
has_best_move: Optional[bool] = None
|
|
97
|
-
"""True if a move is found for the plan unit. A plan unit has no move found
|
|
98
|
-
if the plan unit is over-constrained or the move found is too expensive."""
|
|
99
|
-
stops: Optional[List[str]] = None
|
|
100
|
-
"""IDs of the sops in the plan unit."""
|
|
101
|
-
vehicles_have_moves: Optional[int] = None
|
|
102
|
-
"""Number of vehicles that have moves for the plan unit. Only calculated if
|
|
103
|
-
the verbosity is very high."""
|
|
104
|
-
vehicles_with_moves: Optional[List[str]] = None
|
|
105
|
-
"""IDs of the vehicles that have moves for the plan unit. Only calculated
|
|
106
|
-
if the verbosity is very high."""
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
class Vehicle(BaseModel):
|
|
110
|
-
"""Check of a vehicle."""
|
|
111
|
-
|
|
112
|
-
id: str
|
|
113
|
-
"""ID of the vehicle."""
|
|
114
|
-
|
|
115
|
-
plan_units_have_moves: Optional[int] = None
|
|
116
|
-
"""Number of plan units that have moves for the vehicle. Only calculated if
|
|
117
|
-
the depth is medium."""
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
class Output(BaseModel):
|
|
121
|
-
"""Output of a feasibility check."""
|
|
122
|
-
|
|
123
|
-
duration_maximum: Optional[float] = None
|
|
124
|
-
"""Maximum duration of the check, in seconds."""
|
|
125
|
-
duration_used: Optional[float] = None
|
|
126
|
-
"""Duration used by the check, in seconds."""
|
|
127
|
-
error: Optional[str] = None
|
|
128
|
-
"""Error raised during the check."""
|
|
129
|
-
plan_units: Optional[List[PlanUnit]] = None
|
|
130
|
-
"""Check of the individual plan units."""
|
|
131
|
-
remark: Optional[str] = None
|
|
132
|
-
"""Remark of the check. It can be "ok", "timeout" or anything else that
|
|
133
|
-
should explain itself."""
|
|
134
|
-
solution: Optional[Solution] = None
|
|
135
|
-
"""Start soltuion of the check."""
|
|
136
|
-
summary: Optional[Summary] = None
|
|
137
|
-
"""Summary of the check."""
|
|
138
|
-
vehicles: Optional[List[Vehicle]] = None
|
|
139
|
-
"""Check of the vehicles."""
|
|
140
|
-
verbosity: Optional[str] = None
|
|
141
|
-
"""Verbosity level of the check."""
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"""Schema (class) definitions for the entities in Nextroute."""
|
|
2
|
-
|
|
3
|
-
from .input import Defaults as Defaults
|
|
4
|
-
from .input import DurationGroup as DurationGroup
|
|
5
|
-
from .input import Input as Input
|
|
6
|
-
from .location import Location as Location
|
|
7
|
-
from .output import ObjectiveOutput as ObjectiveOutput
|
|
8
|
-
from .output import Output as Output
|
|
9
|
-
from .output import PlannedStopOutput as PlannedStopOutput
|
|
10
|
-
from .output import Solution as Solution
|
|
11
|
-
from .output import StopOutput as StopOutput
|
|
12
|
-
from .output import VehicleOutput as VehicleOutput
|
|
13
|
-
from .output import Version as Version
|
|
14
|
-
from .stop import AlternateStop as AlternateStop
|
|
15
|
-
from .stop import Stop as Stop
|
|
16
|
-
from .stop import StopDefaults as StopDefaults
|
|
17
|
-
from .vehicle import InitialStop as InitialStop
|
|
18
|
-
from .vehicle import Vehicle as Vehicle
|
|
19
|
-
from .vehicle import VehicleDefaults as VehicleDefaults
|
nextmv/nextroute/schema/input.py
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
"""Defines the input class."""
|
|
2
|
-
|
|
3
|
-
from typing import Any, List, Optional
|
|
4
|
-
|
|
5
|
-
from nextmv.base_model import BaseModel
|
|
6
|
-
from nextmv.nextroute.schema.stop import AlternateStop, Stop, StopDefaults
|
|
7
|
-
from nextmv.nextroute.schema.vehicle import Vehicle, VehicleDefaults
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
class Defaults(BaseModel):
|
|
11
|
-
"""Default values for vehicles and stops."""
|
|
12
|
-
|
|
13
|
-
stops: Optional[StopDefaults] = None
|
|
14
|
-
"""Default values for stops."""
|
|
15
|
-
vehicles: Optional[VehicleDefaults] = None
|
|
16
|
-
"""Default values for vehicles."""
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
class DurationGroup(BaseModel):
|
|
20
|
-
"""Represents a group of stops that get additional duration whenever a stop
|
|
21
|
-
of the group is approached for the first time."""
|
|
22
|
-
|
|
23
|
-
duration: int
|
|
24
|
-
"""Duration to add when visiting the group."""
|
|
25
|
-
group: List[str]
|
|
26
|
-
"""Stop IDs contained in the group."""
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
class Input(BaseModel):
|
|
30
|
-
"""Input schema for Nextroute."""
|
|
31
|
-
|
|
32
|
-
stops: List[Stop]
|
|
33
|
-
"""Stops that must be visited by the vehicles."""
|
|
34
|
-
vehicles: List[Vehicle]
|
|
35
|
-
"""Vehicles that service the stops."""
|
|
36
|
-
|
|
37
|
-
alternate_stops: Optional[List[AlternateStop]] = None
|
|
38
|
-
"""A set of alternate stops for the vehicles."""
|
|
39
|
-
custom_data: Optional[Any] = None
|
|
40
|
-
"""Arbitrary data associated with the input."""
|
|
41
|
-
defaults: Optional[Defaults] = None
|
|
42
|
-
"""Default values for vehicles and stops."""
|
|
43
|
-
distance_matrix: Optional[List[List[float]]] = None
|
|
44
|
-
"""Matrix of travel distances in meters between stops."""
|
|
45
|
-
duratrion_groups: Optional[List[DurationGroup]] = None
|
|
46
|
-
"""Duration in seconds added when approaching the group."""
|
|
47
|
-
duration_matrix: Optional[List[List[float]]] = None
|
|
48
|
-
"""Matrix of travel durations in seconds between stops."""
|
|
49
|
-
options: Optional[Any] = None
|
|
50
|
-
"""Arbitrary options."""
|
|
51
|
-
stop_groups: Optional[List[List[str]]] = None
|
|
52
|
-
"""Groups of stops that must be part of the same route."""
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"""Defines the location class."""
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
from nextmv.base_model import BaseModel
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
class Location(BaseModel):
|
|
8
|
-
"""Location represents a geographical location."""
|
|
9
|
-
|
|
10
|
-
lat: float
|
|
11
|
-
"""Latitude of the location."""
|
|
12
|
-
lon: float
|
|
13
|
-
"""Longitude of the location."""
|
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
"""Defines the output class."""
|
|
2
|
-
|
|
3
|
-
from datetime import datetime
|
|
4
|
-
from typing import Any, Dict, List, Optional
|
|
5
|
-
|
|
6
|
-
from nextmv.base_model import BaseModel
|
|
7
|
-
from nextmv.nextroute.check import Output as checkOutput
|
|
8
|
-
from nextmv.nextroute.schema.location import Location
|
|
9
|
-
from nextmv.output import Statistics
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
class Version(BaseModel):
|
|
13
|
-
"""A version used for solving."""
|
|
14
|
-
|
|
15
|
-
sdk: str
|
|
16
|
-
"""Nextmv SDK."""
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
class StopOutput(BaseModel):
|
|
20
|
-
"""Basic structure for the output of a stop."""
|
|
21
|
-
|
|
22
|
-
id: str
|
|
23
|
-
"""ID of the stop."""
|
|
24
|
-
location: Location
|
|
25
|
-
"""Location of the stop."""
|
|
26
|
-
|
|
27
|
-
custom_data: Optional[Any] = None
|
|
28
|
-
"""Custom data of the stop."""
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
class PlannedStopOutput(BaseModel):
|
|
32
|
-
"""Output of a stop planned in the solution."""
|
|
33
|
-
|
|
34
|
-
stop: StopOutput
|
|
35
|
-
"""Basic information on the stop."""
|
|
36
|
-
|
|
37
|
-
arrival_time: Optional[datetime] = None
|
|
38
|
-
"""Actual arrival time at this stop."""
|
|
39
|
-
cumulative_travel_distance: Optional[float] = None
|
|
40
|
-
"""Cumulative distance to travel from the first stop to this one, in meters."""
|
|
41
|
-
cumulative_travel_duration: Optional[float] = None
|
|
42
|
-
"""Cumulative duration to travel from the first stop to this one, in seconds."""
|
|
43
|
-
custom_data: Optional[Any] = None
|
|
44
|
-
"""Custom data of the stop."""
|
|
45
|
-
duration: Optional[float] = None
|
|
46
|
-
"""Duration of the service at the stop, in seconds."""
|
|
47
|
-
early_arrival_duration: Optional[float] = None
|
|
48
|
-
"""Duration of early arrival at the stop, in seconds."""
|
|
49
|
-
end_time: Optional[datetime] = None
|
|
50
|
-
"""End time of the service at the stop."""
|
|
51
|
-
late_arrival_duration: Optional[float] = None
|
|
52
|
-
"""Duration of late arrival at the stop, in seconds."""
|
|
53
|
-
mix_items: Optional[Any] = None
|
|
54
|
-
"""Mix items at the stop."""
|
|
55
|
-
start_time: Optional[datetime] = None
|
|
56
|
-
"""Start time of the service at the stop."""
|
|
57
|
-
target_arrival_time: Optional[datetime] = None
|
|
58
|
-
"""Target arrival time at this stop."""
|
|
59
|
-
travel_distance: Optional[float] = None
|
|
60
|
-
"""Distance to travel from the previous stop to this one, in meters."""
|
|
61
|
-
travel_duration: Optional[float] = None
|
|
62
|
-
"""Duration to travel from the previous stop to this one, in seconds."""
|
|
63
|
-
waiting_duration: Optional[float] = None
|
|
64
|
-
"""Waiting duratino at the stop, in seconds."""
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
class VehicleOutput(BaseModel):
|
|
68
|
-
"""Output of a vehicle in the solution."""
|
|
69
|
-
|
|
70
|
-
id: str
|
|
71
|
-
"""ID of the vehicle."""
|
|
72
|
-
|
|
73
|
-
alternate_stops: Optional[List[str]] = None
|
|
74
|
-
"""List of alternate stops that were planned on the vehicle."""
|
|
75
|
-
custom_data: Optional[Any] = None
|
|
76
|
-
"""Custom data of the vehicle."""
|
|
77
|
-
route: Optional[List[PlannedStopOutput]] = None
|
|
78
|
-
"""Route of the vehicle, which is a list of stops that were planned on
|
|
79
|
-
it."""
|
|
80
|
-
route_duration: Optional[float] = None
|
|
81
|
-
"""Total duration of the vehicle's route, in seconds."""
|
|
82
|
-
route_stops_duration: Optional[float] = None
|
|
83
|
-
"""Total duration of the stops of the vehicle, in seconds."""
|
|
84
|
-
route_travel_distance: Optional[float] = None
|
|
85
|
-
"""Total travel distance of the vehicle, in meters."""
|
|
86
|
-
route_travel_duration: Optional[float] = None
|
|
87
|
-
"""Total travel duration of the vehicle, in seconds."""
|
|
88
|
-
route_waiting_duration: Optional[float] = None
|
|
89
|
-
"""Total waiting duration of the vehicle, in seconds."""
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
class ObjectiveOutput(BaseModel):
|
|
93
|
-
"""Information of the objective (value function)."""
|
|
94
|
-
|
|
95
|
-
name: str
|
|
96
|
-
"""Name of the objective."""
|
|
97
|
-
|
|
98
|
-
base: Optional[float] = None
|
|
99
|
-
"""Base of the objective."""
|
|
100
|
-
custom_data: Optional[Any] = None
|
|
101
|
-
"""Custom data of the objective."""
|
|
102
|
-
factor: Optional[float] = None
|
|
103
|
-
"""Factor of the objective."""
|
|
104
|
-
objectives: Optional[List[Dict[str, Any]]] = None
|
|
105
|
-
"""List of objectives. Each list is actually of the same class
|
|
106
|
-
`ObjectiveOutput`, but we avoid a recursive definition here."""
|
|
107
|
-
value: Optional[float] = None
|
|
108
|
-
"""Value of the objective, which is equivalent to `self.base *
|
|
109
|
-
self.factor`."""
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
class Solution(BaseModel):
|
|
113
|
-
"""Solution to a Vehicle Routing Problem (VRP)."""
|
|
114
|
-
|
|
115
|
-
unplanned: Optional[List[StopOutput]] = None
|
|
116
|
-
"""List of stops that were not planned in the solution."""
|
|
117
|
-
vehicles: Optional[List[VehicleOutput]] = None
|
|
118
|
-
"""List of vehicles in the solution."""
|
|
119
|
-
objective: Optional[ObjectiveOutput] = None
|
|
120
|
-
"""Information of the objective (value function)."""
|
|
121
|
-
check: Optional[checkOutput] = None
|
|
122
|
-
"""Check of the solution, if enabled."""
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
class Output(BaseModel):
|
|
126
|
-
"""Output schema for Nextroute."""
|
|
127
|
-
|
|
128
|
-
options: Dict[str, Any]
|
|
129
|
-
"""Options used to obtain this output."""
|
|
130
|
-
version: Version
|
|
131
|
-
"""Versions used for the solution."""
|
|
132
|
-
|
|
133
|
-
solutions: Optional[List[Solution]] = None
|
|
134
|
-
"""Solutions to the problem."""
|
|
135
|
-
statistics: Optional[Statistics] = None
|
|
136
|
-
"""Statistics of the solution."""
|
nextmv/nextroute/schema/stop.py
DELETED
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
"""Defines the stop class."""
|
|
2
|
-
|
|
3
|
-
from datetime import datetime
|
|
4
|
-
from typing import Any, List, Optional
|
|
5
|
-
|
|
6
|
-
from nextmv.base_model import BaseModel
|
|
7
|
-
from nextmv.nextroute.schema.location import Location
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
class StopDefaults(BaseModel):
|
|
11
|
-
"""Default values for a stop."""
|
|
12
|
-
|
|
13
|
-
compatibility_attributes: Optional[List[str]] = None
|
|
14
|
-
"""Attributes that the stop is compatible with."""
|
|
15
|
-
duration: Optional[int] = None
|
|
16
|
-
"""Duration of the stop in seconds."""
|
|
17
|
-
early_arrival_time_penalty: Optional[float] = None
|
|
18
|
-
"""Penalty per second for arriving at the stop before the target arrival time."""
|
|
19
|
-
late_arrival_time_penalty: Optional[float] = None
|
|
20
|
-
"""Penalty per second for arriving at the stop after the target arrival time."""
|
|
21
|
-
max_wait: Optional[int] = None
|
|
22
|
-
"""Maximum waiting duration in seconds at the stop."""
|
|
23
|
-
quantity: Optional[Any] = None
|
|
24
|
-
"""Quantity of the stop."""
|
|
25
|
-
start_time_window: Optional[Any] = None
|
|
26
|
-
"""Time window in which the stop can start service."""
|
|
27
|
-
target_arrival_time: Optional[datetime] = None
|
|
28
|
-
"""Target arrival time at the stop."""
|
|
29
|
-
unplanned_penalty: Optional[int] = None
|
|
30
|
-
"""Penalty for not planning a stop."""
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
class Stop(StopDefaults):
|
|
34
|
-
"""Stop is a location that must be visited by a vehicle in a Vehicle
|
|
35
|
-
Routing Problem (VRP.)"""
|
|
36
|
-
|
|
37
|
-
id: str
|
|
38
|
-
"""Unique identifier for the stop."""
|
|
39
|
-
location: Location
|
|
40
|
-
"""Location of the stop."""
|
|
41
|
-
|
|
42
|
-
custom_data: Optional[Any] = None
|
|
43
|
-
"""Arbitrary data associated with the stop."""
|
|
44
|
-
mixing_items: Optional[Any] = None
|
|
45
|
-
"""Defines the items that are inserted or removed from the vehicle when visiting the stop."""
|
|
46
|
-
precedes: Optional[Any] = None
|
|
47
|
-
"""Stops that must be visited after this one on the same route."""
|
|
48
|
-
succeeds: Optional[Any] = None
|
|
49
|
-
"""Stops that must be visited before this one on the same route."""
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
class AlternateStop(StopDefaults):
|
|
53
|
-
"""An alternate stop can be serviced instead of another stop."""
|
|
54
|
-
|
|
55
|
-
id: str
|
|
56
|
-
"""Unique identifier for the stop."""
|
|
57
|
-
location: Location
|
|
58
|
-
"""Location of the stop."""
|
|
59
|
-
|
|
60
|
-
custom_data: Optional[Any] = None
|
|
61
|
-
"""Arbitrary data associated with the stop."""
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
"""Defines the vehicle class."""
|
|
2
|
-
|
|
3
|
-
from datetime import datetime
|
|
4
|
-
from typing import Any, List, Optional
|
|
5
|
-
|
|
6
|
-
from nextmv.base_model import BaseModel
|
|
7
|
-
from nextmv.nextroute.schema.location import Location
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
class InitialStop(BaseModel):
|
|
11
|
-
"""Represents a stop that is already planned on a vehicle."""
|
|
12
|
-
|
|
13
|
-
id: str
|
|
14
|
-
"""Unique identifier of the stop."""
|
|
15
|
-
|
|
16
|
-
fixed: Optional[bool] = None
|
|
17
|
-
"""Whether the stop is fixed on the route."""
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
class VehicleDefaults(BaseModel):
|
|
21
|
-
"""Default values for vehicles."""
|
|
22
|
-
|
|
23
|
-
activation_penalty: Optional[int] = None
|
|
24
|
-
"""Penalty of using the vehicle."""
|
|
25
|
-
alternate_stops: Optional[List[str]] = None
|
|
26
|
-
"""A set of alternate stops for which only one should be serviced."""
|
|
27
|
-
capacity: Optional[Any] = None
|
|
28
|
-
"""Capacity of the vehicle."""
|
|
29
|
-
compatibility_attributes: Optional[List[str]] = None
|
|
30
|
-
"""Attributes that the vehicle is compatible with."""
|
|
31
|
-
end_location: Optional[Location] = None
|
|
32
|
-
"""Location where the vehicle ends."""
|
|
33
|
-
end_time: Optional[datetime] = None
|
|
34
|
-
"""Latest time at which the vehicle ends its route."""
|
|
35
|
-
max_distance: Optional[int] = None
|
|
36
|
-
"""Maximum distance in meters that the vehicle can travel."""
|
|
37
|
-
max_duration: Optional[int] = None
|
|
38
|
-
"""Maximum duration in seconds that the vehicle can travel."""
|
|
39
|
-
max_stops: Optional[int] = None
|
|
40
|
-
"""Maximum number of stops that the vehicle can visit."""
|
|
41
|
-
max_wait: Optional[int] = None
|
|
42
|
-
"""Maximum aggregated waiting time that the vehicle can wait across route stops."""
|
|
43
|
-
min_stops: Optional[int] = None
|
|
44
|
-
"""Minimum stops that a vehicle should visit."""
|
|
45
|
-
min_stops_penalty: Optional[float] = None
|
|
46
|
-
"""Penalty for not visiting the minimum number of stops."""
|
|
47
|
-
speed: Optional[float] = None
|
|
48
|
-
"""Speed of the vehicle in meters per second."""
|
|
49
|
-
start_level: Optional[Any] = None
|
|
50
|
-
"""Initial level of the vehicle."""
|
|
51
|
-
start_location: Optional[Location] = None
|
|
52
|
-
"""Location where the vehicle starts."""
|
|
53
|
-
start_time: Optional[datetime] = None
|
|
54
|
-
"""Time when the vehicle starts its route."""
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
class Vehicle(VehicleDefaults):
|
|
58
|
-
"""A vehicle services stops in a Vehicle Routing Problem (VRP)."""
|
|
59
|
-
|
|
60
|
-
id: str
|
|
61
|
-
"""Unique identifier of the vehicle."""
|
|
62
|
-
|
|
63
|
-
custom_data: Optional[Any] = None
|
|
64
|
-
"""Arbitrary custom data."""
|
|
65
|
-
initial_stops: Optional[List[InitialStop]] = None
|
|
66
|
-
"""Initial stops planned on the vehicle."""
|
|
67
|
-
stop_duration_multiplier: Optional[float] = None
|
|
68
|
-
"""Multiplier for the duration of stops."""
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
nextmv/__about__.py,sha256=FcvYDh9TY1RQoYtd35-lgBzGMYH_osufNgX9Nw2w-lc,29
|
|
2
|
-
nextmv/__init__.py,sha256=Yaxwb8eKEs8qsDRCqPBW60hgVx99MIt0HNN3NjMGSmM,1092
|
|
3
|
-
nextmv/base_model.py,sha256=-8V8HO3h0InD8vcEo_O9rJL1RKUXacQ36V3tngy3TUM,506
|
|
4
|
-
nextmv/input.py,sha256=t-9e1L3-9Z8S4xVWBkFD_qiSHVGEpi9NsBlXeZ0dXOE,11228
|
|
5
|
-
nextmv/logger.py,sha256=5qQ7E3Aaw3zzkIeiUuwYGzTcB7VhVqIzNZm5PHmdpUI,852
|
|
6
|
-
nextmv/options.py,sha256=QRDLAh8MHnvGghKRN3BjhdVTIq5zM0u5WxkTIvpVBbI,7730
|
|
7
|
-
nextmv/output.py,sha256=KFdG4vLR81AKdzGiXaM4z4XlmCVNEBN0IzjYoxg3FNM,15375
|
|
8
|
-
nextmv/cloud/__init__.py,sha256=3X7tGGCUtcrZUkHqFomkPqtxcQfXOQDSCuPDhvflfUM,1451
|
|
9
|
-
nextmv/cloud/acceptance_test.py,sha256=RU7bgUM4l8XpNqbTvTXwA4_u0c51aPlfDRoqJ0Tio1w,2567
|
|
10
|
-
nextmv/cloud/account.py,sha256=0ZB71lM9vZzBiqaHd5Lpm6XWXEvZjN7eswg3VIUm_uc,1865
|
|
11
|
-
nextmv/cloud/application.py,sha256=WZM36F-1UvyMkyzHjjtzHjEzPJW5rZKxpldqS6juYxI,27663
|
|
12
|
-
nextmv/cloud/batch_experiment.py,sha256=-SPh9XMp53Vb61t6tHI1hfCL8gLH3N2r7QzMBZPZ7fo,2248
|
|
13
|
-
nextmv/cloud/client.py,sha256=QFu8Bg9DKWYfIau0vklSXqsYwjXTpbaKQ-ERmZiToMs,7088
|
|
14
|
-
nextmv/cloud/input_set.py,sha256=qw_ndwbwkkzjVgP2uvNpyL8DhWcXKDh3RqPB-DB_Ilc,696
|
|
15
|
-
nextmv/cloud/status.py,sha256=C-ax8cLw0jPeh7CPsJkCa0s4ImRyFI4NDJJxI0_1sr4,602
|
|
16
|
-
nextmv/nextroute/__init__.py,sha256=HNyvOhT7ZCB5evpRcoiYK4k8IC10nTW6wItWd5SUg-4,83
|
|
17
|
-
nextmv/nextroute/check/__init__.py,sha256=iUEZc6pImAygAfFx7ary7HKKksLF0oPnMkaoGok9llw,1270
|
|
18
|
-
nextmv/nextroute/check/schema.py,sha256=cc-bHsyPxIXtaLIhPxuiO0uXk3Ce8RkA-DHJHmVw8Jo,5815
|
|
19
|
-
nextmv/nextroute/schema/__init__.py,sha256=uMJFUW6ny9rVH1hwO0nbvlL_B8CS68BasFxdrhJZzBg,830
|
|
20
|
-
nextmv/nextroute/schema/input.py,sha256=vjf9tP1UQ87XY8_HcauoLd8fVLOsOYbiQCFTbk58428,1839
|
|
21
|
-
nextmv/nextroute/schema/location.py,sha256=P1zqIXnMOP7doQ57_AKQhUhUB5bdB3BAmUTkGXZc1_o,264
|
|
22
|
-
nextmv/nextroute/schema/output.py,sha256=3JwgNWszF7jQcnji2DtemK0By5gullR_bqH8r-zs1l4,4765
|
|
23
|
-
nextmv/nextroute/schema/stop.py,sha256=ilYf-3rdEVDlwyTiqb1y6ipd9QpLvFPuErPZI6bTHPM,2168
|
|
24
|
-
nextmv/nextroute/schema/vehicle.py,sha256=m9PYupXiVdRF_CgyMiyql7vwNhac-BWyosExISGBXSQ,2504
|
|
25
|
-
nextmv-0.10.3.dev0.dist-info/METADATA,sha256=xg1pqezT2ljyqhHh9aGc5M7y-WderQvEICbWavo1y5o,21722
|
|
26
|
-
nextmv-0.10.3.dev0.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
|
|
27
|
-
nextmv-0.10.3.dev0.dist-info/licenses/LICENSE,sha256=ZIbK-sSWA-OZprjNbmJAglYRtl5_K4l9UwAV3PGJAPc,11349
|
|
28
|
-
nextmv-0.10.3.dev0.dist-info/RECORD,,
|
|
File without changes
|