#include <simcrs/SIMCRS_Service.hpp>
Public Member Functions | |
SIMCRS_Service (const stdair::BasLogParams &, const stdair::BasDBParams &, const CRSCode_T &) | |
SIMCRS_Service (const stdair::BasLogParams &, const CRSCode_T &) | |
SIMCRS_Service (stdair::STDAIR_ServicePtr_T, const CRSCode_T &) | |
void | parseAndLoad (const stdair::Filename_T &iScheduleInputFilename, const stdair::Filename_T &iODInputFilename, const AIRRAC::YieldFilePath &iYieldInputFilepath, const SIMFQT::FareFilePath &iFareInputFilepath) |
void | initSnapshotAndRMEvents (const stdair::Date_T &iStartDate, const stdair::Date_T &iEndDate) |
~SIMCRS_Service () | |
stdair::TravelSolutionList_T | calculateSegmentPathList (const stdair::BookingRequestStruct &) |
void | fareQuote (const stdair::BookingRequestStruct &, stdair::TravelSolutionList_T &) |
void | calculateAvailability (stdair::TravelSolutionList_T &, const stdair::PartnershipTechnique &) |
bool | sell (const stdair::TravelSolutionStruct &, const stdair::PartySize_T &) |
void | takeSnapshots (const stdair::SnapshotStruct &) |
bool | playCancellation (const stdair::CancellationStruct &) |
void | optimise (const stdair::RMEventStruct &, const stdair::ForecastingMethod &, const stdair::PartnershipTechnique &) |
void | buildSampleBom () |
void | buildSampleTravelSolutions (stdair::TravelSolutionList_T &) |
stdair::BookingRequestStruct | buildSampleBookingRequest (const bool isForCRS=false) |
std::string | jsonExport (const stdair::AirlineCode_T &, const stdair::FlightNumber_T &, const stdair::Date_T &iDepartureDate) const |
std::string | csvDisplay () const |
std::string | csvDisplay (const stdair::TravelSolutionList_T &) const |
Interface for the SIMCRS Services.
Definition at line 39 of file SIMCRS_Service.hpp.
SIMCRS::SIMCRS_Service::SIMCRS_Service | ( | const stdair::BasLogParams & | iLogParams, |
const stdair::BasDBParams & | iDBParams, | ||
const CRSCode_T & | iCRSCode | ||
) |
Constructor.
The init() 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. |
const | CRSCode_T& Code of the owner of the distribution system. |
Definition at line 78 of file SIMCRS_Service.cpp.
SIMCRS::SIMCRS_Service::SIMCRS_Service | ( | const stdair::BasLogParams & | iLogParams, |
const CRSCode_T & | iCRSCode | ||
) |
Constructor.
The init() 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. |
const | CRSCode_T& Code of the owner of the distribution system. |
Definition at line 48 of file SIMCRS_Service.cpp.
SIMCRS::SIMCRS_Service::SIMCRS_Service | ( | stdair::STDAIR_ServicePtr_T | ioSTDAIR_Service_ptr, |
const CRSCode_T & | iCRSCode | ||
) |
Constructor.
The init() 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 SIMCRS_Service is itself being initialised by another library service such as DSIM_Service).
stdair::STDAIR_ServicePtr_T | Reference on the STDAIR service. |
const | CRSCode_T& Code of the owner of the distribution system. |
Definition at line 110 of file SIMCRS_Service.cpp.
SIMCRS::SIMCRS_Service::~SIMCRS_Service | ( | ) |
Destructor.
Definition at line 136 of file SIMCRS_Service.cpp.
void SIMCRS::SIMCRS_Service::parseAndLoad | ( | const stdair::Filename_T & | iScheduleInputFilename, |
const stdair::Filename_T & | iODInputFilename, | ||
const AIRRAC::YieldFilePath & | iYieldInputFilepath, | ||
const SIMFQT::FareFilePath & | iFareInputFilepath | ||
) |
Parse the schedule, O&D, fare and yield input files.
The CSV files, describing the airline schedule, O&Ds, fares and yields for the simulator, are parsed and instantiated in memory accordingly.
const | stdair::Filename_T& Filename of the input schedule file. |
const | stdair::Filename_T& Filename of the input O&D file. |
const | AIRRAC::YieldFilePath& Filename of the input yield file. |
const | SIMFQT::FareFilePath& Filename of the input fare file. |
Definition at line 288 of file SIMCRS_Service.cpp.
Referenced by main().
void SIMCRS::SIMCRS_Service::initSnapshotAndRMEvents | ( | const stdair::Date_T & | iStartDate, |
const stdair::Date_T & | iEndDate | ||
) |
Initialise the snapshot and RM events for the inventories.
const | stdair::Date_T& Start date of the simulation. |
const | stdair::Date_T& End date of the simulation. |
Definition at line 457 of file SIMCRS_Service.cpp.
stdair::TravelSolutionList_T SIMCRS::SIMCRS_Service::calculateSegmentPathList | ( | const stdair::BookingRequestStruct & | iBookingRequest | ) |
Construct the list of travel solutions corresponding to the booking request.
Definition at line 516 of file SIMCRS_Service.cpp.
Referenced by main().
void SIMCRS::SIMCRS_Service::fareQuote | ( | const stdair::BookingRequestStruct & | iBookingRequest, |
stdair::TravelSolutionList_T & | ioTravelSolutionList | ||
) |
Calculate the fare of each travel solutions in the list.
Definition at line 552 of file SIMCRS_Service.cpp.
Referenced by main().
void SIMCRS::SIMCRS_Service::calculateAvailability | ( | stdair::TravelSolutionList_T & | ioTravelSolutionList, |
const stdair::PartnershipTechnique & | iPartnershipTechnique | ||
) |
Compute the availability for each travel solution in the list.
Definition at line 583 of file SIMCRS_Service.cpp.
bool SIMCRS::SIMCRS_Service::sell | ( | const stdair::TravelSolutionStruct & | iTravelSolution, |
const stdair::PartySize_T & | iPartySize | ||
) |
void SIMCRS::SIMCRS_Service::takeSnapshots | ( | const stdair::SnapshotStruct & | iSnapshot | ) |
Take inventory snapshots.
Definition at line 704 of file SIMCRS_Service.cpp.
bool SIMCRS::SIMCRS_Service::playCancellation | ( | const stdair::CancellationStruct & | iCancellation | ) |
Play cancellation.
Definition at line 665 of file SIMCRS_Service.cpp.
void SIMCRS::SIMCRS_Service::optimise | ( | const stdair::RMEventStruct & | iRMEvent, |
const stdair::ForecastingMethod & | iForecastingMethod, | ||
const stdair::PartnershipTechnique & | iPartnershipTechnique | ||
) |
Optimise (revenue management) an flight-date/network-date
Definition at line 723 of file SIMCRS_Service.cpp.
void SIMCRS::SIMCRS_Service::buildSampleBom | ( | ) |
Build a sample BOM tree, and attach it to the BomRoot instance.
As for now, the BOM sample tree is the one built by the AirInv component.
Definition at line 326 of file SIMCRS_Service.cpp.
Referenced by main().
void SIMCRS::SIMCRS_Service::buildSampleTravelSolutions | ( | stdair::TravelSolutionList_T & | ioTravelSolutionList | ) |
Build a sample list of travel solutions.
As of now (March 2011), that list is made of the following travel solutions:
TravelSolutionList_T& | Sample list of travel solution structures. It should be given empty. It is altered with the returned sample. |
Definition at line 394 of file SIMCRS_Service.cpp.
stdair::BookingRequestStruct SIMCRS::SIMCRS_Service::buildSampleBookingRequest | ( | const bool | isForCRS = false | ) |
Build a sample booking request structure.
As of now (March 2011), the sample booking request is made of the following parameters:
As of now (March 2011), the CRS-related booking request is made of the following parameters:
const | bool isForCRS Whether the sample booking request is for CRS. |
Definition at line 414 of file SIMCRS_Service.cpp.
Referenced by main().
std::string SIMCRS::SIMCRS_Service::jsonExport | ( | const stdair::AirlineCode_T & | iAirlineCode, |
const stdair::FlightNumber_T & | iFlightNumber, | ||
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 the flight to dump. |
Definition at line 434 of file SIMCRS_Service.cpp.
std::string SIMCRS::SIMCRS_Service::csvDisplay | ( | ) | const |
Recursively display (dump in the returned string) the objects of the BOM tree.
Definition at line 476 of file SIMCRS_Service.cpp.
Referenced by main().
std::string SIMCRS::SIMCRS_Service::csvDisplay | ( | const stdair::TravelSolutionList_T & | ioTravelSolutionList | ) | const |
Display (dump in the returned string) the full list of travel solution structures.
Definition at line 496 of file SIMCRS_Service.cpp.