examples.jmarkov

## Class Jackson

- java.lang.Object
- - jmarkov.MarkovProcess<S,E>
  - - jmarkov.SimpleMarkovProcess<examples.jmarkov.JacksonState,examples.jmarkov.JacksonEvent>
    - - examples.jmarkov.Jackson

- All Implemented Interfaces:
    JMarkovElement

      public class Jackson
      extends SimpleMarkovProcess<examples.jmarkov.JacksonState,examples.jmarkov.JacksonEvent>

  This class represents a "Closed Jackson Network" with numStations multi-server workstations and N entities in the system. Every entity goes from workstation "i" to workstation "j" with probability "Pij".
  Author:
    Rodrigo Alberto Cáliz, Luis Felipe Parra (2003) Mod: Germán Riaño (2004-2006)

- - ### Nested Class Summary

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

      `MarkovProcess.Status`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Jackson()` Default Constructor used by GUI
    `Jackson(int[] wip, int[] servers, double[] srvRates, double[][] probabilities)` General constructor.
    `Jackson(int wip, int M, double[] srvRates)` Constructs a flow CONWIP line with M stations, single servers and the given service rates.
    `Jackson(int wip, int M, double[] srvRates, double[][] prob)` Constructs a flow CONWIP line with M stations, single servers and the given service rates.
    `Jackson(int wip, int M, int[] servers, double[] srvRates)` Constructs a flow CONWIP line with M stations, and the given snumber of servers and service rates.
    `Jackson(java.lang.String filewip, java.lang.String fileservers, java.lang.String fileservicesrates, java.lang.String fileprob)` Constructor using file names

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `active(examples.jmarkov.JacksonState i, examples.jmarkov.JacksonEvent e)` Determine the active events.
    `java.lang.String` | `description()` This method should be implemented by the subclass to give word description of the model.
    `States<examples.jmarkov.JacksonState>` | `dests(examples.jmarkov.JacksonState i, examples.jmarkov.JacksonEvent e)` Determines the destination set of States when events e occurs.
    `double[]` | `effLambdas()` Returns the throughput rate for every Station
    `int[]` | `getNumServers()`
    `int` | `getNumStations()`
    `static double[]` | `loadDouble(java.lang.String fileName)` Reads an array of double form a file.
    `static int[]` | `loadInt(java.lang.String fileName)` Load an array of int from a file.
    `static Jama.Matrix` | `loadJamaMatrix(java.lang.String fileName)` Loads a JAMA matrix from a file.
    `static double[][]` | `loadMatrix(java.lang.String fileName)` Load a matrix as an aary.
    `static void` | `main(java.lang.String[] a)` This is just a test program.
    `int` | `printMOPs(java.io.PrintWriter out, int width, int decimals)` Replaces the method to printo MOPs.
    `double` | `rate(examples.jmarkov.JacksonState i, examples.jmarkov.JacksonState j, examples.jmarkov.JacksonEvent e)` Returns the transition rate from State i to State j.

    - ### 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, label, loadGUI, MOPsToString, MOPsToString, numMOPs, pause, printAll, printAll, printDenseMatrix, printDenseMatrix, printEventsRates, printEventsRates, 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

    - #### Jackson

          public Jackson(java.lang.String filewip,
                 java.lang.String fileservers,
                 java.lang.String fileservicesrates,
                 java.lang.String fileprob)

      Constructor using file names
      Parameters:
        `filewip` - File with Initial WIP
        `fileservers` - File with number of servers
        `fileservicesrates` - File with service rates
        `fileprob` - File with transfer probability rates

    - #### Jackson

          public Jackson()

      Default Constructor used by GUI

    - #### Jackson

          public Jackson(int[] wip,
                 int[] servers,
                 double[] srvRates,
                 double[][] probabilities)

      General constructor.
      Parameters:
        `wip` - Initial wip array.
        `servers` - Number of servers per station
        `srvRates` - Service rates
        `probabilities` - Transfer probabilities

    - #### Jackson

          public Jackson(int wip,
                 int M,
                 int[] servers,
                 double[] srvRates)

      Constructs a flow CONWIP line with M stations, and the given snumber of servers and service rates.
      Parameters:
        `wip` - Total wip
        `M` - Number of stations
        `servers` - Number of servers at each station.
        `srvRates` - M-dimensional array with the rates.

    - #### Jackson

          public Jackson(int wip,
                 int M,
                 double[] srvRates)

      Constructs a flow CONWIP line with M stations, single servers and the given service rates.
      Parameters:
        `wip` - Total wip
        `M` - Number of stations
        `srvRates` - M-dimensional array with the rates.

    - #### Jackson

          public Jackson(int wip,
                 int M,
                 double[] srvRates,
                 double[][] prob)

      Constructs a flow CONWIP line with M stations, single servers and the given service rates.
      Parameters:
        `wip` - Total wip
        `M` - Number of stations
        `srvRates` - M-dimensional array with the rates.
        `prob` - Transfer probabilities.

  - ### Method Detail

    - #### loadJamaMatrix

          public static Jama.Matrix loadJamaMatrix(java.lang.String fileName)

      Loads a JAMA matrix from a file. The format is a text file, entries separated by spaces, and each row of the matrix i a row of the file.
      Parameters:
        `fileName` - The name fo the file.
      Returns:
        jama.Matrix object read from file.

    - #### loadInt

          public static int[] loadInt(java.lang.String fileName)

      Load an array of int from a file.
      Parameters:
        `fileName` - The name fo the file.
      Returns:
        the read array.

    - #### loadDouble

          public static double[] loadDouble(java.lang.String fileName)

      Reads an array of double form a file.
      Parameters:
        `fileName` - The name fo the file.
      Returns:
        the read array.

    - #### loadMatrix

          public static double[][] loadMatrix(java.lang.String fileName)

      Load a matrix as an aary.
      Parameters:
        `fileName` - The name fo the file.
      Returns:
        the 2-D array read.

    - #### active

          public boolean active(examples.jmarkov.JacksonState i,
                       examples.jmarkov.JacksonEvent e)

      Determine the active events.
      Specified by:
        `active` in class `SimpleMarkovProcess<examples.jmarkov.JacksonState,examples.jmarkov.JacksonEvent>`
      Parameters:
        `i` - The current State
        `e` - The current Event.
      Returns:
        True if the Event is Active.

    - #### dests

          public States<examples.jmarkov.JacksonState> dests(examples.jmarkov.JacksonState i,
                                                    examples.jmarkov.JacksonEvent e)

      Description copied from class: `SimpleMarkovProcess`
      Determines the destination set of States when events e occurs. It has to be implemented by the subclass.
      Specified by:
        `dests` in class `SimpleMarkovProcess<examples.jmarkov.JacksonState,examples.jmarkov.JacksonEvent>`
      Parameters:
        `i` - current State.
        `e` - The Event that ocurred.
      Returns:
        The destination States

    - #### rate

          public double rate(examples.jmarkov.JacksonState i,
                    examples.jmarkov.JacksonState j,
                    examples.jmarkov.JacksonEvent e)

      Returns the transition rate from State i to State j.
      Specified by:
        `rate` in class `SimpleMarkovProcess<examples.jmarkov.JacksonState,examples.jmarkov.JacksonEvent>`
      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)`

    - #### 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.JacksonState,examples.jmarkov.JacksonEvent>`
      Returns:
        A description of the Model
      See Also:
        `JMarkovElement.label()`

    - #### effLambdas

          public double[] effLambdas()
                              throws NotUnichainException

      Returns the throughput rate for every Station
      Returns:
        An array with the rates.
      Throws:
        `NotUnichainException`

    - #### printMOPs

          public int printMOPs(java.io.PrintWriter out,
                      int width,
                      int decimals)

      Replaces the method to printo MOPs. This method is called in `toString()`, which is also used in the MOP's tab in the GUI.
      Overrides:
        `printMOPs` in class `MarkovProcess<examples.jmarkov.JacksonState,examples.jmarkov.JacksonEvent>`
      Parameters:
        `out` - The printer where the MOPS will be printed.
        `width` - the columns width
        `decimals` - the number of decimals to use.
      Returns:
        The max width among the declared MOPs. You can use this to align nicely your own MOPs.
      See Also:
        `MarkovProcess.printMOPs(PrintWriter)`, `MarkovProcess.printMOPs(PrintWriter, int, int)`

    - #### main

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

      This is just a test program.
      Parameters:
        `a` - If given these are the files to read the data from.

    - #### getNumServers

          public int[] getNumServers()

      Returns:
        Returns the numServers.

    - #### getNumStations

          public int getNumStations()

      Returns:
        Returns the numStations.