discrete_optimization.shop.jsp package

Subpackages

Submodules

discrete_optimization.shop.jsp.parser module

discrete_optimization.shop.jsp.parser.get_data_available(data_folder: str | None = None, data_home: str | None = None) list[str][source]

Get datasets available for jobshop.

Params:
data_folder: folder where datasets for jobshop whould be find.

If None, we look in “jobshop” subdirectory of data_home.

data_home: root directory for all datasets. Is None, set by

default to “~/discrete_optimization_data “

discrete_optimization.shop.jsp.parser.parse_file(file_path: str)[source]

discrete_optimization.shop.jsp.problem module

class discrete_optimization.shop.jsp.problem.JobShopProblem(list_jobs: list[Job], n_jobs: int = None, n_machines: int = None, horizon: int = None)[source]

Bases: CommonShopProblem, WithoutNoOverlapProblem[tuple[int, int]], SinglemodeSchedulingProblem[tuple[int, int]]

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_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_resource_availabilities(resource: Resource) list[tuple[int, int, int]][source]

Get availabilities intervals for a given resource

List of availability intervals of a resource. If the resource is not available, potentially no interval returned.

It is assumed that the intervals are disjunct though.

Parameters:

resource

Returns:

list of intervals of the form (start, end, value), which means from time start to time end, there are value of the resource available. NB: the start is included, the end is excluded (start <= t < end)

get_task_duration(task: tuple[int, int]) int[source]

Get task duration according to mode.

Parameters:

task

Returns:

class discrete_optimization.shop.jsp.problem.JobShopSolution(problem: CommonShopProblem, schedule: list[list[tuple[int, int]]], machine_index: list[list[int]] = None, recipe_index: list[list[int]] = None)[source]

Bases: AnyShopSolution, SinglemodeSolution[tuple[int, int]]

problem: JobShopProblem

Module contents