Detailed Scheduler

The Detailed Scheduler task is part of the optimization suite. It schedules a set of tasks on one or more machines of a production plant, satisfying a set of constraints and minimizing (or balancing) a set of costs the user can select.

The task is made of two main tabs:

  • the Options tab, where all the customization options are set, divided into the Basic, Advanced, Resources, Workers, Constraints and Costs tabs.

  • the Results tab, where general information on the computation is displayed.


The Input Dataset

The Detailed Scheduler task requires a single input dataset describing, the whole hierarchy of jobs, tasks and modes through a set of shared key attributes, together with the machines, the resources, the workers and the constraints involved in the scheduling problem.

Jobs, tasks and modes

The dataset is organized around three nested concepts:

  • Jobs are collections of tasks. Each job has a hard completion time, that is the maximum time by which every task belonging to that job must end.

  • Tasks are the operations that must be scheduled on the machines. Each task has a demand, that is the amount of “work” the Detailed Scheduler task tries to satisfy by scheduling the task’s modes on the machines.

  • Modes are the different ways in which a task can be carried out. As an example, a task representing the production of a certain SKU may have one mode for each machine on which that SKU can be produced. A task can therefore be seen as a collection of modes.

For this hierarchy to be resolved correctly, the dataset must be built so that:

  • from the name of a mode, the name of the corresponding task can be uniquely determined;

  • from the name of a task, the name of the corresponding job can be uniquely determined.

Optionally, each mode can be associated with a run rate, that is the conversion factor between the unit of time and the unit of demand: the unit of time multiplied by the run rate gives the amount of demand that the mode satisfies in a unit of time.

Repeated rows and many-to-many relationships

Since the input is a plain tabular dataset, whenever an entity must be associated with more than one related item, the same key value must be repeated across multiple rows, one for each related item. This mechanism is used, for example, to:

  • associate a mode with the multiple machines on which it can run (or must run simultaneously, see Resources tab below);

  • list the multiple breaks of a machine;

  • list the multiple triplets (worker, machine, department) belonging to the same worker assignment (see Workers tab below);

  • list the multiple pairs of modes involved in the same binary constraint, or the multiple elements belonging to the same group constraint (see Constraints tab below).

Note

It is only necessary to fill an attribute’s value once for each key: for example, the capacity of a renewable resource, or the start and end of a worker assignment, only need to be specified in one of the rows sharing that key, and do not need to be repeated in the other rows sharing the same key.


The Options tab

The Options tab contains all the characteristics of the analysis which can be customized. It is divided into six smaller tabs: the Basic, Advanced, Resources, Workers, Constraints and Costs tabs.

Basic tab

The Basic tab contains the minimal set of options required for the task to work, on the left-hand side, and the solver options, on the right-hand side.

  • In the Jobs section:
    • Attribute for the job name: select the attribute containing the name of each job. This field is mandatory.

    • Attribute for the hard completion time of the job: select the attribute containing the hard completion time of each job, that is the maximum time by which every task of the job must end. This field is mandatory.

  • In the Tasks section:
    • Attribute for the task name: select the attribute containing the name of each task. This field is mandatory.

    • Attribute for the demand of the task: select the attribute containing the demand of each task, that is the quantity the Detailed Scheduler task tries to satisfy by scheduling the task’s modes. This field is mandatory.

  • In the Modes section:
    • Attribute for the mode name: select the attribute containing the name of each mode. This field is mandatory.

    • Attribute for the mode run rate: select the attribute containing the run rate of each mode, that is the conversion factor between the unit of time and the unit of demand. If not selected, the run rate defaults to 1.

In the Solver section, the following options can be found:

  • Solver used for optimization: select from the drop-down list the solver. The only available solver is Hexaly (more information can be found here).

  • Maximum execution time (seconds): specify how many seconds the task can run.

  • Maximum number of iterations: specify the maximum number of iterations the task can perform.

  • Maximum number of nodes: specify the maximum number of nodes the solver can explore.

  • Set an absolute gap limit: specify the limit of the absolute cost gap between the feasible solution and the optimal solution.

  • Set a relative gap limit: specify the limit of the relative cost gap between the feasible solution and the optimal solution.

  • Seed for the solver: specify the seed used by the solver.

Note

Selecting the value 0 for the Maximum execution time, Maximum number of iterations, Maximum number of nodes, absolute gap limit and relative gap limit options means that no limit is set for the corresponding option.

Tip

It is recommended to always select a Maximum execution time, since the method used for the optimization can otherwise take a long time to guarantee that the solution found is the optimal one.

https://cdn.rulex.ai/docs/Factory/TabBasic.webp

Advanced tab

The Advanced tab contains further, optional options for jobs, tasks and modes.

  • In the Jobs section:
    • Attribute for the earliest time the job may start: select the attribute forcing the corresponding job not to start earlier than the indicated time.

    • Attribute for the soft target completion time of the job: select the attribute containing the soft completion time of each job. Unlike the hard completion time, this is not a mandatory deadline: it is only relevant if a cost involving it is selected in the Costs tab.

  • In the Tasks section:
    • Attribute for task optionality: select a binary or integer (0/1) attribute marking a task as optional. A task with value 1 is optional, meaning its demand must be satisfied only if one of its modes is scheduled: if the task is not scheduled, not satisfying its demand does not add any cost. This option is useful mainly when combined with group constraints (see the Constraints tab below).

    • Maximum number of modes that can be chosen for the task: select the attribute limiting how many modes of the task can be selected. If not indicated, any number of modes can be selected, and all of them may contribute to satisfying the task’s demand.

    • Attribute for the minimum hard quantity of task: select the attribute defining the minimum quantity of the demand that must be satisfied.

    • Attribute for the maximum hard quantity of task: select the attribute defining the maximum quantity of the demand that can be satisfied.

Warning

Selecting a minimum hard quantity makes the whole problem prone to infeasibility. If a minimum is not selected, the task remains feasible for sure.

  • In the Modes section:
    • Attribute for the mode earliest start: select the attribute defining the earliest time the mode, if scheduled, can start.

    • Attribute for the mode latest start: select the attribute defining the latest time the mode, if scheduled, can start.

    • Attribute for the mode earliest end: select the attribute defining the earliest time the mode, if scheduled, can end.

    • Attribute for the mode latest end: select the attribute defining the latest time the mode, if scheduled, can end.

    • Attribute for the mode minimum run time: select the attribute forcing the mode, if scheduled, to run for at least the indicated amount of time.

    • Attribute for the mode maximum run time: select the attribute forcing the mode, if scheduled, to run for at most the indicated amount of time.

https://cdn.rulex.ai/docs/Factory/TabAdvanced.webp

Resources tab

The Resources tab contains the options describing the machines, the renewable resources and the consumable resources of the plant.

  • In the Machines section:
    • Attribute for the machine name: select the attribute containing the name of each machine. If not selected, the task assumes there is only one machine, and all tasks are scheduled on it. The rows where this attribute and the mode name attribute are both filled define on which machine(s) each mode can run. Repeating the same mode on different rows, each with a different machine, means that the mode must run simultaneously on all those machines: if this is not the intended behavior, a different mode should be used instead.

    • Starting time of the break: select the attribute containing the starting time of a machine’s break.

    • Ending time of the break: select the attribute containing the ending time of a machine’s break. Multiple breaks for the same machine are defined by repeating the machine on different rows, one for each break.

  • In the Renewable resources section:
    • Attribute for the renewable resource name: select the attribute containing the name of each renewable resource. A renewable resource is used by a mode while it is running, and freed again once the mode ends. If not selected, the task assumes there is only one renewable resource.

    • Attribute for the renewable resource capacity: select the attribute containing the capacity of each renewable resource, that is the amount that must not be exceeded at any time.

    • Quantity of renewable resource used by the mode: select the attribute containing the quantity of the renewable resource consumed by each mode while it is running. If not selected, each mode is assumed to use one unit of the corresponding renewable resource.

Note

At any time, the sum of the quantities used by all the active modes must not exceed the capacity of the renewable resource.

  • In the Consumable resources section:
    • Attribute for the consumable resource name: select the attribute containing the name of each consumable resource. Unlike renewable resources, a consumable resource can be both produced and consumed by tasks. If not selected, the task assumes there is only one consumable resource.

    • Minimum quantity allowed for the consumable resource: select the attribute containing the minimum inventory allowed for the resource.

    • Maximum quantity allowed for the consumable resource: select the attribute containing the maximum inventory allowed for the resource.

    • Attribute for the initial inventory of the consumable resource: select the attribute containing the initial inventory of the resource.

    • Quantity per unit of time of consumable resource produced: select the attribute containing the quantity of the resource produced, per unit of time, by a mode.

    • Quantity per unit of time of consumable resource consumed: select the attribute containing the quantity of the resource consumed, per unit of time, by a mode.

Note

Both the minimum and the maximum quantity are optional, but if neither is selected the consumable resource is not taken into account, since these two options define the constraint on the resource’s inventory. Production of a consumable resource happens at the end of a mode’s runtime, while consumption happens at the beginning of it.

https://cdn.rulex.ai/docs/Factory/TabResources.webp

Workers tab

The Workers tab contains the options describing the workers required to run certain modes.

  • In the Basic section:
    • Attribute for the name of the worker: select the attribute containing the name of each worker. This field is mandatory if at least one attribute is specified in this tab.

    • Attribute for the name of the department: select the attribute containing the name of the department in which each worker can work. If not selected, the task assumes there is only one department.

    • Attribute for the name of the assignment: select the attribute containing the name of each assignment. An assignment is a collection of (worker, machine, department) triplets, saying that a worker can work on a machine for a department. Multiple triplets can be put in the same assignment to say that several workers must work simultaneously, but this is an advanced use of the task: it is recommended to put only one triplet per assignment. This field is mandatory if the workers’ logic is used.

    • Attribute for the start of the assignment: select the attribute containing the start of each assignment. This field is mandatory if the workers’ logic is used.

    • Attribute for the end of the assignment: select the attribute containing the end of each assignment. This field is mandatory if the workers’ logic is used.

    • Number of workers required on mode, line, department: select the attribute containing the number of workers required by a specific combination of mode, machine and department. If no mode requires workers, no worker will be scheduled and no assignment will be selected. This field is mandatory to activate the workers’ logic.

Note

Only one row of the dataset needs to specify the worker, machine and department (and, if used, the number of workers required) corresponding to a given assignment; the same value does not need to be repeated on the other rows sharing that assignment.

  • In the Advanced section:
    • Attribute for the name of the work shift: select the attribute containing the name of each work shift. If not selected, a shift is assumed to be defined by the start and the end of the assignments: all assignments with the same start and the same end are considered to belong to the same shift.

    • Attribute for maximum working time of each worker: select the attribute containing the maximum total time, summing all the assignments selected, that a worker can work.

Warning

The assignments of the same worker belonging to different shifts must not overlap. If they do, the Detailed Scheduler task raises an error.

https://cdn.rulex.ai/docs/Factory/TabWorkers.webp

Constraints tab

The Constraints tab contains the options to add binary constraints, involving pairs of modes, and group constraints, involving groups of modes, tasks, jobs, assignments or shifts.

Binary constraints

  • Attribute for the “to mode” in binary constraints: select the attribute containing the name of the second mode of the pair. Together with the mode name attribute, this defines, on the same row of the dataset, a pair of modes on which a binary constraint is applied.

  • Attribute for the changeover time: select the attribute containing the changeover time, that is the time that must pass between the end of the first mode and the start of the second mode, if both are scheduled subsequently on the same machine. If not selected, the changeover time defaults to 0. A changeover time can be made specific to a machine by also filling the machine name attribute on the corresponding row: if the machine name is not indicated, the changeover time is applied to all the machines shared by the two modes.

  • Attribute for the name of binary constraints on modes: select the attribute containing the name of the constraint to apply to the pair of modes. See Accepted binary constraint strings below for the list of accepted values.

  • Attribute for the delay parameters: select the attribute containing the (optional) delay parameter used by binary constraints to add variability. See Accepted binary constraint strings below.

Accepted binary constraint strings

Let A be the mode in the mode name attribute, and B the mode in the to mode attribute. The following strings are accepted in the Attribute for the name of binary constraints on modes option:

Accepted string

Resulting constraint

s <= s

the start of the mode A plus the (optional) delay must be lower than or equal to the start of the mode B, if both scheduled

s <= e

the start of the mode A plus the (optional) delay must be lower than or equal to the end of the mode B, if both scheduled

e <= s

the end of the mode A plus the (optional) delay must be lower than or equal to the start of the mode B, if both scheduled

e <= e

the end of the mode A plus the (optional) delay must be lower than or equal to the end of the mode B, if both scheduled

s < s

the start of the mode A plus the (optional) delay must be lower than the start of the mode B, if both scheduled

s < e

the start of the mode A plus the (optional) delay must be lower than the end of the mode B, if both scheduled

e < s

the end of the mode A plus the (optional) delay must be lower than the start of the mode B, if both scheduled

e < e

the end of the mode A plus the (optional) delay must be lower than the end of the mode B, if both scheduled

s == s

the distance between the start of the mode A and the start of the mode B must be at most the (optional) delay, if both scheduled

s == e

the distance between the start of the mode A and the end of the mode B must be at most the (optional) delay, if both scheduled

e == s

the distance between the end of the mode A and the start of the mode B must be at most the (optional) delay, if both scheduled

e == e

the distance between the end of the mode A and the end of the mode B must be at most the (optional) delay, if both scheduled

s != s

the distance between the start of the mode A and the start of the mode B must be more than the (optional) delay, if both scheduled

s != e

the distance between the start of the mode A and the end of the mode B must be more than the (optional) delay, if both scheduled

e != s

the distance between the end of the mode A and the start of the mode B must be more than the (optional) delay, if both scheduled

e != e

the distance between the end of the mode A and the end of the mode B must be more than the (optional) delay, if both scheduled

ifelse

if the mode A is scheduled then the mode B must be scheduled (the optional delay parameter is ignored)

Group constraints

  • Attribute for the name of the group constraints: select the attribute containing the name of the constraint to apply to the group. See Accepted group constraint strings below for the list of accepted values.

  • Attribute for the group id parameter: select the attribute containing a unique ID identifying a group of modes, tasks, jobs, assignments or shifts, on which the constraint is applied.

  • Attribute for additional optional parameter: select the attribute containing the (optional) additional parameter used, together with the constraint name, to further define the constraint. See Accepted group constraint strings below.

For a given group ID, the kind of element the group is made of is determined by looking, in order, for the mode name, the task name, the job name, the assignment name and the shift name: the group is made of the first of these that is filled, for the rows sharing that group ID.

Note

Be consistent for a given group ID: if a group is meant to be made of tasks, only fill the task name (and not, for example, both the task name and the mode name) on the rows sharing that group ID.

Accepted group constraint strings

Let n be the (optional) additional parameter. If not indicated, n = 1.

Accepted string

Resulting constraint

atLeast

at least n elements of the group must be scheduled

atMost

at most n elements of the group must be scheduled

exactly

exactly n elements of the group must be scheduled

allNone

all elements of the group or none must be scheduled (the optional additional parameter is ignored in this case)

https://cdn.rulex.ai/docs/Factory/TabConstraints.webp

Costs tab

The Costs tab lists all the costs the Detailed Scheduler task can minimize.

Each cost can be enabled or disabled independently. For each enabled cost, the following can be set:

  • a priority: the optimization runs in a multi-target way, minimizing costs with a lower priority value first, then costs with higher priority values.

  • a coefficient: multiple costs sharing the same priority are summed linearly, and the coefficient is the coefficient of that linear combination.

  • a weight: since each cost refers to a specific key (for example modes, or jobs), an attribute can be selected to put a weight on that key, to obtain a more precise cost.

The available costs are:

  • Changeovers: minimizes the changeover time between modes. The weight refers to the pair of mode and to mode.

  • Earliness: minimizes the amount of time by which each job ends its production before its soft target completion time. The weight refers to jobs.

  • Tardiness: minimizes the amount of time by which each job ends its production after its soft target completion time. The weight refers to jobs.

  • Tardy jobs: minimizes the number of jobs that end their production after their soft target completion time. The weight refers to jobs.

  • Mode time: minimizes the total runtime of the scheduled modes. The weight refers to modes.

  • Mode choice: minimizes the number of modes chosen. The weight refers to modes.

  • Unsatisfied tasks: minimizes the number of tasks for which the demand has not been fully satisfied. The weight refers to tasks.

  • Maximum unsatisfied demand: minimizes the maximum unsatisfied demand among all the tasks. The weight refers to tasks.

  • Unsatisfied demand: minimizes the total unsatisfied demand. This is the default cost. The weight refers to tasks.

  • Assignments: minimizes the number of assignments chosen. The weight refers to assignments.

  • Assignment time: minimizes the total time of the chosen assignments. The weight refers to assignments.

  • Shifts: minimizes the number of shifts. The weight refers to shifts.

  • Workers: minimizes the number of workers chosen. The weight refers to workers.

https://cdn.rulex.ai/docs/Factory/TabCosts.webp

Warning

Always remember to save and compute the task.


The Results tab

The Results tab provides information on the computation, in the same way as the other optimization tasks. It is divided into two panels:

  • In the General Info panel, the following information can be found:
    • the Task Label

    • the Elapsed time

  • In the Result Quantities panel, the following information can be found:
    • the Status of the solver/solution

    • the Time spent by the solver to find the solution