SimCRS Logo  1.00.0
C++ Simulated Travel-Oriented Distribution System Library
 All Classes Namespaces Files Functions Variables Typedefs Friends Macros Pages
simcrs.cpp File Reference
#include <sstream>
#include <fstream>
#include <string>
#include <boost/program_options.hpp>
#include <stdair/stdair_basic_types.hpp>
#include <stdair/basic/BasLogParams.hpp>
#include <stdair/basic/BasDBParams.hpp>
#include <stdair/basic/BasFileMgr.hpp>
#include <stdair/bom/TravelSolutionStruct.hpp>
#include <stdair/bom/BookingRequestStruct.hpp>
#include <stdair/service/Logger.hpp>
#include <simfqt/SIMFQT_Types.hpp>
#include <simcrs/SIMCRS_Service.hpp>
#include <simcrs/config/simcrs-paths.hpp>

Go to the source code of this file.

Functions

const std::string K_SIMCRS_DEFAULT_LOG_FILENAME ("simcrs.log")
const std::string K_SIMCRS_DEFAULT_SCHEDULE_INPUT_FILENAME (STDAIR_SAMPLE_DIR"/schedule01.csv")
const std::string K_SIMCRS_DEFAULT_OND_INPUT_FILENAME (STDAIR_SAMPLE_DIR"/ond01.csv")
const std::string K_SIMCRS_DEFAULT_FRAT5_INPUT_FILENAME (STDAIR_SAMPLE_DIR"/frat5.csv")
const std::string K_SIMCRS_DEFAULT_FF_DISUTILITY_INPUT_FILENAME (STDAIR_SAMPLE_DIR"/ffDisutility.csv")
const std::string K_SIMCRS_DEFAULT_YIELD_INPUT_FILENAME (STDAIR_SAMPLE_DIR"/yieldstore01.csv")
const std::string K_SIMCRS_DEFAULT_FARE_INPUT_FILENAME (STDAIR_SAMPLE_DIR"/fare01.csv")
const std::string K_SIMCRS_DEFAULT_DB_USER ("dsim")
const std::string K_SIMCRS_DEFAULT_DB_PASSWD ("dsim")
const std::string K_SIMCRS_DEFAULT_DB_DBNAME ("sim_dsim")
const std::string K_SIMCRS_DEFAULT_DB_HOST ("localhost")
const std::string K_SIMCRS_DEFAULT_DB_PORT ("3306")
template<class T >
std::ostream & operator<< (std::ostream &os, const std::vector< T > &v)
int readConfiguration (int argc, char *argv[], bool &ioIsBuiltin, stdair::Filename_T &ioScheduleInputFilename, stdair::Filename_T &ioOnDInputFilename, stdair::Filename_T &ioFRAT5Filename, stdair::Filename_T &ioFFDisutilityFilename, stdair::Filename_T &ioYieldInputFilename, stdair::Filename_T &ioFareInputFilename, stdair::Filename_T &ioLogFilename, std::string &ioDBUser, std::string &ioDBPasswd, std::string &ioDBHost, std::string &ioDBPort, std::string &ioDBDBName)
int main (int argc, char *argv[])

Variables

const bool K_SIMCRS_DEFAULT_BUILT_IN_INPUT = false
const int K_SIMCRS_EARLY_RETURN_STATUS = 99

Function Documentation

const std::string K_SIMCRS_DEFAULT_LOG_FILENAME ( "simcrs.log"  )

Default name and location for the log file.

Referenced by readConfiguration().

const std::string K_SIMCRS_DEFAULT_SCHEDULE_INPUT_FILENAME ( STDAIR_SAMPLE_DIR"/schedule01.csv"  )

Default name and location for the (CSV) schedule input file.

Referenced by readConfiguration().

const std::string K_SIMCRS_DEFAULT_OND_INPUT_FILENAME ( STDAIR_SAMPLE_DIR"/ond01.csv"  )

Default name and location for the (CSV) O&D input file.

Referenced by readConfiguration().

const std::string K_SIMCRS_DEFAULT_FRAT5_INPUT_FILENAME ( STDAIR_SAMPLE_DIR"/frat5.csv"  )

FRAT5 curve input file name

Referenced by readConfiguration().

const std::string K_SIMCRS_DEFAULT_FF_DISUTILITY_INPUT_FILENAME ( STDAIR_SAMPLE_DIR"/ffDisutility.csv"  )

Fare family disutility curve input file name

Referenced by readConfiguration().

const std::string K_SIMCRS_DEFAULT_YIELD_INPUT_FILENAME ( STDAIR_SAMPLE_DIR"/yieldstore01.csv"  )

Default name and location for the (CSV) yield input file.

Referenced by readConfiguration().

const std::string K_SIMCRS_DEFAULT_FARE_INPUT_FILENAME ( STDAIR_SAMPLE_DIR"/fare01.csv"  )

Default name and location for the (CSV) fare input file.

Referenced by readConfiguration().

const std::string K_SIMCRS_DEFAULT_DB_USER ( "dsim"  )

Default name and location for the MySQL database.

Referenced by readConfiguration().

const std::string K_SIMCRS_DEFAULT_DB_PASSWD ( "dsim"  )

Referenced by readConfiguration().

const std::string K_SIMCRS_DEFAULT_DB_DBNAME ( "sim_dsim"  )

Referenced by readConfiguration().

const std::string K_SIMCRS_DEFAULT_DB_HOST ( "localhost"  )

Referenced by readConfiguration().

const std::string K_SIMCRS_DEFAULT_DB_PORT ( "3306"  )

Referenced by readConfiguration().

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

Definition at line 80 of file simcrs.cpp.

int readConfiguration ( int  argc,
char *  argv[],
bool &  ioIsBuiltin,
stdair::Filename_T &  ioScheduleInputFilename,
stdair::Filename_T &  ioOnDInputFilename,
stdair::Filename_T &  ioFRAT5Filename,
stdair::Filename_T &  ioFFDisutilityFilename,
stdair::Filename_T &  ioYieldInputFilename,
stdair::Filename_T &  ioFareInputFilename,
stdair::Filename_T &  ioLogFilename,
std::string &  ioDBUser,
std::string &  ioDBPasswd,
std::string &  ioDBHost,
std::string &  ioDBPort,
std::string &  ioDBDBName 
)

Variable Documentation

const bool K_SIMCRS_DEFAULT_BUILT_IN_INPUT = false

Default for the BOM tree building. The BOM tree can either be built-in or provided by an input file. That latter must then be given with input file options (-s, -o, -f, -y).

Definition at line 67 of file simcrs.cpp.

Referenced by readConfiguration().

const int K_SIMCRS_EARLY_RETURN_STATUS = 99

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

Definition at line 87 of file simcrs.cpp.

Referenced by main(), and readConfiguration().