Class PillarEventNode
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.PillarEventNode
- All Implemented Interfaces:
IOptimizationElement,IPillarEventNode,INode,IPillarNode,Serializable
- Direct Known Subclasses:
PillarExtenbdableEventNode
This class describes an
EventNode that is also a Pillar. PillarEventNodes
cannot be attended outside of their OpeningHours, they will be unassigned in case they cannot
be visited in time.- Since:
- 01/09/2019
- Version:
- 01/09/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
ConstructorsConstructorDescriptionPillarEventNode(String nodeId, IDutyHours openingHour) Deprecated.PillarEventNode(String nodeId, IOpeningHours openingHour) APillarEventNodesdoes not have a location and cannot be attended outside of theirOpeningHours, it will be skipped instead.PillarEventNode(String nodeId, IOpeningHours openingHour, Duration visitDuration) APillarEventNodesdoes not have a location and cannot be attended outside of theirOpeningHours, it will be skipped instead.PillarEventNode(String nodeId, IOpeningHours openingHour, Duration visitDuration, boolean isDutyHoursIncludeVisitDuration) APillarEventNodesdoes not have a location and has to be started within theOpeningHoursifisDutyHoursIncludeVisitDurationisfalse. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddConstraint(IConstraint constraint) Adds aconstraintwhich limits theResourcesthat can serve thisNodeto those that have the specificQualificationto do so.voidattachResource(IResource mandatoryVisitor) Attaching themandatoryVisitoras the visitingresourcewill be treated as ahard constraintif amandatoryVisitorwas set using this method.voidRemoves allIConstraint.voiddetachResourceConstraints(String resId) booleanGets theidof theattachedres, returnsnullif noresourcehas been attached.Gets the flavour which spells out the kind ofNodeof the element.booleaninthashCode()booleanGets whether thisNodehas a location.booleanChecks if theNodeis protected from being filtered.booleanSomePillarsthat are scheduled are not actually jobs.booleanChecks if thePillaris anAnchorPillarin which case theRoutehas to start or and at saidAnchorPillar.booleanChecks if it is anAnchorPillarat which theRoutehas to start or end.booleanChecks, whether thisNodeis aPillarNode.booleanChecks the state ofPillarTimeWindowGeoNode.attachedres.booleanChecksPillarTimeWindowGeoNode.isSchedulableOutsideWorkingsHoursEnd.booleanChecksPillarTimeWindowGeoNode.isSchedulableOutsideWorkingsHoursStart.booleanChecksPillarTimeWindowGeoNode.isTimeAdjustableAnchor.voidsetIsOnlyScheduledInCompany(boolean isOnlyScheduledInCompany) Sets thePillaronly to be visited of otherwork Nodesare scheduled that day.voidsetIsOverwritingRouteTermination(boolean isOverwritingRouteTermination, boolean isAdjustable) Sets thePillarto beanAnchorPillarat which theRoutehas to start or end.voidsetIsSchedulableOutsideWorkingHours(boolean isSchedulableOutsideWorkingsHoursStart, boolean isSchedulableOutsideWorkingsHoursEnd) Sets thePillarthat it has to be visited by aResourceoutside of herWorkingHoursifIResource.setMaxPillarAfterHoursTime(Duration)is also set totrue.Methods inherited from class com.dna.jopt.member.unit.node.event.EventNode
isPartialExchangeIdleForDrivingTime, setIsPartialExchangeIdleForDrivingTimeMethods inherited from class com.dna.jopt.member.unit.node.AbstractNode
addNode2NodeRelation, addQualification, addSubsequentSlaveNode, addSubsequentSlaveNodes, addViolation, decrementCurrentAutoFilterProtectedExecutions, detachNodeRelations, 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, hasRelations, hasRouteDependentVisitDuration, invokeDetachedResourceConstraints, isAllowMoveToReduceFlexTime, 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.node.INode
addNode2NodeRelation, addQualification, addSubsequentSlaveNode, addSubsequentSlaveNodes, addViolation, decrementCurrentAutoFilterProtectedExecutions, detachNodeRelations, getAutoFilterViolationCollector, getBaseJointVisitDuration, getBaseJointVisitDurationMillis, getBaseVisitDuration, getBaseVisitDurationMillis, getConstraints, getCurrentLeftAutoFilterProtectedExecutions, getFirstNodeInRouteImportance, getFixCost, getImportance, getIndividualOfferedNodeMultiplier, getJointVisitDuration, getJointVisitDurationMillis, getLastKnownAttachedAndRemovedResIds, getLastNodeInRouteImportance, getLoad, getLockdownTime, getMinVisitDurationMillis, getNode2NodeRelations, getNodeColor, getNodeDepot, getOriginalDutyHours, getQualifications, getStayAtStartDuration, getSubsequentSlaveNodes, getTempImplausibleScore, getTotalLoadDimension, getUnloadAllDimension, getViolations, getVisitDurationMillis, hasFullJobLevelRelations, hasRelations, hasRouteDependentVisitDuration, isAllowMoveToReduceFlexTime, 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, setOptimizable, setOptimizable, setUnassigned, setUnloadAll, setUnloadAllDimension, setVisitDuration, setVisitDurationMillis, setWaitOnEarlyArrival, setWaitOnEarlyArrivalFirstNode, tempIncreaseImplausibleScore, tempSetActiveDutyHoursMethods inherited from interface com.dna.jopt.member.unit.IOptimizationElement
forceSetId, getConstraintAliasId, getDistMatrixId, getDutyHours, getExtraInfo, getId, getLatitude, getLocationId, getLongitude, getNodeConnection, getNodeConnectionKeySet, getNodeConnections, getPosition, getPreferredHoursInteractionController, putNodeConnection, putNodeConnectionFromElement, removeNodeConnection, setConstraintAliasId, setDistMatrixId, setDutyHours, setExtraInfo, setId, setLatitude, setLocationId, setLongitude, setPosition
-
Constructor Details
-
PillarEventNode
Deprecated.Deprecated constructor- Parameters:
nodeId- the string ID of the nodeopeningHour- the iDutyhours when the Node can be given service
-
PillarEventNode
APillarEventNodesdoes not have a location and cannot be attended outside of theirOpeningHours, it will be skipped instead. The totalOpeningHourswill be theDurationof theEvent.Implementation example
// Defining OpeningHours IOpeningHours telCoTime = new OpeningHours( ZonedDateTime.of(2020, MAY.getValue(), 6, 14, 0, 0, 0, ZoneId.of("Europe/Berlin")), ZonedDateTime.of(2020, MAY.getValue(), 6, 16, 0, 0, 0, ZoneId.of("Europe/Berlin"))); // Defining Node PillarEventNode telCoNoLateArrivals = new PillarEventNode("TelCo no late arrivals", telCoTime);- Parameters:
nodeId- the string ID of the nodeopeningHour- the iOpeninghours of the PillarEventNode
-
PillarEventNode
APillarEventNodesdoes not have a location and cannot be attended outside of theirOpeningHours, it will be skipped instead. In this constructor theEventis placed within theOpeningHoursbut not for the fullDuration.Implementation example
// Defining OpeningHours IOpeningHours telCoTime = new OpeningHours( ZonedDateTime.of(2020, MAY.getValue(), 6, 13, 0, 0, 0, ZoneId.of("Europe/Berlin")), ZonedDateTime.of(2020, MAY.getValue(), 6, 17, 0, 0, 0, ZoneId.of("Europe/Berlin"))); Duration durationOfTelCo = Duration.ofMinutes(120); // Defining Node PillarEventNode telCoNoLateArrivals = new PillarEventNode("TelCo no late arrivals", telCoTime, durationOfTelCo);- Parameters:
nodeId- the string ID of the nodeopeningHour- the iOpeninghours of the PillarEventNodevisitDuration- the duration of the event
-
PillarEventNode
public PillarEventNode(String nodeId, IOpeningHours openingHour, Duration visitDuration, boolean isDutyHoursIncludeVisitDuration) APillarEventNodesdoes not have a location and has to be started within theOpeningHoursifisDutyHoursIncludeVisitDurationisfalse. IfisDutyHoursIncludeVisitDurationistruethevisitDurationhas to fit in theOpeningHours, otherwise thePillarEventnodewill be skipped.Implementation example
// Defining OpeningHours IOpeningHours telCoTime = new OpeningHours( ZonedDateTime.of(2020, MAY.getValue(), 6, 13, 0, 0, 0, ZoneId.of("Europe/Berlin")), ZonedDateTime.of(2020, MAY.getValue(), 6, 14, 0, 0, 0, ZoneId.of("Europe/Berlin"))); Duration durationOfTelCo = Duration.ofMinutes(120); // Defining Node PillarEventNode telCoNoLateArrivals = new PillarEventNode("TelCo no late arrivals", telCoTime, durationOfTelCo, false);- Parameters:
nodeId- the string ID of the nodeopeningHour- the iOpeningHoursvisitDuration- the duration of the eventisDutyHoursIncludeVisitDuration- the boolean whether the event has to be finished within the OpeningHours or not
-
-
Method Details
-
setIsOverwritingRouteTermination
public void setIsOverwritingRouteTermination(boolean isOverwritingRouteTermination, boolean isAdjustable) Description copied from interface:IPillarNodeSets thePillarto beanAnchorPillarat which theRoutehas to start or end. Thebooleandefines whether thePillarcan still be moved.- Specified by:
setIsOverwritingRouteTerminationin interfaceIPillarNode- Parameters:
isOverwritingRouteTermination- the boolean whether it is overwriting route terminationisAdjustable- the boolean whether it is adjustable
-
isTimeAdjustableAnchor
public boolean isTimeAdjustableAnchor()Description copied from interface:IPillarNodeChecksPillarTimeWindowGeoNode.isTimeAdjustableAnchor. If yes, then thePillaris allowed to change time a bit if theRoutestart is moving as well. The default value isfalse.- Specified by:
isTimeAdjustableAnchorin interfaceIPillarNode- Returns:
- the state of isTimeAdjustableAnchor
-
isOverwritingRouteTermination
public boolean isOverwritingRouteTermination()Description copied from interface:IPillarNodeChecks if it is anAnchorPillarat which theRoutehas to start or end.- Specified by:
isOverwritingRouteTerminationin interfaceIPillarNode- Returns:
- whether it is overwriting route termination
-
attachResource
Description copied from interface:IPillarNodeAttaching themandatoryVisitoras the visitingresourcewill be treated as ahard constraintif amandatoryVisitorwas set using this method.Throws an
IllegalStateExceptionif amandatoryVisitorhas already been attached- Specified by:
attachResourcein interfaceIPillarNode- Parameters:
mandatoryVisitor- the Resource to attach to the Pillarnode
-
detachResourceConstraints
public void detachResourceConstraints()Description copied from interface:INodeRemoves allIConstraint. This method is used internally.- Specified by:
detachResourceConstraintsin interfaceINode- Overrides:
detachResourceConstraintsin classAbstractNode
-
detachResourceConstraints
Description copied from interface:INodeRemoves theIResourcewith the givenresIdfrom theIConstraintthat areIConstraintResource. This method is used internally.- Specified by:
detachResourceConstraintsin interfaceINode- Overrides:
detachResourceConstraintsin classAbstractNode- Parameters:
resId- the string Resource /D
-
getLastKnownAsRouteTermination
public boolean getLastKnownAsRouteTermination()- Specified by:
getLastKnownAsRouteTerminationin interfaceIPillarNode
-
isAutoFilterProtected
public boolean isAutoFilterProtected()Description copied from interface:INodeChecks if theNodeis protected from being filtered.- Specified by:
isAutoFilterProtectedin interfaceINode- Overrides:
isAutoFilterProtectedin classAbstractNode- Returns:
trueif the condition allows
-
addConstraint
Description copied from interface:INodeAdds aconstraintwhich limits theResourcesthat can serve thisNodeto those that have the specificQualificationto do so.For further explanations and implementation examples please see
TypeConstraintandTypeQualification.- Specified by:
addConstraintin interfaceINode- Overrides:
addConstraintin classAbstractNode- Parameters:
constraint- theIconstraintto be added
-
getAttachedResourceId
Description copied from interface:IPillarNodeGets theidof theattachedres, returnsnullif noresourcehas been attached.- Specified by:
getAttachedResourceIdin interfaceIPillarNode- Returns:
- the id of the attached resource
-
isOnlyScheduledInCompany
public boolean isOnlyScheduledInCompany()Description copied from interface:IPillarNodeSomePillarsthat are scheduled are not actually jobs. Setting this totruethesePillarsonly need to be visited if they occur on a day thatwork Nodesare scheduled. The default value isfalse.- Specified by:
isOnlyScheduledInCompanyin interfaceIPillarNode- Returns:
- whether the
Nodeis only scheduled in company
-
setIsOnlyScheduledInCompany
public void setIsOnlyScheduledInCompany(boolean isOnlyScheduledInCompany) Description copied from interface:IPillarNodeSets thePillaronly to be visited of otherwork Nodesare scheduled that day. The default value isfalse.- Specified by:
setIsOnlyScheduledInCompanyin interfaceIPillarNode- Parameters:
isOnlyScheduledInCompany- the boolean whether theNodeis only scheduled in company
-
getFlavour
Description copied from interface:IOptimizationElementGets the flavour which spells out the kind ofNodeof the element.- Specified by:
getFlavourin interfaceIOptimizationElement- Overrides:
getFlavourin classEventNode- Returns:
- the flavour
-
isPillarNode
public boolean isPillarNode()Description copied from class:EventNodeChecks, whether thisNodeis aPillarNode. Since this is anEventNodethe response always isfalse.- Specified by:
isPillarNodein interfaceINode- Overrides:
isPillarNodein classEventNode- Returns:
- false, since
EventNode - See Also:
-
isResourceAttached
public boolean isResourceAttached()Description copied from interface:IPillarNodeChecks the state ofPillarTimeWindowGeoNode.attachedres.- Specified by:
isResourceAttachedin interfaceIPillarNode- Returns:
- true if an attachedResource has already ben set
-
equals
- Overrides:
equalsin classAbstractNode
-
hashCode
public int hashCode()- Overrides:
hashCodein classAbstractNode
-
setIsSchedulableOutsideWorkingHours
public void setIsSchedulableOutsideWorkingHours(boolean isSchedulableOutsideWorkingsHoursStart, boolean isSchedulableOutsideWorkingsHoursEnd) Description copied from interface:IPillarNodeSets thePillarthat it has to be visited by aResourceoutside of herWorkingHoursifIResource.setMaxPillarAfterHoursTime(Duration)is also set totrue.- Specified by:
setIsSchedulableOutsideWorkingHoursin interfaceIPillarNode- Parameters:
isSchedulableOutsideWorkingsHoursStart- the boolean if working is possible before workingHoursisSchedulableOutsideWorkingsHoursEnd- the boolean if working is possible after workingHours
-
isSchedulableBeforeWorkingHours
public boolean isSchedulableBeforeWorkingHours()Description copied from interface:IPillarNodeChecksPillarTimeWindowGeoNode.isSchedulableOutsideWorkingsHoursStart. The default value isfalse.- Specified by:
isSchedulableBeforeWorkingHoursin interfaceIPillarNode- Returns:
- whether working is possible before workingHours
-
isSchedulableAfterWorkingHours
public boolean isSchedulableAfterWorkingHours()Description copied from interface:IPillarNodeChecksPillarTimeWindowGeoNode.isSchedulableOutsideWorkingsHoursEnd. The default value isfalse.- Specified by:
isSchedulableAfterWorkingHoursin interfaceIPillarNode- Returns:
- whether working is possible after workingHours
-
isOverwritingRouteStartOrTermination
public boolean isOverwritingRouteStartOrTermination()Description copied from interface:IPillarNodeChecks if thePillaris anAnchorPillarin which case theRoutehas to start or and at saidAnchorPillar. The default values arefalse- Specified by:
isOverwritingRouteStartOrTerminationin interfaceIPillarNode- Returns:
- the states if either the route start or the route termination is overwritten
-
hasRealGeoLocation
public boolean hasRealGeoLocation()Description copied from class:EventNodeGets whether thisNodehas a location. Since this is anEventnodethe response always isfalse.- Specified by:
hasRealGeoLocationin interfaceIOptimizationElement- Overrides:
hasRealGeoLocationin classEventNode- Returns:
- false, since
EventNode
-
PillarEventNode(String, IOpeningHours),PillarEventNode(String, IOpeningHours, Duration)orPillarEventNode(String, IOpeningHours, Duration, boolean)instead