Class InducedIdleEventNode
java.lang.Object
com.dna.jopt.member.unit.AbstractOptimizationElement
com.dna.jopt.member.unit.node.AbstractNode
com.dna.jopt.member.unit.node.event.EventNode
com.dna.jopt.member.unit.node.event.InducedIdleEventNode
- All Implemented Interfaces:
IOptimizationElement,INode,Serializable
This class
- Since:
- 31/01/2020
- Version:
- 31/01/2020
- Author:
- DNA
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.dna.jopt.member.unit.IOptimizationElement
IOptimizationElement.OptimizationElementFlavour -
Field Summary
FieldsFields inherited from class com.dna.jopt.member.unit.AbstractOptimizationElement
dutyHours -
Constructor Summary
ConstructorsConstructorDescriptionInducedIdleEventNode(INode2NodeRelation rel, IOpeningHours openingHour, Duration duration) The constructor of anInducedIdleEventNodeto add to theNode IDtheRelationsto anotherNode.InducedIdleEventNode(String nodeId, IOpeningHours openingHour, Duration duration) The constructor of anInducedIdleEventNode. -
Method Summary
Modifier and TypeMethodDescriptionGets theTimeStampof the creation of theInducedIdleEventNodeas created bySystem.currentTimeMillis().getId()Gets theIDand the time it was created.Gets theIDof theMasterNode.static StringgetPartialNodeId(String masterNodeId, String relatedNodeId) Gets theNode IDand adds themasterNodeIdand therelatedNodeId.Gets theIDof theRelatedNode.static InducedIdleEventNodegetShrinkedCopy(InducedIdleEventNode baseEvent, long shinkMillis, long safetyAdditionalDuration) Gets a copy of the inputNodewhere the inputshinkMillisandsafetyAdditionalDurationare substracted or added respectively from/to the end of thetimeWindowof theOpeningHoursin seconds.booleanChecks for route dependent visit duration.voidsetCreationTimeStamp(long creationTimeStamp) Sets the input in the form ofSystem.currentTimeMillis()as theTimeStampwhen theInducedIdleEventNodewas created.voidsetMasterNodeId(String connectedMasterNodeId) Sets the inputIDas theMasterNode.voidsetRelatedNodeId(String connectedRelatedNodeId) Sets the inputIDas theRelatedNodeMethods inherited from class com.dna.jopt.member.unit.node.event.EventNode
getFlavour, hasRealGeoLocation, isPartialExchangeIdleForDrivingTime, isPillarNode, setIsPartialExchangeIdleForDrivingTimeMethods 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, 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, 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, getLatitude, getLocationId, getLongitude, getNodeConnection, getNodeConnectionKeySet, getNodeConnections, getPosition, getPreferredHoursInteractionController, putNodeConnection, putNodeConnectionFromElement, removeNodeConnection, setConstraintAliasId, setDistMatrixId, setDutyHours, setExtraInfo, setId, setLatitude, setLocationId, setLongitude, setPosition
-
Field Details
-
RELATED_ELEMENT_INDEX
public static final int RELATED_ELEMENT_INDEX- See Also:
-
-
Constructor Details
-
InducedIdleEventNode
The constructor of anInducedIdleEventNode.- Parameters:
nodeId- the string ID of theNodeopeningHour- the iOpeningHourduration- the duration of theidle time
-
InducedIdleEventNode
The constructor of anInducedIdleEventNodeto add to theNode IDtheRelationsto anotherNode.- Parameters:
rel- the iNode2NodeRelationopeningHour- the iOpeningHourduration- the duration of theidle time
-
-
Method Details
-
getPartialNodeId
Gets theNode IDand adds themasterNodeIdand therelatedNodeId.Used in
InducedIdleEventNode(INode2NodeRelation, IOpeningHours, Duration)to add theIDsof theMasterNodeand theRelatedNodeto the to theIDof theInducedIdleEventNode- Parameters:
masterNodeId- the stringIDof theMasterNoderelatedNodeId- the stringIDof theRelatedNode- Returns:
- the
IDin conjunction with theMaster-andRelatedNode ID
-
getId
Gets theIDand the time it was created.- Specified by:
getIdin interfaceIOptimizationElement- Overrides:
getIdin classAbstractOptimizationElement- Returns:
- the
ID String
-
getShrinkedCopy
public static InducedIdleEventNode getShrinkedCopy(InducedIdleEventNode baseEvent, long shinkMillis, long safetyAdditionalDuration) Gets a copy of the inputNodewhere the inputshinkMillisandsafetyAdditionalDurationare substracted or added respectively from/to the end of thetimeWindowof theOpeningHoursin seconds.- Parameters:
baseEvent- the node to shrinkshinkMillis- the long milliseconds to substract from the end of theOpeningHourssafetyAdditionalDuration- the long milliseconds to add to the end of theOpeningHours- Returns:
- a copy of the
Nodewith the changedTimeWindow
-
setMasterNodeId
Sets the inputIDas theMasterNode.This method does not actually set up
Relationsbut only sets the inputStringin theclass variable- Parameters:
connectedMasterNodeId- the stringIDof theMasterNode
-
setRelatedNodeId
Sets the inputIDas theRelatedNodeThis method does not actually set up
Relationsbut only sets the inputStringin theclass variable- Parameters:
connectedRelatedNodeId- the stringIDof theMasterNode
-
setCreationTimeStamp
public void setCreationTimeStamp(long creationTimeStamp) Sets the input in the form ofSystem.currentTimeMillis()as theTimeStampwhen theInducedIdleEventNodewas created.- Parameters:
creationTimeStamp- the longTimeStamp
-
getMasterNodeId
Gets theIDof theMasterNode.- Returns:
- the optional
ID
-
getRelatedNodeId
Gets theIDof theRelatedNode.- Returns:
- the optional
ID
-
getCreationTimeStamp
Gets theTimeStampof the creation of theInducedIdleEventNodeas created bySystem.currentTimeMillis().- Returns:
- the timestamp in milliseconds
-
hasRouteDependentVisitDuration
public boolean hasRouteDependentVisitDuration()Description copied from interface:INodeChecks for route dependent visit duration.- Specified by:
hasRouteDependentVisitDurationin interfaceINode- Overrides:
hasRouteDependentVisitDurationin classAbstractNode- Returns:
- true, if successful
-