Interface for the AirSched Services. More...
#include <airsched/AIRSCHED_Service.hpp>
Public Member Functions | |
AIRSCHED_Service (const stdair::BasLogParams &, const stdair::BasDBParams &) | |
AIRSCHED_Service (const stdair::BasLogParams &) | |
AIRSCHED_Service (stdair::STDAIR_ServicePtr_T ioSTDAIR_ServicePtr) | |
void | parseAndLoad (const stdair::Filename_T &iScheduleInputFilename) |
void | parseAndLoad (const stdair::Filename_T &iScheduleFilename, const stdair::Filename_T &iODInputFilename) |
~AIRSCHED_Service () | |
void | buildSampleBom () |
void | buildSegmentPathList (stdair::TravelSolutionList_T &, const stdair::BookingRequestStruct &) |
void | simulate () |
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::AirlineCode_T &, const stdair::FlightNumber_T &, const stdair::Date_T &iDepartureDate) const |
Interface for the AirSched Services.
Definition at line 32 of file AIRSCHED_Service.hpp.
AIRSCHED::AIRSCHED_Service::AIRSCHED_Service | ( | const stdair::BasLogParams & | iLogParams, |
const stdair::BasDBParams & | iDBParams | ||
) |
Constructor.
The initAirschedService() 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 62 of file AIRSCHED_Service.cpp.
AIRSCHED::AIRSCHED_Service::AIRSCHED_Service | ( | const stdair::BasLogParams & | iLogParams | ) |
Constructor.
The initAirschedService() 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.
const | stdair::BasLogParams& Parameters for the output log stream. |
Definition at line 42 of file AIRSCHED_Service.cpp.
AIRSCHED::AIRSCHED_Service::AIRSCHED_Service | ( | stdair::STDAIR_ServicePtr_T | ioSTDAIR_ServicePtr | ) |
Constructor.
The initAirschedService() 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 AIRSCHED_Service is itself being initialised by another library service such as SIMCRS_Service).
stdair::STDAIR_ServicePtr_T | Reference on the STDAIR service. |
Definition at line 84 of file AIRSCHED_Service.cpp.
AIRSCHED::AIRSCHED_Service::~AIRSCHED_Service | ( | ) |
Destructor.
Definition at line 100 of file AIRSCHED_Service.cpp.
void AIRSCHED::AIRSCHED_Service::parseAndLoad | ( | const stdair::Filename_T & | iScheduleInputFilename | ) |
Parse the schedule input file and load it into memory.
The CSV file, describing the airline schedule for the simulator, is parsed and instantiated in memory accordingly.
const | stdair::Filename_T& Filename of the input schedule file. |
Definition at line 178 of file AIRSCHED_Service.cpp.
References AIRSCHED::ScheduleParser::generateInventories().
Referenced by main(), and parseAndLoad().
void AIRSCHED::AIRSCHED_Service::parseAndLoad | ( | const stdair::Filename_T & | iScheduleFilename, |
const stdair::Filename_T & | iODInputFilename | ||
) |
Parse the schedule and O&D input files, and load them into memory.
The CSV files, describing the airline schedule and the O&Ds 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. |
Definition at line 199 of file AIRSCHED_Service.cpp.
References AIRSCHED::OnDParser::generateOnDPeriods(), and parseAndLoad().
void AIRSCHED::AIRSCHED_Service::buildSampleBom | ( | ) |
Build a sample BOM tree, and attach it to the BomRoot instance.
The BOM tree is based on two actual inventories (one for BA, another for AF). Each inventory contains one flight. One of those flights has two legs (and therefore three segments).
Definition at line 223 of file AIRSCHED_Service.cpp.
References AIRSCHED::SegmentPathGenerator::createSegmentPathNetwork().
Referenced by main().
void AIRSCHED::AIRSCHED_Service::buildSegmentPathList | ( | stdair::TravelSolutionList_T & | ioTravelSolutionList, |
const stdair::BookingRequestStruct & | iBookingRequest | ||
) |
Calculate and return a list of travel solutions corresponding to a given product demand.
Definition at line 369 of file AIRSCHED_Service.cpp.
Referenced by main().
void AIRSCHED::AIRSCHED_Service::simulate | ( | ) |
Perform a small simulation, which uses the Customer Choice Model (CCM).
Currently, that method does nothing.
Definition at line 341 of file AIRSCHED_Service.cpp.
std::string AIRSCHED::AIRSCHED_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-period 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 within the flight period to dump. |
Definition at line 274 of file AIRSCHED_Service.cpp.
std::string AIRSCHED::AIRSCHED_Service::csvDisplay | ( | ) | const |
Recursively display (dump in the returned string) the objects of the BOM tree.
Definition at line 297 of file AIRSCHED_Service.cpp.
std::string AIRSCHED::AIRSCHED_Service::csvDisplay | ( | const stdair::AirlineCode_T & | iAirlineCode, |
const stdair::FlightNumber_T & | iFlightNumber, | ||
const stdair::Date_T & | iDepartureDate | ||
) | const |
Recursively display (dump in the returned string) the flight-period corresponding to the parameters given as input.
const | stdair::AirlineCode_T& Airline code of the flight period to display. |
const | stdair::FlightNumber_T& Flight number of the flight to display. |
const | stdair::Date_T& Departure date of a flight within the flight-period to display. |
Definition at line 318 of file AIRSCHED_Service.cpp.