NeuroLab
|
The time. More...
Public Member Functions | |
Time (double timestep) | |
Create time. | |
virtual | ~Time () |
Destroy time. | |
virtual string | getPhysicalDescription () |
Return physick description. | |
void | run (double startTime, double endTime, ostream &log=cout, bool init=true) |
Run simulation for all attached objects. More... | |
void | run (unsigned long long steps, ostream &log=cout, bool init=true) |
Run simulation for all attached objects. More... | |
void | run (unsigned long long events, class StochasticEventGenerator *eventSource, unsigned long long maxSteps, ostream &log=cout, bool init=true) |
Run simulation for all attached objects. More... | |
void | runNested (unsigned long long steps, unsigned long long runs, DataCollector *runRecorder, ostream &log=cout) |
Run multiple simulations for all attached objects. More... | |
void | runNested (unsigned long long events, class StochasticEventGenerator *eventSource, unsigned long long maxSteps, unsigned long long runs, DataCollector *runRecorder, ostream &log=cout) |
Run multiple simulations for all attached objects. More... | |
void | add (class TimeDependent *object) |
Attach an object. | |
void | add (class Estimator *object) |
Attach an object. | |
void | remove (class TimeDependent *object) |
Detach an object. | |
void | remove (class Estimator *object) |
Detach an object. | |
Public Member Functions inherited from Physical | |
Physical () | |
Construct. | |
Physical (const Physical &) | |
Copy. | |
Physical (string name) | |
Construct. | |
Physical (string name, string unitPrefix, string unitSymbol) | |
Construct. | |
Physical (string name, Unit unit) | |
Construct. | |
virtual string | getDescription () |
Retrive the physical name. More... | |
virtual string | getUnitName () |
Returns the unit name. | |
virtual string | getUnitSymbol () |
Returns the unit name. | |
virtual void | setDescription (string name) |
Set the name. More... | |
virtual void | setPhysicalDescription (string name) |
Set the name. Same as setDescription(). More... | |
virtual void | setUnit (Unit u) |
Set the unit. | |
virtual void | setUnitPrefix (int n) |
Set unit prefix. More... | |
virtual Unit | getUnit () const |
Retrieve the unit. | |
The time.
This class is responsable for governing the simulation progress.
void Time::run | ( | double | startTime, |
double | endTime, | ||
ostream & | log = cout , |
||
bool | init = true |
||
) |
Run simulation for all attached objects.
Runs a simulation from a start time to an end time.
startTime | time value to start witch |
endTime | time value to stop at |
log | stream for progress messages |
init | include initialising of all dependent objects |
void Time::run | ( | unsigned long long | steps, |
ostream & | log = cout , |
||
bool | init = true |
||
) |
Run simulation for all attached objects.
Runs a simulation for a certain number of time steps. This function does not reset the Time::timePassed value before start.
steps | number of time steps to run |
log | stream for progress messages |
init | include initialising of all dependent objects |
void Time::run | ( | unsigned long long | events, |
class StochasticEventGenerator * | eventSource, | ||
unsigned long long | maxSteps, | ||
ostream & | log = cout , |
||
bool | init = true |
||
) |
Run simulation for all attached objects.
Runs a simulation for a certain number of events (e.g. spikes from a neuron). As a safeguard a maximum number of time steps must be given, in case the event source fails to deliver events. This function does not reset the Time::timePassed value before start.
events | number of events until run is finished |
eventSource | event source |
maxSteps | maximum number of time steps, should the event source fail |
log | stream for progress messages |
init | include initialising of all dependent objects |
void Time::runNested | ( | unsigned long long | steps, |
unsigned long long | runs, | ||
DataCollector * | runRecorder, | ||
ostream & | log = cout |
||
) |
Run multiple simulations for all attached objects.
Runs a number of simulations for a certain number of time steps.
steps | number of time stepsfor each run |
runs | number of time runs |
runRecorder | object with functions to execute at beginning/end of each run |
log | stream for progress messages |
void Time::runNested | ( | unsigned long long | events, |
class StochasticEventGenerator * | eventSource, | ||
unsigned long long | maxSteps, | ||
unsigned long long | runs, | ||
DataCollector * | runRecorder, | ||
ostream & | log = cout |
||
) |
Run multiple simulations for all attached objects.
Runs a number of simulations for a certain number of time steps.
events | number of events until run is finished |
eventSource | event source |
maxSteps | maximum number of time steps, should the event source fail |
runs | number of time runs |
runRecorder | object with functions to execute at beginning/end of each run |
log | stream for progress messages |