discrete_optimization.shop.jsp.solvers package

Submodules

discrete_optimization.shop.jsp.solvers.cpsat module

discrete_optimization.shop.jsp.solvers.dp module

class discrete_optimization.shop.jsp.solvers.dp.DpJspSolver(problem: Problem, params_objective_function: ParamsObjectiveFunction | None = None, **kwargs: Any)[source]

Bases: DpSolver, WarmstartMixin

hyperparameters: list[Hyperparameter] = [CategoricalHyperparameter(name='solver', default=<class 'builtins.CABS'>, depends_on=None, name_in_kwargs='solver')]

Hyperparameters available for this solver.

These hyperparameters are to be feed to **kwargs found in
  • __init__()

  • init_model() (when available)

  • solve()

init_model(**kwargs: Any) → None[source]

Initialize internal model used to solve.

Can initialize a ortools, milp, gurobi, … model.

problem: JobShopProblem
retrieve_solution(sol: Solution) → Solution[source]
set_warm_start(solution: JobShopSolution) → None[source]

Make the solver warm start from the given solution.

transitions: dict

discrete_optimization.shop.jsp.solvers.optal module

class discrete_optimization.shop.jsp.solvers.optal.OptalJspSolver(problem: JobShopProblem, params_objective_function: ParamsObjectiveFunction | None = None, **kwargs: Any)[source]

Bases: SchedulingOptalSolver[tuple[int, int]]

get_task_interval(task: Task) → cp.IntervalVar[source]

Return interval variable for the task.

This variable corresponds to the task schedule, whatever the mode. This is the main optal variable (start, end and duration are derived from it)

If the task is optional, this interval should be also taken into account the presence/absence of the task.

init_model(**kwargs)[source]

Builds the OptalCP model for the JSP problem.

problem: JobShopProblem
retrieve_solution(solution: cp.Solution) → Solution[source]

Construct a d-o solution from OptalCP solver solution.

Parameters:

solution – OptalCP solution

Returns:

d-o solution

discrete_optimization.shop.jsp.solvers.tempo module

class discrete_optimization.shop.jsp.solvers.tempo.TempoJspScheduler(problem: Problem, params_objective_function: ParamsObjectiveFunction | None = None, input_format: FormatEnum | None = None, path_to_tempo_executable: str | None = None, **kwargs: Any)[source]

Bases: TempoSchedulingSolver

init_model(**kwargs: Any) → None[source]

For tempo solver, this should transform the python object into some format that tempo can understand. For now it’s via the creation of a temporary _file_input.

problem: JobShopProblem
retrieve_solution(path_to_output: str, process_stdout: str) → JobShopSolution[source]
discrete_optimization.shop.jsp.solvers.tempo.from_jsp_to_jsplib(problem: JobShopProblem) → str[source]
discrete_optimization.shop.jsp.solvers.tempo.parse_output(solver_output: str, problem: JobShopProblem) → JobShopSolution[source]

Module contents