Interface INodeUnassigner

All Superinterfaces:
Serializable
All Known Implementing Classes:
NodeUnassigner

public interface INodeUnassigner extends Serializable
This interface provides the methods to unassign a INode from an ILogicEntityRoute.

A Node can get unassigned in two ways: Either through the AutoFilter or it contained hard constraint violations.

Since:
26/07/2019
Version:
14/02/2020
Author:
DNA
  • Method Details

    • unassignNodes

      List<INodeFilterReason> unassignNodes(List<IEntity> entities, List<IOptimizationElement> unassignedNodes)
      Unassigns the given Nodes. If Nodes were related to the Nodes to be unassigned, its resource constraints get detached and INode#setUnassigned(boolean) is set to true.
      Parameters:
      entities - the list of iEntities of the Nodes
      unassignedNodes - the list of iOptimizationElements to be unassigned
      Returns:
      the list
    • cleanUnassignedNodeList

      void cleanUnassignedNodeList()
      Clears the list of unassign Nodes.
    • removeUnassignedNode

      boolean removeUnassignedNode(IOptimizationElement unassignedNode)
      Removes the given Nodes from list of unassigned Nodes.
      Parameters:
      unassignedNode - the iOptimizationElement nodes to be unassigned
      Returns:
      the list of remaining iOptimizationElement
    • addUnassignedNodes

      void addUnassignedNodes(List<? extends IOptimizationElement> unassignedNodes)
      Removes from the input all Nodes that were already unassigned so there are no duplicates, then adds the remaining Nodes to the list.
      Parameters:
      unassignedNodes - the iOptimizationElement Nodes to be added to the list
    • hasUnassignedNodes

      boolean hasUnassignedNodes()
      Returns true if there are already unassigned Nodes.
      Returns:
      false no Nodes have been unassigned yet
    • removeUnassignedNodes

      boolean removeUnassignedNodes(List<? extends IOptimizationElement> unassignedNodes)
      Removes the input from the List of unassigned Nodes, then returns the remaining unassigned Nodes.
      Parameters:
      unassignedNodes - the iOptimizationElement to be removed
      Returns:
      the remaining unassigned nodes
    • getUnassignedNodesById

      List<IOptimizationElement> getUnassignedNodesById(String id)
      Gets all the unassigned Nodes with that ID.
      Parameters:
      id - the string id of the Nodes
      Returns:
      the Nodes with that ID
    • getUnassignedFirstNodeById

      Optional<IOptimizationElement> getUnassignedFirstNodeById(String id)
      Gets the first Node in unassigned Node corresponding with that Id.
      Parameters:
      id - the string Id of the Node
      Returns:
      the first Node found with that ID
    • getUnassignedNodes

      List<IOptimizationElement> getUnassignedNodes()
      Gets a new ArrayList with all the unassigned Nodes.
      Returns:
      the list of unassignedNodes
    • getUnassignedNodesCount

      int getUnassignedNodesCount()
      Gets the number of unassigned Nodes.
      Returns:
      the number of unassigned Nodes
    • copy