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.
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
¶
plan_units_planned: int | None = None
Number of plan units planned in the start solution.
plan_units_unplanned
class-attribute
instance-attribute
¶
plan_units_unplanned: int | None = None
Number of plan units unplanned in the start solution.
stops_planned
class-attribute
instance-attribute
¶
stops_planned: int | None = None
Number of stops planned in the start solution.
Summary
¶
Bases: BaseModel
Summary of the check.
moves_failed
class-attribute
instance-attribute
¶
moves_failed: int | None = None
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
¶
plan_units_best_move_failed: int | None = None
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
¶
plan_units_best_move_found: int | None = None
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
¶
plan_units_best_move_increases_objective: int | None = None
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
¶
plan_units_checked: int | None = None
Number of plan units that have been checked. If this is less than
self.plan_units_to_be_checked the check timed out.
PlanUnit
¶
Bases: BaseModel
Check of a plan unit.
best_move_failed
class-attribute
instance-attribute
¶
best_move_failed: bool | None = None
True if the plan unit's best move failed to execute.
best_move_increases_objective
class-attribute
instance-attribute
¶
best_move_increases_objective: bool | None = None
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
¶
has_best_move: bool | None = None
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.
Vehicle
¶
Output
¶
Bases: BaseModel
Output of a feasibility check.
duration_maximum
class-attribute
instance-attribute
¶
duration_maximum: float | None = None
Maximum duration of the check, in seconds.
duration_used
class-attribute
instance-attribute
¶
duration_used: float | None = None
Duration used by the check, in seconds.
plan_units
class-attribute
instance-attribute
¶
Check of the individual plan units.
remark
class-attribute
instance-attribute
¶
remark: str | None = None
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
¶
Check of the vehicles.