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
ConstructorsConstructorDescriptionTimeWindowGeoNode(String nodeId, double latitude, double longitude, IOpeningHours openingHour, Duration visitDuration, int priority) The constructor for aTimeWindowGeoNodewhere theOpeningHoursare 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 ofNodeof the element.booleanReturnstrueif the item has a real geo location.booleanChecks 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, isOnBlackList, isOptimizable, isOptional, isReturnStart, isStayNode, isUnassigned, isUnloadAll, isUseJointVisitDuration, isWaitOnEarlyArrival, isWaitOnEarlyArrivalFirstNode, isWorkNode, putResourceToBlacklist, 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, toStringMethods 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, setPositionMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods 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 theconstructorfor aTimeWindowGeoNodethat is a normalINode. It specifies a name and a place thatIResourcehave to visit, including theIOpeningHourswhen the work has to be done and thedurationof 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 aTimeWindowGeoNodewhere theOpeningHoursare 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:IOptimizationElementGets the flavour which spells out the kind ofNodeof the element.- Returns:
- the flavour
-
hasRealGeoLocation
public boolean hasRealGeoLocation()Description copied from interface:IOptimizationElementReturnstrueif the item has a real geo location. For example, anEventNodehas no real geo location.- Returns:
- true, if real geo location exists
-
isPillarNode
public boolean isPillarNode()Description copied from interface:INodeChecks if the node is aisPillarNode.PillarNodeswill only be served if theResourcearrives on time. If theResourceis arriving too late thePillarNodewill be skipped.- Returns:
- the boolean
isPillarNode
-