jmarkov
Class GeomRelState<Sub extends State>

java.lang.Object
  extended by jmarkov.basic.State
      extended by jmarkov.GeomRelState<Sub>
Type Parameters:
Sub - Is the State that represents the Sub-states
All Implemented Interfaces:
java.lang.Comparable<State>, JMarkovElement

public final class GeomRelState<Sub extends State>
extends State

This class is used to build destinations which are relative to a given GeomState. The user shoulld not extend this class, but rather use it when building destination states.

Author:
Julio Góez, Germán Riaño. Universidad de los Andes. (C) 2005

Field Summary
protected  boolean boundary
          Whether it is boundary
protected  int rLevel
          Relitive Level
protected  Sub subState
          subState represnts the background states in every rLevel.
 
Constructor Summary
GeomRelState(Sub subState)
          Creates a boundary GeomState with the given relative level rLevel, and subState.
GeomRelState(Sub subState, int rLevel)
          Creates a Non boundary GeomState with the given relative level rLevel, and subState.
 
Method Summary
 int compareTo(State s)
          Compares GeomStates according to rLevel first and then according to the subStates comparator.
 void computeMOPs(MarkovProcess mp)
          This method should be implemented in order to compute all the measures of performance MOPs.
 int getRelLevel()
           
 Sub getSubState()
           
 boolean isBoundary()
          This method determines fi the State is a boundary 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
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

rLevel

protected int rLevel
Relitive Level


boundary

protected boolean boundary
Whether it is boundary


subState

protected Sub extends State subState
subState represnts the background states in every rLevel.

Constructor Detail

GeomRelState

public GeomRelState(Sub subState,
                    int rLevel)
Creates a Non boundary GeomState with the given relative level rLevel, and subState.

Parameters:
rLevel -
subState -

GeomRelState

public GeomRelState(Sub subState)
Creates a boundary GeomState with the given relative level rLevel, and subState.

Parameters:
subState -
Method Detail

getRelLevel

public int getRelLevel()
Returns:
Returns the rLevel.

isBoundary

public boolean isBoundary()
This method determines fi the State is a boundary state.

Returns:
Whether it is Boundary

getSubState

public Sub getSubState()
Returns:
Returns the subState.

compareTo

public int compareTo(State s)
Compares GeomStates according to rLevel first and then according to the subStates comparator.

Specified by:
compareTo in interface java.lang.Comparable<State>
Specified by:
compareTo in class State
Parameters:
s - state to compare to.
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)

computeMOPs

public void computeMOPs(MarkovProcess mp)
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:
mp - The model being solved.
See Also:
State.computeMOPs(MarkovProcess)

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:
State.label()

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()