public abstract class AbstractNode extends AbstractOptimizationElement implements INode
IOptimizationElement.OptimizationElementFlavour
dutyHours
Modifier | Constructor and Description |
---|---|
protected |
AbstractNode() |
Modifier and Type | Method and Description |
---|---|
void |
addConstraint(IConstraint constraint)
Adds a
constraint which limits the Resources that can serve
this Node to those that have the specific Qualification to do
so. |
void |
addNode2NodeRelation(INode2NodeRelation relation)
Sets two
Nodes in a Relation . |
void |
addQualification(IQualification qualification)
Adds a
IQualification to the Resource , which means that by
adding a IConstraint to the INode , they are limited to which
Nodes 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 a
IViolation to Node . |
int |
decrementCurrentAutoFilterProtectedExecutions()
The number of
iterations the Node is still protected from
being autofiltered. |
void |
detachNodeRelations() |
void |
detachResourceConstraints()
Removes all
IConstraint . |
void |
detachResourceConstraints(String resId)
|
boolean |
equals(Object obj) |
IAutoFilterViolationAndConstrainCollector |
getAutoFilterViolationCollector()
Gets the
myAutoFilterViolationCollector that collected
all IViolation . |
int |
getBaseJointVisitDuration() |
long |
getBaseJointVisitDurationMillis() |
int |
getBaseVisitDuration()
Deprecated.
|
long |
getBaseVisitDurationMillis()
Gets the base visit duration in millis
|
List<IConstraint> |
getConstraints()
Gets the
Constraints which limit the Resources that can serve
this Node to those that have the specific Qualification to do
so. |
int |
getCurrentLeftAutoFilterProtectedExecutions()
Gets the
numCurrentProtectedExecutions , the default
value is 0 . |
List<IDutyHours> |
getDutyHours()
Gets the
IDutyHours of the element . |
int |
getFirstNodeInRouteImportance() |
double |
getFixCost()
Gets the
fixCost . |
int |
getImportance()
Gets the
priority . |
double |
getIndividualOfferedNodeMultiplier()
Gets a cost
multiplier for this specific Node . |
int |
getJointVisitDuration(ILogicEntityRoute ownerRoute)
Deprecated.
|
long |
getJointVisitDurationMillis(ILogicEntityRoute ownerRoute)
Gets the
getJointVisitDurationMillis(com.dna.jopt.member.bucket.route.ILogicEntityRoute) , which is the reduced
visitDuration of a Node caused by efficiency effects since several
Nodes close to one another. |
List<String> |
getLastKnownAttachedAndRemovedResIds() |
int |
getLastNodeInRouteImportance() |
double[] |
getLoad()
Gets the amount of goods the
Resource is getting added by visiting
the Resource . |
Optional<Long> |
getLockdownTime() |
int |
getMinVisitDuration()
Deprecated.
|
long |
getMinVisitDurationMillis()
Gets the min visit duration millis.
|
List<INode2NodeRelation> |
getNode2NodeRelations()
Gets the
Relations of the Node . |
INodeColor |
getNodeColor()
Gets the
INodeColor of the Node . |
Optional<INodeDepot> |
getNodeDepot() |
String |
getNodeId()
Deprecated.
|
List<IDutyHours> |
getOriginalDutyHours() |
Map<Class<? extends IQualification>,IQualification> |
getQualifications()
Gets the
IQualification of the Resource . |
Duration |
getStayAtStartDuration() |
List<INode> |
getSubsequentSlaveNodes() |
int |
getTempImplausibleScore() |
int |
getTotalLoadDimension()
Gets the total load of a specific good.
|
int |
getUnloadAllDimension()
Gets if it is allowed for a
Resource to unload all its
Capacity of a specific good (dimension ) at this Node . |
List<IViolation> |
getViolations()
Gets the
IViolation of the Node . |
long |
getVisitDurationMillis(ILogicEntityRoute ownerRoute)
Gets the defined visit duration of a job at a
Node in seconds. |
boolean |
hasFullJobLevelRelations()
Checks if all the data of the
Node should be saved in a
ILogicRouteElementDetailItem . |
int |
hashCode() |
boolean |
hasRelations()
Checks if the
Node has any Relations . |
boolean |
hasRouteDependentVisitDuration()
Checks for route dependent visit duration.
|
void |
invokeDetachedResourceConstraints(List<IConstraintResource> removedCons) |
boolean |
isAllowMoveToReduceFlexTime() |
boolean |
isAutoFilterProtected()
Checks if the
Node is protected from being filtered. |
boolean |
isCausingIdleTimeCost()
Checks if the
Node can cause idle time . |
boolean |
isDutyHoursIncludesVisitDuration()
Checks whether the job at the
Node has to be done within the
IOpeningHours or if the
IResource only has to arrive and
start the job within that time. |
boolean |
isOfferedNode()
|
boolean |
isOptimizable()
Checks
isOptimizable , the default value is true . |
boolean |
isOptional()
Checks if it is an
optional Node one of which the Resource
may visit in order to further be able to do its job (for example a waste dump
or a packet station.The default value is false . |
boolean |
isReturnStart() |
boolean |
isStayNode()
Checks if the
Node can be used as for an overnight stay . |
boolean |
isUnassigned()
Checks if the node was unassigned by the
INodeUnassigner . |
boolean |
isUnloadAll()
Checks if it is possible for the
Resource to unload all its
Capacity at this Node . |
boolean |
isUseJointVisitDuration()
Checks if there are beneficial effects of a reduced
visitDuration
since several Nodes are close to one another. |
boolean |
isWaitOnEarlyArrival()
Checks if the
Resource , if arriving early, has to wait until the
start of the IOpeningHours before
being able to work. |
boolean |
isWaitOnEarlyArrivalFirstNode() |
boolean |
isWorkNode()
Deprecated.
|
boolean |
removeConstraint(IConstraint removeConstraint)
Removes the
IConstraint from this Node . |
boolean |
removeNode2NodeRelations(INode2NodeRelation removeRelation)
Removes a
INode2NodeRelation from the Node |
void |
resetDutyHoursTempActivation() |
void |
resetLockdownTime() |
void |
resetSubsequentSlaveNodes() |
void |
setAllowMoveToReduceFlexTime(boolean allowMoveToReduceFlexTime) |
void |
setAutoFilterConstraints(List<IAutoFilterNodeConstraint> nodeAutoFilterConstraints)
Sets a
IConstraint at a Node for which it could be filtered. |
void |
setConstraints(List<IConstraint> constraints)
Sets the
ArrayList constraints which limit the Resources that
can serve this * Node to those that have the specific
Qualification to do so. |
void |
setFirstNodeInRouteImportance(int importance) |
void |
setFixCost(double fixCost)
Sets the
fixCost for visiting the Node . |
void |
setHasRouteDependentVisitDuration(boolean hasRouteDependentVisitDuration)
Sets the checks for route dependent visit duration.
|
void |
setImportance(int priority)
Sets the
priority/importance . |
void |
setIndividualOfferedNodeMultiplier(double individualOfferedNodeMultiplier)
Sets the
multiplier of the cost for this specific Node . |
void |
setIsCausingIdleTimeCost(boolean isCausingIdleTimeCost)
Sets
isCausingIdleTimeCost , the default value is true . |
void |
setIsDutyHoursIncludesVisitDuration(boolean isDutyHoursIncludeVisitDuration)
Sets
isDutyHoursIncludesVisitDuration , if set to false, the
DutyHours act as an access window in which the work has to be
started. |
void |
setIsOfferedNode(boolean isOfferedNode)
Sets as a
offered Node . |
void |
setIsOptional(boolean isOptional)
Sets the
Node as an optional Node . |
boolean |
setIsReturnStart(Duration stayAtStartDuration) |
void |
setIsStayNode(boolean isStayNode)
Sets
Node as a possible overnight stay Node . |
void |
setIsWorkNode(boolean isWorkNode)
Deprecated.
|
void |
setJointVisitDuration(Duration visitDuration)
If two or more
Nodes are close to one another, the
visitDuration of the Nodes 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 the
Resource is getting added by visiting
the Resource . |
void |
setLockdownTime(long lockdowntime) |
void |
setMinAutoFilterProtectedExecutions(int numProtectedExecutions)
Sets a number of
iterations of the Optimizer in which the
Node is protected from being filtered by the
IAutoNodeFilter . |
void |
setMinimalVisitDuration(Duration minimalVisitDuration) |
void |
setNodeColor(INodeColor color)
|
void |
setNodeDepot(INodeDepot depot) |
void |
setNodeId(String id)
Deprecated.
|
void |
setOptimizable(boolean isOptimizable)
Sets if the
Node can still be moved around or if it is on
lockdown and is fixed. |
void |
setOptimizable(boolean isOptimizable,
boolean forceKeepLockdownTime) |
void |
setUnassigned(boolean unassigned)
Sets the
Node to be unassigned , meaning not part of any
Route . |
void |
setUnloadAll(boolean unloadAll)
Allows the
Resource to unload all its Capacity at this
Node |
void |
setUnloadAllDimension(int unloadAllDimension,
int totalLoadDimension)
Allows a
Resource to unload all its Capacity of a specific
good (dimension ) at this Node . |
void |
setVisitDuration(int visitDurationSeconds)
Deprecated.
|
void |
setVisitDurationMillis(long visitDurationMillis)
Sets the visit duration millis.
|
void |
setWaitOnEarlyArrival(boolean waitOnEarlyArrival)
Sets whether a
Resource has to wait when arriving before the
IOpeningHours of the Node . |
void |
setWaitOnEarlyArrivalFirstNode(boolean waitOnEarlyArrival) |
void |
tempIncreaseImplausibleScore() |
void |
tempSetActiveDutyHours(Set<Integer> tempActivateIndicesSet) |
String |
toString() |
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
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
isPillarNode
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
public String toString()
toString
in class AbstractOptimizationElement
public void tempIncreaseImplausibleScore()
tempIncreaseImplausibleScore
in interface INode
public int getTempImplausibleScore()
getTempImplausibleScore
in interface INode
public void tempSetActiveDutyHours(Set<Integer> tempActivateIndicesSet)
tempSetActiveDutyHours
in interface INode
public List<IDutyHours> getDutyHours()
IOptimizationElement
IDutyHours
of the element
.getDutyHours
in interface IOptimizationElement
getDutyHours
in class AbstractOptimizationElement
public List<IDutyHours> getOriginalDutyHours()
getOriginalDutyHours
in interface INode
public void resetDutyHoursTempActivation()
resetDutyHoursTempActivation
in interface INode
public void setNodeColor(INodeColor color)
INode
INodeColor
to the Node
by adding a
NodeColorCapacityItem
. By using
IWorkingHours.addNodeColorCapacity(NodeColorCapacityItem)
it limits
the amount of Color
coded Nodes
a Resource
can give service to. This way
can be made sure that Nodes
with a certain Color
are not
overrepresented and can be used for white space generation. The default value
is NodeColors.DEFAULT
.setNodeColor
in interface INode
color
- the iNodeColor
public INodeColor getNodeColor()
INode
getNodeColor
in interface INode
iNodeColor
public int hashCode()
hashCode
in class AbstractOptimizationElement
public boolean equals(Object obj)
equals
in class AbstractOptimizationElement
public IAutoFilterViolationAndConstrainCollector getAutoFilterViolationCollector()
INode
myAutoFilterViolationCollector
that collected
all IViolation
.getAutoFilterViolationCollector
in interface INode
public void setAutoFilterConstraints(List<IAutoFilterNodeConstraint> nodeAutoFilterConstraints)
INode
IConstraint
at a Node
for which it could be filtered.setAutoFilterConstraints
in interface INode
nodeAutoFilterConstraints
- the
AutoFilterViolationAndConstraintCollector to
be setpublic boolean isAutoFilterProtected()
INode
Node
is protected from being filtered.isAutoFilterProtected
in interface INode
true
if the condition allowspublic void setMinAutoFilterProtectedExecutions(int numProtectedExecutions)
INode
iterations
of the Optimizer
in which the
Node
is protected from being filtered by the
IAutoNodeFilter
.setMinAutoFilterProtectedExecutions
in interface INode
numProtectedExecutions
- the int valuepublic int decrementCurrentAutoFilterProtectedExecutions()
INode
iterations
the Node
is still protected from
being autofiltered.decrementCurrentAutoFilterProtectedExecutions
in interface INode
public int getCurrentLeftAutoFilterProtectedExecutions()
INode
numCurrentProtectedExecutions
, the default
value is 0
.getCurrentLeftAutoFilterProtectedExecutions
in interface INode
public long getVisitDurationMillis(ILogicEntityRoute ownerRoute)
INode
Node
in seconds.getVisitDurationMillis
in interface INode
ownerRoute
- the owner routepublic long getBaseVisitDurationMillis()
INode
getBaseVisitDurationMillis
in interface INode
@Deprecated public int getBaseVisitDuration()
INode
getBaseVisitDuration
in interface INode
@Deprecated public void setVisitDuration(int visitDurationSeconds)
INode
Node
in seconds.setVisitDuration
in interface INode
visitDurationSeconds
- the int new visit duration seconds.public void setMinimalVisitDuration(Duration minimalVisitDuration)
setMinimalVisitDuration
in interface INode
@Deprecated public int getMinVisitDuration()
public long getMinVisitDurationMillis()
INode
getMinVisitDurationMillis
in interface INode
public boolean hasRouteDependentVisitDuration()
INode
hasRouteDependentVisitDuration
in interface INode
public void setHasRouteDependentVisitDuration(boolean hasRouteDependentVisitDuration)
INode
setHasRouteDependentVisitDuration
in interface INode
hasRouteDependentVisitDuration
- the new checks for route dependent
visit durationpublic void setVisitDurationMillis(long visitDurationMillis)
INode
setVisitDurationMillis
in interface INode
visitDurationMillis
- the new visit duration millispublic void setJointVisitDuration(Duration visitDuration)
INode
Nodes
are close to one another, the
visitDuration
of the Nodes
after the first one can be reduced since for example less loading and
unloading time is needed . Sets the reduced visitDuration
for these
Nodes
instead of the normal visit duration.setJointVisitDuration
in interface INode
visitDuration
- the duration of the reduced visitpublic int getBaseJointVisitDuration()
getBaseJointVisitDuration
in interface INode
public long getBaseJointVisitDurationMillis()
getBaseJointVisitDurationMillis
in interface INode
@Deprecated public int getJointVisitDuration(ILogicEntityRoute ownerRoute)
INode
visitDuration
of a Node
caused by efficiency effects since several
Nodes
close to one another.getJointVisitDuration
in interface INode
ownerRoute
- the owner routepublic long getJointVisitDurationMillis(ILogicEntityRoute ownerRoute)
INode
getJointVisitDurationMillis(com.dna.jopt.member.bucket.route.ILogicEntityRoute)
, which is the reduced
visitDuration
of a Node
caused by efficiency effects since several
Nodes
close to one another.getJointVisitDurationMillis
in interface INode
ownerRoute
- the owner routepublic boolean isUseJointVisitDuration()
INode
visitDuration
since several Nodes
are close to one another. The default value is false
.
Will be set to true
by INode.setJointVisitDuration(Duration)
.
isUseJointVisitDuration
in interface INode
visitDuration
is reducedpublic void setUnassigned(boolean unassigned)
INode
Node
to be unassigned
, meaning not part of any
Route
. The default value is false
.
This method es bing used internally.
setUnassigned
in interface INode
unassigned
- the boolean for the new unassignedpublic boolean isUnassigned()
INode
INodeUnassigner
. An
unassigned Node
is not part of any Route
isUnassigned
in interface INode
public void setOptimizable(boolean isOptimizable)
INode
Node
can still be moved around or if it is on
lockdown
and is fixed.setOptimizable
in interface INode
isOptimizable
- the boolean isOptimizable to be setpublic void setOptimizable(boolean isOptimizable, boolean forceKeepLockdownTime)
setOptimizable
in interface INode
public void resetLockdownTime()
resetLockdownTime
in interface INode
public void setLockdownTime(long lockdowntime)
setLockdownTime
in interface INode
public Optional<Long> getLockdownTime()
getLockdownTime
in interface INode
public boolean isOptimizable()
INode
isOptimizable
, the default value is true
.isOptimizable
in interface INode
public void addViolation(IViolation violation)
INode
IViolation
to Node
. This method is used internally.addViolation
in interface INode
violation
- the violationpublic List<IViolation> getViolations()
INode
IViolation
of the Node
. Only has a non-empty list in
case a result was requested.getViolations
in interface INode
List<IViolation> violations
public void setFixCost(double fixCost)
INode
fixCost
for visiting the Node
. The default
value of the
double
is 0.setFixCost
in interface INode
fixCost
- the double fixCostpublic double getFixCost()
INode
fixCost
. The default value of the double
is 0.getFixCost
in interface INode
public boolean isStayNode()
INode
Node
can be used as for an overnight stay
. The
default value is false
.
This allows the Resource
to stay at this Node
at the end of
the Route
instead of returning home and proceeding from there the next day. The
Resource also needs IWorkingHours.getIsAvailableForStay()
to be set
to true
in order to be able to stay there at the end of the
Route
.
isStayNode
in interface INode
public void setIsStayNode(boolean isStayNode)
INode
Node
as a possible overnight stay Node
.
This allows the Resource
to stay at this Node
at the end of
the Route
instead of returning home and proceeding from there the next day. The
Resource also needs IWorkingHours.getIsAvailableForStay()
to be set
to true
in order to be able to stay there at the end of the
Route
.
setIsStayNode
in interface INode
isStayNode
- if the boolean is set to true
the
Node
can be used for
overnight stays
@Deprecated public boolean isWorkNode()
isWorkNode
in interface INode
@Deprecated public void setIsWorkNode(boolean isWorkNode)
setIsWorkNode
in interface INode
isWorkNode
- the boolean for the workNode
public boolean isOfferedNode()
INode
Node
is a offered Node
which has its own
individualOfferedNodeMultiplier
. An offered Node
usually has a higher priority to be integrated into a Route
which is
done by multiplying the cost for this specific Node
when being
missed.isOfferedNode
in interface INode
isOfferedNode
public void setIsOfferedNode(boolean isOfferedNode)
INode
offered Node
. The default value is false
. When
a node is marked as offered node more costs can arise when violating any of
the constraints of the node. An offered Node
usually has a higher
priority to be integrated into a Route
which is done by multiplying
the cost for this specific Node
when being missed.setIsOfferedNode
in interface INode
isOfferedNode
- the boolean to be setINode.setIndividualOfferedNodeMultiplier(double)
public double getIndividualOfferedNodeMultiplier()
INode
multiplier
for this specific Node
.getIndividualOfferedNodeMultiplier
in interface INode
individualOfferedNodeMultiplier
public void setIndividualOfferedNodeMultiplier(double individualOfferedNodeMultiplier)
INode
multiplier
of the cost for this specific Node
.
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 the Node
a higher priority to be given
service on time.setIndividualOfferedNodeMultiplier
in interface INode
individualOfferedNodeMultiplier
- the double to be setpublic void setImportance(int priority)
INode
priority/importance
. The default value is 1.setImportance
in interface INode
priority
- the int priority to be set.public int getImportance()
INode
priority
.getImportance
in interface INode
priority
public boolean isWaitOnEarlyArrival()
INode
Resource
, if arriving early, has to wait until the
start of the IOpeningHours
before
being able to work. The default value is true
, in which case
arriving too early means idle time
.isWaitOnEarlyArrival
in interface INode
waitOnEarlyArrival
public void setWaitOnEarlyArrival(boolean waitOnEarlyArrival)
INode
Resource
has to wait when arriving before the
IOpeningHours
of the Node
. The default value is
true
.
When wait on early arrival is set to false, a visiting resource will start
working right away. In contrast, if WaitOnEarlyArrival
is set to
true
, a Resource
will idle until a Node
opens based on its defined
IWorkingHours
.
setWaitOnEarlyArrival
in interface INode
waitOnEarlyArrival
- the boolean to be setpublic void setWaitOnEarlyArrivalFirstNode(boolean waitOnEarlyArrival)
setWaitOnEarlyArrivalFirstNode
in interface INode
public boolean isWaitOnEarlyArrivalFirstNode()
isWaitOnEarlyArrivalFirstNode
in interface INode
public void setFirstNodeInRouteImportance(int importance)
setFirstNodeInRouteImportance
in interface INode
public int getFirstNodeInRouteImportance()
getFirstNodeInRouteImportance
in interface INode
public void setLastNodeInRouteImportance(int importance)
setLastNodeInRouteImportance
in interface INode
public int getLastNodeInRouteImportance()
getLastNodeInRouteImportance
in interface INode
public void setAllowMoveToReduceFlexTime(boolean allowMoveToReduceFlexTime)
setAllowMoveToReduceFlexTime
in interface INode
public boolean isAllowMoveToReduceFlexTime()
isAllowMoveToReduceFlexTime
in interface INode
public void addNode2NodeRelation(INode2NodeRelation relation)
INode
Nodes
in a Relation
. A MasterNode
has to be
served before a RelatedNode
.
For further explanation and implementation examples please see
INode2NodeRelation
.
addNode2NodeRelation
in interface INode
relation
- the INode2NodeRelation
to be addedpublic List<INode2NodeRelation> getNode2NodeRelations()
INode
Relations
of the Node
.
For further explanation and implementation examples please see
INode2NodeRelation
.
getNode2NodeRelations
in interface INode
List<INode2NodeRelation> node2NodeRelation
public boolean removeNode2NodeRelations(INode2NodeRelation removeRelation)
INode
INode2NodeRelation
from the Node
removeNode2NodeRelations
in interface INode
removeRelation
- the INode2NodeRelation that will be removedpublic boolean hasFullJobLevelRelations()
INode
Node
should be saved in a
ILogicRouteElementDetailItem
.
The default value is false
.
The only other instance when this data is saved is when a ILogicRouteElementDetailItem
is requested.
hasFullJobLevelRelations
in interface INode
boolean hasFullJobLevelRelations
public boolean hasRelations()
INode
Node
has any Relations
.
For further explanation and implementation examples of Relations
please see INode2NodeRelation
hasRelations
in interface INode
hasRelations
public void addConstraint(IConstraint constraint)
INode
constraint
which limits the Resources
that can serve
this Node
to those that have the specific Qualification
to do
so.
For further explanations and implementation examples please see
TypeConstraint
and
TypeQualification
.
addConstraint
in interface INode
constraint
- the Iconstraint
to be addedpublic void detachResourceConstraints()
INode
IConstraint
. This method is used internally.detachResourceConstraints
in interface INode
public void detachNodeRelations()
detachNodeRelations
in interface INode
public void detachResourceConstraints(String resId)
INode
IResource
with the given resId
from the
IConstraint
that are IConstraintResource
. This method is used
internally.detachResourceConstraints
in interface INode
resId
- the string Resource /Dpublic void invokeDetachedResourceConstraints(List<IConstraintResource> removedCons)
public List<String> getLastKnownAttachedAndRemovedResIds()
getLastKnownAttachedAndRemovedResIds
in interface INode
public List<IConstraint> getConstraints()
INode
Constraints
which limit the Resources
that can serve
this Node
to those that have the specific Qualification
to do
so.
For further explanations and implementation examples please see
TypeConstraint
and
TypeQualification
.
getConstraints
in interface INode
List<IConstraint> constraints
public boolean removeConstraint(IConstraint removeConstraint)
INode
IConstraint
from this Node
.removeConstraint
in interface INode
removeConstraint
- the constraint to be removedList<IConstraint>
constraints that were removedpublic void setConstraints(List<IConstraint> constraints)
INode
ArrayList constraints
which limit the Resources
that
can serve this * Node
to those that have the specific
Qualification
to do so. Cannot be null
.
For further explanations and implementation examples please see
TypeConstraint
and
TypeQualification
setConstraints
in interface INode
constraints
- the Arraylist constraints
to be setpublic boolean isDutyHoursIncludesVisitDuration()
INode
Node
has to be done within the
IOpeningHours
or if the
IResource
only has to arrive and
start the job within that time.isDutyHoursIncludesVisitDuration
in interface INode
INode.setIsDutyHoursIncludesVisitDuration(boolean)
public void setIsDutyHoursIncludesVisitDuration(boolean isDutyHoursIncludeVisitDuration)
INode
isDutyHoursIncludesVisitDuration
, if set to false, the
DutyHours
act as an access window in which the work has to be
started. If set to true
the work has to be finished within the
DutyHours
.setIsDutyHoursIncludesVisitDuration
in interface INode
isDutyHoursIncludeVisitDuration
- the boolean if the work has to be done
within the Dutyhourspublic void setIsCausingIdleTimeCost(boolean isCausingIdleTimeCost)
INode
isCausingIdleTimeCost
, the default value is true
. When
INode.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 tight
IOpeningHours
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.
setIsCausingIdleTimeCost
in interface INode
isCausingIdleTimeCost
- the boolean to be setpublic boolean isCausingIdleTimeCost()
INode
Node
can cause idle time
. If set to
false
the Node
still causes idle time
but at no cost. The default value is
true
.isCausingIdleTimeCost
in interface INode
isCausingIdleTimeCost
public void setIsOptional(boolean isOptional)
INode
Node
as an optional Node
. The Resource
can
go to one of many optional Nodes
to do a task (for example dump
waste, get new packets to deliver) but does not have to go to a specific
optional Node
.setIsOptional
in interface INode
isOptional
- the boolean to set the Node as an optional Nodepublic boolean isOptional()
INode
optional Node
one of which the Resource
may visit in order to further be able to do its job (for example a waste dump
or a packet station.The default value is false
.isOptional
in interface INode
public void addQualification(IQualification qualification)
INode
IQualification
to the Resource
, which means that by
adding a IConstraint
to the INode
, they are limited to which
Nodes
they can give service.
Used in
UKPostCodeConstraint
.
addQualification
in interface INode
qualification
- the iQualification that is to be addedpublic Map<Class<? extends IQualification>,IQualification> getQualifications()
INode
IQualification
of the Resource
.getQualifications
in interface INode
INode.addQualification(IQualification)
public void addSubsequentSlaveNode(INode node)
INode
addSubsequentSlaveNode
in interface INode
node
- the subsequent slave nodepublic void addSubsequentSlaveNodes(List<INode> nodes)
INode
addSubsequentSlaveNodes
in interface INode
nodes
- the subsequent slave nodespublic List<INode> getSubsequentSlaveNodes()
getSubsequentSlaveNodes
in interface INode
public void resetSubsequentSlaveNodes()
resetSubsequentSlaveNodes
in interface INode
public boolean setIsReturnStart(Duration stayAtStartDuration)
setIsReturnStart
in interface INode
public boolean isReturnStart()
isReturnStart
in interface INode
public Duration getStayAtStartDuration()
getStayAtStartDuration
in interface INode
public void setLoad(double[] load)
INode
Resource
is getting added by visiting
the Resource
. Can be negative (delivering packages).setLoad
in interface INode
load
- the double arrayIResource.addCapacity(double)
public double[] getLoad()
INode
Resource
is getting added by visiting
the Resource
. Can be negative (delivering packages).getLoad
in interface INode
IResource.addCapacity(double)
public void setUnloadAll(boolean unloadAll)
INode
Resource
to unload all its Capacity
at this
Node
setUnloadAll
in interface INode
unloadAll
- the boolean to be setIResource.addCapacity(double)
public boolean isUnloadAll()
INode
Resource
to unload all its
Capacity
at this Node
.isUnloadAll
in interface INode
public void setUnloadAllDimension(int unloadAllDimension, int totalLoadDimension)
INode
Resource
to unload all its Capacity
of a specific
good (dimension
) at this Node
.setUnloadAllDimension
in interface INode
unloadAllDimension
- the int unloadAllDimensiontotalLoadDimension
- the int totalLoadDimensionpublic int getUnloadAllDimension()
INode
Resource
to unload all its
Capacity
of a specific good (dimension
) at this Node
.getUnloadAllDimension
in interface INode
public int getTotalLoadDimension()
INode
getTotalLoadDimension
in interface INode
@Deprecated public String getNodeId()
Gets the node id.
@Deprecated public void setNodeId(String id)
id
- the new node idSets the node id.
public void setNodeDepot(INodeDepot depot)
setNodeDepot
in interface INode
public Optional<INodeDepot> getNodeDepot()
getNodeDepot
in interface INode
Copyright © 2017–2023 DNA Evolutions GmbH. All rights reserved.