TvlSim Logo  1.00.0
C++ Simulated Travel-Oriented Distribution System Library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
TVLSIM::SimulationStatus Struct Reference

#include <tvlsim/bom/SimulationStatus.hpp>

+ Inheritance diagram for TVLSIM::SimulationStatus:

List of all members.

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_TgetCurrentRun () const
const NbOfRuns_TgetTotalNumberOfRuns () const
const SimulationModegetSimulationMode () 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 ()

Detailed Description

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.


Member Typedef Documentation

Definition allowing to retrieve the associated BOM key type.

Definition at line 38 of file SimulationStatus.hpp.


Constructor & Destructor Documentation

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.


Member Function Documentation

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().

const stdair::Date_T& TVLSIM::SimulationStatus::getStartDate ( ) const
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().

const stdair::Date_T& TVLSIM::SimulationStatus::getCurrentDate ( ) const
inline

Get the current date of the simulation.

Definition at line 57 of file SimulationStatus.hpp.

Referenced by TVLSIM::BomJSONExport::jsonExportSimulationStatus().

const stdair::Date_T& TVLSIM::SimulationStatus::getEndDate ( ) const
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().

const NbOfRuns_T& TVLSIM::SimulationStatus::getCurrentRun ( ) const
inline

Get the current run of the simulation.

Definition at line 71 of file SimulationStatus.hpp.

Referenced by TVLSIM::TVLSIM_Service::simulate().

const NbOfRuns_T& TVLSIM::SimulationStatus::getTotalNumberOfRuns ( ) const
inline

Get the total number of runs

Definition at line 78 of file SimulationStatus.hpp.

const SimulationMode& TVLSIM::SimulationStatus::getSimulationMode ( ) const
inline

Get the current mode of the simulation.

Definition at line 85 of file SimulationStatus.hpp.

Referenced by TVLSIM::BomJSONExport::jsonExportSimulationStatus().

SimulationMode::EN_SimulationMode TVLSIM::SimulationStatus::getMode ( ) const
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().

const stdair::NbOfBookings_T& TVLSIM::SimulationStatus::getCurrentNumberOfBookings ( ) const
inline

Get the total number of bookings

Definition at line 99 of file SimulationStatus.hpp.

Referenced by TVLSIM::BomJSONExport::jsonExportSimulationStatus().

const double& TVLSIM::SimulationStatus::getCurrentElapsedTime ( ) const
inline

Get the elapsed time

Definition at line 106 of file SimulationStatus.hpp.

Referenced by TVLSIM::BomJSONExport::jsonExportSimulationStatus().

const double& TVLSIM::SimulationStatus::getCurrentEstimatedRemainingTime ( ) const
inline

Get the estimated remaining time

Definition at line 113 of file SimulationStatus.hpp.

Referenced by TVLSIM::BomJSONExport::jsonExportSimulationStatus().

const stdair::ProgressStatus& TVLSIM::SimulationStatus::getCurrentProgressStatus ( ) const
inline

Get the overall progress status.

Definition at line 120 of file SimulationStatus.hpp.

Referenced by TVLSIM::BomJSONExport::jsonExportSimulationStatus().

const SEVMGR::ProgressStatusMap_T& TVLSIM::SimulationStatus::getProgressStatusMap ( ) const
inline

Get the current progress status.

Definition at line 127 of file SimulationStatus.hpp.

Referenced by TVLSIM::BomJSONExport::jsonExportSimulationStatus().

void TVLSIM::SimulationStatus::setSimulationPeriod ( const stdair::Date_T &  iStartDate,
const stdair::Date_T &  iEndDate 
)
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().

void TVLSIM::SimulationStatus::setCurrentDate ( const stdair::Date_T &  iCurrentDate)
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().

void TVLSIM::SimulationStatus::setMode ( const SimulationMode::EN_SimulationMode iEN_SimulationMode)
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.

void TVLSIM::SimulationStatus::setTotalNumberOfRuns ( const NbOfRuns_T iNbOfRuns)
inline

Update the total number of runs

Definition at line 187 of file SimulationStatus.hpp.

Referenced by TVLSIM::ConfigExport::updateSimulationStatus().

void TVLSIM::SimulationStatus::toStream ( std::ostream &  ioOut) const
inline

Dump a Business Object into an output stream.

Parameters:
ostream&the output stream.

Definition at line 198 of file SimulationStatus.hpp.

References describe().

void TVLSIM::SimulationStatus::fromStream ( std::istream &  ioIn)
inline

Read a Business Object from an input stream.

Parameters:
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().

const std::string TVLSIM::SimulationStatus::describeKey ( ) const
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

The documentation for this struct was generated from the following files: