All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class examples.network.NetworkSimulation

java.lang.Object
   |
   +----java.util.Observable
           |
           +----simula.simset.simulation.Simulation
                   |
                   +----examples.network.NetworkSimulation

public class NetworkSimulation
extends Simulation
A queueing network model


Variable Index

 o i
Node index
 o n
Number of nodes
 o node
Arrays of stations
 o numthrough
Movements counter
 o seed
Seed for random generator
 o simtime
Simulation length
 o sojourn
Total time of soujourn in a node
 o uniform
Random generator

Constructor Index

 o NetworkSimulation()

Method Index

 o choice(int, double[])
Perform a random selection from a set of alternatives.
 o main(String[])
Start the simualtion, instantiating a new Simulation and launching the main program

Variables

 o n
 public int n
Number of nodes

 o seed
 public int seed
Seed for random generator

 o numthrough
 public int numthrough
Movements counter

 o i
 public int i
Node index

 o sojourn
 public double sojourn
Total time of soujourn in a node

 o simtime
 public double simtime
Simulation length

 o node
 public Station node[]
Arrays of stations

 o uniform
 public Uniform uniform
Random generator

Constructors

 o NetworkSimulation
 public NetworkSimulation()

Methods

 o choice
 public int choice(int n,
                   double a[]) throws SimulaException
Perform a random selection from a set of alternatives.

Parameters:
n - Upper bound for return
a - Probabilities dor choiches. Elements must sum up to 1
Returns:
0 with probability a[0]...n with probability a[n]
Throws: SimulaException
Any exception from Korretto API
 o main
 public static void main(String args[])
Start the simualtion, instantiating a new Simulation and launching the main program

Parameters:
args[] - Ignored
See Also:
Simulation, SimulationMain

All Packages  Class Hierarchy  This Package  Previous  Next  Index