StdAir Logo  1.00.3
C++ Standard Airline IT Object Library
AirlineFeature.cpp
Go to the documentation of this file.
1 // //////////////////////////////////////////////////////////////////////
2 // Import section
3 // //////////////////////////////////////////////////////////////////////
4 // STL
5 #include <cassert>
6 // StdAir
10 
11 namespace stdair {
12 
13  // ////////////////////////////////////////////////////////////////////
14  AirlineFeature::AirlineFeature (const Key_T& iKey) :
15  _key (iKey),
16  _forecastingMethod(DEFAULT_FORECASTING_METHOD),
17  _unconstrainingMethod(DEFAULT_UNCONSTRAINING_METHOD),
18  _preOptimisationMethod(DEFAULT_PREOPTIMISATION_METHOD),
19  _optimisationMethod(DEFAULT_OPTIMISATION_METHOD),
20  _partnershipTechnique(DEFAULT_PARTNERSHIP_TECHNIQUE) {
21  }
22 
23  // ////////////////////////////////////////////////////////////////////
24  AirlineFeature::AirlineFeature (const AirlineFeature& iAirlineFeature) :
25  _key (iAirlineFeature._key),
26  _forecastingMethod (iAirlineFeature._forecastingMethod),
27  _unconstrainingMethod (iAirlineFeature._unconstrainingMethod),
28  _preOptimisationMethod (iAirlineFeature._preOptimisationMethod),
29  _optimisationMethod (iAirlineFeature._optimisationMethod),
30  _partnershipTechnique (iAirlineFeature._partnershipTechnique) {
31  }
32 
33  // ////////////////////////////////////////////////////////////////////
35  }
36 
37  // ////////////////////////////////////////////////////////////////////
38  void AirlineFeature::init(const ForecastingMethod& iForecastingMethod,
39  const UnconstrainingMethod& iUnconstrainingMethod,
40  const PreOptimisationMethod& iPreOptimisationMethod,
41  const OptimisationMethod& iOptimisationMethod,
42  const HistoricalDataLimit_T& iHistoricalDataLimit,
43  const ControlMode_T& iControlMode,
44  const PartnershipTechnique& iPartnershipTechnique) {
45  _forecastingMethod = iForecastingMethod;
46  _unconstrainingMethod = iUnconstrainingMethod;
47  _preOptimisationMethod = iPreOptimisationMethod;
48  _optimisationMethod = iOptimisationMethod;
49  _historicalDataLimit = iHistoricalDataLimit;
50  _controlMode = iControlMode;
51  _partnershipTechnique = iPartnershipTechnique;
52  }
53 
54  // ////////////////////////////////////////////////////////////////////
55  std::string AirlineFeature::toString() const {
56  std::ostringstream ostr;
57  ostr << describeKey()
58  << ", " << _forecastingMethod
59  << ", " << _unconstrainingMethod
60  << ", " << _preOptimisationMethod
61  << ", " << _optimisationMethod
62  << ", " << _historicalDataLimit
63  //<< ", " << _controlMode
64  << ", " << _partnershipTechnique;
65  return ostr.str();
66  }
67 
68 }
69 
const ForecastingMethod DEFAULT_FORECASTING_METHOD('Q')
const PartnershipTechnique DEFAULT_PARTNERSHIP_TECHNIQUE('N')
std::string toString() const
const OptimisationMethod DEFAULT_OPTIMISATION_METHOD('M')
Handle on the StdAir library context.
ForecastingMethod _forecastingMethod
const std::string describeKey() const
PartnershipTechnique _partnershipTechnique
void init(const ForecastingMethod &, const UnconstrainingMethod &, const PreOptimisationMethod &, const OptimisationMethod &, const HistoricalDataLimit_T &, const ControlMode_T &, const PartnershipTechnique &)
HistoricalDataLimit_T _historicalDataLimit
PreOptimisationMethod _preOptimisationMethod
const PreOptimisationMethod DEFAULT_PREOPTIMISATION_METHOD('N')
std::string ControlMode_T
Enumeration of partnership techniques.
Class representing various configuration parameters (e.g., revenue management methods such EMSRb or M...
short HistoricalDataLimit_T
UnconstrainingMethod _unconstrainingMethod
OptimisationMethod _optimisationMethod
const UnconstrainingMethod DEFAULT_UNCONSTRAINING_METHOD('E')