discrete_optimization.fjsp package
Subpackages
- discrete_optimization.fjsp.solvers package
- Submodules
- discrete_optimization.fjsp.solvers.cpsat module
CpSatFjspSolverCpSatFjspSolver.create_disjunctive_constraints()CpSatFjspSolver.create_is_present_constraints()CpSatFjspSolver.create_precedence_constraints()CpSatFjspSolver.create_vars()CpSatFjspSolver.get_makespan_upper_bound()CpSatFjspSolver.get_task_mode_is_present_variable()CpSatFjspSolver.get_task_start_or_end_variable()CpSatFjspSolver.hyperparametersCpSatFjspSolver.init_model()CpSatFjspSolver.problemCpSatFjspSolver.retrieve_solution()CpSatFjspSolver.set_warm_start()
- discrete_optimization.fjsp.solvers.dp module
- discrete_optimization.fjsp.solvers.lns_cpsat module
- discrete_optimization.fjsp.solvers.optal module
- Module contents
Submodules
discrete_optimization.fjsp.parser module
discrete_optimization.fjsp.problem module
- class discrete_optimization.fjsp.problem.FJobShopProblem(list_jobs: list[Job], n_jobs: int | None = None, n_machines: int | None = None, horizon: int | None = None)[source]
Bases:
SchedulingProblem[tuple[int,int]],MultimodeProblem[tuple[int,int]],PrecedenceProblem[tuple[int,int]]- evaluate(variable: FJobShopSolution) dict[str, float][source]
Evaluate a given solution object for the given problem.
This method should return a dictionnary of KPI, that can be then used for mono or multiobjective optimization.
- Parameters:
variable (Solution) – the Solution object to evaluate.
Returns: dictionnary of float kpi for the solution.
- get_attribute_register() EncodingRegister[source]
Returns how the Solution should be encoded.
Returns (EncodingRegister): content of the encoding of the solution
- get_last_tasks() list[tuple[int, int]][source]
Get a sublist of tasks that are candidate to be the last one scheduled.
Default to all tasks.
- get_objective_register() ObjectiveRegister[source]
Returns the objective definition.
Returns (ObjectiveRegister): object defining the objective criteria.
- get_precedence_constraints() dict[tuple[int, int], list[tuple[int, int]]][source]
Map each task to the tasks that need to be performed after it.
- get_solution_type() type[Solution][source]
Returns the class implementation of a Solution.
Returns (class): class object of the given Problem.
- get_task_modes(task: tuple[int, int]) set[int][source]
Retrieve mode found for given task.
- Parameters:
task
Returns:
- n_jobs: int
- n_machines: int
- satisfy(variable: FJobShopSolution) bool[source]
Computes if a solution satisfies or not the constraints of the problem.
- Parameters:
variable – the Solution object to check satisfability
Returns (bool): boolean true if the constraints are fulfilled, false elsewhere.
- property tasks_list: list[tuple[int, int]]
- class discrete_optimization.fjsp.problem.FJobShopSolution(problem: FJobShopProblem, schedule: list[list[tuple[int, int, int, int]]])[source]
Bases:
SchedulingSolution[tuple[int,int]],MultimodeSolution[tuple[int,int]]- change_problem(new_problem: FJobShopProblem) None[source]
If relevant to the optimisation problem, change the underlying problem instance for the solution.
This method can be used to evaluate a solution for different instance of problems.
- Parameters:
new_problem (Problem) – another problem instance from which the solution can be evaluated
Returns: None
- copy() FJobShopSolution[source]
Deep copy of the solution.
The copy() function should return a new object containing the same input as the current object, that respects the following expected behaviour: -y = x.copy() -if do some inplace change of y, the changes are not done in x.
Returns: a new object from which you can manipulate attributes without changing the original object.
- problem: FJobShopProblem