Class TimeWindowGeoNode
java.lang.Object
com.dna.jopt.member.unit.AbstractOptimizationElement
com.dna.jopt.member.unit.node.AbstractNode
com.dna.jopt.member.unit.node.geo.TimeWindowGeoNode
- All Implemented Interfaces:
IOptimizationElement
,INode
,Serializable
- Direct Known Subclasses:
PillarTimeWindowGeoNode
The
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
.- Since:
- 14/08/2019
- Version:
- 13/08/2019
- Author:
- DNA
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.dna.jopt.member.unit.IOptimizationElement
IOptimizationElement.OptimizationElementFlavour
-
Field Summary
Fields inherited from class com.dna.jopt.member.unit.AbstractOptimizationElement
dutyHours
-
Constructor Summary
ConstructorDescriptionTimeWindowGeoNode
(String nodeId, double latitude, double longitude, IOpeningHours openingHour, Duration visitDuration, int priority) The constructor for aTimeWindowGeoNode
where theOpeningHours
are not added as aList
.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) -
Method Summary
Modifier and TypeMethodDescriptionGets the flavour which spells out the kind ofNode
of the element.boolean
Returnstrue
if the item has a real geo location.boolean
Checks if the node is aisPillarNode
.Methods inherited from class com.dna.jopt.member.unit.node.AbstractNode
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
Methods inherited from class com.dna.jopt.member.unit.AbstractOptimizationElement
forceSetId, getConstraintAliasId, getDistMatrixId, getExtraInfo, getId, getLatitude, getLocationId, getLongitude, getNodeConnection, getNodeConnectionKeySet, getNodeConnections, getPosition, getPreferredHoursInteractionController, putNodeConnection, putNodeConnectionFromElement, removeNodeConnection, setConstraintAliasId, setDistMatrixId, setDutyHours, setExtraInfo, setId, setLatitude, setLocationId, setLongitude, setPosition
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.dna.jopt.member.unit.IOptimizationElement
forceSetId, getConstraintAliasId, getDistMatrixId, getExtraInfo, getId, getLatitude, getLocationId, getLongitude, getNodeConnection, getNodeConnectionKeySet, getNodeConnections, getPosition, getPreferredHoursInteractionController, putNodeConnection, putNodeConnectionFromElement, removeNodeConnection, setConstraintAliasId, setDistMatrixId, setDutyHours, setExtraInfo, setId, setLatitude, setLocationId, setLongitude, setPosition
-
Constructor Details
-
TimeWindowGeoNode
public TimeWindowGeoNode() -
TimeWindowGeoNode
public TimeWindowGeoNode(String nodeId, double latitude, double longitude, List<IOpeningHours> openingHours, Duration visitDuration, int importance) This is theconstructor
for aTimeWindowGeoNode
that is a normalINode
. It specifies a name and a place thatIResource
have to visit, including theIOpeningHours
when the work has to be done and theduration
of the work and theimportance
.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);
- Parameters:
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 Node
-
TimeWindowGeoNode
public TimeWindowGeoNode(String nodeId, com.dna.jopt.config.types.Position pos, List<IOpeningHours> openingHours, Duration visitDuration, int importance) -
TimeWindowGeoNode
public TimeWindowGeoNode(String nodeId, double latitude, double longitude, IOpeningHours openingHour, Duration visitDuration, int priority) The constructor for aTimeWindowGeoNode
where theOpeningHours
are not added as aList
.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);
- Parameters:
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 node
-
TimeWindowGeoNode
public TimeWindowGeoNode(String nodeId, com.dna.jopt.config.types.Position pos, IOpeningHours openingHour, Duration visitDuration, int priority)
-
-
Method Details
-
getFlavour
Description copied from interface:IOptimizationElement
Gets the flavour which spells out the kind ofNode
of the element.- Returns:
- the flavour
-
hasRealGeoLocation
public boolean hasRealGeoLocation()Description copied from interface:IOptimizationElement
Returnstrue
if the item has a real geo location. For example, anEventNode
has no real geo location.- Returns:
- true, if real geo location exists
-
isPillarNode
public boolean isPillarNode()Description copied from interface:INode
Checks if the node is aisPillarNode
.PillarNodes
will only be served if theResource
arrives on time. If theResource
is arriving too late thePillarNode
will be skipped.- Returns:
- the boolean
isPillarNode
-