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
ConstructorsConstructorDescriptionPuts a hard preferred constraint of aResourceon aNodeso that the specifiedResourceis supposed to visit saidNode. -
Method Summary
Methods inherited from class com.dna.jopt.member.unit.condition.resource.BindingResourceConstraint
assessConstraint, getTitle, isSatisfied, toStringMethods inherited from class com.dna.jopt.member.unit.condition.resource.AbstractResourceConstraint
addResource, addResources, getMaxPriority, getPriority, getResourceIds, getResPriorityMap, hasMembers, isHard, removeResource, setIsHard, setMaxPriority, setResPriorityMapMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.dna.jopt.member.unit.condition.IConstraint
hasMembers, isHard, setIsHardMethods 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 aResourceon aNodeso that the specifiedResourceis 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 constraintplease usePreferredResourceConstraint.
-