#include <cassert>
#include <iostream>
#include <sstream>
#include <fstream>
#include <string>
#include <boost/date_time/posix_time/posix_time.hpp>
#include <boost/date_time/gregorian/gregorian.hpp>
#include <boost/program_options.hpp>
#include <stdair/service/Logger.hpp>
#include <rmol/basic/BasConst_General.hpp>
#include <rmol/RMOL_Service.hpp>
#include <rmol/config/rmol-paths.hpp>
Go to the source code of this file.
Functions | |
const std::string | K_RMOL_DEFAULT_LOG_FILENAME ("rmol.log") |
const std::string | K_RMOL_DEFAULT_INPUT_FILENAME (STDAIR_SAMPLE_DIR"/rm01.csv") |
template<class T > | |
std::ostream & | operator<< (std::ostream &os, const std::vector< T > &v) |
int | readConfiguration (int argc, char *argv[], int &ioRandomDraws, double &ioCapacity, short &ioMethod, bool &ioIsBuiltin, std::string &ioInputFilename, std::string &ioLogFilename) |
void | optimise (RMOL::RMOL_Service &rmolService, const short &iMethod, const int &iRandomDraws) |
int | main (int argc, char *argv[]) |
Variables | |
const bool | K_RMOL_DEFAULT_BUILT_IN_INPUT = false |
const int | K_RMOL_DEFAULT_RANDOM_DRAWS = RMOL::DEFAULT_NUMBER_OF_DRAWS_FOR_MC_SIMULATION |
const double | K_RMOL_DEFAULT_CAPACITY = 500.0 |
const short | K_RMOL_DEFAULT_METHOD = 0 |
const int | K_RMOL_EARLY_RETURN_STATUS = 99 |
const std::string K_RMOL_DEFAULT_LOG_FILENAME | ( | "rmol.log" | ) |
Default name and location for the log file.
Referenced by readConfiguration().
const std::string K_RMOL_DEFAULT_INPUT_FILENAME | ( | STDAIR_SAMPLE_DIR"/rm01.csv" | ) |
Default name and location for the (CSV) input file.
Referenced by readConfiguration().
std::ostream& operator<< | ( | std::ostream & | os, |
const std::vector< T > & | v | ||
) |
int readConfiguration | ( | int | argc, |
char * | argv[], | ||
int & | ioRandomDraws, | ||
double & | ioCapacity, | ||
short & | ioMethod, | ||
bool & | ioIsBuiltin, | ||
std::string & | ioInputFilename, | ||
std::string & | ioLogFilename | ||
) |
Read and parse the command line options.
Definition at line 58 of file rmol.cpp.
References K_RMOL_DEFAULT_BUILT_IN_INPUT, K_RMOL_DEFAULT_CAPACITY, K_RMOL_DEFAULT_INPUT_FILENAME(), K_RMOL_DEFAULT_LOG_FILENAME(), K_RMOL_DEFAULT_METHOD, K_RMOL_DEFAULT_RANDOM_DRAWS, and K_RMOL_EARLY_RETURN_STATUS.
Referenced by main().
void optimise | ( | RMOL::RMOL_Service & | rmolService, |
const short & | iMethod, | ||
const int & | iRandomDraws | ||
) |
Definition at line 168 of file rmol.cpp.
References RMOL::RMOL_Service::heuristicOptimisationByEmsr(), RMOL::RMOL_Service::heuristicOptimisationByEmsrA(), RMOL::RMOL_Service::heuristicOptimisationByEmsrB(), RMOL::RMOL_Service::optimalOptimisationByDP(), and RMOL::RMOL_Service::optimalOptimisationByMCIntegration().
Referenced by main().
int main | ( | int | argc, |
char * | argv[] | ||
) |
Definition at line 205 of file rmol.cpp.
References RMOL::RMOL_Service::buildSampleBom(), K_RMOL_EARLY_RETURN_STATUS, optimise(), RMOL::RMOL_Service::parseAndLoad(), and readConfiguration().
const bool K_RMOL_DEFAULT_BUILT_IN_INPUT = false |
Default for the input type. It can be either built-in or provided by an input file. That latter must then be given with the -i/–input option.
Definition at line 24 of file rmol.cpp.
Referenced by readConfiguration().
const int K_RMOL_DEFAULT_RANDOM_DRAWS = RMOL::DEFAULT_NUMBER_OF_DRAWS_FOR_MC_SIMULATION |
Default number of random draws to be generated (best if over 100).
Definition at line 30 of file rmol.cpp.
Referenced by readConfiguration().
const double K_RMOL_DEFAULT_CAPACITY = 500.0 |
Default value for the capacity of the resource (e.g., a flight cabin).
Definition at line 33 of file rmol.cpp.
Referenced by readConfiguration().
const short K_RMOL_DEFAULT_METHOD = 0 |
Default name and location for the Revenue Management method to be used.
Definition at line 44 of file rmol.cpp.
Referenced by readConfiguration().
const int K_RMOL_EARLY_RETURN_STATUS = 99 |
Early return status (so that it can be differentiated from an error).
Definition at line 55 of file rmol.cpp.
Referenced by main(), and readConfiguration().