Class PropertyBasedStrategy

java.lang.Object
NetStrategies.RoutingStrategy
NetStrategies.RoutingStrategies.PropertyBasedStrategy
All Implemented Interfaces:
AutoCheck
Direct Known Subclasses:
PowerOfKRoutingStrategy

public abstract class PropertyBasedStrategy extends RoutingStrategy
Routing strategy that selects the destination station based on a property of the stations.
  • Constructor Details

    • PropertyBasedStrategy

      public PropertyBasedStrategy()
  • Method Details

    • getOutNode

      public NetNode getOutNode(NetNode ownerNode, JobClass jobClass)
      Description copied from class: RoutingStrategy
      This method should be overridden to implement a specific strategy.
      Specified by:
      getOutNode in class RoutingStrategy
      Parameters:
      ownerNode - Owner node of the output section.
      jobClass - Class of current job to be routed.
      Returns:
      Selected node.
    • calculateProperty

      protected abstract double calculateProperty(NetNode node, JobClass jobClass) throws NetException
      Throws:
      NetException
    • getRandomIndexBelow

      protected final int getRandomIndexBelow(int max, RandomEngine randomEngine)
    • calculateQueueLength

      protected final int calculateQueueLength(NetNode node, boolean isClosedClass) throws NetException
      Throws:
      NetException