Class TaskScheduler
java.lang.Object
org.chocosolver.solver.constraints.Constraint
org.btrplace.scheduler.choco.extensions.TaskScheduler
public class TaskScheduler
extends org.chocosolver.solver.constraints.Constraint
A constraint to schedule tasks with regards to their resource usages on resources having a finite amount to share.
Tasks and resources can have multiple dimensions.
There is only 2 kind of tasks. cTasks that are already placed and necessarily starts at 0 and dTasks that
are not placed but end necessarily at the end of the schedule.
Inspired by the cumulative constraint.
- Author:
- Fabien Hermenier
-
Nested Class Summary
-
Field Summary
-
Constructor Summary
Constructors Constructor Description TaskScheduler(org.chocosolver.solver.variables.IntVar[] earlyStarts, org.chocosolver.solver.variables.IntVar[] lastEnds, int[][] capas, org.chocosolver.solver.variables.IntVar[] cHosters, int[][] cUsages, org.chocosolver.solver.variables.IntVar[] cEnds, org.chocosolver.solver.variables.IntVar[] dHosters, int[][] dUsages, org.chocosolver.solver.variables.IntVar[] dStarts, int[] assocs)
Make a new constraint. -
Method Summary
Methods inherited from class org.chocosolver.solver.constraints.Constraint
checkNewStatus, computeMaxPriority, declareAs, getCidxInModel, getName, getOpposite, getPropagator, getPropagators, getStatus, ignore, isEnabled, isReified, isSatisfied, makeOpposite, merge, post, reify, reifyWith, setEnabled, setName, setOpposite, toString
-
Constructor Details
-
TaskScheduler
public TaskScheduler(org.chocosolver.solver.variables.IntVar[] earlyStarts, org.chocosolver.solver.variables.IntVar[] lastEnds, int[][] capas, org.chocosolver.solver.variables.IntVar[] cHosters, int[][] cUsages, org.chocosolver.solver.variables.IntVar[] cEnds, org.chocosolver.solver.variables.IntVar[] dHosters, int[][] dUsages, org.chocosolver.solver.variables.IntVar[] dStarts, int[] assocs)Make a new constraint.- Parameters:
earlyStarts
- a variable for each resource to indicate the earliest moment a task can arrive on the resourcelastEnds
- a variable for each resource to indicate the latest moment a task can stay on the resourcecapas
- the capacity for each resource and for each dimensioncHosters
- the placement variable of each cTaskcUsages
- the resource usage of each cTask for each dimensioncEnds
- the moment each cTask endsdHosters
- the placement variable of each dTaskdUsages
- the resource usage of each dTask for each dimensiondStarts
- the moment each dTask startsassocs
- indicate association between cTasks and dTasks. Associated tasks cannot overlap on a same resource
-