Skip to content

Schema module

Reference to the check.schema.py module.

schema

This module contains definitions for the schema in the Nextroute check.

ObjectiveTerm

Bases: BaseModel

Check of the individual terms of the objective for a move.

base class-attribute instance-attribute

base: float | None = None

Base of the objective term.

factor class-attribute instance-attribute

factor: float | None = None

Factor of the objective term.

name class-attribute instance-attribute

name: str | None = None

Name of the objective term.

value class-attribute instance-attribute

value: float | None = None

Value of the objective term, which is equivalent to self.base * self.factor.

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.

value class-attribute instance-attribute

value: float | None = None

Value of the objective.

vehicle class-attribute instance-attribute

vehicle: str | None = None

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

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.

vehicles_not_used class-attribute instance-attribute

vehicles_not_used: int | None = None

Number of vehicles not used in the start solution.

vehicles_used class-attribute instance-attribute

vehicles_used: int | None = None

Number of vehicles used 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.

plan_units_have_no_move class-attribute instance-attribute

plan_units_have_no_move: int | None = None

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

plan_units_to_be_checked: int | None = None

Number of plan units to be checked.

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: dict[str, int] | None = None

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

stops: list[str] | None = None

IDs of the sops in the plan unit.

vehicles_have_moves class-attribute instance-attribute

vehicles_have_moves: int | None = None

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

vehicles_with_moves: list[str] | None = None

IDs of the vehicles that have moves for the plan unit. Only calculated if the verbosity is very high.

Vehicle

Bases: BaseModel

Check of a vehicle.

id instance-attribute

id: str

ID of the vehicle.

plan_units_have_moves class-attribute instance-attribute

plan_units_have_moves: int | None = None

Number of plan units that have moves for the vehicle. Only calculated if the depth is medium.

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.

error class-attribute instance-attribute

error: str | None = None

Error raised during the check.

plan_units class-attribute instance-attribute

plan_units: list[PlanUnit] | None = None

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.

summary class-attribute instance-attribute

summary: Summary | None = None

Summary of the check.

vehicles class-attribute instance-attribute

vehicles: list[Vehicle] | None = None

Check of the vehicles.

verbosity class-attribute instance-attribute

verbosity: str | None = None

Verbosity level of the check.