jmarkov.basic

## Class StateEvent<S extends State,E extends Event>

- java.lang.Object
- - jmarkov.basic.State
  - - jmarkov.basic.StateEvent<S,E>

- Type Parameters:
    `S` - States set
    `E` - Event set
  All Implemented Interfaces:
    java.lang.Comparable<State>, JMarkovElement

      public class StateEvent<S extends State,E extends Event>
      extends State

  This class represents a state compounded of a state and an event. It is used for state expansion for the problems where actions can depend on the event that happens in a transition. Only future events that can occur from the state state should be allowed as events event.
  Author:
    Andres Sarmiento, Germán Riaño - Universidad de Los Andes

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `StateEvent(S state, E event)` Builds a new state with the event information

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `compareTo(State i)` The method compareTo should be implemented in order to establish a total ordering among the States.
    `void` | `computeMOPs(MarkovProcess<?,?> model)` This method should be implemented in order to compute all the measures of performance MOPs.
    `E` | `getEvent()` Gets the event.
    `S` | `getState()` Gets the state.
    `boolean` | `isConsistent()` This method is called when a state is added to a set, if assertions are enabled.
    `java.lang.String` | `label()` Returns a (hopefully short) label that descibes the State.

    - ### Methods inherited from class jmarkov.basic.State

      `description, equals, getIndex, getMOP, getMOP, setMOP, setMOP, toString`

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

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

- - ### Constructor Detail

    - #### StateEvent

          public StateEvent(S state,
                    E event)

      Builds a new state with the event information
      Parameters:
        `state` - state
        `event` - event

  - ### Method Detail

    - #### getState

          public S getState()

      Gets the state.
      Returns:
        the original state from the state

    - #### getEvent

          public E getEvent()

      Gets the event.
      Returns:
        the original event from the state

    - #### label

          public java.lang.String label()

      Description copied from class: `State`
      Returns a (hopefully short) label that descibes the State. It is used by all print methods and in the GUI.
      Specified by:
        `label` in interface `JMarkovElement`
      Specified by:
        `label` in class `State`
      Returns:
        A shor String label that identifies the state.
      See Also:
        `JMarkovElement.description()`

    - #### compareTo

          public int compareTo(State i)

      Description copied from class: `State`
      The method compareTo should be implemented in order to establish a total ordering among the States.
      Specified by:
        `compareTo` in interface `java.lang.Comparable<State>`
      Specified by:
        `compareTo` in class `State`
      Returns:
        A positive integer if this is grater then j, negative if this is less then j and 0 if this == j.
      See Also:
        `Comparable.compareTo(Object)`

    - #### isConsistent

          public boolean isConsistent()

      Description copied from class: `State`
      This method is called when a state is added to a set, if assertions are enabled. You should include code that checks the consistency of the paprameters entered. It is very helpful during depelopment. Once assertions are disabled, this will not reduce the speed of your program.
      Specified by:
        `isConsistent` in class `State`
      Returns:
        true if the state is consistent.
      See Also:
        `State.isConsistent()`

    - #### computeMOPs

          public void computeMOPs(MarkovProcess<?,?> model)

      Description copied from class: `State`
      This method should be implemented in order to compute all the measures of performance MOPs. Inside it you should issue commands like `setMop("Utilization server 1", x, model);`. * For large models override this method as empty and rather override getMOP(int). Do NOT mix both approaches!!
      Specified by:
        `computeMOPs` in class `State`
      Parameters:
        `model` - The model being solved.
      See Also:
        `State.computeMOPs(jmarkov.MarkovProcess)`