TvlSim Logo  1.01.6
C++ Simulated Travel-Oriented Distribution System Library
Loading...
Searching...
No Matches
TVLSIM::SimulationStatus Struct Reference

#include <tvlsim/bom/SimulationStatus.hpp>

+ Inheritance diagram for TVLSIM::SimulationStatus:

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 29 of file SimulationStatus.hpp.

Member Typedef Documentation

◆ Key_T

Definition allowing to retrieve the associated BOM key type.

Definition at line 36 of file SimulationStatus.hpp.

Constructor & Destructor Documentation

◆ SimulationStatus() [1/2]

TVLSIM::SimulationStatus::SimulationStatus ( const Key_T iKey)

Main Constructor.

Definition at line 15 of file SimulationStatus.cpp.

◆ SimulationStatus() [2/2]

TVLSIM::SimulationStatus::SimulationStatus ( )

Default Constructor.

Definition at line 32 of file SimulationStatus.cpp.

◆ ~SimulationStatus()

TVLSIM::SimulationStatus::~SimulationStatus ( )

Destructor.

Definition at line 67 of file SimulationStatus.cpp.

Member Function Documentation

◆ isTheSimulationDone()

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, and isTheSimulationDone().

Referenced by isTheSimulationDone(), and TVLSIM::TVLSIM_Service::simulate().

◆ getStartDate()

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

Get the start date of the simulation.

Definition at line 48 of file SimulationStatus.hpp.

Referenced by TVLSIM::TVLSIM_Service::initSnapshotAndRMEvents(), and TVLSIM::BomJSONExport::jsonExportSimulationStatus().

◆ getCurrentDate()

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

Get the current date of the simulation.

Definition at line 55 of file SimulationStatus.hpp.

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

◆ getEndDate()

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

Get the end date of the simulation.

Definition at line 62 of file SimulationStatus.hpp.

Referenced by TVLSIM::TVLSIM_Service::initSnapshotAndRMEvents(), and TVLSIM::BomJSONExport::jsonExportSimulationStatus().

◆ getCurrentRun()

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

Get the current run of the simulation.

Definition at line 69 of file SimulationStatus.hpp.

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

◆ getTotalNumberOfRuns()

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

Get the total number of runs

Definition at line 76 of file SimulationStatus.hpp.

◆ getSimulationMode()

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

Get the current mode of the simulation.

Definition at line 83 of file SimulationStatus.hpp.

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

◆ getMode()

SimulationMode::EN_SimulationMode TVLSIM::SimulationStatus::getMode ( ) const
inline

Get the current mode of the simulation.

Definition at line 90 of file SimulationStatus.hpp.

References TVLSIM::SimulationMode::getMode().

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

◆ getCurrentNumberOfBookings()

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

Get the total number of bookings

Definition at line 97 of file SimulationStatus.hpp.

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

◆ getCurrentElapsedTime()

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

Get the elapsed time

Definition at line 104 of file SimulationStatus.hpp.

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

◆ getCurrentEstimatedRemainingTime()

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

Get the estimated remaining time

Definition at line 111 of file SimulationStatus.hpp.

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

◆ getCurrentProgressStatus()

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

Get the overall progress status.

Definition at line 118 of file SimulationStatus.hpp.

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

◆ getProgressStatusMap()

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

Get the current progress status.

Definition at line 125 of file SimulationStatus.hpp.

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

◆ setSimulationPeriod()

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 134 of file SimulationStatus.hpp.

References setCurrentDate().

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

◆ setCurrentDate()

void TVLSIM::SimulationStatus::setCurrentDate ( const stdair::Date_T &  iCurrentDate)
inline

Set the current date of the simulation.

Definition at line 144 of file SimulationStatus.hpp.

Referenced by setSimulationPeriod().

◆ updateProgress()

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 99 of file SimulationStatus.cpp.

◆ reset()

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

◆ prepareNewRun()

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

◆ setMode()

void TVLSIM::SimulationStatus::setMode ( const SimulationMode::EN_SimulationMode iEN_SimulationMode)
inline

Change the current mode of the simulation.

Definition at line 168 of file SimulationStatus.hpp.

References TVLSIM::SimulationMode::setMode().

◆ increaseGlobalNumberOfBookings()

void TVLSIM::SimulationStatus::increaseGlobalNumberOfBookings ( const stdair::PartySize_T &  iPartySize)

Update the total number of bookings

Definition at line 190 of file SimulationStatus.cpp.

◆ setCurrentProgressStatus()

void TVLSIM::SimulationStatus::setCurrentProgressStatus ( const stdair::ProgressStatus &  iProgressStatus)

Set the current and overall progress statuses

Definition at line 72 of file SimulationStatus.cpp.

◆ setTotalNumberOfRuns()

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

Update the total number of runs

Definition at line 185 of file SimulationStatus.hpp.

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

◆ toStream()

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 196 of file SimulationStatus.hpp.

References describe().

◆ fromStream()

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

Read a Business Object from an input stream.

Parameters
istream&the input stream.

Definition at line 205 of file SimulationStatus.hpp.

◆ describe()

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

◆ describeKey()

const std::string TVLSIM::SimulationStatus::describeKey ( ) const
inline

Get a string describing the key.

Definition at line 216 of file SimulationStatus.hpp.

References TVLSIM::SimulationStatusKey::toString().

◆ displayStartStatusMessage()

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

◆ displayEndStatusMessage()

void TVLSIM::SimulationStatus::displayEndStatusMessage ( ) const

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