RMOL Logo  0.25.3
C++ library of Revenue Management and Optimisation classes and functions
rmol.cpp File Reference
#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/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 = 100000
const double K_RMOL_DEFAULT_CAPACITY = 500.0
const short K_RMOL_DEFAULT_METHOD = 0
const int K_RMOL_EARLY_RETURN_STATUS = 99

Function Documentation

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().

template<class T >
std::ostream& operator<< ( std::ostream &  os,
const std::vector< T > &  v 
)

Definition at line 47 of file rmol.cpp.

int readConfiguration ( int  argc,
char *  argv[],
int &  ioRandomDraws,
double &  ioCapacity,
short &  ioMethod,
bool &  ioIsBuiltin,
std::string &  ioInputFilename,
std::string &  ioLogFilename 
)
int main ( int  argc,
char *  argv[] 
)

Variable Documentation

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 23 of file rmol.cpp.

Referenced by readConfiguration().

const int K_RMOL_DEFAULT_RANDOM_DRAWS = 100000

Default number of random draws to be generated (best if over 100).

Definition at line 29 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 32 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.

  • 0 = Monte-Carlo
  • 1 = Dynamic Programming
  • 2 = EMSR
  • 3 = EMSR-a
  • 4 = EMSR-b

Definition at line 43 of file rmol.cpp.

Referenced by readConfiguration().

Early return status (so that it can be differentiated from an error).

Definition at line 54 of file rmol.cpp.

Referenced by main(), and readConfiguration().