StdAir Logo  1.00.0
C++ Standard Airline IT Object Library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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