#include <tvlsim/bom/SimulationStatus.hpp>
Public Types | |
typedef SimulationStatusKey | Key_T |
Public Member Functions | |
bool | isTheSimulationDone () const |
const stdair::Date_T & | getStartDate () const |
const stdair::Date_T & | getCurrentDate () const |
const stdair::Date_T & | getEndDate () const |
const NbOfRuns_T & | getCurrentRun () const |
const NbOfRuns_T & | getTotalNumberOfRuns () const |
const SimulationMode & | getSimulationMode () const |
SimulationMode::EN_SimulationMode | getMode () const |
const stdair::NbOfBookings_T & | getCurrentNumberOfBookings () const |
const double & | getCurrentElapsedTime () const |
const double & | getCurrentEstimatedRemainingTime () const |
const stdair::ProgressStatus & | getCurrentProgressStatus () const |
const SEVMGR::ProgressStatusMap_T & | getProgressStatusMap () const |
void | setSimulationPeriod (const stdair::Date_T &iStartDate, const stdair::Date_T &iEndDate) |
void | setCurrentDate (const stdair::Date_T &iCurrentDate) |
void | updateProgress (const stdair::EventType::EN_EventType &, const stdair::ProgressStatus &, const double &iEventMeasure=0) |
void | reset () |
void | prepareNewRun () |
void | setMode (const SimulationMode::EN_SimulationMode &iEN_SimulationMode) |
void | increaseGlobalNumberOfBookings (const stdair::PartySize_T &) |
void | setCurrentProgressStatus (const stdair::ProgressStatus &) |
void | setTotalNumberOfRuns (const NbOfRuns_T &iNbOfRuns) |
void | toStream (std::ostream &ioOut) const |
void | fromStream (std::istream &ioIn) |
const std::string | describe () const |
const std::string | describeKey () const |
void | displayStartStatusMessage () const |
void | displayEndStatusMessage () const |
SimulationStatus (const Key_T &) | |
SimulationStatus () | |
~SimulationStatus () |
Structure holding the details of the simulation status.
The progress status is given by the ratio between the "current" and the "expected" (or "actual") numbers. For instance, when the expected/actual number is 1000 and the current number is 200, then the progress status is 20% (= 200 / 1000).
Definition at line 31 of file SimulationStatus.hpp.
Definition allowing to retrieve the associated BOM key type.
Definition at line 38 of file SimulationStatus.hpp.
TVLSIM::SimulationStatus::SimulationStatus | ( | const Key_T & | iKey | ) |
Main Constructor.
Definition at line 15 of file SimulationStatus.cpp.
TVLSIM::SimulationStatus::SimulationStatus | ( | ) |
Default Constructor.
Definition at line 32 of file SimulationStatus.cpp.
TVLSIM::SimulationStatus::~SimulationStatus | ( | ) |
Destructor.
Definition at line 67 of file SimulationStatus.cpp.
bool TVLSIM::SimulationStatus::isTheSimulationDone | ( | ) | const |
Check whether the simulation has ended or not.
Definition at line 80 of file SimulationStatus.cpp.
References TVLSIM::SimulationMode::DONE.
Referenced by TVLSIM::TVLSIM_Service::simulate().
|
inline |
Get the start date of the simulation.
Definition at line 50 of file SimulationStatus.hpp.
Referenced by TVLSIM::TVLSIM_Service::initSnapshotAndRMEvents(), and TVLSIM::BomJSONExport::jsonExportSimulationStatus().
|
inline |
Get the current date of the simulation.
Definition at line 57 of file SimulationStatus.hpp.
Referenced by TVLSIM::BomJSONExport::jsonExportSimulationStatus().
|
inline |
Get the end date of the simulation.
Definition at line 64 of file SimulationStatus.hpp.
Referenced by TVLSIM::TVLSIM_Service::initSnapshotAndRMEvents(), and TVLSIM::BomJSONExport::jsonExportSimulationStatus().
|
inline |
Get the current run of the simulation.
Definition at line 71 of file SimulationStatus.hpp.
Referenced by TVLSIM::TVLSIM_Service::simulate().
|
inline |
Get the total number of runs
Definition at line 78 of file SimulationStatus.hpp.
|
inline |
Get the current mode of the simulation.
Definition at line 85 of file SimulationStatus.hpp.
Referenced by TVLSIM::BomJSONExport::jsonExportSimulationStatus().
|
inline |
Get the current mode of the simulation.
Definition at line 92 of file SimulationStatus.hpp.
References TVLSIM::SimulationMode::getMode().
Referenced by TVLSIM::TVLSIM_Service::simulate().
|
inline |
Get the total number of bookings
Definition at line 99 of file SimulationStatus.hpp.
Referenced by TVLSIM::BomJSONExport::jsonExportSimulationStatus().
|
inline |
Get the elapsed time
Definition at line 106 of file SimulationStatus.hpp.
Referenced by TVLSIM::BomJSONExport::jsonExportSimulationStatus().
|
inline |
Get the estimated remaining time
Definition at line 113 of file SimulationStatus.hpp.
Referenced by TVLSIM::BomJSONExport::jsonExportSimulationStatus().
|
inline |
Get the overall progress status.
Definition at line 120 of file SimulationStatus.hpp.
Referenced by TVLSIM::BomJSONExport::jsonExportSimulationStatus().
|
inline |
Get the current progress status.
Definition at line 127 of file SimulationStatus.hpp.
Referenced by TVLSIM::BomJSONExport::jsonExportSimulationStatus().
|
inline |
Set the start and end date of the simulation.
Definition at line 136 of file SimulationStatus.hpp.
References setCurrentDate().
Referenced by TVLSIM::ConfigExport::updateSimulationStatus().
|
inline |
Set the current date of the simulation.
Definition at line 146 of file SimulationStatus.hpp.
Referenced by setSimulationPeriod().
void TVLSIM::SimulationStatus::updateProgress | ( | const stdair::EventType::EN_EventType & | iType, |
const stdair::ProgressStatus & | iProgressStatus, | ||
const double & | iEventMeasure = 0 |
||
) |
Update the progress status for a specific type
Definition at line 100 of file SimulationStatus.cpp.
void TVLSIM::SimulationStatus::reset | ( | ) |
Reset all the parameters
Definition at line 197 of file SimulationStatus.cpp.
References prepareNewRun(), TVLSIM::SimulationMode::setMode(), and TVLSIM::SimulationMode::START.
Referenced by TVLSIM::TVLSIM_Service::reset().
void TVLSIM::SimulationStatus::prepareNewRun | ( | ) |
Prepare a new run (i.e. reset the values of the current run)
Definition at line 217 of file SimulationStatus.cpp.
Referenced by reset().
|
inline |
Change the current mode of the simulation.
Definition at line 170 of file SimulationStatus.hpp.
References TVLSIM::SimulationMode::setMode().
void TVLSIM::SimulationStatus::increaseGlobalNumberOfBookings | ( | const stdair::PartySize_T & | iPartySize | ) |
Update the total number of bookings
Definition at line 191 of file SimulationStatus.cpp.
void TVLSIM::SimulationStatus::setCurrentProgressStatus | ( | const stdair::ProgressStatus & | iProgressStatus | ) |
Set the current and overall progress statuses
Definition at line 73 of file SimulationStatus.cpp.
|
inline |
Update the total number of runs
Definition at line 187 of file SimulationStatus.hpp.
Referenced by TVLSIM::ConfigExport::updateSimulationStatus().
|
inline |
Dump a Business Object into an output stream.
ostream& | the output stream. |
Definition at line 198 of file SimulationStatus.hpp.
References describe().
|
inline |
Read a Business Object from an input stream.
istream& | the input stream. |
Definition at line 207 of file SimulationStatus.hpp.
const std::string TVLSIM::SimulationStatus::describe | ( | ) | const |
Display of the structure.
Definition at line 308 of file SimulationStatus.cpp.
Referenced by displayEndStatusMessage(), TVLSIM::TVLSIM_Service::simulationStatusDisplay(), and toStream().
|
inline |
Get a string describing the key.
Definition at line 218 of file SimulationStatus.hpp.
References TVLSIM::SimulationStatusKey::toString().
void TVLSIM::SimulationStatus::displayStartStatusMessage | ( | ) | const |
Display a short message describing the simulation status before starting a run.
Definition at line 240 of file SimulationStatus.cpp.
References TVLSIM::SimulationMode::BREAK, TVLSIM::SimulationMode::DONE, TVLSIM::SimulationMode::getMode(), TVLSIM::SimulationMode::RUNNING, and TVLSIM::SimulationMode::START.
Referenced by TVLSIM::TVLSIM_Service::simulate().
void TVLSIM::SimulationStatus::displayEndStatusMessage | ( | ) | const |
Display a short message describing the simulation status after a run.
Definition at line 276 of file SimulationStatus.cpp.
References TVLSIM::SimulationMode::BREAK, describe(), TVLSIM::SimulationMode::DONE, TVLSIM::SimulationMode::getMode(), TVLSIM::SimulationMode::RUNNING, and TVLSIM::SimulationMode::START.
Referenced by TVLSIM::TVLSIM_Service::simulate().