verinec.netsim
Class Simulation

java.lang.Object
  extended by verinec.netsim.Simulation
All Implemented Interfaces:
ISimulation

public class Simulation
extends Object
implements ISimulation

The standart Simulation constructed by the SimulationFactory.

Version:
$Revision:835 $
Author:
Dominik Jungo

Field Summary
private  Experiment experiment
           
private  Events inputevents
           
private  NetworkModel model
           
private  IVerinecRepository repository
           
private  double stoptime
           
 
Constructor Summary
Simulation()
          constructs a new simulation with no infrastrructure or scheduled input events
Simulation(IVerinecRepository repository, Events inputevents)
          constructs a new simulation with the network infrastrructure from the repository and scheduled input events.
Simulation(IVerinecRepository repository, Events inputevents, double stoptime)
          constructs a new simulation with the network infrastructure from the repository, scheduled input events and a given stop time.
 
Method Summary
 Experiment getExperiment()
          gets the experiment of this simulation
 Events getInputEvents()
          gets the events that are scheduled initally by the simulator
 NetworkModel getModel()
          gets the model of this simulation
 IVerinecRepository getRepository()
          gets the repository containing the network definition
 double getStopTime()
          gets the time value when the simulation stops
 void setExperiment(Experiment experiment)
          sets the experiment of the simulation
 void setInputEvents(Events events)
          sets the InputsEvents of the simulator.
 void setModel(NetworkModel model)
          sets the model of the simulation
 void setRepository(IVerinecRepository repository)
          sets the repository of the simulator.
 void setStopTime(double time)
          sets the time to the value when the simulation stops.
 Events start()
          starts the simulation and returns all Eventsthat happend during the simulation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

repository

private IVerinecRepository repository

inputevents

private Events inputevents

stoptime

private double stoptime

model

private NetworkModel model

experiment

private Experiment experiment
Constructor Detail

Simulation

public Simulation()
constructs a new simulation with no infrastrructure or scheduled input events


Simulation

public Simulation(IVerinecRepository repository,
                  Events inputevents)
constructs a new simulation with the network infrastrructure from the repository and scheduled input events.

Parameters:
repository - the repository containing the definitions used to build up the network infrastructure
inputevents - Input Events of the simulator

Simulation

public Simulation(IVerinecRepository repository,
                  Events inputevents,
                  double stoptime)
constructs a new simulation with the network infrastructure from the repository, scheduled input events and a given stop time.

Parameters:
repository - the repository used to build up the network infrastructure
inputevents - Inputs Events of the simulator
stoptime - stoptime of the simulation
Method Detail

start

public Events start()
             throws NetSimException
Description copied from interface: ISimulation
starts the simulation and returns all Eventsthat happend during the simulation.

Specified by:
start in interface ISimulation
Returns:
Eventsthat happend during the simulation
Throws:
NetSimException
See Also:
ISimulation.start()

setRepository

public void setRepository(IVerinecRepository repository)
Description copied from interface: ISimulation
sets the repository of the simulator. the repository is used to build up the network infrastructure.

Specified by:
setRepository in interface ISimulation
Parameters:
repository - a repository
See Also:
ISimulation.setRepository(verinec.data.repository.IVerinecRepository)

setInputEvents

public void setInputEvents(Events events)
Description copied from interface: ISimulation
sets the InputsEvents of the simulator. These are events that the simulator schedules initally.

Specified by:
setInputEvents in interface ISimulation
Parameters:
events - Inputevents
See Also:
ISimulation.setInputEvents(verinec.netsim.loggers.events.Events)

setStopTime

public void setStopTime(double time)
Description copied from interface: ISimulation
sets the time to the value when the simulation stops.

Specified by:
setStopTime in interface ISimulation
Parameters:
time - stoptime of the simulation
See Also:
ISimulation.setStopTime(double)

getStopTime

public double getStopTime()
Description copied from interface: ISimulation
gets the time value when the simulation stops

Specified by:
getStopTime in interface ISimulation
Returns:
stop stoptime of the simulation
See Also:
ISimulation.getStopTime()

getRepository

public IVerinecRepository getRepository()
Description copied from interface: ISimulation
gets the repository containing the network definition

Specified by:
getRepository in interface ISimulation
Returns:
the repository containing the network definition
See Also:
ISimulation.getRepository()

getInputEvents

public Events getInputEvents()
Description copied from interface: ISimulation
gets the events that are scheduled initally by the simulator

Specified by:
getInputEvents in interface ISimulation
Returns:
the events that are scheduled initally by the simulator
See Also:
ISimulation.getInputEvents()

getExperiment

public Experiment getExperiment()
gets the experiment of this simulation

Returns:
the experiment of this simulation

getModel

public NetworkModel getModel()
gets the model of this simulation

Returns:
the model of this simulation

setExperiment

public void setExperiment(Experiment experiment)
sets the experiment of the simulation

Parameters:
experiment - a experiment

setModel

public void setModel(NetworkModel model)
sets the model of the simulation

Parameters:
model - a model

Copyright © 2005 Verinec, DIUF