labscheduler.solvers.specialized_pd_implementation module

Basic priority dispatching framework This module contains a basic implementation of the priority dispatching framework.

The priority dispatching framework is a general framework for solving scheduling problems. It is based on the idea of assigning priorities to actions (operations or jobs) and then scheduling them in order of priority. The framework consists of a class PDFramework, which implements the basic algorithm, and a class Action, which represents an action that can be scheduled. The framework can be extended by subclassing PDFramework and overriding the sort_actions method.

The basic algorithm works as follows:
  1. The algorithm is initialized with a list of actions to be scheduled.

  2. The algorithm sorts the actions according to their priority.

  3. The algorithm iterates over the sorted list of actions. For each action, it tries to schedule it as early as

    possible, without violating any constraints. If this is not possible, the action is scheduled as late as possible.

  4. The algorithm returns the schedule.

This module contains an extension of the basic priority dispatching framework, called MachinePriorityHeuristic. It gives priority to operations on machines with a more critical workload and the waiting times on those. The module also defines a function to get algorithm information. An extension of the basic priority dispatching framework.

class labscheduler.solvers.specialized_pd_implementation.BottleneckPD[source]

Bases: PDFramework

Simple extension of the priority dispatching heuristic, that gives priority to operations on machines with a more critical workload and the waiting times on those, i.e., where the ratio of the total duration of all operations on it to the process capacity is the largest. These machines are the bottleneck of the process and should be prioritized to avoid delays.

This class is a subclass of PDFramework, which implements the basic priority dispatching algorithm.

workload

A dictionary that maps machine names to their workload, which is a measure of how busy the machine is. The workload is computed in the reset() method.

Type:

Dict[str, float]

sort_actions(action_list

List[Action]) -> List[Action]: Sorts a list of actions according to several criteria, including the workload of the machine, the waiting time on the machine, the minimum start time of the action, the wait cost of the job, and the priority of the action. Returns the sorted list of actions.

reset(offset

float = 10): Resets the state of the algorithm and computes the workload of each machine based on the jobs assigned to it. The offset parameter is passed to the superclass method.

get_algorithm_info() AlgorithmInfo[source]

Returns an AlgorithmInfo object that describes the algorithm.

_abc_impl = <_abc._abc_data object>
static get_algorithm_info() AlgorithmInfo[source]

Returns information about the PDF algorithm.

Returns:

Information about the PDF algorithm.

is_doable(action: Action) bool[source]

Checks whether the given action is also possible in the current state of the machines. :param action: :return:

reset(offset: float = 10)[source]

Prepares to compute a new schedule by resetting all the inner structures. :param offset: :return:

sort_actions(action_list: list[Action]) list[Action][source]

Sorts the given list of actions according to the current policies.

Parameters:

action_list – List of actions to sort.

Returns:

Sorted version of the input list.

workload: dict[str, float]
class labscheduler.solvers.specialized_pd_implementation.LPTF[source]

Bases: PDFramework

_abc_impl = <_abc._abc_data object>
static get_algorithm_info() AlgorithmInfo[source]

Returns information about the PDF algorithm.

Returns:

Information about the PDF algorithm.

sort_actions(action_list: list[Action]) list[Action][source]

Sorts the given list of actions according to the current policies.

Parameters:

action_list – List of actions to sort.

Returns:

Sorted version of the input list.

class labscheduler.solvers.specialized_pd_implementation.Random[source]

Bases: PDFramework

_abc_impl = <_abc._abc_data object>
static get_algorithm_info() AlgorithmInfo[source]

Returns information about the PDF algorithm.

Returns:

Information about the PDF algorithm.

sort_actions(action_list: list[Action]) list[Action][source]

Sorts the given list of actions according to the current policies.

Parameters:

action_list – List of actions to sort.

Returns:

Sorted version of the input list.