Miind
|
#include <libs/MPILib/include/SimulationRunParameter.hpp>
Public Member Functions | |
SimulationRunParameter (const report::handler::AbstractReportHandler &handler, Number max_iter, Time t_begin, Time t_end, Time t_report, Time t_step, const std::string &name_log="", Time t_state_report=0, bool bOnCanvas=false) | |
SimulationRunParameter (const SimulationRunParameter ¶meter) | |
const report::handler::AbstractReportHandler & | getHandler () const |
std::string | getLogName () const |
Number | getMaximumNumberIterations () const |
Time | getTBegin () const |
Time | getTEnd () const |
Time | getTReport () const |
Time | getTState () const |
Time | getTStep () const |
SimulationRunParameter & | operator= (const SimulationRunParameter ¶meter) |
Private Attributes | |
bool | _bOnCanvas |
std::string | _logFileName |
Number | _maxIter |
const report::handler::AbstractReportHandler * | _pHandler |
Time | _tBegin |
Time | _tEnd |
Time | _tReport |
Time | _tStateReport |
Time | _tStep |
Parameter determining how a simulation is run. Specifiying begin and end time, log file names, etc.
This Parameter requires a handler, which determines how the simulation results are stored to disk. Common choices are AsciiReportHandler or RootReportHandler (see their respective documentation). Begin and end times of the simulation must be specified. Report time indicates at which time the simulation results should be written by the Handler. Clearly one wants to set a report time that on the one hand represents the simulation accurately, but on the other hand does not burden the simulation by writing out massive amounts of data, thereby impeding simulation efficiency. An update time allows to set a report time for an online visualisation module. The objective of online visualization is typically to monitor whether the simulation behaves as expected, whilst running. Since visualization can make a heavy demand on processing time on a single core machine (e.g. during development), it makes sense to update much less than to report. The maximum number of iterations is there to prevent endless loops or to specify a maximum number of iterations that is reasonable. It allows for automatically breaking off simulations that have gone on expectedly long. The string specifies the path of the log file, where the status of the simulation is reported during running. In some simulations, typically involving population density techniques, the nodes have an activity as well as a state. By default only activities are written into the simulation results by the handler, but optionally an Algorithms state can be stored as well. This is specified by the State Report time, which must be set in order for more than just the beginning and the end state to be written out. See the example programs in BasicDemos for applications.
Definition at line 48 of file SimulationRunParameter.hpp.
MPILib::SimulationRunParameter::SimulationRunParameter | ( | const report::handler::AbstractReportHandler & | handler, |
Number | max_iter, | ||
Time | t_begin, | ||
Time | t_end, | ||
Time | t_report, | ||
Time | t_step, | ||
const std::string & | name_log = "" , |
||
Time | t_state_report = 0 , |
||
bool | bOnCanvas = false |
||
) |
The standard constructor
handler | ReportHandler (where and how is the NodeState information recorded ?) |
max_iter | maximum number of iterations |
t_begin | Start time of simulation |
t_end | End time of Simulation |
t_report | Report time |
t_step | Network step time |
name_log | Log file path name |
std::cerr
t_state_report | Report State time |
bOnCanvas | Whether or not a simulation should shown on a Canvas. This only works on code that has been compiled with MPI_ENABLED switched off. |
Definition at line 23 of file SimulationRunParameter.cpp.
MPILib::SimulationRunParameter::SimulationRunParameter | ( | const SimulationRunParameter & | parameter | ) |
copy constructor
parameter | Another SimulationRunParameter |
Definition at line 39 of file SimulationRunParameter.cpp.
const report::handler::AbstractReportHandler & MPILib::SimulationRunParameter::getHandler | ( | ) | const |
Getter for the Handler
Definition at line 99 of file SimulationRunParameter.cpp.
References _pHandler.
Referenced by MPILib::MPINode< Weight, NodeDistribution >::configureSimulationRun().
std::string MPILib::SimulationRunParameter::getLogName | ( | ) | const |
Getter for the log name
Definition at line 90 of file SimulationRunParameter.cpp.
References _logFileName, and MPILib::utilities::FileNameGenerator::getFileName().
Referenced by MPILib::MPINetwork< WeightValue, NodeDistribution >::configureSimulation().
Number MPILib::SimulationRunParameter::getMaximumNumberIterations | ( | ) | const |
Getter for the maximum number of iterations
Definition at line 103 of file SimulationRunParameter.cpp.
References _maxIter.
Referenced by GeomLib::OUAlgorithm::configure(), MPILib::WilsonCowanAlgorithm::configure(), and MPILib::MPINode< Weight, NodeDistribution >::configureSimulationRun().
Time MPILib::SimulationRunParameter::getTBegin | ( | ) | const |
Getter for the start time
Definition at line 70 of file SimulationRunParameter.cpp.
References _tBegin.
Referenced by MPILib::HebbianAlgorithm::configure(), MPILib::algorithm::PersistantAlgorithm::configure(), MPILib::RateAlgorithm< Weight >::configure(), GeomLib::OUAlgorithm::configure(), MPILib::WilsonCowanAlgorithm::configure(), MPILib::algorithm::DelayAlgorithm< Weight >::configure(), and GeomLib::GeomAlgorithm< WeightValue >::configure().
Time MPILib::SimulationRunParameter::getTEnd | ( | ) | const |
Getter for the end time
Definition at line 74 of file SimulationRunParameter.cpp.
References _tEnd.
Referenced by GeomLib::OUAlgorithm::configure(), MPILib::WilsonCowanAlgorithm::configure(), and MPILib::MPINetwork< WeightValue, NodeDistribution >::configureSimulation().
Time MPILib::SimulationRunParameter::getTReport | ( | ) | const |
Getter for the report time
Definition at line 78 of file SimulationRunParameter.cpp.
References _tReport.
Referenced by GeomLib::GeomAlgorithm< WeightValue >::configure(), and MPILib::MPINetwork< WeightValue, NodeDistribution >::configureSimulation().
Time MPILib::SimulationRunParameter::getTState | ( | ) | const |
Getter for the state report
Definition at line 86 of file SimulationRunParameter.cpp.
References _tStateReport.
Referenced by MPILib::MPINetwork< WeightValue, NodeDistribution >::configureSimulation().
Time MPILib::SimulationRunParameter::getTStep | ( | ) | const |
Getter for the step time
Definition at line 82 of file SimulationRunParameter.cpp.
References _tStep.
Referenced by GeomLib::OUAlgorithm::configure(), MPILib::WilsonCowanAlgorithm::configure(), and MPILib::MPINetwork< WeightValue, NodeDistribution >::configureSimulation().
SimulationRunParameter & MPILib::SimulationRunParameter::operator= | ( | const SimulationRunParameter & | parameter | ) |
copy operator
parameter | Another SimulationRunParameter |
Definition at line 52 of file SimulationRunParameter.cpp.
References _logFileName, _maxIter, _pHandler, _tBegin, _tEnd, _tReport, _tStateReport, and _tStep.
|
private |
Definition at line 144 of file SimulationRunParameter.hpp.
|
private |
Definition at line 140 of file SimulationRunParameter.hpp.
Referenced by getLogName(), and operator=().
|
private |
Definition at line 133 of file SimulationRunParameter.hpp.
Referenced by getMaximumNumberIterations(), and operator=().
|
private |
Definition at line 131 of file SimulationRunParameter.hpp.
Referenced by getHandler(), and operator=().
|
private |
Definition at line 135 of file SimulationRunParameter.hpp.
Referenced by getTBegin(), and operator=().
|
private |
Definition at line 136 of file SimulationRunParameter.hpp.
Referenced by getTEnd(), and operator=().
|
private |
Definition at line 137 of file SimulationRunParameter.hpp.
Referenced by getTReport(), and operator=().
|
private |
Definition at line 142 of file SimulationRunParameter.hpp.
Referenced by getTState(), and operator=().
|
private |
Definition at line 138 of file SimulationRunParameter.hpp.
Referenced by getTStep(), and operator=().