galatea.glider
Class Glider

java.lang.Object
  extended bygalatea.glider.Glider

public class Glider
extends java.lang.Object

Class Glider definition.
This is the base class for GLIDER simulator.
-----
Clase básica del simulador GLIDER.

Version:
3 10/06/00
Author:
Mayerlin Uzcátegui

Field Summary
static Event event
          Current event.
static LEvents fel
          Future events list.
static List htrace
          Trace of future events list.
static Message mess
          Current message.
static Node node
          Current node.
static LNodes nodesl
          Nodes list.
 
Constructor Summary
Glider()
           
 
Method Summary
static void act(Node n, double ta)
          GLIDER Method.
static void endsimul()
          GLIDER Method.
static java.lang.String format(double n)
          Output format to doubles with outf decimals.
static int getOutf()
          Get Method.
static double getTime()
          Get Method.
static java.lang.String getTitle()
          Get Method.
static double getTsim()
          Get Method.
static double max(double a, double b)
          GLIDER Method.
static int max(int a, int b)
          GLIDER Method.
static double min(double a, double b)
          GLIDER Method.
static int min(int a, int b)
          GLIDER Method.
static void process()
          Process the future events list.
static void setEos(boolean end)
          Set Method.
static void setOutf(int n)
          Set Method.
static void setTime(double t)
          Set Method.
static void setTitle(java.lang.String n)
          Set Method.
static void setTsim(double t)
          Set Method.
static void stat()
          GLIDER Method.
static void stat(java.lang.String fname)
          GLIDER Method.
static void trace()
          GLIDER Method.
static void trace(java.lang.String fname)
          GLIDER Method.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mess

public static Message mess
Current message.
-----
Mensaje actual.


event

public static Event event
Current event.
-----
Evento actual.


node

public static Node node
Current node.
-----
Nodo actual.


fel

public static LEvents fel
Future events list.
-----
Lista de eventos futuros.


htrace

public static List htrace
Trace of future events list.
-----
Registro de la lista de eventos futuros.


nodesl

public static LNodes nodesl
Nodes list.
-----
Lista de nodos de la red.

Constructor Detail

Glider

public Glider()
Method Detail

act

public static void act(Node n,
                       double ta)
GLIDER Method. Node activation.
-----
Método GLIDER para activar un nodo.

Parameters:
n - Node. node to activate.
-----
n - Node. Nodo a ser activado.

ta - double. Activation time.
-----
ta - double. Tiempo de activación.

endsimul

public static void endsimul()
GLIDER Method. Force the end of simulation.
-----
Método GLIDER para forzar el fin de simulación.


getOutf

public static int getOutf()
Get Method. Decimal output format.
-----
Método de Consulta. Formato de salida decimal.

Returns:
int. Number of decimals in output format.
-----
int. Número de decimales de salida.

getTime

public static double getTime()
Get Method. Current time.
-----
Método de Consulta. Tiempo actual.

Returns:
double. Simulation time.
-----
double. Tiempo actual de simulación.

getTitle

public static java.lang.String getTitle()
Get Method. Models' name.
-----
Método de Consulta. Nombre del modelo.

Returns:
String. Models' name.
-----
String. Nombre del modelo.

getTsim

public static double getTsim()
Get Method. Total simulation time.
-----
Método de Consulta. Tiempo total de simulación.

Returns:
double. Total simulation time.
-----
double. Tiempo máximo de simulación.

max

public static double max(double a,
                         double b)
GLIDER Method. Maximum betwen two double values.
-----
Método GLIDER que retorna el máximo entre dos valores reales.

Parameters:
a - double. Value.
-----
valor límite.

b - double. Value.
-----
valor límite.

Returns:
double.
max(a,b).

max

public static int max(int a,
                      int b)
GLIDER Method. Maximum betwen two int values.
-----
Método GLIDER que retorna el máximo entre dos valores enteros.

Parameters:
a - int. Value.
-----
valor límite.

b - int. Value.
-----
valor límite.

Returns:
int.
max(a,b).

min

public static double min(double a,
                         double b)
GLIDER Method. Minimum betwen two double values.
-----
Método GLIDER que retorna el mínimo entre dos valores reales.

Parameters:
a - double. Value.
-----
valor límite.

b - double. Value.
-----
valor límite.

Returns:
double.
min(a,b).

min

public static int min(int a,
                      int b)
GLIDER Method. Maximum betwen two int values.
-----
Método GLIDER que retorna el máximo entre dos valores enteros.

Parameters:
a - int. Value.
-----
valor límite.

b - int. Value.
-----
valor límite.

Returns:
int.
max(a,b).

format

public static java.lang.String format(double n)
Output format to doubles with outf decimals.
-----
Formato paraa un número con outf decimales.

Parameters:
n - double. Double to process.
-----
n - double. Número a procesar.
Returns:
String. Doubles in string format.
-----
String. Formato de salida para reales.

process

public static void process()
Process the future events list. This stop if:
a. Arrive to simulation time,
b. Future event list is empty,
c. Node lists don't change.
-----
Procesa la lista de eventos futuros y se detiene si:
a. Se alcanza el tiempo máximo de simulación,
b. Se recorre toda la lista de eventos futuros,
c. No hay cambios en las listas internas de los nodos.


setEos

public static void setEos(boolean end)
Set Method. End of simulation.
-----
Metodo de Asignación. Fin de simulación.

Parameters:
end - boolean. Flag to end of simulation.
-----
end - boolean. Indica el fin de simulación.

setOutf

public static void setOutf(int n)
Set Method. Counter to decimal format.
-----
Método de Asignación. Número de decimales.

Parameters:
n - int. Counter to decimal format.
-----
n - int. Número de decimales.

setTime

public static void setTime(double t)
Set Method. Current simulation time.
-----
Método de Asignación. Tiempo actual de simulación.

Parameters:
t - double. Current simulation time.
-----
t - double. Tiempo actual de simulación.

setTitle

public static void setTitle(java.lang.String n)
Set Method. Models' name.
-----
Método de Asignación. Nombre del modelo.

Parameters:
n - String. Models' name.
-----
n - String. Nombre del modelo.

setTsim

public static void setTsim(double t)
Set Method. Total simulation time.
-----
Método de Asignación. Tiempo máximo de simulación

Parameters:
t - double. Total simulation time.
-----
t - double. Tiempo máximo de simulación.

stat

public static void stat()
GLIDER Method. Statistics of simulation.
-----
Método GLIDER para registrar las estadísticas de la simulación.


stat

public static void stat(java.lang.String fname)
GLIDER Method. Statistics of simulation on file.
-----
Método GLIDER para registrar las estadísticas de la simulación.

Parameters:
fname - String. Statistics file's name.
-----
fname - String. Nombre del archivo de estadísticas.

trace

public static void trace()
GLIDER Method. Trace of simulation.
-----
Método GLIDER para registrar la traza de la simulación.


trace

public static void trace(java.lang.String fname)
GLIDER Method. Trace of simulation on file.
-----
Método GLIDER para registrar en archivo la traza de la simulación.

Parameters:
fname - String. Statistics file's name.
-----
fname - String. Nombre del archivo de traza.