labscheduler.solver_interface module¶
Interface of JSSP solver
- class labscheduler.solver_interface.AlgorithmInfo(name: str, is_optimal: bool, success_guaranty: bool, max_problem_size: int)[source]¶
Bases:
NamedTupleEvery algorithm should provide this basic information
- _asdict()¶
Return a new dict which maps field names to their values.
- _field_defaults = {}¶
- _fields = ('name', 'is_optimal', 'success_guaranty', 'max_problem_size')¶
- classmethod _make(iterable)¶
Make a new AlgorithmInfo object from a sequence or iterable
- _replace(**kwds)¶
Return a new AlgorithmInfo object replacing specified fields with new values
- is_optimal: bool¶
Alias for field number 1
- max_problem_size: int¶
Alias for field number 3
- name: str¶
Alias for field number 0
- success_guaranty: bool¶
Alias for field number 2
- class labscheduler.solver_interface.JSSPSolver[source]¶
Bases:
ABCThe interface of a JSSP solver used in the LabScheduler
- _abc_impl = <_abc._abc_data object>¶
- abstractmethod compute_schedule(inst: JSSP, time_limit: float, offset: float, **kwargs) tuple[Schedule | None, SolutionQuality][source]¶
Tries to compute a schedule for the given JSSP instance. Depending on the algorithm there might be no guaranty a solution is found. :param inst: The Problem instance :param time_limit: Maximum computation time(in seconds) the solver is allowed :param offset: Minimum time(in seconds) between call of the function and start time scheduled for any operation :param kwargs: Optional arguments custom to a solver :return: A valid schedule or None
- abstractmethod static get_algorithm_info() AlgorithmInfo[source]¶
Every algorithm should provide this basic information about itself :return: A typing.NamedTuple containing name, optimality, success guaranty and recommended maximum problem size