labscheduler.solvers.cp_solver_structures module

Collection of utility structures used by the CP solver

class labscheduler.solvers.cp_solver_structures.CPVariables(inst: JSSP, offset: int)[source]

Bases: object

add_interval(o: Operation, interval: IntervalVar, is_present: int | IntVar = 1, **kwargs)[source]

Adds the interval var into the correct bundle. In the kwargs must be specified which machine shall execute which required role if that is not already specified in the operation (i.e. for pooling).

property all_intervals: list[IntervalVar]
hard_time_cons: list[Constraint] | None = None
horizon: int
intervals: dict[str, IntervalBundle]
intervals_by_id(idx: str) list[IntervalVar][source]
objective: LinearExpr | int
offset: int
operation_by_machine: dict[str, list[IntervalVar]]
presence

alias of dict[str, int | IntVar]

reference_time: datetime
class labscheduler.solvers.cp_solver_structures.IntervalBundle(op_idx: str, interval_vars: list[tuple[~ortools.sat.python.cp_model.IntervalVar, dict[str, str], bool | ~ortools.sat.python.cp_model.IntVar]] = <factory>)[source]

Bases: object

Contains all information about the interval variables corresponding to an operation.

interval_vars: list[tuple[IntervalVar, dict[str, str], bool | IntVar]]
op_idx: str
labscheduler.solvers.cp_solver_structures.solver_status_to_solution_quality(status: <google.protobuf.internal.enum_type_wrapper.EnumTypeWrapper object at 0x7bd8bf759e80>) SolutionQuality[source]