examples.jmarkov

## Class BucketBrigades

- java.lang.Object
- - jmarkov.MarkovProcess<S,E>
  - - jmarkov.SimpleMarkovProcess<examples.jmarkov.BucketState,examples.jmarkov.BucketEvent>
    - - examples.jmarkov.BucketBrigades

- All Implemented Interfaces:
    JMarkovElement

      public class BucketBrigades
      extends SimpleMarkovProcess<examples.jmarkov.BucketState,examples.jmarkov.BucketEvent>

  This class describes a Bucket Brigades system with no intermediate buffers, N workers and M machines with possibly uneven working velocities.
  Author:
    Diego Rojas, Germán Riaño.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class jmarkov.MarkovProcess

      `MarkovProcess.Status`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `BucketBrigades(int N, int M, double[][] mu)`
    `BucketBrigades(int N, int M, double[] processRates, double[] velocities)` This method construct a BB where workers consistently dominate each other.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `active(examples.jmarkov.BucketState i, examples.jmarkov.BucketEvent e)` This boolean function returns true if one event e is active (may occur) when the system is in a state i, and 0 otherwise
    `java.lang.String` | `description()` This method should be implemented by the subclass to give word description of the model.
    `States<examples.jmarkov.BucketState>` | `dests(examples.jmarkov.BucketState i, examples.jmarkov.BucketEvent e)` This function returns an array of states that are reached from a state i after the event e has ocurred.
    `java.lang.String` | `label()` Returns the name of the model.
    `static void` | `main(java.lang.String[] args)` This is just s test program.
    `double` | `rate(examples.jmarkov.BucketState i, examples.jmarkov.BucketState j, examples.jmarkov.BucketEvent e)` Now the rate at which an event occurs, given a state, is defined.

    - ### Methods inherited from class jmarkov.SimpleMarkovProcess

      `activeTransitions`

    - ### Methods inherited from class jmarkov.MarkovProcess

      `addMOP, allToString, canGo, clearMOPs, debug, debug, debug, denseMatrixToString, denseMatrixToString, eventRatesToString, eventsRatesToString, generate, getDebugLevel, getDebugReporter, getEventClass, getEventNames, getEventRate, getEvents, getEventsRates, getFinalRate, getGenerator, getMaxStates, getMOPIndex, getMOPNames, getMOPNames, getMOPsAvg, getMOPsAvg, getMOPsAvg, getMOPsMoment, getMOPsMoment, getMOPsMoment, getMtjGenerator, getMtjRates, getNumStates, getProgress, getRate, getRates, getRates, getStateClass, getStates, getStates, getStatus, getStatusMsg, getSteadyState, getSteadyStateSolver, getTransientSolver, go, goStep, hideGUI, isGenerated, killGUI, loadGUI, MOPsToString, MOPsToString, numMOPs, pause, printAll, printAll, printDenseMatrix, printDenseMatrix, printEventsRates, printEventsRates, printMOPs, printMOPs, printMOPs, printStates, printStates, reset, resetResults, setDebugLevel, setDebugReporter, setMaxStates, setMOPs, setSteadyStateSolver, setTransientSolver, showGUI, statesLableMaxWidth, statesToString, toString`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface jmarkov.basic.JMarkovElement

      `equals`

- - ### Constructor Detail

    - #### BucketBrigades

          public BucketBrigades(int N,
                        int M,
                        double[][] mu)

      Parameters:
        `N` - Number of workers
        `M` - Number of machines
        `mu` - Processing rates for each worker at each machine.

    - #### BucketBrigades

          public BucketBrigades(int N,
                        int M,
                        double[] processRates,
                        double[] velocities)

      This method construct a BB where workers consistently dominate each other.
      Parameters:
        `N` - Number of workers
        `M` - Number of machines
        `processRates` - Processing rates for each machine.
        `velocities` - Relative worker velocities.

  - ### Method Detail

    - #### active

          public boolean active(examples.jmarkov.BucketState i,
                       examples.jmarkov.BucketEvent e)

      This boolean function returns true if one event e is active (may occur) when the system is in a state i, and 0 otherwise
      Specified by:
        `active` in class `SimpleMarkovProcess<examples.jmarkov.BucketState,examples.jmarkov.BucketEvent>`
      Parameters:
        `i` - The current State
        `e` - The current Event.
      Returns:
        True if the Event is Active.

    - #### dests

          public States<examples.jmarkov.BucketState> dests(examples.jmarkov.BucketState i,
                                                   examples.jmarkov.BucketEvent e)

      This function returns an array of states that are reached from a state i after the event e has ocurred. An auxiliar function getOpEvent(state,machine) returns the number of the worker who finished his work on the machine m. Since this is a pure bucket brigade system, this worker can only be the one with the highest ordinal number stationed at machine m.
      Specified by:
        `dests` in class `SimpleMarkovProcess<examples.jmarkov.BucketState,examples.jmarkov.BucketEvent>`
      Parameters:
        `i` - current State.
        `e` - The Event that ocurred.
      Returns:
        The destination States

    - #### rate

          public double rate(examples.jmarkov.BucketState i,
                    examples.jmarkov.BucketState j,
                    examples.jmarkov.BucketEvent e)

      Now the rate at which an event occurs, given a state, is defined.
      Specified by:
        `rate` in class `SimpleMarkovProcess<examples.jmarkov.BucketState,examples.jmarkov.BucketEvent>`
      Parameters:
        `i` - Current state
        `j` - Destination State
        `e` - The occuring event
      Returns:
        The rate at which the system goes from i to j when e occurs.
      See Also:
        `SimpleMarkovProcess.dests(State, Event)`

    - #### main

          public static void main(java.lang.String[] args)

      This is just s test program.
      Parameters:
        `args` - Not used.

    - #### description

          public java.lang.String description()

      Description copied from class: `MarkovProcess`
      This method should be implemented by the subclass to give word description of the model. For example it should say: Queueing system with 2 servers and exponential arrivals with rate 50 per hour.
      Specified by:
        `description` in interface `JMarkovElement`
      Specified by:
        `description` in class `MarkovProcess<examples.jmarkov.BucketState,examples.jmarkov.BucketEvent>`
      Returns:
        A description of the Model
      See Also:
        `JMarkovElement.label()`

    - #### label

          public java.lang.String label()

      Description copied from class: `MarkovProcess`
      Returns the name of the model.
      Specified by:
        `label` in interface `JMarkovElement`
      Overrides:
        `label` in class `MarkovProcess<examples.jmarkov.BucketState,examples.jmarkov.BucketEvent>`
      Returns:
        The Name of this model.
      See Also:
        `MarkovProcess.label()`