#include <desystem.h>
Collaboration diagram for DESystem:
Public Member Functions | |
DESystem (ParamManager *_Param, GlobalProbeManager *_Results, ProbeManager *_ProbeMgr, int _TimeResolution, time_int _TicksPerStep, time_int _StepsPerBigstep, time_int _BigstepsPerSuperstep) | |
System constructor. | |
const DETime & | getTime () const |
Returns the time stamp of the event which is currently beeing executed. | |
virtual void | Initialize () |
Initializes the syestem for simulation. MUST be called by the subclass' Initialize function. | |
void | Run () |
Runs the simulation from time 0 to TMax. | |
Friends | |
class | DEDevice |
"System" parameters:
Param Type | Param Name | Default value | span or allowed values | meaning |
DETimeParameter | SimulationTime | 10000 | (0,inf) | How long the simulation will run |
EnumParameter | SimulationMode | Single | Single Multi | If the simulation is a single one or a multirun |
IntParameter | MaxRepetitions | 1000 | (0,inf) | In case of a multirun simulation, the number of runs. Otherwise not considered |
StringParameter | RandomGenType | default | see GSL docs | The random number generation type.
|
IntParameter | RandomSeed | 1234567 | [0,MaxInt] | The random number generation seed.
|
DETimeParameter | WriteStatsInterval | 100 | (0,inf) | How frequently the probes will write its stats to their files. Beware, a too high frequency can slow the simulation; usually it's set to 1/100 of SimulationTime |
|
System constructor. This is the DESystem constructor. It is called by the user's system constructor (a subclass of this) and is the main way to setup the time structure. The pointers to the ParamManager, the GlobalProbeManager and the ProbeManager are passed by the user's system constructor, while the others parameters must be read from the corresponding parameter file. This constructor should look like: DESystem(_Param, _Results, _ProbeMgr, get<IntParameter,int>(_Param, "TimeResolution", "MySimulation", ""), stringToULL( get<StringParameter,string>(_Param, "SlotTime", "MySimulation", ""), get<IntParameter,int>(_Param, "TimeResolution", "MySimulation", "") ), get<IntParameter,int>(_Param, "N_Slots_per_Frame", "MySimulation", ""), get<IntParameter,int>(_Param, "N_Frames_per_SuperFrame", "MySimulation", "")) If you don't plan to use one of the DETime's framing aggregation types (e.g., you want to use Slots and Frames, but not SuperFrames), you must pass 1 to the corresponding parameter.
|