Interface for the RMOL Services. More...
#include <rmol/RMOL_Service.hpp>
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 | optimalOptimisationByMCIntegration (const int K) |
void | optimalOptimisationByDP () |
void | heuristicOptimisationByEmsr () |
void | heuristicOptimisationByEmsrA () |
void | heuristicOptimisationByEmsrB () |
bool | optimise (stdair::FlightDate &, const stdair::DateTime_T &, const stdair::ForecastingMethod &, 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 |
Interface for the RMOL Services.
Definition at line 39 of file RMOL_Service.hpp.
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.
const | stdair::BasLogParams& Parameters for the output log stream. |
const | stdair::BasDBParams& Parameters for the database access. |
Definition at line 84 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.
const | stdair::BasLogParams& Parameters for the output log stream. |
Definition at line 63 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).
STDAIR_ServicePtr_T | the shared pointer of stdair service. |
Definition at line 106 of file RMOL_Service.cpp.
RMOL::RMOL_Service::~RMOL_Service | ( | ) |
Destructor.
Definition at line 123 of file RMOL_Service.cpp.
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.:
That CSV file is parsed and instantiated in memory accordingly. The leg-cabin capacity has been set at the initialisation of the (RMOL) service.
const | stdair::CabinCapacity& Capacity of the leg-cabin to be optimised. |
const | stdair::Filename_T& (CSV) input file. |
Definition at line 200 of file RMOL_Service.cpp.
References 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.
Definition at line 224 of file RMOL_Service.cpp.
Referenced by main().
void RMOL::RMOL_Service::optimalOptimisationByMCIntegration | ( | const int | K | ) |
Single resource optimization using the Monte Carlo algorithm.
Definition at line 272 of file RMOL_Service.cpp.
Referenced by optimise().
void RMOL::RMOL_Service::optimalOptimisationByDP | ( | ) |
Single resource optimization using dynamic programming.
Definition at line 312 of file RMOL_Service.cpp.
Referenced by optimise().
void RMOL::RMOL_Service::heuristicOptimisationByEmsr | ( | ) |
Single resource optimization using EMSR heuristic.
Definition at line 316 of file RMOL_Service.cpp.
Referenced by optimise().
void RMOL::RMOL_Service::heuristicOptimisationByEmsrA | ( | ) |
Single resource optimization using EMSR-a heuristic.
Definition at line 357 of file RMOL_Service.cpp.
Referenced by optimise().
void RMOL::RMOL_Service::heuristicOptimisationByEmsrB | ( | ) |
Single resource optimization using EMSR-b heuristic.
Definition at line 378 of file RMOL_Service.cpp.
Referenced by optimise().
bool RMOL::RMOL_Service::optimise | ( | stdair::FlightDate & | ioFlightDate, |
const stdair::DateTime_T & | iRMEventTime, | ||
const stdair::ForecastingMethod & | iForecastingMethod, | ||
const stdair::PartnershipTechnique & | iPartnershipTechnique | ||
) |
Optimise (revenue management) an flight-date/network-date
Definition at line 399 of file RMOL_Service.cpp.
References forecastOnD(), RMOL::Forecaster::forecastUsingAdditivePickUp(), RMOL::Forecaster::forecastUsingMultiplicativePickUp(), optimiseOnD(), optimiseOnDUsingAdvancedRMCooperation(), optimiseOnDUsingRMCooperation(), projectAggregatedDemandOnLegCabins(), projectOnDDemandOnLegCabinsUsingDYP(), projectOnDDemandOnLegCabinsUsingYP(), resetDemandInformation(), and updateBidPrice().
void RMOL::RMOL_Service::forecastOnD | ( | const stdair::DateTime_T & | iRMEventTime | ) |
Definition at line 500 of file RMOL_Service.cpp.
References RMOL::DEFAULT_DCP_LIST, and 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 573 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 646 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 761 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 820 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 882 of file RMOL_Service.cpp.
void RMOL::RMOL_Service::resetDemandInformation | ( | const stdair::DateTime_T & | iRMEventTime | ) |
Definition at line 997 of file RMOL_Service.cpp.
Referenced by optimise(), optimiseOnDUsingAdvancedRMCooperation(), and optimiseOnDUsingRMCooperation().
void RMOL::RMOL_Service::resetDemandInformation | ( | const stdair::DateTime_T & | iRMEventTime, |
const stdair::Inventory & | iInventory | ||
) |
Definition at line 1023 of file RMOL_Service.cpp.
References RMOL::DEFAULT_DCP_LIST.
void RMOL::RMOL_Service::projectAggregatedDemandOnLegCabins | ( | const stdair::DateTime_T & | iRMEventTime | ) |
Definition at line 1071 of file RMOL_Service.cpp.
References RMOL::DEFAULT_DCP_LIST.
Referenced by optimise().
void RMOL::RMOL_Service::projectOnDDemandOnLegCabinsUsingYP | ( | const stdair::DateTime_T & | iRMEventTime | ) |
Definition at line 1176 of file RMOL_Service.cpp.
References RMOL::DEFAULT_DCP_LIST.
Referenced by optimise().
void RMOL::RMOL_Service::projectOnDDemandOnLegCabinsUsingDA | ( | const stdair::DateTime_T & | iRMEventTime | ) |
Definition at line 1451 of file RMOL_Service.cpp.
References RMOL::DEFAULT_DCP_LIST.
void RMOL::RMOL_Service::projectOnDDemandOnLegCabinsUsingDYP | ( | const stdair::DateTime_T & | iRMEventTime | ) |
Definition at line 1607 of file RMOL_Service.cpp.
Referenced by optimise(), optimiseOnDUsingAdvancedRMCooperation(), and optimiseOnDUsingRMCooperation().
void RMOL::RMOL_Service::projectOnDDemandOnLegCabinsUsingDYP | ( | const stdair::DateTime_T & | iRMEventTime, |
const stdair::Inventory & | iInventory | ||
) |
Definition at line 1633 of file RMOL_Service.cpp.
References RMOL::DEFAULT_DCP_LIST.
void RMOL::RMOL_Service::optimiseOnD | ( | const stdair::DateTime_T & | iRMEventTime | ) |
Definition at line 1275 of file RMOL_Service.cpp.
References RMOL::DEFAULT_DCP_LIST, and RMOL::Optimiser::optimiseUsingOnDForecast().
Referenced by optimise().
void RMOL::RMOL_Service::optimiseOnDUsingRMCooperation | ( | const stdair::DateTime_T & | iRMEventTime | ) |
Definition at line 1749 of file RMOL_Service.cpp.
References RMOL::DEFAULT_DCP_LIST, RMOL::Optimiser::optimiseUsingOnDForecast(), projectOnDDemandOnLegCabinsUsingDYP(), and resetDemandInformation().
Referenced by optimise().
void RMOL::RMOL_Service::optimiseOnDUsingAdvancedRMCooperation | ( | const stdair::DateTime_T & | iRMEventTime | ) |
Definition at line 1809 of file RMOL_Service.cpp.
References RMOL::DEFAULT_DCP_LIST, RMOL::Optimiser::optimiseUsingOnDForecast(), projectOnDDemandOnLegCabinsUsingDYP(), resetDemandInformation(), and updateBidPrice().
Referenced by optimise().
void RMOL::RMOL_Service::updateBidPrice | ( | const stdair::DateTime_T & | iRMEventTime | ) |
Definition at line 1324 of file RMOL_Service.cpp.
References RMOL::DEFAULT_DCP_LIST.
Referenced by optimise(), and optimiseOnDUsingAdvancedRMCooperation().
void RMOL::RMOL_Service::updateBidPrice | ( | const stdair::FlightDate & | iFlightDate, |
stdair::BomRoot & | iBomRoot | ||
) |
Definition at line 1372 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.
const | stdair::AirlineCode_T& Airline code of the flight to dump. |
const | stdair::FlightNumber_T& Flight number of the flight to dump. |
const | stdair::Date_T& Departure date of a flight to dump. |
std::string RMOL::RMOL_Service::csvDisplay | ( | ) | const |
Recursively display (dump in the returned string) the objects of the BOM tree.