Package com.artelys.kalis
Class KUnaryResourceConstraint
- java.lang.Object
-
- com.artelys.kalis.KConstraint
-
- com.artelys.kalis.KUnaryResourceConstraint
-
public class KUnaryResourceConstraint extends KConstraint
This constraint states that some tasks are not overlapping chronologically.
Resources (machines, raw material etc) can be of two different types :
- Disjunctive when the resource can process only one task at a time (represented by the class KUnaryResource).
- Cumulative when the resource can process several tasks at the same time (represented by the class
KDiscreteResource).
Traditional examples of disjunctive resources are Jobshop problems, cumulative resources are heavily used for the
Resource-Constrained Project Scheduling Problem (RCPSP). Note that a disjunctive resource is semantically equivalent
to a cumulative resource with maximal capacity one and unit resource usage for each task using this resource but this
equivalence does not hold in terms of constraint propagation.
The following schema shows an example with three tasks A,B and C executing on a disjunctive resource and on a
cumulative resource with resource usage 3 for task A, 1 for task B and 1 for task C :
- Since:
- 2016.1
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
KUnaryResourceConstraint.PropagationLevel
Differents level of propagation for the constraints
-
Field Summary
-
Fields inherited from class com.artelys.kalis.KConstraint
swigCMemOwn
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
KUnaryResourceConstraint(long cPtr, boolean cMemoryOwn)
KUnaryResourceConstraint(KUnaryResourceConstraint toCopy)
Copy constructorKUnaryResourceConstraint(java.lang.String name, KIntVarArray startsp)
Constructor
KUnaryResourceConstraint(java.lang.String name, KIntVarArray startsp, int propagation)
Constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addTask(com.artelys.kalis.SWIGTYPE_p_KTask_I task)
void
delete()
protected void
finalize()
protected static long
getCPtr(KUnaryResourceConstraint obj)
-
Methods inherited from class com.artelys.kalis.KConstraint
askIfEntailed, getArity, getCopyPtr, getCPtr, getInstance, getInstanceCopyPtr, getLinearRelaxation, getLinearRelaxation, getName, getPriority, getProblem, getTag, getTypeInfo, isGetLinearRelaxationImplemented, print, print, setName, setPriority, setTag
-
-
-
-
Constructor Detail
-
KUnaryResourceConstraint
protected KUnaryResourceConstraint(long cPtr, boolean cMemoryOwn)
-
KUnaryResourceConstraint
public KUnaryResourceConstraint(java.lang.String name, KIntVarArray startsp, int propagation)
Constructor
- Parameters:
name
- name of this constraintstartsp
- array of starts variablespropagation
- propagation scheme @see KUnaryResource#PropagationHint
-
KUnaryResourceConstraint
public KUnaryResourceConstraint(java.lang.String name, KIntVarArray startsp)
Constructor
- Parameters:
name
- name of this constraintstartsp
- array of starts variables- See Also:
KUnaryResource#PropagationHint
-
KUnaryResourceConstraint
public KUnaryResourceConstraint(KUnaryResourceConstraint toCopy)
Copy constructor
-
-
Method Detail
-
getCPtr
protected static long getCPtr(KUnaryResourceConstraint obj)
-
finalize
protected void finalize()
- Overrides:
finalize
in classKConstraint
-
delete
public void delete()
- Overrides:
delete
in classKConstraint
-
addTask
public void addTask(com.artelys.kalis.SWIGTYPE_p_KTask_I task)
-
-