RMOL Logo  1.00.0
C++ library of Revenue Management and Optimisation classes and functions
 All Classes Namespaces Files Functions Variables Typedefs Friends Pages
RMOL::RMOL_Service Class Reference

Interface for the RMOL Services. More...

#include <rmol/RMOL_Service.hpp>

List of all members.

Public Member Functions

 RMOL_Service (const stdair::BasLogParams &, const stdair::BasDBParams &)
 RMOL_Service (const stdair::BasLogParams &)
 RMOL_Service (stdair::STDAIR_ServicePtr_T)
void parseAndLoad (const stdair::CabinCapacity_T &iCabinCapacity, const stdair::Filename_T &iDemandAndClassDataFile)
void setUpStudyStatManager ()
 ~RMOL_Service ()
void buildSampleBom ()
void clonePersistentBom ()
void buildComplementaryLinks (stdair::BomRoot &)
void optimalOptimisationByMCIntegration (const int K)
void optimalOptimisationByDP ()
void heuristicOptimisationByEmsr ()
void heuristicOptimisationByEmsrA ()
void heuristicOptimisationByEmsrB ()
void heuristicOptimisationByMCIntegrationForQFF ()
void heuristicOptimisationByEmsrBForQFF ()
void MRTForNewQFF ()
const stdair::SegmentCabin & retrieveDummySegmentCabin (const bool isForFareFamilies=false)
bool optimise (stdair::FlightDate &, const stdair::DateTime_T &, const stdair::UnconstrainingMethod &, const stdair::ForecastingMethod &, const stdair::PreOptimisationMethod &, const stdair::OptimisationMethod &, const stdair::PartnershipTechnique &)
void forecastOnD (const stdair::DateTime_T &)
stdair::YieldFeatures * getYieldFeatures (const stdair::OnDDate &, const stdair::CabinCode_T &, stdair::BomRoot &)
void forecastOnD (const stdair::YieldFeatures &, stdair::OnDDate &, const stdair::CabinCode_T &, const stdair::DTD_T &, stdair::BomRoot &)
void setOnDForecast (const stdair::AirlineClassList &, const stdair::MeanValue_T &, const stdair::StdDevValue_T &, stdair::OnDDate &, const stdair::CabinCode_T &, stdair::BomRoot &)
void setOnDForecast (const stdair::AirlineCode_T &, const stdair::Date_T &, const stdair::AirportCode_T &, const stdair::AirportCode_T &, const stdair::CabinCode_T &, const stdair::ClassCode_T &, const stdair::MeanValue_T &, const stdair::StdDevValue_T &, const stdair::Yield_T &, stdair::BomRoot &)
void setOnDForecast (const stdair::AirlineCodeList_T &, const stdair::AirlineCode_T &, const stdair::Date_T &, const stdair::AirportCode_T &, const stdair::AirportCode_T &, const stdair::CabinCode_T &, const stdair::ClassCodeList_T &, const stdair::MeanValue_T &, const stdair::StdDevValue_T &, const stdair::Yield_T &, stdair::BomRoot &)
void resetDemandInformation (const stdair::DateTime_T &)
void resetDemandInformation (const stdair::DateTime_T &, const stdair::Inventory &)
void projectAggregatedDemandOnLegCabins (const stdair::DateTime_T &)
void projectOnDDemandOnLegCabinsUsingYP (const stdair::DateTime_T &)
void projectOnDDemandOnLegCabinsUsingDA (const stdair::DateTime_T &)
void projectOnDDemandOnLegCabinsUsingDYP (const stdair::DateTime_T &)
void projectOnDDemandOnLegCabinsUsingDYP (const stdair::DateTime_T &, const stdair::Inventory &)
void optimiseOnD (const stdair::DateTime_T &)
void optimiseOnDUsingRMCooperation (const stdair::DateTime_T &)
void optimiseOnDUsingAdvancedRMCooperation (const stdair::DateTime_T &)
void updateBidPrice (const stdair::DateTime_T &)
void updateBidPrice (const stdair::FlightDate &, stdair::BomRoot &)
std::string jsonExport (const stdair::AirlineCode_T &, const stdair::FlightNumber_T &, const stdair::Date_T &iDepartureDate) const
std::string csvDisplay () const

Detailed Description

Interface for the RMOL Services.

Definition at line 43 of file RMOL_Service.hpp.


Constructor & Destructor Documentation

RMOL::RMOL_Service::RMOL_Service ( const stdair::BasLogParams &  iLogParams,
const stdair::BasDBParams &  iDBParams 
)

Constructor.

The initRmolService() method is called; see the corresponding documentation for more details.

A reference on an output stream is given, so that log outputs can be directed onto that stream.

Moreover, database connection parameters are given, so that a session can be created on the corresponding database.

Parameters:
conststdair::BasLogParams& Parameters for the output log stream.
conststdair::BasDBParams& Parameters for the database access.

Definition at line 85 of file RMOL_Service.cpp.

RMOL::RMOL_Service::RMOL_Service ( const stdair::BasLogParams &  iLogParams)

Constructor.

The initRmolService() method is called; see the corresponding documentation for more details.

Moreover, a reference on an output stream is given, so that log outputs can be directed onto that stream.

Parameters:
conststdair::BasLogParams& Parameters for the output log stream.

Definition at line 64 of file RMOL_Service.cpp.

RMOL::RMOL_Service::RMOL_Service ( stdair::STDAIR_ServicePtr_T  ioSTDAIRServicePtr)

Constructor.

The initRmolService() method is called; see the corresponding documentation for more details.

Moreover, as no reference on any output stream is given, it is assumed that the StdAir log service has already been initialised with the proper log output stream by some other methods in the calling chain (for instance, when the RMOL_Service is itself being initialised by another library service such as AIRINV_Service).

Parameters:
STDAIR_ServicePtr_Tthe shared pointer of stdair service.

Definition at line 107 of file RMOL_Service.cpp.

RMOL::RMOL_Service::~RMOL_Service ( )

Destructor.

Definition at line 124 of file RMOL_Service.cpp.


Member Function Documentation

void RMOL::RMOL_Service::parseAndLoad ( const stdair::CabinCapacity_T &  iCabinCapacity,
const stdair::Filename_T &  iDemandAndClassDataFile 
)

Parse the optimisation-related data and load them into memory.

First, the STDAIR_Service::buildDummyInventory() method is called, for RMOL and with the given cabin capacity, in order to build the miminum required flight-date structure in order to perform an optimisation on a leg-cabin.

The CSV input file describes the problem to be optimised, i.e.:

  • the demand specifications for all the booking classes (mean and standard deviations for the demand distribution); the yields corresponding to those booking classes.

That CSV file is parsed and instantiated in memory accordingly. The leg-cabin capacity has been set at the initialisation of the (RMOL) service.

Parameters:
conststdair::CabinCapacity& Capacity of the leg-cabin to be optimised.
conststdair::Filename_T& (CSV) input file.

Definition at line 201 of file RMOL_Service.cpp.

References buildComplementaryLinks(), clonePersistentBom(), and RMOL::InventoryParser::parseInputFileAndBuildBom().

Referenced by main().

void RMOL::RMOL_Service::setUpStudyStatManager ( )

Set up the StudyStatManager.

void RMOL::RMOL_Service::buildSampleBom ( )

Build a sample BOM tree, and attach it to the BomRoot instance.

See also:
stdair::CmdBomManager::buildSampleBom() for more details.

Definition at line 260 of file RMOL_Service.cpp.

References buildComplementaryLinks(), and clonePersistentBom().

Referenced by main().

void RMOL::RMOL_Service::clonePersistentBom ( )

Clone the persistent BOM object.

Definition at line 319 of file RMOL_Service.cpp.

References buildComplementaryLinks().

Referenced by buildSampleBom(), and parseAndLoad().

void RMOL::RMOL_Service::buildComplementaryLinks ( stdair::BomRoot &  ioBomRoot)

Build all the complementary links in the given bom root object. Build the links between dummy leg cabin and dummy segment cabin.

Definition at line 357 of file RMOL_Service.cpp.

Referenced by buildSampleBom(), clonePersistentBom(), and parseAndLoad().

void RMOL::RMOL_Service::optimalOptimisationByMCIntegration ( const int  K)

Single resource optimization using the Monte Carlo algorithm.

Definition at line 382 of file RMOL_Service.cpp.

Referenced by optimise().

void RMOL::RMOL_Service::optimalOptimisationByDP ( )

Single resource optimization using dynamic programming.

Definition at line 426 of file RMOL_Service.cpp.

Referenced by optimise().

void RMOL::RMOL_Service::heuristicOptimisationByEmsr ( )

Single resource optimization using EMSR heuristic.

Definition at line 430 of file RMOL_Service.cpp.

Referenced by optimise().

void RMOL::RMOL_Service::heuristicOptimisationByEmsrA ( )

Single resource optimization using EMSR-a heuristic.

Definition at line 475 of file RMOL_Service.cpp.

Referenced by optimise().

void RMOL::RMOL_Service::heuristicOptimisationByEmsrB ( )

Single resource optimization using EMSR-b heuristic.

Definition at line 500 of file RMOL_Service.cpp.

Referenced by optimise().

void RMOL::RMOL_Service::heuristicOptimisationByMCIntegrationForQFF ( )

Single resource optimization using the Monte Carlo algorithm for QFF method.

void RMOL::RMOL_Service::heuristicOptimisationByEmsrBForQFF ( )

Single resource optimization using EMSR-b heuristic for QFF method.

void RMOL::RMOL_Service::MRTForNewQFF ( )

Single resource pre-optimization using Marginal Revenue Transformation for QFF method.

const stdair::SegmentCabin & RMOL::RMOL_Service::retrieveDummySegmentCabin ( const bool  isForFareFamilies = false)

Retrieve one sample segment-cabin of the dummy inventory of "XX".

Parameters:
constbool Boolean to choose the sample segment-cabin. True: the dummy segment-cabin with fare families. False: the dummy segment-cabin without fare families. By default the value is false.

Definition at line 525 of file RMOL_Service.cpp.

bool RMOL::RMOL_Service::optimise ( stdair::FlightDate &  ioFlightDate,
const stdair::DateTime_T &  iRMEventTime,
const stdair::UnconstrainingMethod &  iUnconstrainingMethod,
const stdair::ForecastingMethod &  iForecastingMethod,
const stdair::PreOptimisationMethod &  iPreOptimisationMethod,
const stdair::OptimisationMethod &  iOptimisationMethod,
const stdair::PartnershipTechnique &  iPartnershipTechnique 
)
void RMOL::RMOL_Service::forecastOnD ( const stdair::DateTime_T &  iRMEventTime)

Forecaster

Definition at line 648 of file RMOL_Service.cpp.

References getYieldFeatures().

Referenced by optimise().

stdair::YieldFeatures * RMOL::RMOL_Service::getYieldFeatures ( const stdair::OnDDate &  iOnDDate,
const stdair::CabinCode_T &  iCabinCode,
stdair::BomRoot &  iBomRoot 
)

Definition at line 723 of file RMOL_Service.cpp.

Referenced by forecastOnD().

void RMOL::RMOL_Service::forecastOnD ( const stdair::YieldFeatures &  iYieldFeatures,
stdair::OnDDate &  iOnDDate,
const stdair::CabinCode_T &  iCabinCode,
const stdair::DTD_T &  iDTD,
stdair::BomRoot &  iBomRoot 
)

Definition at line 796 of file RMOL_Service.cpp.

References setOnDForecast().

void RMOL::RMOL_Service::setOnDForecast ( const stdair::AirlineClassList &  iAirlineClassList,
const stdair::MeanValue_T &  iMeanValue,
const stdair::StdDevValue_T &  iStdDevValue,
stdair::OnDDate &  iOnDDate,
const stdair::CabinCode_T &  iCabinCode,
stdair::BomRoot &  iBomRoot 
)

Definition at line 911 of file RMOL_Service.cpp.

Referenced by forecastOnD().

void RMOL::RMOL_Service::setOnDForecast ( const stdair::AirlineCode_T &  iAirlineCode,
const stdair::Date_T &  iDepartureDate,
const stdair::AirportCode_T &  iOrigin,
const stdair::AirportCode_T &  iDestination,
const stdair::CabinCode_T &  iCabinCode,
const stdair::ClassCode_T &  iClassCode,
const stdair::MeanValue_T &  iMeanValue,
const stdair::StdDevValue_T &  iStdDevValue,
const stdair::Yield_T &  iYield,
stdair::BomRoot &  iBomRoot 
)

Definition at line 970 of file RMOL_Service.cpp.

void RMOL::RMOL_Service::setOnDForecast ( const stdair::AirlineCodeList_T &  iAirlineCodeList,
const stdair::AirlineCode_T &  iAirlineCode,
const stdair::Date_T &  iDepartureDate,
const stdair::AirportCode_T &  iOrigin,
const stdair::AirportCode_T &  iDestination,
const stdair::CabinCode_T &  iCabinCode,
const stdair::ClassCodeList_T &  iClassCodeList,
const stdair::MeanValue_T &  iMeanValue,
const stdair::StdDevValue_T &  iStdDevValue,
const stdair::Yield_T &  iYield,
stdair::BomRoot &  iBomRoot 
)

Definition at line 1034 of file RMOL_Service.cpp.

void RMOL::RMOL_Service::resetDemandInformation ( const stdair::DateTime_T &  iRMEventTime)
void RMOL::RMOL_Service::resetDemandInformation ( const stdair::DateTime_T &  iRMEventTime,
const stdair::Inventory &  iInventory 
)

Definition at line 1177 of file RMOL_Service.cpp.

void RMOL::RMOL_Service::projectAggregatedDemandOnLegCabins ( const stdair::DateTime_T &  iRMEventTime)

Definition at line 1227 of file RMOL_Service.cpp.

Referenced by optimise().

void RMOL::RMOL_Service::projectOnDDemandOnLegCabinsUsingYP ( const stdair::DateTime_T &  iRMEventTime)

Definition at line 1332 of file RMOL_Service.cpp.

Referenced by optimise().

void RMOL::RMOL_Service::projectOnDDemandOnLegCabinsUsingDA ( const stdair::DateTime_T &  iRMEventTime)

Definition at line 1609 of file RMOL_Service.cpp.

void RMOL::RMOL_Service::projectOnDDemandOnLegCabinsUsingDYP ( const stdair::DateTime_T &  iRMEventTime)
void RMOL::RMOL_Service::projectOnDDemandOnLegCabinsUsingDYP ( const stdair::DateTime_T &  iRMEventTime,
const stdair::Inventory &  iInventory 
)

Definition at line 1791 of file RMOL_Service.cpp.

void RMOL::RMOL_Service::optimiseOnD ( const stdair::DateTime_T &  iRMEventTime)

Optimiser

Definition at line 1431 of file RMOL_Service.cpp.

References RMOL::Optimiser::optimiseUsingOnDForecast().

Referenced by optimise().

void RMOL::RMOL_Service::optimiseOnDUsingRMCooperation ( const stdair::DateTime_T &  iRMEventTime)
void RMOL::RMOL_Service::optimiseOnDUsingAdvancedRMCooperation ( const stdair::DateTime_T &  iRMEventTime)
void RMOL::RMOL_Service::updateBidPrice ( const stdair::DateTime_T &  iRMEventTime)

Definition at line 1480 of file RMOL_Service.cpp.

Referenced by optimise(), and optimiseOnDUsingAdvancedRMCooperation().

void RMOL::RMOL_Service::updateBidPrice ( const stdair::FlightDate &  iFlightDate,
stdair::BomRoot &  iBomRoot 
)

Definition at line 1528 of file RMOL_Service.cpp.

std::string RMOL::RMOL_Service::jsonExport ( const stdair::AirlineCode_T &  ,
const stdair::FlightNumber_T &  ,
const stdair::Date_T &  iDepartureDate 
) const

Recursively dump, in the returned string and in JSON format, the flight-date corresponding to the parameters given as input.

Parameters:
conststdair::AirlineCode_T& Airline code of the flight to dump.
conststdair::FlightNumber_T& Flight number of the flight to dump.
conststdair::Date_T& Departure date of a flight to dump.
Returns:
std::string Output string in which the BOM tree is JSON-ified.
std::string RMOL::RMOL_Service::csvDisplay ( ) const

Recursively display (dump in the returned string) the objects of the BOM tree.

Returns:
std::string Output string in which the BOM tree is logged/dumped.

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