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
ConstructorDescriptionPillarEventNode
(String nodeId, IDutyHours openingHour) Deprecated.PillarEventNode
(String nodeId, IOpeningHours openingHour) APillarEventNodes
does not have a location and cannot be attended outside of theirOpeningHours
, it will be skipped instead.PillarEventNode
(String nodeId, IOpeningHours openingHour, Duration visitDuration) APillarEventNodes
does 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) APillarEventNodes
does not have a location and has to be started within theOpeningHours
ifisDutyHoursIncludeVisitDuration
isfalse
. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addConstraint
(IConstraint constraint) Adds aconstraint
which limits theResources
that can serve thisNode
to those that have the specificQualification
to do so.void
attachResource
(IResource mandatoryVisitor) Attaching themandatoryVisitor
as the visitingresource
will be treated as ahard constraint
if amandatoryVisitor
was set using this method.void
Removes allIConstraint
.void
detachResourceConstraints
(String resId) boolean
Gets theid
of theattachedres
, returnsnull
if noresource
has been attached.Gets the flavour which spells out the kind ofNode
of the element.boolean
int
hashCode()
boolean
Gets whether thisNode
has a location.boolean
Checks if theNode
is protected from being filtered.boolean
SomePillars
that are scheduled are not actually jobs.boolean
Checks if thePillar
is anAnchorPillar
in which case theRoute
has to start or and at saidAnchorPillar
.boolean
Checks if it is anAnchorPillar
at which theRoute
has to start or end.boolean
Checks, whether thisNode
is aPillarNode
.boolean
Checks the state ofPillarTimeWindowGeoNode.attachedres
.boolean
ChecksPillarTimeWindowGeoNode.isSchedulableOutsideWorkingsHoursEnd
.boolean
ChecksPillarTimeWindowGeoNode.isSchedulableOutsideWorkingsHoursStart
.boolean
ChecksPillarTimeWindowGeoNode.isTimeAdjustableAnchor
.void
setIsOnlyScheduledInCompany
(boolean isOnlyScheduledInCompany) Sets thePillar
only to be visited of otherwork Nodes
are scheduled that day.void
setIsOverwritingRouteTermination
(boolean isOverwritingRouteTermination, boolean isAdjustable) Sets thePillar
to beanAnchorPillar
at which theRoute
has to start or end.void
setIsSchedulableOutsideWorkingHours
(boolean isSchedulableOutsideWorkingsHoursStart, boolean isSchedulableOutsideWorkingsHoursEnd) Sets thePillar
that it has to be visited by aResource
outside of herWorkingHours
ifIResource.setMaxPillarAfterHoursTime(Duration)
is also set totrue
.Methods inherited from class com.dna.jopt.member.unit.node.event.EventNode
isPartialExchangeIdleForDrivingTime, setIsPartialExchangeIdleForDrivingTime
Methods 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, 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.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, 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, setOptimizable, setOptimizable, setUnassigned, setUnloadAll, setUnloadAllDimension, setVisitDuration, setVisitDurationMillis, setWaitOnEarlyArrival, setWaitOnEarlyArrivalFirstNode, tempIncreaseImplausibleScore, tempSetActiveDutyHours
Methods 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
APillarEventNodes
does not have a location and cannot be attended outside of theirOpeningHours
, it will be skipped instead. The totalOpeningHours
will be theDuration
of 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
APillarEventNodes
does not have a location and cannot be attended outside of theirOpeningHours
, it will be skipped instead. In this constructor theEvent
is placed within theOpeningHours
but 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) APillarEventNodes
does not have a location and has to be started within theOpeningHours
ifisDutyHoursIncludeVisitDuration
isfalse
. IfisDutyHoursIncludeVisitDuration
istrue
thevisitDuration
has to fit in theOpeningHours
, otherwise thePillarEventnode
will 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:IPillarNode
Sets thePillar
to beanAnchorPillar
at which theRoute
has to start or end. Theboolean
defines whether thePillar
can still be moved.- Specified by:
setIsOverwritingRouteTermination
in 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:IPillarNode
ChecksPillarTimeWindowGeoNode.isTimeAdjustableAnchor
. If yes, then thePillar
is allowed to change time a bit if theRoute
start is moving as well. The default value isfalse
.- Specified by:
isTimeAdjustableAnchor
in interfaceIPillarNode
- Returns:
- the state of isTimeAdjustableAnchor
-
isOverwritingRouteTermination
public boolean isOverwritingRouteTermination()Description copied from interface:IPillarNode
Checks if it is anAnchorPillar
at which theRoute
has to start or end.- Specified by:
isOverwritingRouteTermination
in interfaceIPillarNode
- Returns:
- whether it is overwriting route termination
-
attachResource
Description copied from interface:IPillarNode
Attaching themandatoryVisitor
as the visitingresource
will be treated as ahard constraint
if amandatoryVisitor
was set using this method.Throws an
IllegalStateException
if amandatoryVisitor
has already been attached- Specified by:
attachResource
in interfaceIPillarNode
- Parameters:
mandatoryVisitor
- the Resource to attach to the Pillarnode
-
detachResourceConstraints
public void detachResourceConstraints()Description copied from interface:INode
Removes allIConstraint
. This method is used internally.- Specified by:
detachResourceConstraints
in interfaceINode
- Overrides:
detachResourceConstraints
in classAbstractNode
-
detachResourceConstraints
Description copied from interface:INode
Removes theIResource
with the givenresId
from theIConstraint
that areIConstraintResource
. This method is used internally.- Specified by:
detachResourceConstraints
in interfaceINode
- Overrides:
detachResourceConstraints
in classAbstractNode
- Parameters:
resId
- the string Resource /D
-
getLastKnownAsRouteTermination
public boolean getLastKnownAsRouteTermination()- Specified by:
getLastKnownAsRouteTermination
in interfaceIPillarNode
-
isAutoFilterProtected
public boolean isAutoFilterProtected()Description copied from interface:INode
Checks if theNode
is protected from being filtered.- Specified by:
isAutoFilterProtected
in interfaceINode
- Overrides:
isAutoFilterProtected
in classAbstractNode
- Returns:
true
if the condition allows
-
addConstraint
Description copied from interface:INode
Adds aconstraint
which limits theResources
that can serve thisNode
to those that have the specificQualification
to do so.For further explanations and implementation examples please see
TypeConstraint
andTypeQualification
.- Specified by:
addConstraint
in interfaceINode
- Overrides:
addConstraint
in classAbstractNode
- Parameters:
constraint
- theIconstraint
to be added
-
getAttachedResourceId
Description copied from interface:IPillarNode
Gets theid
of theattachedres
, returnsnull
if noresource
has been attached.- Specified by:
getAttachedResourceId
in interfaceIPillarNode
- Returns:
- the id of the attached resource
-
isOnlyScheduledInCompany
public boolean isOnlyScheduledInCompany()Description copied from interface:IPillarNode
SomePillars
that are scheduled are not actually jobs. Setting this totrue
thesePillars
only need to be visited if they occur on a day thatwork Nodes
are scheduled. The default value isfalse
.- Specified by:
isOnlyScheduledInCompany
in interfaceIPillarNode
- Returns:
- whether the
Node
is only scheduled in company
-
setIsOnlyScheduledInCompany
public void setIsOnlyScheduledInCompany(boolean isOnlyScheduledInCompany) Description copied from interface:IPillarNode
Sets thePillar
only to be visited of otherwork Nodes
are scheduled that day. The default value isfalse
.- Specified by:
setIsOnlyScheduledInCompany
in interfaceIPillarNode
- Parameters:
isOnlyScheduledInCompany
- the boolean whether theNode
is only scheduled in company
-
getFlavour
Description copied from interface:IOptimizationElement
Gets the flavour which spells out the kind ofNode
of the element.- Specified by:
getFlavour
in interfaceIOptimizationElement
- Overrides:
getFlavour
in classEventNode
- Returns:
- the flavour
-
isPillarNode
public boolean isPillarNode()Description copied from class:EventNode
Checks, whether thisNode
is aPillarNode
. Since this is anEventNode
the response always isfalse
.- Specified by:
isPillarNode
in interfaceINode
- Overrides:
isPillarNode
in classEventNode
- Returns:
- false, since
EventNode
- See Also:
-
isResourceAttached
public boolean isResourceAttached()Description copied from interface:IPillarNode
Checks the state ofPillarTimeWindowGeoNode.attachedres
.- Specified by:
isResourceAttached
in interfaceIPillarNode
- Returns:
- true if an attachedResource has already ben set
-
equals
- Overrides:
equals
in classAbstractNode
-
hashCode
public int hashCode()- Overrides:
hashCode
in classAbstractNode
-
setIsSchedulableOutsideWorkingHours
public void setIsSchedulableOutsideWorkingHours(boolean isSchedulableOutsideWorkingsHoursStart, boolean isSchedulableOutsideWorkingsHoursEnd) Description copied from interface:IPillarNode
Sets thePillar
that it has to be visited by aResource
outside of herWorkingHours
ifIResource.setMaxPillarAfterHoursTime(Duration)
is also set totrue
.- Specified by:
setIsSchedulableOutsideWorkingHours
in 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:IPillarNode
ChecksPillarTimeWindowGeoNode.isSchedulableOutsideWorkingsHoursStart
. The default value isfalse
.- Specified by:
isSchedulableBeforeWorkingHours
in interfaceIPillarNode
- Returns:
- whether working is possible before workingHours
-
isSchedulableAfterWorkingHours
public boolean isSchedulableAfterWorkingHours()Description copied from interface:IPillarNode
ChecksPillarTimeWindowGeoNode.isSchedulableOutsideWorkingsHoursEnd
. The default value isfalse
.- Specified by:
isSchedulableAfterWorkingHours
in interfaceIPillarNode
- Returns:
- whether working is possible after workingHours
-
isOverwritingRouteStartOrTermination
public boolean isOverwritingRouteStartOrTermination()Description copied from interface:IPillarNode
Checks if thePillar
is anAnchorPillar
in which case theRoute
has to start or and at saidAnchorPillar
. The default values arefalse
- Specified by:
isOverwritingRouteStartOrTermination
in interfaceIPillarNode
- Returns:
- the states if either the route start or the route termination is overwritten
-
hasRealGeoLocation
public boolean hasRealGeoLocation()Description copied from class:EventNode
Gets whether thisNode
has a location. Since this is anEventnode
the response always isfalse
.- Specified by:
hasRealGeoLocation
in interfaceIOptimizationElement
- Overrides:
hasRealGeoLocation
in classEventNode
- Returns:
- false, since
EventNode
-
PillarEventNode(String, IOpeningHours)
,PillarEventNode(String, IOpeningHours, Duration)
orPillarEventNode(String, IOpeningHours, Duration, boolean)
instead