Schema module¶
Reference to the check.schema.py module.
schema
¶
This module contains definitions for the schema in the Nextroute check.
ObjectiveTerm
¶
Objective
¶
Bases: BaseModel
Estimate of an objective of a move.
terms
class-attribute
instance-attribute
¶
terms: list[ObjectiveTerm] | None = None
Check of the individual terms of the objective.
vehicle
class-attribute
instance-attribute
¶
ID of the vehicle for which it reports the objective.
Solution
¶
Bases: BaseModel
Solution that the check has been executed on.
objective
class-attribute
instance-attribute
¶
objective: Objective | None = None
Objective of the start solution.
plan_units_planned
class-attribute
instance-attribute
¶
Number of plan units planned in the start solution.
plan_units_unplanned
class-attribute
instance-attribute
¶
Number of plan units unplanned in the start solution.
stops_planned
class-attribute
instance-attribute
¶
Number of stops planned in the start solution.
vehicles_not_used
class-attribute
instance-attribute
¶
Number of vehicles not used in the start solution.
vehicles_used
class-attribute
instance-attribute
¶
Number of vehicles used in the start solution.
Summary
¶
Bases: BaseModel
Summary of the check.
moves_failed
class-attribute
instance-attribute
¶
number of moves that failed. A move can fail if the estimate of a
constraint is incorrect. A constraint is incorrect if ModelConstraint.
EstimateIsViolated returns true and one of the violation checks returns
false. Violation checks are implementations of one or more of the
interfaces [SolutionStopViolationCheck], [SolutionVehicleViolationCheck] or
[SolutionViolationCheck] on the same constraint. Most constraints do not
need and do not have violation checks as the estimate is perfect. The
number of moves failed can be more than one per plan unit as we continue to
try moves on different vehicles until we find a move that is executable or
all vehicles have been visited.
plan_units_best_move_failed
class-attribute
instance-attribute
¶
Number of plan units for which the best move can not be planned. This should not happen if all the constraints are implemented correct.
plan_units_best_move_found
class-attribute
instance-attribute
¶
Number of plan units for which at least one move has been found and the move is executable.
plan_units_best_move_increases_objective
class-attribute
instance-attribute
¶
Number of plan units for which the best move is executable but would increase the objective value instead of decreasing it.
plan_units_checked
class-attribute
instance-attribute
¶
Number of plan units that have been checked. If this is less than
self.plan_units_to_be_checked the check timed out.
plan_units_have_no_move
class-attribute
instance-attribute
¶
Number of plan units for which no feasible move has been found. This implies there is no move that can be executed without violating a constraint.
plan_units_to_be_checked
class-attribute
instance-attribute
¶
Number of plan units to be checked.
PlanUnit
¶
Bases: BaseModel
Check of a plan unit.
best_move_failed
class-attribute
instance-attribute
¶
True if the plan unit's best move failed to execute.
best_move_increases_objective
class-attribute
instance-attribute
¶
True if the best move for the plan unit increases the objective.
best_move_objective
class-attribute
instance-attribute
¶
best_move_objective: Objective | None = None
Estimate of the objective of the best move if the plan unit has a best move.
constraints
class-attribute
instance-attribute
¶
Constraints that are violated for the plan unit.
has_best_move
class-attribute
instance-attribute
¶
True if a move is found for the plan unit. A plan unit has no move found if the plan unit is over-constrained or the move found is too expensive.
stops
class-attribute
instance-attribute
¶
IDs of the sops in the plan unit.
vehicles_have_moves
class-attribute
instance-attribute
¶
Number of vehicles that have moves for the plan unit. Only calculated if the verbosity is very high.
vehicles_with_moves
class-attribute
instance-attribute
¶
IDs of the vehicles that have moves for the plan unit. Only calculated if the verbosity is very high.
Vehicle
¶
Output
¶
Bases: BaseModel
Output of a feasibility check.
duration_maximum
class-attribute
instance-attribute
¶
Maximum duration of the check, in seconds.
duration_used
class-attribute
instance-attribute
¶
Duration used by the check, in seconds.
plan_units
class-attribute
instance-attribute
¶
plan_units: list[PlanUnit] | None = None
Check of the individual plan units.
remark
class-attribute
instance-attribute
¶
Remark of the check. It can be "ok", "timeout" or anything else that should explain itself.
solution
class-attribute
instance-attribute
¶
solution: Solution | None = None
Start soltuion of the check.
vehicles
class-attribute
instance-attribute
¶
vehicles: list[Vehicle] | None = None
Check of the vehicles.
verbosity
class-attribute
instance-attribute
¶
Verbosity level of the check.