Class AbstractNode

All Implemented Interfaces:
IOptimizationElement, INode, Serializable
Direct Known Subclasses:
EventNode, TimeWindowGeoNode

public abstract class AbstractNode extends AbstractOptimizationElement implements INode
See Also:
  • Constructor Details

    • AbstractNode

      protected AbstractNode()
  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class AbstractOptimizationElement
    • tempIncreaseImplausibleScore

      public void tempIncreaseImplausibleScore()
      Specified by:
      tempIncreaseImplausibleScore in interface INode
    • getTempImplausibleScore

      public int getTempImplausibleScore()
      Specified by:
      getTempImplausibleScore in interface INode
    • tempSetActiveDutyHours

      public void tempSetActiveDutyHours(Set<Integer> tempActivateIndicesSet)
      Specified by:
      tempSetActiveDutyHours in interface INode
    • getDutyHours

      public List<IDutyHours> getDutyHours()
      Description copied from interface: IOptimizationElement
      Gets the IDutyHours of the element.
      Specified by:
      getDutyHours in interface IOptimizationElement
      Overrides:
      getDutyHours in class AbstractOptimizationElement
      Returns:
      the duty hours
    • getOriginalDutyHours

      public List<IDutyHours> getOriginalDutyHours()
      Specified by:
      getOriginalDutyHours in interface INode
    • resetDutyHoursTempActivation

      public void resetDutyHoursTempActivation()
      Specified by:
      resetDutyHoursTempActivation in interface INode
    • setNodeColor

      public void setNodeColor(INodeColor color)
      Description copied from interface: INode
      Sets the 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.
      Specified by:
      setNodeColor in interface INode
      Parameters:
      color - the iNodeColor
    • getNodeColor

      public INodeColor getNodeColor()
      Description copied from interface: INode
      Gets the INodeColor of the Node.

      For more information please see INode.setNodeColor(INodeColor).

      Specified by:
      getNodeColor in interface INode
      Returns:
      the iNodeColor
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class AbstractOptimizationElement
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class AbstractOptimizationElement
    • getAutoFilterViolationCollector

      public IAutoFilterViolationAndConstrainCollector getAutoFilterViolationCollector()
      Description copied from interface: INode
      Gets the myAutoFilterViolationCollector that collected all IViolation.
      Specified by:
      getAutoFilterViolationCollector in interface INode
      Returns:
      the myAutoFilterViolationCollector
    • setAutoFilterConstraints

      public void setAutoFilterConstraints(List<IAutoFilterNodeConstraint> nodeAutoFilterConstraints)
      Description copied from interface: INode
      Sets a IConstraint at a Node for which it could be filtered.
      Specified by:
      setAutoFilterConstraints in interface INode
      Parameters:
      nodeAutoFilterConstraints - the AutoFilterViolationAndConstraintCollector to be set
    • isAutoFilterProtected

      public boolean isAutoFilterProtected()
      Description copied from interface: INode
      Checks if the Node is protected from being filtered.
      Specified by:
      isAutoFilterProtected in interface INode
      Returns:
      true if the condition allows
    • setMinAutoFilterProtectedExecutions

      public void setMinAutoFilterProtectedExecutions(int numProtectedExecutions)
      Description copied from interface: INode
      Sets a number of iterations of the Optimizer in which the Node is protected from being filtered by the IAutoNodeFilter.
      Specified by:
      setMinAutoFilterProtectedExecutions in interface INode
      Parameters:
      numProtectedExecutions - the int value
    • decrementCurrentAutoFilterProtectedExecutions

      public int decrementCurrentAutoFilterProtectedExecutions()
      Description copied from interface: INode
      The number of iterations the Node is still protected from being autofiltered.
      Specified by:
      decrementCurrentAutoFilterProtectedExecutions in interface INode
      Returns:
      the int numCurrentProtectedExecutions
    • getCurrentLeftAutoFilterProtectedExecutions

      public int getCurrentLeftAutoFilterProtectedExecutions()
      Description copied from interface: INode
      Gets the numCurrentProtectedExecutions, the default value is 0.
      Specified by:
      getCurrentLeftAutoFilterProtectedExecutions in interface INode
      Returns:
      the
    • getVisitDurationMillis

      public long getVisitDurationMillis(ILogicEntityRoute ownerRoute)
      Description copied from interface: INode
      Gets the defined visit duration of a job at a Node in seconds.
      Specified by:
      getVisitDurationMillis in interface INode
      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 interface INode
      Returns:
      the base visit duration
    • getBaseVisitDuration

      @Deprecated public int getBaseVisitDuration()
      Deprecated.
      Description copied from interface: INode
      Gets the base visit duration in seconds
      Specified by:
      getBaseVisitDuration in interface INode
      Returns:
      the base visit duration
    • setVisitDuration

      @Deprecated public void setVisitDuration(int visitDurationSeconds)
      Deprecated.
      Description copied from interface: INode
      Sets the visit duration of a job at a Node in seconds.
      Specified by:
      setVisitDuration in interface INode
      Parameters:
      visitDurationSeconds - the int new visit duration seconds.
    • setMinimalVisitDuration

      public void setMinimalVisitDuration(Duration minimalVisitDuration)
      Specified by:
      setMinimalVisitDuration in interface INode
    • getMinVisitDuration

      @Deprecated public int getMinVisitDuration()
      Deprecated.
    • getMinVisitDurationMillis

      public long getMinVisitDurationMillis()
      Description copied from interface: INode
      Gets the min visit duration millis.
      Specified by:
      getMinVisitDurationMillis in interface INode
      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 interface INode
      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 interface INode
      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 interface INode
      Parameters:
      visitDurationMillis - the new visit duration millis
    • setJointVisitDuration

      public void setJointVisitDuration(Duration visitDuration)
      Description copied from interface: INode
      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 . Sets the reduced visitDuration for these Nodes instead of the normal visit duration.
      Specified by:
      setJointVisitDuration in interface INode
      Parameters:
      visitDuration - the duration of the reduced visit
    • getBaseJointVisitDuration

      public int getBaseJointVisitDuration()
      Specified by:
      getBaseJointVisitDuration in interface INode
    • getBaseJointVisitDurationMillis

      public long getBaseJointVisitDurationMillis()
      Specified by:
      getBaseJointVisitDurationMillis in interface INode
    • getJointVisitDuration

      @Deprecated public int getJointVisitDuration(ILogicEntityRoute ownerRoute)
      Deprecated.
      Description copied from interface: INode
      Gets the jointVisitDuration, which is the reduced visitDuration of a Node caused by efficiency effects since several Nodes close to one another.
      Specified by:
      getJointVisitDuration in interface INode
      Parameters:
      ownerRoute - the owner route
      Returns:
      the joint visit duration
    • getJointVisitDurationMillis

      public long getJointVisitDurationMillis(ILogicEntityRoute ownerRoute)
      Description copied from interface: INode
      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.
      Specified by:
      getJointVisitDurationMillis in interface INode
      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 reduced visitDuration since several Nodes are close to one another. The default value is false.

      Will be set to true by INode.setJointVisitDuration(Duration).

      Specified by:
      isUseJointVisitDuration in interface INode
      Returns:
      the boolean if visitDuration is reduced
    • setUnassigned

      public void setUnassigned(boolean unassigned)
      Description copied from interface: INode
      Sets the Node to be unassigned, meaning not part of any Route. The default value is false.

      This method es bing used internally.

      Specified by:
      setUnassigned in interface INode
      Parameters:
      unassigned - the boolean for the new unassigned
    • isUnassigned

      public boolean isUnassigned()
      Description copied from interface: INode
      Checks if the node was unassigned by the INodeUnassigner. An unassigned Node is not part of any Route
      Specified by:
      isUnassigned in interface INode
      Returns:
      boolean true if the node was unassigned
    • setOptimizable

      public void setOptimizable(boolean isOptimizable)
      Description copied from interface: INode
      Sets if the Node can still be moved around or if it is on lockdown and is fixed.
      Specified by:
      setOptimizable in interface INode
      Parameters:
      isOptimizable - the boolean isOptimizable to be set
    • setOptimizable

      public void setOptimizable(boolean isOptimizable, boolean forceKeepLockdownTime)
      Specified by:
      setOptimizable in interface INode
    • resetLockdownTime

      public void resetLockdownTime()
      Specified by:
      resetLockdownTime in interface INode
    • setLockdownTime

      public void setLockdownTime(long lockdowntime)
      Specified by:
      setLockdownTime in interface INode
    • getLockdownTime

      public Optional<Long> getLockdownTime()
      Specified by:
      getLockdownTime in interface INode
    • isOptimizable

      public boolean isOptimizable()
      Description copied from interface: INode
      Checks isOptimizable, the default value is true.
      Specified by:
      isOptimizable in interface INode
      Returns:
      the boolean isOptimizable
    • addViolation

      public void addViolation(IViolation violation)
      Description copied from interface: INode
      Adds a IViolation to Node. This method is used internally.
      Specified by:
      addViolation in interface INode
      Parameters:
      violation - the violation
    • getViolations

      public List<IViolation> getViolations()
      Description copied from interface: INode
      Gets the IViolation of the Node. Only has a non-empty list in case a result was requested.
      Specified by:
      getViolations in interface INode
      Returns:
      the List<IViolation> violations
    • setFixCost

      public void setFixCost(double fixCost)
      Description copied from interface: INode
      Sets the fixCost for visiting the Node. The default value of the double is 0.
      Specified by:
      setFixCost in interface INode
      Parameters:
      fixCost - the double fixCost
    • getFixCost

      public double getFixCost()
      Description copied from interface: INode
      Gets the fixCost. The default value of the double is 0.
      Specified by:
      getFixCost in interface INode
      Returns:
      the double fixCost
    • isStayNode

      public boolean isStayNode()
      Description copied from interface: INode
      Checks if the 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.

      Specified by:
      isStayNode in interface INode
      Returns:
      the boolean if a Resource can stay there
    • setIsStayNode

      public void setIsStayNode(boolean isStayNode)
      Description copied from interface: INode
      Sets 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.

      Specified by:
      setIsStayNode in interface INode
      Parameters:
      isStayNode - if the boolean is set to true the Node can be used for overnight stays
    • isWorkNode

      public boolean isWorkNode()
      Description copied from interface: INode
      Checks if is a Node is a work Node which is the default where a Resource has a job to do. This method is needed because it is possible to define a Node as a INode.setIsStayNode(boolean) but not as a work Node.
      Specified by:
      isWorkNode in interface INode
      Returns:
      the boolean whether Resources can do work at this Node
    • setIsWorkNode

      public void setIsWorkNode(boolean isWorkNode)
      Description copied from interface: INode
      Sets the Node as a work Node which is the default where a Resource has a job to do. This method is needed because it is possible to define a Node as a INode.setIsStayNode(boolean) but not as a work Node
      Specified by:
      setIsWorkNode in interface INode
      Parameters:
      isWorkNode - the boolean for the workNode
    • isOfferedNode

      public boolean isOfferedNode()
      Description copied from interface: INode
      Checks if the 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.
      Specified by:
      isOfferedNode in interface INode
      Returns:
      the boolean isOfferedNode
    • setIsOfferedNode

      public void setIsOfferedNode(boolean isOfferedNode)
      Description copied from interface: INode
      Sets as a 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.
      Specified by:
      setIsOfferedNode in interface INode
      Parameters:
      isOfferedNode - the boolean to be set
      See Also:
    • getIndividualOfferedNodeMultiplier

      public double getIndividualOfferedNodeMultiplier()
      Description copied from interface: INode
      Gets a cost multiplier for this specific Node.
      Specified by:
      getIndividualOfferedNodeMultiplier in interface INode
      Returns:
      the double individualOfferedNodeMultiplier
    • setIndividualOfferedNodeMultiplier

      public void setIndividualOfferedNodeMultiplier(double individualOfferedNodeMultiplier)
      Description copied from interface: INode
      Sets the 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.
      Specified by:
      setIndividualOfferedNodeMultiplier in interface INode
      Parameters:
      individualOfferedNodeMultiplier - the double to be set
    • setImportance

      public void setImportance(int priority)
      Description copied from interface: INode
      Sets the priority/importance. The default value is 1.
      Specified by:
      setImportance in interface INode
      Parameters:
      priority - the int priority to be set.
    • getImportance

      public int getImportance()
      Description copied from interface: INode
      Gets the priority.
      Specified by:
      getImportance in interface INode
      Returns:
      the int priority
    • isWaitOnEarlyArrival

      public boolean isWaitOnEarlyArrival()
      Description copied from interface: INode
      Checks if the 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.
      Specified by:
      isWaitOnEarlyArrival in interface INode
      Returns:
      the boolean waitOnEarlyArrival
    • setWaitOnEarlyArrival

      public void setWaitOnEarlyArrival(boolean waitOnEarlyArrival)
      Description copied from interface: INode
      Sets whether a 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.

      Specified by:
      setWaitOnEarlyArrival in interface INode
      Parameters:
      waitOnEarlyArrival - the boolean to be set
    • setWaitOnEarlyArrivalFirstNode

      public void setWaitOnEarlyArrivalFirstNode(boolean waitOnEarlyArrival)
      Specified by:
      setWaitOnEarlyArrivalFirstNode in interface INode
    • isWaitOnEarlyArrivalFirstNode

      public boolean isWaitOnEarlyArrivalFirstNode()
      Specified by:
      isWaitOnEarlyArrivalFirstNode in interface INode
    • setFirstNodeInRouteImportance

      public void setFirstNodeInRouteImportance(int importance)
      Specified by:
      setFirstNodeInRouteImportance in interface INode
    • getFirstNodeInRouteImportance

      public int getFirstNodeInRouteImportance()
      Specified by:
      getFirstNodeInRouteImportance in interface INode
    • setLastNodeInRouteImportance

      public void setLastNodeInRouteImportance(int importance)
      Specified by:
      setLastNodeInRouteImportance in interface INode
    • getLastNodeInRouteImportance

      public int getLastNodeInRouteImportance()
      Specified by:
      getLastNodeInRouteImportance in interface INode
    • setAllowMoveToReduceFlexTime

      public void setAllowMoveToReduceFlexTime(boolean allowMoveToReduceFlexTime)
      Specified by:
      setAllowMoveToReduceFlexTime in interface INode
    • isAllowMoveToReduceFlexTime

      public boolean isAllowMoveToReduceFlexTime()
      Specified by:
      isAllowMoveToReduceFlexTime in interface INode
    • addNode2NodeRelation

      public void addNode2NodeRelation(INode2NodeRelation relation)
      Description copied from interface: INode
      Sets two Nodes in a Relation. A MasterNode has to be served before a RelatedNode.

      For further explanation and implementation examples please see INode2NodeRelation.

      Specified by:
      addNode2NodeRelation in interface INode
      Parameters:
      relation - the INode2NodeRelation to be added
    • getNode2NodeRelations

      public List<INode2NodeRelation> getNode2NodeRelations()
      Description copied from interface: INode
      Gets the Relations of the Node.

      For further explanation and implementation examples please see INode2NodeRelation.

      Specified by:
      getNode2NodeRelations in interface INode
      Returns:
      the arraylist List<INode2NodeRelation> node2NodeRelation
    • removeNode2NodeRelations

      public boolean removeNode2NodeRelations(INode2NodeRelation removeRelation)
      Description copied from interface: INode
      Removes a INode2NodeRelation from the Node
      Specified by:
      removeNode2NodeRelations in interface INode
      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 the 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.

      Specified by:
      hasFullJobLevelRelations in interface INode
      Returns:
      the boolean hasFullJobLevelRelations
    • hasRelations

      public boolean hasRelations()
      Description copied from interface: INode
      Checks if the Node has any Relations.

      For further explanation and implementation examples of Relations please see INode2NodeRelation

      Specified by:
      hasRelations in interface INode
      Returns:
      the boolean hasRelations
    • addConstraint

      public void addConstraint(IConstraint constraint)
      Description copied from interface: INode
      Adds a 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.

      Specified by:
      addConstraint in interface INode
      Parameters:
      constraint - the Iconstraint to be added
    • detachResourceConstraints

      public void detachResourceConstraints()
      Description copied from interface: INode
      Removes all IConstraint. This method is used internally.
      Specified by:
      detachResourceConstraints in interface INode
    • detachNodeRelations

      public void detachNodeRelations()
      Specified by:
      detachNodeRelations in interface INode
    • detachResourceConstraints

      public void detachResourceConstraints(String resId)
      Description copied from interface: INode
      Removes the IResource with the given resId from the IConstraint that are IConstraintResource. This method is used internally.
      Specified by:
      detachResourceConstraints in interface INode
      Parameters:
      resId - the string Resource /D
    • invokeDetachedResourceConstraints

      public void invokeDetachedResourceConstraints(List<IConstraintResource> removedCons)
    • getLastKnownAttachedAndRemovedResIds

      public List<String> getLastKnownAttachedAndRemovedResIds()
      Specified by:
      getLastKnownAttachedAndRemovedResIds in interface INode
    • getConstraints

      public List<IConstraint> getConstraints()
      Description copied from interface: INode
      Gets the 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.

      Specified by:
      getConstraints in interface INode
      Returns:
      the List<IConstraint> constraints
    • removeConstraint

      public boolean removeConstraint(IConstraint removeConstraint)
      Description copied from interface: INode
      Removes the IConstraint from this Node.
      Specified by:
      removeConstraint in interface INode
      Parameters:
      removeConstraint - the constraint to be removed
      Returns:
      the List<IConstraint> constraints that were removed
    • setConstraints

      public void setConstraints(List<IConstraint> constraints)
      Description copied from interface: INode
      Sets the 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

      Specified by:
      setConstraints in interface INode
      Parameters:
      constraints - the Arraylist constraints to be set
    • isDutyHoursIncludesVisitDuration

      public boolean isDutyHoursIncludesVisitDuration()
      Description copied from interface: INode
      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.
      Specified by:
      isDutyHoursIncludesVisitDuration in interface INode
      Returns:
      the boolean isDutyHoursIncludesVisitDuration
      See Also:
    • setIsDutyHoursIncludesVisitDuration

      public void setIsDutyHoursIncludesVisitDuration(boolean isDutyHoursIncludeVisitDuration)
      Description copied from interface: INode
      Sets 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.
      Specified by:
      setIsDutyHoursIncludesVisitDuration in interface INode
      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
      Sets 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.

      Specified by:
      setIsCausingIdleTimeCost in interface INode
      Parameters:
      isCausingIdleTimeCost - the boolean to be set
    • isCausingIdleTimeCost

      public boolean isCausingIdleTimeCost()
      Description copied from interface: INode
      Checks if the Node can cause idle time. If set to false the Node still causes idle time but at no cost. The default value is true.
      Specified by:
      isCausingIdleTimeCost in interface INode
      Returns:
      the boolean isCausingIdleTimeCost
    • setIsOptional

      public void setIsOptional(boolean isOptional)
      Description copied from interface: INode
      Sets the 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.
      Specified by:
      setIsOptional in interface INode
      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 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.
      Specified by:
      isOptional in interface INode
      Returns:
      the boolean to be checked
    • addQualification

      public void addQualification(IQualification qualification)
      Description copied from interface: INode
      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.

      Used in UKPostCodeConstraint.

      Specified by:
      addQualification in interface INode
      Parameters:
      qualification - the iQualification that is to be added
    • getQualifications

      public Map<Class<? extends IQualification>,IQualification> getQualifications()
      Description copied from interface: INode
      Gets the IQualification of the Resource.
      Specified by:
      getQualifications in interface INode
      Returns:
      the node qualifications
      See Also:
    • addSubsequentSlaveNode

      public void addSubsequentSlaveNode(INode node)
      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 interface INode
      Parameters:
      node - the subsequent slave node
    • addSubsequentSlaveNodes

      public void addSubsequentSlaveNodes(List<INode> nodes)
      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 interface INode
      Parameters:
      nodes - the subsequent slave nodes
    • getSubsequentSlaveNodes

      public List<INode> getSubsequentSlaveNodes()
      Specified by:
      getSubsequentSlaveNodes in interface INode
    • resetSubsequentSlaveNodes

      public void resetSubsequentSlaveNodes()
      Specified by:
      resetSubsequentSlaveNodes in interface INode
    • setIsReturnStart

      public boolean setIsReturnStart(Duration stayAtStartDuration)
      Specified by:
      setIsReturnStart in interface INode
    • isReturnStart

      public boolean isReturnStart()
      Specified by:
      isReturnStart in interface INode
    • getStayAtStartDuration

      public Duration getStayAtStartDuration()
      Specified by:
      getStayAtStartDuration in interface INode
    • setLoad

      public void setLoad(double[] load)
      Description copied from interface: INode
      Sets the amount of goods the Resource is getting added by visiting the Resource. Can be negative (delivering packages).
      Specified by:
      setLoad in interface INode
      Parameters:
      load - the double array
      See Also:
    • getLoad

      public double[] getLoad()
      Description copied from interface: INode
      Gets the amount of goods the Resource is getting added by visiting the Resource. Can be negative (delivering packages).
      Specified by:
      getLoad in interface INode
      Returns:
      the double array loadv
      See Also:
    • setUnloadAll

      public void setUnloadAll(boolean unloadAll)
      Description copied from interface: INode
      Allows the Resource to unload all its Capacity at this Node
      Specified by:
      setUnloadAll in interface INode
      Parameters:
      unloadAll - the boolean to be set
      See Also:
    • isUnloadAll

      public boolean isUnloadAll()
      Description copied from interface: INode
      Checks if it is possible for the Resource to unload all its Capacity at this Node.
      Specified by:
      isUnloadAll in interface INode
      Returns:
      the boolean unloadAll
    • setUnloadAllDimension

      public void setUnloadAllDimension(int unloadAllDimension, int totalLoadDimension)
      Description copied from interface: INode
      Allows a Resource to unload all its Capacity of a specific good ( dimension) at this Node.
      Specified by:
      setUnloadAllDimension in interface INode
      Parameters:
      unloadAllDimension - the int unloadAllDimension
      totalLoadDimension - the int totalLoadDimension
    • getUnloadAllDimension

      public int getUnloadAllDimension()
      Description copied from interface: INode
      Gets if it is allowed for a Resource to unload all its Capacity of a specific good (dimension) at this Node.
      Specified by:
      getUnloadAllDimension in interface INode
      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 interface INode
      Returns:
      the int totalLoadDimension
    • getNodeId

      @Deprecated public String getNodeId()
      Deprecated.
      Returns:
      the node id
      Category:
      Legacy

      Gets the node id.

    • setNodeId

      @Deprecated public void setNodeId(String id)
      Deprecated.
      Parameters:
      id - the new node id
      Category:
      Legacy

      Sets the node id.

    • setNodeDepot

      public void setNodeDepot(INodeDepot depot)
      Specified by:
      setNodeDepot in interface INode
    • getNodeDepot

      public Optional<INodeDepot> getNodeDepot()
      Specified by:
      getNodeDepot in interface INode