Class QueueNetwork

java.lang.Object
QueueNet.QueueNetwork

public class QueueNetwork extends Object
This class implements a queue network.
Author:
Francesco Radaelli, Bertoli Marco (Added support for global measures)
  • Field Details

    • REFERENCE_NODE

      public static final int REFERENCE_NODE
      See Also:
    • NODE

      public static final int NODE
      See Also:
    • BEHAVIOUR_ABORT

      public static final int BEHAVIOUR_ABORT
      Behaviour ID: Aborts the simulation when a measure has been obtained.
      See Also:
    • BEHAVIOUR_STOP

      public static final int BEHAVIOUR_STOP
      Behaviour ID: Stops the simulation when a measure has been obtained.
      See Also:
    • BEHAVIOUR_CONTINUE

      public static final int BEHAVIOUR_CONTINUE
      Behaviour ID: Continues the simulation when a measure has been obtained.
      See Also:
    • BEHAVIOUR_OBTAIN_ALL_MEASURES_THEN_ABORT

      public static final int BEHAVIOUR_OBTAIN_ALL_MEASURES_THEN_ABORT
      Behaviour ID: Continues and waits other measures when a measure has been obtained.
      See Also:
    • BEHAVIOUR_OBTAIN_ALL_MEASURES_THEN_STOP

      public static final int BEHAVIOUR_OBTAIN_ALL_MEASURES_THEN_STOP
      Behaviour ID: Continues and waits other measures when a measure has been obtained.
      See Also:
    • STATE_READY

      public static final int STATE_READY
      State ID: Initial state, the network is ready to be started.
      See Also:
    • STATE_RUNNING

      public static final int STATE_RUNNING
      State ID: The network is running.
      See Also:
    • STATE_STOPPED

      public static final int STATE_STOPPED
      State ID: The network has been stopped.
      See Also:
    • STATE_ABORTED

      public static final int STATE_ABORTED
      State ID: The network has been aborted.
      See Also:
    • STATE_FINAL

      public static final int STATE_FINAL
      State ID: The network is in final state.
      See Also:
    • QUEUE_LENGTH

      public static final int QUEUE_LENGTH
      Measure ID: queue length
      See Also:
    • RESIDENCE_TIME

      public static final int RESIDENCE_TIME
      Measure ID: residence time
      See Also:
    • SERVICE_TIME

      public static final int SERVICE_TIME
      Measure ID: residence time
      See Also:
  • Constructor Details

    • QueueNetwork

      public QueueNetwork(String name)
      Creates a new instance of QueueNetwork.
  • Method Details

    • addNode

      public void addNode(NetNode node)
      Adds a generic node to the network. If the node has no inputs the node is set as reference node.
      Parameters:
      node - node to be added.
    • addReferenceNode

      public void addReferenceNode(NetNode node)
      Adds a node to the network and forces it to be a reference node.
      Parameters:
      node - node to be added.
    • addJobClass

      public void addJobClass(JobClass jobClass)
      Adds a new job class to the network.
      Parameters:
      jobClass - Job class to be added.
    • getNodes

      public NodeList getNodes()
      Gets the list of the queue network nodes.
      Returns:
      Queue network nodes.
    • getNode

      public NetNode getNode(String name)
      Gets the NetNode with the specified name.
      Parameters:
      name - the name of the node
      Returns:
      the specified node
    • getJobClass

      public JobClass getJobClass(String name)
      Gets the JobClass with the specified name.
      Parameters:
      name - the name of the JobClass
      Returns:
      the job class. Null if it does not exist.
    • getReferenceNodes

      public NodeList getReferenceNodes()
      Gets the list of the queue network reference nodes.
      Returns:
      Queue network reference nodes.
    • getJobClasses

      public JobClassList getJobClasses()
      Gets the list of the queue network job classes.
      Returns:
      Queue network job classes.
    • getName

      public String getName()
      Gets network name
      Returns:
      Network name.
    • addMeasure

      public void addMeasure(Measure measure)
      Adds a new measure to the network.
      Parameters:
      measure - Reference to the measure to be added.
    • getJobInfoList

      public GlobalJobInfoList getJobInfoList()
      Returns Global jobInfoList associated with this queue network. This is used to calculate global measures
      Returns:
      Global JobInfoList of this network
    • getMeasures

      public LinkedList<Measure> getMeasures()
      Gets the measures
    • getBehaviour

      public int getBehaviour()
      Gets the network behaviour (see behaviour constants).
    • setBehaviuor

      public void setBehaviuor(int behaviour)
      Sets the network behaviour (see behaviour constants).
    • getState

      public int getState()
      Gets the network state (see state constants).
    • abortAllMeasures

      public void abortAllMeasures()
      Aborts all the measures linked to the queue network
    • isTerminalSimulation

      public boolean isTerminalSimulation()
    • setTerminalSimulation

      public void setTerminalSimulation(boolean isTerminalSimulation)
    • getParametricStep

      public int getParametricStep()
    • setParametricStep

      public void setParametricStep(int parametricStep)
    • getNetSystem

      public NetSystem getNetSystem()
    • setNetSystem

      public void setNetSystem(NetSystem netSystem)