public class TimeWindowGeoNode extends AbstractNode
TimeWindowGeoNode
is a normal INode
.
It specifies a name and a place that IResource
have to visit, including the
IOpeningHours
when the work has to be done and the duration
of the work and the importance
.IOptimizationElement.OptimizationElementFlavour
dutyHours
Constructor and Description |
---|
TimeWindowGeoNode() |
TimeWindowGeoNode(String nodeId,
double latitude,
double longitude,
IOpeningHours openingHour,
Duration visitDuration,
int priority)
The constructor for a
TimeWindowGeoNode where the OpeningHours are not added as a List . |
TimeWindowGeoNode(String nodeId,
double latitude,
double longitude,
List<IOpeningHours> openingHours,
Duration visitDuration,
int importance)
|
TimeWindowGeoNode(String nodeId,
com.dna.jopt.config.types.Position pos,
IOpeningHours openingHour,
Duration visitDuration,
int priority) |
TimeWindowGeoNode(String nodeId,
com.dna.jopt.config.types.Position pos,
List<IOpeningHours> openingHours,
Duration visitDuration,
int importance) |
Modifier and Type | Method and Description |
---|---|
IOptimizationElement.OptimizationElementFlavour |
getFlavour()
Gets the flavour which spells out the kind of
Node of the element. |
boolean |
hasRealGeoLocation()
Returns
true if the item has a real geo location. |
boolean |
isPillarNode()
Checks if the node is a
isPillarNode . |
addConstraint, addNode2NodeRelation, addQualification, addSubsequentSlaveNode, addSubsequentSlaveNodes, addViolation, decrementCurrentAutoFilterProtectedExecutions, detachNodeRelations, detachResourceConstraints, detachResourceConstraints, equals, getAutoFilterViolationCollector, getBaseJointVisitDuration, getBaseJointVisitDurationMillis, getBaseVisitDuration, getBaseVisitDurationMillis, getConstraints, getCurrentLeftAutoFilterProtectedExecutions, getDutyHours, getFirstNodeInRouteImportance, getFixCost, getImportance, getIndividualOfferedNodeMultiplier, getJointVisitDuration, getJointVisitDurationMillis, getLastKnownAttachedAndRemovedResIds, getLastNodeInRouteImportance, getLoad, getLockdownTime, getMinVisitDuration, getMinVisitDurationMillis, getNode2NodeRelations, getNodeColor, getNodeDepot, getNodeId, getOriginalDutyHours, getQualifications, getStayAtStartDuration, getSubsequentSlaveNodes, getTempImplausibleScore, getTotalLoadDimension, getUnloadAllDimension, getViolations, getVisitDurationMillis, hasFullJobLevelRelations, hashCode, hasRelations, hasRouteDependentVisitDuration, invokeDetachedResourceConstraints, isAllowMoveToReduceFlexTime, isAutoFilterProtected, isCausingIdleTimeCost, isDutyHoursIncludesVisitDuration, isOfferedNode, isOptimizable, isOptional, isReturnStart, isStayNode, isUnassigned, isUnloadAll, isUseJointVisitDuration, isWaitOnEarlyArrival, isWaitOnEarlyArrivalFirstNode, isWorkNode, removeConstraint, removeNode2NodeRelations, resetDutyHoursTempActivation, resetLockdownTime, resetSubsequentSlaveNodes, setAllowMoveToReduceFlexTime, setAutoFilterConstraints, setConstraints, setFirstNodeInRouteImportance, setFixCost, setHasRouteDependentVisitDuration, setImportance, setIndividualOfferedNodeMultiplier, setIsCausingIdleTimeCost, setIsDutyHoursIncludesVisitDuration, setIsOfferedNode, setIsOptional, setIsReturnStart, setIsStayNode, setIsWorkNode, setJointVisitDuration, setLastNodeInRouteImportance, setLoad, setLockdownTime, setMinAutoFilterProtectedExecutions, setMinimalVisitDuration, setNodeColor, setNodeDepot, setNodeId, setOptimizable, setOptimizable, setUnassigned, setUnloadAll, setUnloadAllDimension, setVisitDuration, setVisitDurationMillis, setWaitOnEarlyArrival, setWaitOnEarlyArrivalFirstNode, tempIncreaseImplausibleScore, tempSetActiveDutyHours, toString
forceSetId, getDistMatrixId, getExtraInfo, getId, getLatitude, getLocationId, getLongitude, getNodeConnection, getNodeConnectionKeySet, getNodeConnections, getPosition, getPreferredHoursInteractionController, putNodeConnection, putNodeConnectionFromElement, removeNodeConnection, setDistMatrixId, setDutyHours, setExtraInfo, setId, setLatitude, setLocationId, setLongitude, setPosition
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
forceSetId, getDistMatrixId, getExtraInfo, getId, getLatitude, getLocationId, getLongitude, getNodeConnection, getNodeConnectionKeySet, getNodeConnections, getPosition, getPreferredHoursInteractionController, putNodeConnection, putNodeConnectionFromElement, removeNodeConnection, setDistMatrixId, setDutyHours, setExtraInfo, setId, setLatitude, setLocationId, setLongitude, setPosition
public TimeWindowGeoNode()
public TimeWindowGeoNode(String nodeId, double latitude, double longitude, List<IOpeningHours> openingHours, Duration visitDuration, int importance)
constructor
for a TimeWindowGeoNode
that is a normal INode
. It specifies a name and a place that IResource
have to visit, including the IOpeningHours
when the work has to be done and the duration
of the work and the importance
.
Implementation example:
// Define the opening hours
List<IOpeningHours> weeklyOpeningHours = new ArrayList<IOpeningHours>();
weeklyOpeningHours.add(
new OpeningHours(
ZonedDateTime.of(2020, MAY.getValue(), 6, 14, 0, 0, 0, ZoneId.of("Europe/Berlin")),
ZonedDateTime.of(2020, MAY.getValue(), 6, 21, 0, 0, 0, ZoneId.of("Europe/Berlin"))));
weeklyOpeningHours.add(
new OpeningHours(
ZonedDateTime.of(2020, MAY.getValue(), 7, 14, 0, 0, 0, ZoneId.of("Europe/Berlin")),
ZonedDateTime.of(2020, MAY.getValue(), 7, 21, 0, 0, 0, ZoneId.of("Europe/Berlin"))));
// Defining an (optional) constraint
IConstraint typeConstraint = new TypeConstraint();
((TypeConstraint) typeConstraint).addType("plumbing");
typeConstraint.setIsHard(true);
Duration visitDuration = Duration.ofMinutes(20);
TimeWindowGeoNode aachen =
new TimeWindowGeoNode("Aachen", 50.775346, 6.083887, weeklyOpeningHours, visitDuration, 1);
aachen.addConstraint(typeConstraint);
this.addElement(aachen);
nodeId
- the string name of the nodelatitude
- the double latitude of the starting locationlongitude
- the double longitude of the starting locationopeningHours
- the iOpeninghours when Resources can visit the NodevisitDuration
- the duration length the visit will beimportance
- the int importance to visit this Nodepublic TimeWindowGeoNode(String nodeId, com.dna.jopt.config.types.Position pos, List<IOpeningHours> openingHours, Duration visitDuration, int importance)
public TimeWindowGeoNode(String nodeId, double latitude, double longitude, IOpeningHours openingHour, Duration visitDuration, int priority)
TimeWindowGeoNode
where the OpeningHours
are not added as a List
.
Implementation example:
// Defining opening hours
OpeningHours openingHours =
new OpeningHours(ZonedDateTime.of(2020, MAY.getValue(), 6, 14, 0, 0, 0, ZoneId.of("Europe/Berlin")),
ZonedDateTime.of(2020, MAY.getValue(), 6, 21, 0, 0, 0, ZoneId.of("Europe/Berlin")));
// Defining an (optional) constraint IConstraint typeConstraint = new TypeConstraint();
((TypeConstraint) typeConstraint).addType("plumbing"); typeConstraint.setIsHard(true);
Duration visitDuration = Duration.ofMinutes(20);
TimeWindowGeoNode aachen =
new TimeWindowGeoNode("Aachen", 50.775346, 6.083887, openingHours, visitDuration, 1);
aachen.addConstraint(typeConstraint);
this.addElement(aachen);
nodeId
- the string name of the nodelatitude
- the double latitude of the starting locationlongitude
- the double longitude of the starting locationopeningHour
- the iOpeninghoursvisitDuration
- the duration length the visit will bepriority
- the int priority to visit this nodepublic TimeWindowGeoNode(String nodeId, com.dna.jopt.config.types.Position pos, IOpeningHours openingHour, Duration visitDuration, int priority)
public IOptimizationElement.OptimizationElementFlavour getFlavour()
IOptimizationElement
Node
of the element.public boolean hasRealGeoLocation()
IOptimizationElement
true
if the item has a real geo location. For example, an EventNode
has no real geo location.public boolean isPillarNode()
INode
isPillarNode
. PillarNodes
will
only be served if the Resource
arrives on time. If the
Resource
is arriving too late the PillarNode
will be skipped.isPillarNode
Copyright © 2017–2023 DNA Evolutions GmbH. All rights reserved.