Class AbstractNode
- All Implemented Interfaces:
IOptimizationElement
,INode
,Serializable
- Direct Known Subclasses:
EventNode
,TimeWindowGeoNode
- 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
-
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
addNode2NodeRelation
(INode2NodeRelation relation) Sets twoNodes
in aRelation
.void
addQualification
(IQualification qualification) Adds aIQualification
to theResource
, which means that by adding aIConstraint
to theINode
, they are limited to whichNodes
they can give service.void
addSubsequentSlaveNode
(INode node) Adds a subsequent slave node, which need to be visited in direct succession.void
addSubsequentSlaveNodes
(List<INode> nodes) Adds a list of subsequent slave nodes, which need to be visited in direct succession.void
addViolation
(IViolation violation) Adds aIViolation
toNode
.int
The number ofiterations
theNode
is still protected from being autofiltered.void
void
Removes allIConstraint
.void
detachResourceConstraints
(String resId) boolean
Gets themyAutoFilterViolationCollector
that collected allIViolation
.int
long
int
Deprecated.long
Gets the base visit duration in millisGets theConstraints
which limit theResources
that can serve thisNode
to those that have the specificQualification
to do so.int
Gets thenumCurrentProtectedExecutions
, the default value is0
.Gets theIDutyHours
of theelement
.int
double
Gets thefixCost
.int
Gets thepriority
.double
Gets a costmultiplier
for this specificNode
.int
getJointVisitDuration
(ILogicEntityRoute ownerRoute) Deprecated.long
getJointVisitDurationMillis
(ILogicEntityRoute ownerRoute) Gets thegetJointVisitDurationMillis(com.dna.jopt.member.bucket.route.ILogicEntityRoute)
, which is the reducedvisitDuration
of aNode
caused by efficiency effects since severalNodes
close to one another.int
double[]
getLoad()
Gets the amount of goods theResource
is getting added by visiting theResource
.int
Deprecated.long
Gets the min visit duration millis.Gets theRelations
of theNode
.Gets theINodeColor
of theNode
.Deprecated.Map<Class<? extends IQualification>,
IQualification> Gets theIQualification
of theResource
.int
int
Gets the total load of a specific good.int
Gets if it is allowed for aResource
to unload all itsCapacity
of a specific good (dimension
) at thisNode
.Gets theIViolation
of theNode
.long
getVisitDurationMillis
(ILogicEntityRoute ownerRoute) Gets the defined visit duration of a job at aNode
in seconds.boolean
Checks if all the data of theNode
should be saved in aILogicRouteElementDetailItem
.int
hashCode()
boolean
Checks if theNode
has anyRelations
.boolean
Checks for route dependent visit duration.void
invokeDetachedResourceConstraints
(List<IConstraintResource> removedCons) boolean
boolean
Checks if theNode
is protected from being filtered.boolean
Checks if theNode
can causeidle time
.boolean
Checks whether the job at theNode
has to be done within theIOpeningHours
or if theIResource
only has to arrive and start the job within that time.boolean
Checks if theNode
is aoffered Node
which has its ownindividualOfferedNodeMultiplier
.boolean
ChecksisOptimizable
, the default value istrue
.boolean
Checks if it is anoptional Node
one of which theResource
may visit in order to further be able to do its job (for example a waste dump or a packet station.The default value isfalse
.boolean
boolean
Checks if theNode
can be used as for anovernight stay
.boolean
Checks if the node was unassigned by theINodeUnassigner
.boolean
Checks if it is possible for theResource
to unload all itsCapacity
at thisNode
.boolean
Checks if there are beneficial effects of a reducedvisitDuration
since severalNodes
are close to one another.boolean
Checks if theResource
, if arriving early, has to wait until the start of theIOpeningHours
before being able to work.boolean
boolean
Checks if is aNode
is awork Node
which is the default where aResource
has a job to do.boolean
removeConstraint
(IConstraint removeConstraint) Removes theIConstraint
from thisNode
.boolean
removeNode2NodeRelations
(INode2NodeRelation removeRelation) Removes aINode2NodeRelation
from theNode
void
void
void
void
setAllowMoveToReduceFlexTime
(boolean allowMoveToReduceFlexTime) void
setAutoFilterConstraints
(List<IAutoFilterNodeConstraint> nodeAutoFilterConstraints) Sets aIConstraint
at aNode
for which it could be filtered.void
setConstraints
(List<IConstraint> constraints) Sets theArrayList constraints
which limit theResources
that can serve this* Node
to those that have the specificQualification
to do so.void
setFirstNodeInRouteImportance
(int importance) void
setFixCost
(double fixCost) Sets thefixCost
for visiting theNode
.void
setHasRouteDependentVisitDuration
(boolean hasRouteDependentVisitDuration) Sets the checks for route dependent visit duration.void
setImportance
(int priority) Sets thepriority/importance
.void
setIndividualOfferedNodeMultiplier
(double individualOfferedNodeMultiplier) Sets themultiplier
of the cost for this specificNode
.void
setIsCausingIdleTimeCost
(boolean isCausingIdleTimeCost) SetsisCausingIdleTimeCost
, the default value istrue
.void
setIsDutyHoursIncludesVisitDuration
(boolean isDutyHoursIncludeVisitDuration) SetsisDutyHoursIncludesVisitDuration
, if set to false, theDutyHours
act as an access window in which the work has to be started.void
setIsOfferedNode
(boolean isOfferedNode) Sets as aoffered Node
.void
setIsOptional
(boolean isOptional) Sets theNode
as anoptional Node
.boolean
setIsReturnStart
(Duration stayAtStartDuration) void
setIsStayNode
(boolean isStayNode) SetsNode
as a possibleovernight stay Node
.void
setIsWorkNode
(boolean isWorkNode) Sets theNode
as awork Node
which is the default where aResource
has a job to do.void
setJointVisitDuration
(Duration visitDuration) If two or moreNodes
are close to one another, thevisitDuration
of theNodes
after the first one can be reduced since for example less loading and unloading time is needed .void
setLastNodeInRouteImportance
(int importance) void
setLoad
(double[] load) Sets the amount of goods theResource
is getting added by visiting theResource
.void
setLockdownTime
(long lockdowntime) void
setMinAutoFilterProtectedExecutions
(int numProtectedExecutions) Sets a number ofiterations
of theOptimizer
in which theNode
is protected from being filtered by theIAutoNodeFilter
.void
setMinimalVisitDuration
(Duration minimalVisitDuration) void
setNodeColor
(INodeColor color) void
setNodeDepot
(INodeDepot depot) void
Deprecated.void
setOptimizable
(boolean isOptimizable) Sets if theNode
can still be moved around or if it is onlockdown
and is fixed.void
setOptimizable
(boolean isOptimizable, boolean forceKeepLockdownTime) void
setUnassigned
(boolean unassigned) Sets theNode
to beunassigned
, meaning not part of anyRoute
.void
setUnloadAll
(boolean unloadAll) Allows theResource
to unload all itsCapacity
at thisNode
void
setUnloadAllDimension
(int unloadAllDimension, int totalLoadDimension) Allows aResource
to unload all itsCapacity
of a specific good (dimension
) at thisNode
.void
setVisitDuration
(int visitDurationSeconds) Deprecated.void
setVisitDurationMillis
(long visitDurationMillis) Sets the visit duration millis.void
setWaitOnEarlyArrival
(boolean waitOnEarlyArrival) Sets whether aResource
has to wait when arriving before theIOpeningHours
of theNode
.void
setWaitOnEarlyArrivalFirstNode
(boolean waitOnEarlyArrival) void
void
tempSetActiveDutyHours
(Set<Integer> tempActivateIndicesSet) 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
isPillarNode
Methods inherited from interface com.dna.jopt.member.unit.IOptimizationElement
forceSetId, getConstraintAliasId, getDistMatrixId, getExtraInfo, getFlavour, getId, getLatitude, getLocationId, getLongitude, getNodeConnection, getNodeConnectionKeySet, getNodeConnections, getPosition, getPreferredHoursInteractionController, hasRealGeoLocation, putNodeConnection, putNodeConnectionFromElement, removeNodeConnection, setConstraintAliasId, setDistMatrixId, setDutyHours, setExtraInfo, setId, setLatitude, setLocationId, setLongitude, setPosition
-
Constructor Details
-
AbstractNode
protected AbstractNode()
-
-
Method Details
-
toString
- Overrides:
toString
in classAbstractOptimizationElement
-
tempIncreaseImplausibleScore
public void tempIncreaseImplausibleScore()- Specified by:
tempIncreaseImplausibleScore
in interfaceINode
-
getTempImplausibleScore
public int getTempImplausibleScore()- Specified by:
getTempImplausibleScore
in interfaceINode
-
tempSetActiveDutyHours
- Specified by:
tempSetActiveDutyHours
in interfaceINode
-
getDutyHours
Description copied from interface:IOptimizationElement
Gets theIDutyHours
of theelement
.- Specified by:
getDutyHours
in interfaceIOptimizationElement
- Overrides:
getDutyHours
in classAbstractOptimizationElement
- Returns:
- the duty hours
-
getOriginalDutyHours
- Specified by:
getOriginalDutyHours
in interfaceINode
-
resetDutyHoursTempActivation
public void resetDutyHoursTempActivation()- Specified by:
resetDutyHoursTempActivation
in interfaceINode
-
setNodeColor
Description copied from interface:INode
Sets theINodeColor
to theNode
by adding aNodeColorCapacityItem
. By usingIWorkingHours.addNodeColorCapacity(NodeColorCapacityItem)
it limits the amount ofColor
codedNodes
aResource
can give service to. This way can be made sure thatNodes
with a certainColor
are not overrepresented and can be used for white space generation. The default value isNodeColors.DEFAULT
.- Specified by:
setNodeColor
in interfaceINode
- Parameters:
color
- theiNodeColor
-
getNodeColor
Description copied from interface:INode
- Specified by:
getNodeColor
in interfaceINode
- Returns:
- the
iNodeColor
-
hashCode
public int hashCode()- Overrides:
hashCode
in classAbstractOptimizationElement
-
equals
- Overrides:
equals
in classAbstractOptimizationElement
-
getAutoFilterViolationCollector
Description copied from interface:INode
Gets themyAutoFilterViolationCollector
that collected allIViolation
.- Specified by:
getAutoFilterViolationCollector
in interfaceINode
- Returns:
- the myAutoFilterViolationCollector
-
setAutoFilterConstraints
Description copied from interface:INode
Sets aIConstraint
at aNode
for which it could be filtered.- Specified by:
setAutoFilterConstraints
in interfaceINode
- Parameters:
nodeAutoFilterConstraints
- the AutoFilterViolationAndConstraintCollector to be set
-
isAutoFilterProtected
public boolean isAutoFilterProtected()Description copied from interface:INode
Checks if theNode
is protected from being filtered.- Specified by:
isAutoFilterProtected
in interfaceINode
- Returns:
true
if the condition allows
-
setMinAutoFilterProtectedExecutions
public void setMinAutoFilterProtectedExecutions(int numProtectedExecutions) Description copied from interface:INode
Sets a number ofiterations
of theOptimizer
in which theNode
is protected from being filtered by theIAutoNodeFilter
.- Specified by:
setMinAutoFilterProtectedExecutions
in interfaceINode
- Parameters:
numProtectedExecutions
- the int value
-
decrementCurrentAutoFilterProtectedExecutions
public int decrementCurrentAutoFilterProtectedExecutions()Description copied from interface:INode
The number ofiterations
theNode
is still protected from being autofiltered.- Specified by:
decrementCurrentAutoFilterProtectedExecutions
in interfaceINode
- Returns:
- the int numCurrentProtectedExecutions
-
getCurrentLeftAutoFilterProtectedExecutions
public int getCurrentLeftAutoFilterProtectedExecutions()Description copied from interface:INode
Gets thenumCurrentProtectedExecutions
, the default value is0
.- Specified by:
getCurrentLeftAutoFilterProtectedExecutions
in interfaceINode
- Returns:
- the
-
getVisitDurationMillis
Description copied from interface:INode
Gets the defined visit duration of a job at aNode
in seconds.- Specified by:
getVisitDurationMillis
in interfaceINode
- Parameters:
ownerRoute
- the owner route- Returns:
- the long visit duration in millis.
-
getBaseVisitDurationMillis
public long getBaseVisitDurationMillis()Description copied from interface:INode
Gets the base visit duration in millis- Specified by:
getBaseVisitDurationMillis
in interfaceINode
- Returns:
- the base visit duration
-
getBaseVisitDuration
Deprecated.Description copied from interface:INode
Gets the base visit duration in seconds- Specified by:
getBaseVisitDuration
in interfaceINode
- Returns:
- the base visit duration
-
setVisitDuration
Deprecated.Description copied from interface:INode
Sets the visit duration of a job at aNode
in seconds.- Specified by:
setVisitDuration
in interfaceINode
- Parameters:
visitDurationSeconds
- the int new visit duration seconds.
-
setMinimalVisitDuration
- Specified by:
setMinimalVisitDuration
in interfaceINode
-
getMinVisitDuration
Deprecated. -
getMinVisitDurationMillis
public long getMinVisitDurationMillis()Description copied from interface:INode
Gets the min visit duration millis.- Specified by:
getMinVisitDurationMillis
in interfaceINode
- Returns:
- the min visit duration millis
-
hasRouteDependentVisitDuration
public boolean hasRouteDependentVisitDuration()Description copied from interface:INode
Checks for route dependent visit duration.- Specified by:
hasRouteDependentVisitDuration
in interfaceINode
- Returns:
- true, if successful
-
setHasRouteDependentVisitDuration
public void setHasRouteDependentVisitDuration(boolean hasRouteDependentVisitDuration) Description copied from interface:INode
Sets the checks for route dependent visit duration. Keep in mind: Some internal node classes do not accept a manipulation of the visit duration.- Specified by:
setHasRouteDependentVisitDuration
in interfaceINode
- Parameters:
hasRouteDependentVisitDuration
- the new checks for route dependent visit duration
-
setVisitDurationMillis
public void setVisitDurationMillis(long visitDurationMillis) Description copied from interface:INode
Sets the visit duration millis.- Specified by:
setVisitDurationMillis
in interfaceINode
- Parameters:
visitDurationMillis
- the new visit duration millis
-
setJointVisitDuration
Description copied from interface:INode
If two or moreNodes
are close to one another, thevisitDuration
of theNodes
after the first one can be reduced since for example less loading and unloading time is needed . Sets the reducedvisitDuration
for theseNodes
instead of the normal visit duration.- Specified by:
setJointVisitDuration
in interfaceINode
- Parameters:
visitDuration
- the duration of the reduced visit
-
getBaseJointVisitDuration
public int getBaseJointVisitDuration()- Specified by:
getBaseJointVisitDuration
in interfaceINode
-
getBaseJointVisitDurationMillis
public long getBaseJointVisitDurationMillis()- Specified by:
getBaseJointVisitDurationMillis
in interfaceINode
-
getJointVisitDuration
Deprecated.Description copied from interface:INode
Gets the jointVisitDuration, which is the reducedvisitDuration
of aNode
caused by efficiency effects since severalNodes
close to one another.- Specified by:
getJointVisitDuration
in interfaceINode
- Parameters:
ownerRoute
- the owner route- Returns:
- the joint visit duration
-
getJointVisitDurationMillis
Description copied from interface:INode
Gets thegetJointVisitDurationMillis(com.dna.jopt.member.bucket.route.ILogicEntityRoute)
, which is the reducedvisitDuration
of aNode
caused by efficiency effects since severalNodes
close to one another.- Specified by:
getJointVisitDurationMillis
in interfaceINode
- Parameters:
ownerRoute
- the owner route- Returns:
- the joint visit duration
-
isUseJointVisitDuration
public boolean isUseJointVisitDuration()Description copied from interface:INode
Checks if there are beneficial effects of a reducedvisitDuration
since severalNodes
are close to one another. The default value isfalse
.Will be set to
true
byINode.setJointVisitDuration(Duration)
.- Specified by:
isUseJointVisitDuration
in interfaceINode
- Returns:
- the boolean if
visitDuration
is reduced
-
setUnassigned
public void setUnassigned(boolean unassigned) Description copied from interface:INode
Sets theNode
to beunassigned
, meaning not part of anyRoute
. The default value isfalse
.This method es bing used internally.
- Specified by:
setUnassigned
in interfaceINode
- Parameters:
unassigned
- the boolean for the new unassigned
-
isUnassigned
public boolean isUnassigned()Description copied from interface:INode
Checks if the node was unassigned by theINodeUnassigner
. Anunassigned Node
is not part of anyRoute
- Specified by:
isUnassigned
in interfaceINode
- Returns:
- boolean true if the node was unassigned
-
setOptimizable
public void setOptimizable(boolean isOptimizable) Description copied from interface:INode
Sets if theNode
can still be moved around or if it is onlockdown
and is fixed.- Specified by:
setOptimizable
in interfaceINode
- Parameters:
isOptimizable
- the boolean isOptimizable to be set
-
setOptimizable
public void setOptimizable(boolean isOptimizable, boolean forceKeepLockdownTime) - Specified by:
setOptimizable
in interfaceINode
-
resetLockdownTime
public void resetLockdownTime()- Specified by:
resetLockdownTime
in interfaceINode
-
setLockdownTime
public void setLockdownTime(long lockdowntime) - Specified by:
setLockdownTime
in interfaceINode
-
getLockdownTime
- Specified by:
getLockdownTime
in interfaceINode
-
isOptimizable
public boolean isOptimizable()Description copied from interface:INode
ChecksisOptimizable
, the default value istrue
.- Specified by:
isOptimizable
in interfaceINode
- Returns:
- the boolean isOptimizable
-
addViolation
Description copied from interface:INode
Adds aIViolation
toNode
. This method is used internally.- Specified by:
addViolation
in interfaceINode
- Parameters:
violation
- the violation
-
getViolations
Description copied from interface:INode
Gets theIViolation
of theNode
. Only has a non-empty list in case a result was requested.- Specified by:
getViolations
in interfaceINode
- Returns:
- the
List<IViolation> violations
-
setFixCost
public void setFixCost(double fixCost) Description copied from interface:INode
Sets thefixCost
for visiting theNode
. The default value of thedouble
is 0.- Specified by:
setFixCost
in interfaceINode
- Parameters:
fixCost
- the double fixCost
-
getFixCost
public double getFixCost()Description copied from interface:INode
Gets thefixCost
. The default value of thedouble
is 0.- Specified by:
getFixCost
in interfaceINode
- Returns:
- the double fixCost
-
isStayNode
public boolean isStayNode()Description copied from interface:INode
Checks if theNode
can be used as for anovernight stay
. The default value isfalse
.This allows the
Resource
to stay at thisNode
at the end of theRoute
instead of returning home and proceeding from there the next day. The Resource also needsIWorkingHours.getIsAvailableForStay()
to be set totrue
in order to be able to stay there at the end of theRoute
.- Specified by:
isStayNode
in interfaceINode
- Returns:
- the boolean if a Resource can stay there
-
setIsStayNode
public void setIsStayNode(boolean isStayNode) Description copied from interface:INode
SetsNode
as a possibleovernight stay Node
.This allows the
Resource
to stay at thisNode
at the end of theRoute
instead of returning home and proceeding from there the next day. The Resource also needsIWorkingHours.getIsAvailableForStay()
to be set totrue
in order to be able to stay there at the end of theRoute
.- Specified by:
setIsStayNode
in interfaceINode
- Parameters:
isStayNode
- if the boolean is set totrue
theNode
can be used forovernight stays
-
isWorkNode
public boolean isWorkNode()Description copied from interface:INode
Checks if is aNode
is awork Node
which is the default where aResource
has a job to do. This method is needed because it is possible to define aNode
as aINode.setIsStayNode(boolean)
but not as awork Node
.- Specified by:
isWorkNode
in interfaceINode
- Returns:
- the boolean whether Resources can do work at this Node
-
setIsWorkNode
public void setIsWorkNode(boolean isWorkNode) Description copied from interface:INode
Sets theNode
as awork Node
which is the default where aResource
has a job to do. This method is needed because it is possible to define aNode
as aINode.setIsStayNode(boolean)
but not as awork Node
- Specified by:
setIsWorkNode
in interfaceINode
- Parameters:
isWorkNode
- the boolean for theworkNode
-
isOfferedNode
public boolean isOfferedNode()Description copied from interface:INode
Checks if theNode
is aoffered Node
which has its ownindividualOfferedNodeMultiplier
. Anoffered Node
usually has a higher priority to be integrated into aRoute
which is done by multiplying the cost for this specificNode
when being missed.- Specified by:
isOfferedNode
in interfaceINode
- Returns:
- the boolean
isOfferedNode
-
setIsOfferedNode
public void setIsOfferedNode(boolean isOfferedNode) Description copied from interface:INode
Sets as aoffered Node
. The default value isfalse
. When a node is marked as offered node more costs can arise when violating any of the constraints of the node. Anoffered Node
usually has a higher priority to be integrated into aRoute
which is done by multiplying the cost for this specificNode
when being missed.- Specified by:
setIsOfferedNode
in interfaceINode
- Parameters:
isOfferedNode
- the boolean to be set- See Also:
-
getIndividualOfferedNodeMultiplier
public double getIndividualOfferedNodeMultiplier()Description copied from interface:INode
Gets a costmultiplier
for this specificNode
.- Specified by:
getIndividualOfferedNodeMultiplier
in interfaceINode
- Returns:
- the double
individualOfferedNodeMultiplier
-
setIndividualOfferedNodeMultiplier
public void setIndividualOfferedNodeMultiplier(double individualOfferedNodeMultiplier) Description copied from interface:INode
Sets themultiplier
of the cost for this specificNode
. The default value is 1. When using a higher value the default costs arising from not fulfilling any constraints of the node are multiplied by this factor, therefore giving theNode
a higher priority to be given service on time.- Specified by:
setIndividualOfferedNodeMultiplier
in interfaceINode
- Parameters:
individualOfferedNodeMultiplier
- the double to be set
-
setImportance
public void setImportance(int priority) Description copied from interface:INode
Sets thepriority/importance
. The default value is 1.- Specified by:
setImportance
in interfaceINode
- Parameters:
priority
- the int priority to be set.
-
getImportance
public int getImportance()Description copied from interface:INode
Gets thepriority
.- Specified by:
getImportance
in interfaceINode
- Returns:
- the int
priority
-
isWaitOnEarlyArrival
public boolean isWaitOnEarlyArrival()Description copied from interface:INode
Checks if theResource
, if arriving early, has to wait until the start of theIOpeningHours
before being able to work. The default value istrue
, in which case arriving too early meansidle time
.- Specified by:
isWaitOnEarlyArrival
in interfaceINode
- Returns:
- the boolean
waitOnEarlyArrival
-
setWaitOnEarlyArrival
public void setWaitOnEarlyArrival(boolean waitOnEarlyArrival) Description copied from interface:INode
Sets whether aResource
has to wait when arriving before theIOpeningHours
of theNode
. The default value istrue
.When wait on early arrival is set to false, a visiting resource will start working right away. In contrast, if
WaitOnEarlyArrival
is set totrue
, aResource
will idle until aNode
opens based on its definedIWorkingHours
.- Specified by:
setWaitOnEarlyArrival
in interfaceINode
- Parameters:
waitOnEarlyArrival
- the boolean to be set
-
setWaitOnEarlyArrivalFirstNode
public void setWaitOnEarlyArrivalFirstNode(boolean waitOnEarlyArrival) - Specified by:
setWaitOnEarlyArrivalFirstNode
in interfaceINode
-
isWaitOnEarlyArrivalFirstNode
public boolean isWaitOnEarlyArrivalFirstNode()- Specified by:
isWaitOnEarlyArrivalFirstNode
in interfaceINode
-
setFirstNodeInRouteImportance
public void setFirstNodeInRouteImportance(int importance) - Specified by:
setFirstNodeInRouteImportance
in interfaceINode
-
getFirstNodeInRouteImportance
public int getFirstNodeInRouteImportance()- Specified by:
getFirstNodeInRouteImportance
in interfaceINode
-
setLastNodeInRouteImportance
public void setLastNodeInRouteImportance(int importance) - Specified by:
setLastNodeInRouteImportance
in interfaceINode
-
getLastNodeInRouteImportance
public int getLastNodeInRouteImportance()- Specified by:
getLastNodeInRouteImportance
in interfaceINode
-
setAllowMoveToReduceFlexTime
public void setAllowMoveToReduceFlexTime(boolean allowMoveToReduceFlexTime) - Specified by:
setAllowMoveToReduceFlexTime
in interfaceINode
-
isAllowMoveToReduceFlexTime
public boolean isAllowMoveToReduceFlexTime()- Specified by:
isAllowMoveToReduceFlexTime
in interfaceINode
-
addNode2NodeRelation
Description copied from interface:INode
Sets twoNodes
in aRelation
. AMasterNode
has to be served before aRelatedNode
.For further explanation and implementation examples please see
INode2NodeRelation
.- Specified by:
addNode2NodeRelation
in interfaceINode
- Parameters:
relation
- theINode2NodeRelation
to be added
-
getNode2NodeRelations
Description copied from interface:INode
Gets theRelations
of theNode
.For further explanation and implementation examples please see
INode2NodeRelation
.- Specified by:
getNode2NodeRelations
in interfaceINode
- Returns:
- the arraylist
List<INode2NodeRelation> node2NodeRelation
-
removeNode2NodeRelations
Description copied from interface:INode
Removes aINode2NodeRelation
from theNode
- Specified by:
removeNode2NodeRelations
in interfaceINode
- Parameters:
removeRelation
- the INode2NodeRelation that will be removed- Returns:
- the relation that was removed
-
hasFullJobLevelRelations
public boolean hasFullJobLevelRelations()Description copied from interface:INode
Checks if all the data of theNode
should be saved in aILogicRouteElementDetailItem
. The default value isfalse
.The only other instance when this data is saved is when a
ILogicRouteElementDetailItem
is requested.- Specified by:
hasFullJobLevelRelations
in interfaceINode
- Returns:
- the
boolean hasFullJobLevelRelations
-
hasRelations
public boolean hasRelations()Description copied from interface:INode
Checks if theNode
has anyRelations
.For further explanation and implementation examples of
Relations
please seeINode2NodeRelation
- Specified by:
hasRelations
in interfaceINode
- Returns:
- the boolean
hasRelations
-
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
- Parameters:
constraint
- theIconstraint
to be added
-
detachResourceConstraints
public void detachResourceConstraints()Description copied from interface:INode
Removes allIConstraint
. This method is used internally.- Specified by:
detachResourceConstraints
in interfaceINode
-
detachNodeRelations
public void detachNodeRelations()- Specified by:
detachNodeRelations
in interfaceINode
-
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
- Parameters:
resId
- the string Resource /D
-
invokeDetachedResourceConstraints
-
getLastKnownAttachedAndRemovedResIds
- Specified by:
getLastKnownAttachedAndRemovedResIds
in interfaceINode
-
getConstraints
Description copied from interface:INode
Gets theConstraints
which limit 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:
getConstraints
in interfaceINode
- Returns:
- the
List<IConstraint> constraints
-
removeConstraint
Description copied from interface:INode
Removes theIConstraint
from thisNode
.- Specified by:
removeConstraint
in interfaceINode
- Parameters:
removeConstraint
- the constraint to be removed- Returns:
- the
List<IConstraint>
constraints that were removed
-
setConstraints
Description copied from interface:INode
Sets theArrayList constraints
which limit theResources
that can serve this* Node
to those that have the specificQualification
to do so. Cannot benull
.For further explanations and implementation examples please see
TypeConstraint
andTypeQualification
- Specified by:
setConstraints
in interfaceINode
- Parameters:
constraints
- theArraylist constraints
to be set
-
isDutyHoursIncludesVisitDuration
public boolean isDutyHoursIncludesVisitDuration()Description copied from interface:INode
Checks whether the job at theNode
has to be done within theIOpeningHours
or if theIResource
only has to arrive and start the job within that time.- Specified by:
isDutyHoursIncludesVisitDuration
in interfaceINode
- Returns:
- the boolean isDutyHoursIncludesVisitDuration
- See Also:
-
setIsDutyHoursIncludesVisitDuration
public void setIsDutyHoursIncludesVisitDuration(boolean isDutyHoursIncludeVisitDuration) Description copied from interface:INode
SetsisDutyHoursIncludesVisitDuration
, if set to false, theDutyHours
act as an access window in which the work has to be started. If set totrue
the work has to be finished within theDutyHours
.- Specified by:
setIsDutyHoursIncludesVisitDuration
in interfaceINode
- Parameters:
isDutyHoursIncludeVisitDuration
- the boolean if the work has to be done within the Dutyhours
-
setIsCausingIdleTimeCost
public void setIsCausingIdleTimeCost(boolean isCausingIdleTimeCost) Description copied from interface:INode
SetsisCausingIdleTimeCost
, the default value istrue
. WhenINode.isWaitOnEarlyArrival()
is true, a resource can generate idle time at a node. However, in a partially loaded optimization (so the amount of available working time of the resources is much higher than the required working time at the nodes) with tightIOpeningHours
of the nodes, a lot of idle time can arise, as resources have to wait till nodes are opening and have nothing else to do. This can lead to bad optimization results, as the optimizer tries to avoid idle time and whitespace.By setting
isCausingIdleTimeCost
to false, idle time at this node does not generate cost.- Specified by:
setIsCausingIdleTimeCost
in interfaceINode
- Parameters:
isCausingIdleTimeCost
- the boolean to be set
-
isCausingIdleTimeCost
public boolean isCausingIdleTimeCost()Description copied from interface:INode
Checks if theNode
can causeidle time
. If set tofalse
theNode
still causesidle time
but at no cost. The default value istrue
.- Specified by:
isCausingIdleTimeCost
in interfaceINode
- Returns:
- the boolean
isCausingIdleTimeCost
-
setIsOptional
public void setIsOptional(boolean isOptional) Description copied from interface:INode
Sets theNode
as anoptional Node
. TheResource
can go to one of manyoptional Nodes
to do a task (for example dump waste, get new packets to deliver) but does not have to go to a specificoptional Node
.- Specified by:
setIsOptional
in interfaceINode
- Parameters:
isOptional
- the boolean to set the Node as an optional Node
-
isOptional
public boolean isOptional()Description copied from interface:INode
Checks if it is anoptional Node
one of which theResource
may visit in order to further be able to do its job (for example a waste dump or a packet station.The default value isfalse
.- Specified by:
isOptional
in interfaceINode
- Returns:
- the boolean to be checked
-
addQualification
Description copied from interface:INode
Adds aIQualification
to theResource
, which means that by adding aIConstraint
to theINode
, they are limited to whichNodes
they can give service.Used in
UKPostCodeConstraint
.- Specified by:
addQualification
in interfaceINode
- Parameters:
qualification
- the iQualification that is to be added
-
getQualifications
Description copied from interface:INode
Gets theIQualification
of theResource
.- Specified by:
getQualifications
in interfaceINode
- Returns:
- the node qualifications
- See Also:
-
addSubsequentSlaveNode
Description copied from interface:INode
Adds a subsequent slave node, which need to be visited in direct succession. The slave node should not be added directly to the optimization.- Specified by:
addSubsequentSlaveNode
in interfaceINode
- Parameters:
node
- the subsequent slave node
-
addSubsequentSlaveNodes
Description copied from interface:INode
Adds a list of subsequent slave nodes, which need to be visited in direct succession. The slave nodes should not be added directly to the optimization.- Specified by:
addSubsequentSlaveNodes
in interfaceINode
- Parameters:
nodes
- the subsequent slave nodes
-
getSubsequentSlaveNodes
- Specified by:
getSubsequentSlaveNodes
in interfaceINode
-
resetSubsequentSlaveNodes
public void resetSubsequentSlaveNodes()- Specified by:
resetSubsequentSlaveNodes
in interfaceINode
-
setIsReturnStart
- Specified by:
setIsReturnStart
in interfaceINode
-
isReturnStart
public boolean isReturnStart()- Specified by:
isReturnStart
in interfaceINode
-
getStayAtStartDuration
- Specified by:
getStayAtStartDuration
in interfaceINode
-
setLoad
public void setLoad(double[] load) Description copied from interface:INode
Sets the amount of goods theResource
is getting added by visiting theResource
. Can be negative (delivering packages). -
getLoad
public double[] getLoad()Description copied from interface:INode
Gets the amount of goods theResource
is getting added by visiting theResource
. Can be negative (delivering packages). -
setUnloadAll
public void setUnloadAll(boolean unloadAll) Description copied from interface:INode
Allows theResource
to unload all itsCapacity
at thisNode
- Specified by:
setUnloadAll
in interfaceINode
- Parameters:
unloadAll
- the boolean to be set- See Also:
-
isUnloadAll
public boolean isUnloadAll()Description copied from interface:INode
Checks if it is possible for theResource
to unload all itsCapacity
at thisNode
.- Specified by:
isUnloadAll
in interfaceINode
- Returns:
- the boolean unloadAll
-
setUnloadAllDimension
public void setUnloadAllDimension(int unloadAllDimension, int totalLoadDimension) Description copied from interface:INode
Allows aResource
to unload all itsCapacity
of a specific good (dimension
) at thisNode
.- Specified by:
setUnloadAllDimension
in interfaceINode
- Parameters:
unloadAllDimension
- the int unloadAllDimensiontotalLoadDimension
- the int totalLoadDimension
-
getUnloadAllDimension
public int getUnloadAllDimension()Description copied from interface:INode
Gets if it is allowed for aResource
to unload all itsCapacity
of a specific good (dimension
) at thisNode
.- Specified by:
getUnloadAllDimension
in interfaceINode
- Returns:
- the int unloadAllDimension
-
getTotalLoadDimension
public int getTotalLoadDimension()Description copied from interface:INode
Gets the total load of a specific good.- Specified by:
getTotalLoadDimension
in interfaceINode
- Returns:
- the int totalLoadDimension
-
getNodeId
Deprecated.- Returns:
- the node id
- Category:
- Legacy
Gets the node id.
-
setNodeId
Deprecated.- Parameters:
id
- the new node id- Category:
- Legacy
Sets the node id.
-
setNodeDepot
- Specified by:
setNodeDepot
in interfaceINode
-
getNodeDepot
- Specified by:
getNodeDepot
in interfaceINode
-