public class MandatoryResourceConstraint extends BindingResourceConstraint
Resource
on a Node
so that the specified
Resource
is supposed to visit said Node
.
For a soft constraint
please use PreferredResourceConstraint
.
MY_TITLE
Constructor and Description |
---|
MandatoryResourceConstraint()
Puts a hard preferred constraint of a
Resource on a Node so that the specified
Resource is supposed to visit said Node . |
assessConstraint, getTitle, isSatisfied, toString
addResource, addResources, getMaxPriority, getPriority, getResourceIds, getResPriorityMap, hasMembers, isHard, removeResource, setIsHard, setMaxPriority, setResPriorityMap
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addResource, addResources, getMaxPriority, getPriority, getResourceIds, getResPriorityMap, removeResource
hasMembers, isHard, setIsHard
public MandatoryResourceConstraint()
Resource
on a Node
so that the specified
Resource
is supposed to visit said Node
.
Implementation example:
CapacityResource 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);
For a soft constraint
please use PreferredResourceConstraint
.Copyright © 2017–2023 DNA Evolutions GmbH. All rights reserved.