Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members  

SIGEL_Simulation::SIG_Simulation Class Reference

The class corresponding to one Robot-Simulation. More...

#include <SIG_Simulation.h>

Inheritance diagram for SIGEL_Simulation::SIG_Simulation:

List of all members.

Public Methods

 SIG_Simulation ( SIGEL_Robot::SIG_Robot const & robot, SIGEL_Environment::SIG_Environment const & environment, SIGEL_Program::SIG_Program const & robotProgram, SIG_SimulationParameters const & simulationParameter, SIG_Recorder & theRecorder)
 The constructor of the SIG_Simulation class. More...

void start () throw (SIGEL_Simulation::SIG_SimulationCannotSolveException)
 Starts the simulation. More...

void makeTimeSteps ( int numTimeSteps ) throw (SIGEL_Simulation::SIG_SimulationCannotSolveException)
 Performs a certain number of time steps given by numTimeSteps. More...


Public Slots

void slotDynamoMessage (QString theMessage)
 This slot will catch a message from Dynamo. More...


Private Attributes

bool stopSimulation
 if this boolean is true, the Simulation will stop. More...

SIG_Recorderrecorder
 A recorder to record data. More...

SIG_CommandInterfacecommandInterface
 The commandInterface used for example to propagate move commands to the simulation. More...

SIG_SimulationDatasimulationData
 The representation of the simulation data. More...

SIG_SimulationQueriessimulationQueries
 The interface used to query the simulation for example about the actual simulation time. More...

SIG_Interpreterinterpreter
 The interpreter used to interpret the programs. More...


Detailed Description

The class corresponding to one Robot-Simulation.

One SIG_Simulation object contains the complete information about one simulation run and the method how to record data about the simulation sun in each frame. This implies that two simulation objects constructed with the same parameters should result in the same simulation run and the same set of recorded data.

Definition at line 36 of file SIG_Simulation.h.


Constructor & Destructor Documentation

SIGEL_Simulation::SIG_Simulation::SIG_Simulation ( SIGEL_Robot::SIG_Robot const & robot,
SIGEL_Environment::SIG_Environment const & environment,
SIGEL_Program::SIG_Program const & robotProgram,
SIG_SimulationParameters const & simulationParameter,
SIG_Recorder & theRecorder )
 

The constructor of the SIG_Simulation class.

When being constructed the simulation gets all the relevant data neccessary for the the simulation. This includes the robot, the environment, the robot program, the simulation parameters as well as a recorder to record data.

Parameters:
robot   The robot that is to be simulated.
environment   The environment in which the simulation will take place.
robotProgram   The robot program that will be simulated on the robot.
simulationParameter   The parameters that specify the simulation conditions.
recorder   A recorder to record data.

Definition at line 11 of file SIG_Simulation.cpp.


Member Function Documentation

void SIGEL_Simulation::SIG_Simulation::makeTimeSteps ( int numTimeSteps ) throw (SIGEL_Simulation::SIG_SimulationCannotSolveException)
 

Performs a certain number of time steps given by numTimeSteps.

This function will be called several times by the start-function as long as the elapsed time is less than the amount of time that the simulation should run.

Exceptions:
SIGEL_Toolss::SIG_SimulatorCannotSolveException   Some simulation-constraint could'nt be solved by the Dynamo-System.
Parameters:
numTimeSteps   The number of time steps that are performed.
Postcondition:
numTimeStep time steps are performed.

Definition at line 79 of file SIG_Simulation.cpp.

void SIGEL_Simulation::SIG_Simulation::slotDynamoMessage ( QString theMessage ) [slot]
 

This slot will catch a message from Dynamo.

(which was thrown in SIG_DynaSystem)

Definition at line 105 of file SIG_Simulation.cpp.

Referenced by SIG_Simulation().

void SIGEL_Simulation::SIG_Simulation::start ( ) throw (SIGEL_Simulation::SIG_SimulationCannotSolveException)
 

Starts the simulation.

Starts the simulation and calls makeTimeSteps as often as neccessary, so that a complete simulation run is performed. The duration of this run is specified in the simulationParameter object given in the constructor.

Exceptions:
SIGEL_Tools::SIG_SimulatorCannotSolveException   Some simulation-constraint could'nt be solved by the Dynamo-System.

Postcondition:
The complete simulation is performed.

Definition at line 63 of file SIG_Simulation.cpp.

Referenced by SIGEL_GP::SIG_GPSimpleFitnessFunction::evalFitness().


Member Data Documentation

SIG_CommandInterface * SIGEL_Simulation::SIG_Simulation::commandInterface [private]
 

The commandInterface used for example to propagate move commands to the simulation.

Definition at line 111 of file SIG_Simulation.h.

SIG_Interpreter * SIGEL_Simulation::SIG_Simulation::interpreter [private]
 

The interpreter used to interpret the programs.

Definition at line 129 of file SIG_Simulation.h.

SIG_Recorder & SIGEL_Simulation::SIG_Simulation::recorder [private]
 

A recorder to record data.

A derived class from SIG_Recorder which will record data at the beginning, during and at the end of the simulation.

Definition at line 106 of file SIG_Simulation.h.

SIG_SimulationData * SIGEL_Simulation::SIG_Simulation::simulationData [private]
 

The representation of the simulation data.

The simulation data cannot be access directly by any of the other classes. They have to use the interfaces SIG_SimulationQueries and SIG_CommandInterface to manipulate it.

Definition at line 119 of file SIG_Simulation.h.

SIG_SimulationQueries * SIGEL_Simulation::SIG_Simulation::simulationQueries [private]
 

The interface used to query the simulation for example about the actual simulation time.

Definition at line 124 of file SIG_Simulation.h.

bool SIGEL_Simulation::SIG_Simulation::stopSimulation [private]
 

if this boolean is true, the Simulation will stop.

Definition at line 98 of file SIG_Simulation.h.


The documentation for this class was generated from the following files:
Generated at Mon Sep 3 01:32:56 2001 for PG 368 - SIGEL by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000