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
Fields inherited from class com.dna.jopt.member.unit.AbstractOptimizationElement
dutyHours
-
Constructor Summary
ConstructorDescriptionInducedIdleEventNode
(INode2NodeRelation rel, IOpeningHours openingHour, Duration duration) The constructor of anInducedIdleEventNode
to add to theNode ID
theRelations
to anotherNode
.InducedIdleEventNode
(String nodeId, IOpeningHours openingHour, Duration duration) The constructor of anInducedIdleEventNode
. -
Method Summary
Modifier and TypeMethodDescriptionGets theTimeStamp
of the creation of theInducedIdleEventNode
as created bySystem.currentTimeMillis()
.getId()
Gets theID
and the time it was created.Gets theID
of theMasterNode
.static String
getPartialNodeId
(String masterNodeId, String relatedNodeId) Gets theNode ID
and adds themasterNodeId
and therelatedNodeId
.Gets theID
of theRelatedNode
.static InducedIdleEventNode
getShrinkedCopy
(InducedIdleEventNode baseEvent, long shinkMillis, long safetyAdditionalDuration) Gets a copy of the inputNode
where the inputshinkMillis
andsafetyAdditionalDuration
are substracted or added respectively from/to the end of thetimeWindow
of theOpeningHours
in seconds.boolean
Checks for route dependent visit duration.void
setCreationTimeStamp
(long creationTimeStamp) Sets the input in the form ofSystem.currentTimeMillis()
as theTimeStamp
when theInducedIdleEventNode
was created.void
setMasterNodeId
(String connectedMasterNodeId) Sets the inputID
as theMasterNode
.void
setRelatedNodeId
(String connectedRelatedNodeId) Sets the inputID
as theRelatedNode
Methods inherited from class com.dna.jopt.member.unit.node.event.EventNode
getFlavour, hasRealGeoLocation, isPartialExchangeIdleForDrivingTime, isPillarNode, setIsPartialExchangeIdleForDrivingTime
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, 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, 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, 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 theNode
openingHour
- the iOpeningHourduration
- the duration of theidle time
-
InducedIdleEventNode
The constructor of anInducedIdleEventNode
to add to theNode ID
theRelations
to anotherNode
.- Parameters:
rel
- the iNode2NodeRelationopeningHour
- the iOpeningHourduration
- the duration of theidle time
-
-
Method Details
-
getPartialNodeId
Gets theNode ID
and adds themasterNodeId
and therelatedNodeId
.Used in
InducedIdleEventNode(INode2NodeRelation, IOpeningHours, Duration)
to add theIDs
of theMasterNode
and theRelatedNode
to the to theID
of theInducedIdleEventNode
- Parameters:
masterNodeId
- the stringID
of theMasterNode
relatedNodeId
- the stringID
of theRelatedNode
- Returns:
- the
ID
in conjunction with theMaster-
andRelatedNode ID
-
getId
Gets theID
and the time it was created.- Specified by:
getId
in interfaceIOptimizationElement
- Overrides:
getId
in classAbstractOptimizationElement
- Returns:
- the
ID String
-
getShrinkedCopy
public static InducedIdleEventNode getShrinkedCopy(InducedIdleEventNode baseEvent, long shinkMillis, long safetyAdditionalDuration) Gets a copy of the inputNode
where the inputshinkMillis
andsafetyAdditionalDuration
are substracted or added respectively from/to the end of thetimeWindow
of theOpeningHours
in seconds.- Parameters:
baseEvent
- the node to shrinkshinkMillis
- the long milliseconds to substract from the end of theOpeningHours
safetyAdditionalDuration
- the long milliseconds to add to the end of theOpeningHours
- Returns:
- a copy of the
Node
with the changedTimeWindow
-
setMasterNodeId
Sets the inputID
as theMasterNode
.This method does not actually set up
Relations
but only sets the inputString
in theclass variable
- Parameters:
connectedMasterNodeId
- the stringID
of theMasterNode
-
setRelatedNodeId
Sets the inputID
as theRelatedNode
This method does not actually set up
Relations
but only sets the inputString
in theclass variable
- Parameters:
connectedRelatedNodeId
- the stringID
of theMasterNode
-
setCreationTimeStamp
public void setCreationTimeStamp(long creationTimeStamp) Sets the input in the form ofSystem.currentTimeMillis()
as theTimeStamp
when theInducedIdleEventNode
was created.- Parameters:
creationTimeStamp
- the longTimeStamp
-
getMasterNodeId
Gets theID
of theMasterNode
.- Returns:
- the optional
ID
-
getRelatedNodeId
Gets theID
of theRelatedNode
.- Returns:
- the optional
ID
-
getCreationTimeStamp
Gets theTimeStamp
of the creation of theInducedIdleEventNode
as created bySystem.currentTimeMillis()
.- Returns:
- the timestamp in milliseconds
-
hasRouteDependentVisitDuration
public boolean hasRouteDependentVisitDuration()Description copied from interface:INode
Checks for route dependent visit duration.- Specified by:
hasRouteDependentVisitDuration
in interfaceINode
- Overrides:
hasRouteDependentVisitDuration
in classAbstractNode
- Returns:
- true, if successful
-