Class MandatoryResourceConstraint
java.lang.Object
com.dna.jopt.member.unit.condition.resource.AbstractResourceConstraint
com.dna.jopt.member.unit.condition.resource.BindingResourceConstraint
com.dna.jopt.member.unit.condition.resource.MandatoryResourceConstraint
- All Implemented Interfaces:
IConstraint
,IConstraintResource
,Serializable
This class puts a hard preferred constraint of a
Resource
on a Node
so that the specified
Resource
is supposed to visit said Node
.
For a soft constraint
please use PreferredResourceConstraint
.
- Since:
- 13/08/2019
- Version:
- 23/01/2020
- Author:
- DNA
- See Also:
-
Field Summary
Fields inherited from class com.dna.jopt.member.unit.condition.resource.BindingResourceConstraint
MY_TITLE
-
Constructor Summary
ConstructorDescriptionPuts a hard preferred constraint of aResource
on aNode
so that the specifiedResource
is supposed to visit saidNode
. -
Method Summary
Methods inherited from class com.dna.jopt.member.unit.condition.resource.BindingResourceConstraint
assessConstraint, getTitle, isSatisfied, toString
Methods inherited from class com.dna.jopt.member.unit.condition.resource.AbstractResourceConstraint
addResource, addResources, getMaxPriority, getPriority, getResourceIds, getResPriorityMap, hasMembers, isHard, removeResource, setIsHard, setMaxPriority, setResPriorityMap
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.dna.jopt.member.unit.condition.IConstraint
hasMembers, isHard, setIsHard
Methods inherited from interface com.dna.jopt.member.unit.condition.resource.IConstraintResource
addResource, addResources, getMaxPriority, getPriority, getResourceIds, getResPriorityMap, removeResource
-
Constructor Details
-
MandatoryResourceConstraint
public MandatoryResourceConstraint()Puts a hard preferred constraint of aResource
on aNode
so that the specifiedResource
is supposed to visit saidNode
.Implementation example:
For aCapacityResource resource = new CapacityResource( "Jack", 50.775346, 6.083887, maxWorkingTime, maxDistanceKmW, workingHours); IConstraintResource jackMandatoryConstraint = new MandatoryResourceConstraint(); jackMandatoryConstraint.addResource("Jack", 10); TimeWindowGeoNode aachen = new TimeWindowGeoNode("Aachen", 50.775346, 6.083887, weeklyOpeningHours, visitDuration, 1); aachen.addConstraint(jackMandConstraint); this.addElement(aachen);
soft constraint
please usePreferredResourceConstraint
.
-