StdAir Logo  1.00.0
C++ Standard Airline IT Object Library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
BasConst.cpp
Go to the documentation of this file.
1 // //////////////////////////////////////////////////////////////////////
2 // Import section
3 // //////////////////////////////////////////////////////////////////////
4 // StdAir
16 
17 namespace stdair {
18 
19  // ///////// General /////////
21  const std::string DEFAULT_BOM_ROOT_KEY (" -- ROOT -- ");
22 
24  const double DEFAULT_EPSILON_VALUE (0.0001);
25 
27  const unsigned int DEFAULT_FLIGHT_SPEED (900);
28 
31 
33  const Duration_T NULL_BOOST_TIME_DURATION (-1, -1, -1);
34 
36  const Duration_T DEFAULT_NULL_DURATION (0, 0, 0);
37 
39  const unsigned int DEFAULT_NB_OF_DAYS_IN_A_YEAR (365);
40 
42  const unsigned int DEFAULT_NUMBER_OF_SUBDIVISIONS (1000);
43 
44  // //////// (Flight-)Period-related BOM ///////
47 
49  const DatePeriod_T BOOST_DEFAULT_DATE_PERIOD (Date_T (2007, 1, 1),
50  Date_T (2007, 1, 1));
51 
53  const std::string DOW_STR[] =
54  {"Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"};
55 
57  const DOW_String_T DEFAULT_DOW_STRING ("0000000");
58 
61 
62 
63  // // //////// General ///////
65  const Date_T DEFAULT_DATE (2010, boost::gregorian::Jan, 1);
66 
69 
71  const Duration_T DEFAULT_EPSILON_DURATION (0, 0, 0, 1);
72 
74  const Count_T SECONDS_IN_ONE_DAY (86400);
75 
78 
80  const RandomSeed_T DEFAULT_RANDOM_SEED (120765987);
81 
82  // //////// Default BOM tree objects /////// ///////
84  const AirportCode_T AIRPORT_LHR ("LHR");
85 
87  const AirportCode_T AIRPORT_SYD ("SYD");
88 
90  const CityCode_T POS_LHR ("LHR");
91 
93  const Date_T DATE_20110115 (2011, boost::gregorian::Jan, 15);
94  const Date_T DATE_20111231 (2011, boost::gregorian::Dec, 31);
95 
98 
100  const SaturdayStay_T SATURDAY_STAY (true);
101 
103  const SaturdayStay_T NO_SATURDAY_STAY (false);
104 
106  const ChangeFees_T CHANGE_FEES (true);
107 
109  const ChangeFees_T NO_CHANGE_FEES (false);
110 
112  const NonRefundable_T NON_REFUNDABLE (true);
113 
115  const NonRefundable_T NO_NON_REFUNDABLE (false);
116 
119 
122 
125 
128 
130  const AirlineCode_T AIRLINE_CODE_BA ("BA");
131 
133  const CabinCode_T CABIN_Y ("Y");
134 
136  const ClassCode_T CLASS_CODE_Y ("Y");
137 
138  // //////// Travel solutions related objects///////
140  const ClassCode_T CLASS_CODE_Q ("Q");
141 
142  // //////// Booking request related objects///////
144  const AirportCode_T AIRPORT_SIN ("SIN");
145 
147  const AirportCode_T AIRPORT_BKK ("BKK");
148 
150  const CityCode_T POS_SIN ("SIN");
151 
153  const CabinCode_T CABIN_ECO ("Eco");
154 
157 
158  // //////// Default ///////
160  const FamilyCode_T DEFAULT_FAMILY_CODE ("0");
161 
163  const PolicyCode_T DEFAULT_POLICY_CODE ("0");
164 
167 
169  const NestingStructureCode_T DISPLAY_NESTING_STRUCTURE_CODE ("Display Nesting");
170 
172  const NestingStructureCode_T YIELD_BASED_NESTING_STRUCTURE_CODE ("Yield-Based Nesting");
173 
176 
179 
182 
183  // //////// Booking-class-related BOM ///////
186 
189 
193 
197 
200 
203 
206 
209 
212 
215 
218 
220  const BlockSpace_T DEFAULT_BLOCK_SPACE (0.0);
221 
224 
227 
229  const Availability_T MAXIMAL_AVAILABILITY (9999.0);
230 
232  const UnconstrainingMethod DEFAULT_UNCONSTRAINING_METHOD ('E');
233 
235  const PartnershipTechnique DEFAULT_PARTNERSHIP_TECHNIQUE ('N');
236 
238  const ForecastingMethod DEFAULT_FORECASTING_METHOD ('Q');
239 
241  const PreOptimisationMethod DEFAULT_PREOPTIMISATION_METHOD ('N');
242 
244  const OptimisationMethod DEFAULT_OPTIMISATION_METHOD ('M');;
245 
246  // //////// (Segment-)Class-related BOM ///////
250 
254  std::vector<CensorshipFlag_T>();
255 
258 
261 
264 
267 
270 
273 
275  const Fare_T DEFAULT_FARE_VALUE (0.0);
276 
279 
281  const Revenue_T DEFAULT_REVENUE_VALUE (0.0);
282 
285 
286 
287  // //////// (Leg-)YieldRange-related BOM ///////
289  const Yield_T DEFAULT_YIELD_VALUE (0.0);
290 
292  const Yield_T DEFAULT_YIELD_MAX_VALUE (std::numeric_limits<double>::max());
293 
296 
299 
302 
305 
308 
312 
315 
318 
319 
320  // //////// OnD-related BOM ///////
322  const Fare_T DEFAULT_OND_FARE_VALUE (0.0);
323 
324 
325  // //////// Event Generation /////////
326 
328  const Count_T DEFAULT_PROGRESS_STATUS (0);
329 
332 
335  const Date_T DEFAULT_EVENT_OLDEST_DATE (2008, boost::gregorian::Jan, 1);
336 
341 
342 
343  // //////// Booking Request /////////
346 
349 
351  const WTP_T DEFAULT_WTP (1000.0);
352 
355 
358 
361 
365 
367  const Duration_T DEFAULT_REQUEST_TIME (8, 0, 0);
368 
372 
375 
377  const CityCode_T DEFAULT_POS ("ALL");
378 
380  const ChannelLabel_T DEFAULT_CHANNEL ("DC");
381 
383  const ChannelLabel_T CHANNEL_DN ("DN");
384 
386  const ChannelLabel_T CHANNEL_IN ("IN");
387 
389  const TripType_T TRIP_TYPE_ONE_WAY ("OW");
390 
392  const TripType_T TRIP_TYPE_ROUND_TRIP ("RT");
393 
395  const TripType_T TRIP_TYPE_INBOUND ("RI");
396 
398  const TripType_T TRIP_TYPE_OUTBOUND ("RO");
399 
401  const FrequentFlyer_T DEFAULT_FF_TIER ("N");
402 
404  const PriceValue_T DEFAULT_VALUE_OF_TIME (100.0);
405 
408 
409  // //////// Travel Solutions ///////
412 
415 
418 
420  const PriceCurrency_T DEFAULT_CURRENCY ("EUR");
421 
424 
427 
428  // //////// Inventory-related BOM ///////
430  const AirlineCode_T DEFAULT_AIRLINE_CODE ("XX");
431 
434 
437 
440 
443 
445  const TableID_T DEFAULT_TABLE_ID (9999);
446 
448  const Date_T DEFAULT_DEPARTURE_DATE (1900, boost::gregorian::Jan, 1);
449 
451  const AirportCode_T DEFAULT_AIRPORT_CODE ("XXX");
452 
455 
457  const AirportCode_T DEFAULT_ORIGIN ("XXX");
458 
460  const AirportCode_T DEFAULT_DESTINATION ("YYY");
461 
463  const CabinCode_T DEFAULT_CABIN_CODE ("X");
464 
466  const FamilyCode_T DEFAULT_FARE_FAMILY_CODE ("EcoSaver");
467 
470 
472  const ClassCode_T DEFAULT_CLASS_CODE ("X");
473 
476 
479 
481  const BidPrice_T DEFAULT_BID_PRICE (0.0);
482 
484  const BidPriceVector_T DEFAULT_BID_PRICE_VECTOR = std::vector<BidPrice_T>();
485 
489  const unsigned short MAXIMAL_NUMBER_OF_LEGS_IN_FLIGHT (7);
490 
493  const unsigned short MAXIMAL_NUMBER_OF_SEGMENTS_IN_OND (3);
494 
497 
500 
503 
505  const UPR_T DEFAULT_NULL_UPR (0);
506 
508  const std::string DEFAULT_FARE_FAMILY_VALUE_TYPE ("FF");
509 
511  const std::string DEFAULT_SEGMENT_CABIN_VALUE_TYPE ("SC");
512 
514  const int DEFAULT_MAX_DTD = 365;
515 
519  DCPList_T oDCPList;
520  //oDCPList.push_back (72);
521  oDCPList.push_back (63);oDCPList.push_back (56);oDCPList.push_back (49);
522  oDCPList.push_back (42);oDCPList.push_back (35);oDCPList.push_back (31);
523  oDCPList.push_back (27);oDCPList.push_back (23);oDCPList.push_back (19);
524  oDCPList.push_back (16);oDCPList.push_back (13);oDCPList.push_back (10);
525  oDCPList.push_back (7); oDCPList.push_back (5); oDCPList.push_back (3);
526  oDCPList.push_back (1); oDCPList.push_back (0);
527  return oDCPList;
528  }
529 
534  FRAT5Curve_T oCurve;
535  oCurve[63] = 1.05; oCurve[56] = 1.07; oCurve[49] = 1.09;
536  oCurve[42] = 1.11; oCurve[35] = 1.14; oCurve[31] = 1.16;
537  oCurve[27] = 1.18; oCurve[23] = 1.21; oCurve[19] = 1.24;
538  oCurve[16] = 1.27; oCurve[13] = 1.30; oCurve[10] = 1.33;
539  oCurve[7] = 1.37; oCurve[5] = 1.40; oCurve[3] = 1.45;
540  oCurve[1] = 1.50;
541  return oCurve;
542  }
543 
548  FRAT5Curve_T oCurve;
549  oCurve[63] = 1.20; oCurve[56] = 1.23; oCurve[49] = 1.26;
550  oCurve[42] = 1.30; oCurve[35] = 1.35; oCurve[31] = 1.40;
551  oCurve[27] = 1.50; oCurve[23] = 1.60; oCurve[19] = 1.80;
552  oCurve[16] = 2.10; oCurve[13] = 2.20; oCurve[10] = 2.30;
553  oCurve[7] = 2.40; oCurve[5] = 2.44; oCurve[3] = 2.47;
554  oCurve[1] = 2.50;
555  return oCurve;
556  }
557 
562  FRAT5Curve_T oCurve;
563  oCurve[63] = 1.40; oCurve[56] = 1.45; oCurve[49] = 1.50;
564  oCurve[42] = 1.55; oCurve[35] = 1.60; oCurve[31] = 1.70;
565  oCurve[27] = 1.80; oCurve[23] = 2.00; oCurve[19] = 2.30;
566  oCurve[16] = 2.60; oCurve[13] = 3.00; oCurve[10] = 3.30;
567  oCurve[7] = 3.40; oCurve[5] = 3.44; oCurve[3] = 3.47;
568  oCurve[1] = 3.50;
569  return oCurve;
570  }
571 
576  FRAT5Curve_T oCurve;
577  oCurve[63] = 1.60; oCurve[56] = 1.67; oCurve[49] = 1.74;
578  oCurve[42] = 1.81; oCurve[35] = 1.88; oCurve[31] = 2.00;
579  oCurve[27] = 2.15; oCurve[23] = 2.45; oCurve[19] = 2.75;
580  oCurve[16] = 3.20; oCurve[13] = 3.80; oCurve[10] = 4.25;
581  oCurve[7] = 4.35; oCurve[5] = 4.40; oCurve[3] = 4.45;
582  oCurve[1] = 4.50;
583  return oCurve;
584  }
585 
594  FFDisutilityCurve_T oCurve;
595  oCurve[63] = 0.0098; oCurve[56] = 0.0096; oCurve[49] = 0.0093;
596  oCurve[42] = 0.0090; oCurve[35] = 0.0086; oCurve[31] = 0.0082;
597  oCurve[27] = 0.0077; oCurve[23] = 0.0071; oCurve[19] = 0.0065;
598  oCurve[16] = 0.0059; oCurve[13] = 0.0052; oCurve[10] = 0.0045;
599  oCurve[7] = 0.0039; oCurve[5] = 0.0036; oCurve[3] = 0.0033;
600  oCurve[1] = 0.0030;
601  return oCurve;
602  }
603 
612  FFDisutilityCurve_T oCurve;
613  oCurve[63] = 0.0082; oCurve[56] = 0.0080; oCurve[49] = 0.0078;
614  oCurve[42] = 0.0075; oCurve[35] = 0.0072; oCurve[31] = 0.0068;
615  oCurve[27] = 0.0064; oCurve[23] = 0.0059; oCurve[19] = 0.0054;
616  oCurve[16] = 0.0049; oCurve[13] = 0.0044; oCurve[10] = 0.0038;
617  oCurve[7] = 0.0033; oCurve[5] = 0.0030; oCurve[3] = 0.0028;
618  oCurve[1] = 0.0025;
619  return oCurve;
620  }
621 
630  FFDisutilityCurve_T oCurve;
631  oCurve[63] = 0.0065; oCurve[56] = 0.0064; oCurve[49] = 0.0062;
632  oCurve[42] = 0.0060; oCurve[35] = 0.0057; oCurve[31] = 0.0054;
633  oCurve[27] = 0.0051; oCurve[23] = 0.0047; oCurve[19] = 0.0043;
634  oCurve[16] = 0.0039; oCurve[13] = 0.0035; oCurve[10] = 0.0030;
635  oCurve[7] = 0.0026; oCurve[5] = 0.0024; oCurve[3] = 0.0022;
636  oCurve[1] = 0.0020;
637  return oCurve;
638  }
639 
648  FFDisutilityCurve_T oCurve;
649  oCurve[63] = 0.0050; oCurve[56] = 0.0049; oCurve[49] = 0.0047;
650  oCurve[42] = 0.0045; oCurve[35] = 0.0043; oCurve[31] = 0.0040;
651  oCurve[27] = 0.0037; oCurve[23] = 0.0034; oCurve[19] = 0.0030;
652  oCurve[16] = 0.0026; oCurve[13] = 0.0022; oCurve[10] = 0.0017;
653  oCurve[7] = 0.0013; oCurve[5] = 0.0012; oCurve[3] = 0.0011;
654  oCurve[1] = 0.0010;
655  return oCurve;
656  }
657 
666  FFDisutilityCurve_T oCurve;
667  oCurve[63] = 0.0043; oCurve[56] = 0.0042; oCurve[49] = 0.0041;
668  oCurve[42] = 0.0039; oCurve[35] = 0.0037; oCurve[31] = 0.0035;
669  oCurve[27] = 0.0032; oCurve[23] = 0.0029; oCurve[19] = 0.0025;
670  oCurve[16] = 0.0021; oCurve[13] = 0.0018; oCurve[10] = 0.0013;
671  oCurve[7] = 0.0011; oCurve[5] = 0.0010; oCurve[3] = 0.0009;
672  oCurve[1] = 0.0008;
673  return oCurve;
674  }
675 
684  FFDisutilityCurve_T oCurve;
685  oCurve[63] = 0.0032; oCurve[56] = 0.0031; oCurve[49] = 0.0030;
686  oCurve[42] = 0.0029; oCurve[35] = 0.0027; oCurve[31] = 0.0025;
687  oCurve[27] = 0.0022; oCurve[23] = 0.0019; oCurve[19] = 0.0016;
688  oCurve[16] = 0.0013; oCurve[13] = 0.0010; oCurve[10] = 0.0008;
689  oCurve[7] = 0.0007; oCurve[5] = 0.0006; oCurve[3] = 0.0005;
690  oCurve[1] = 0.0004;
691  return oCurve;
692  }
693 
698  DTDFratMap_T oDFCMap;
699  oDFCMap[71] = 2.50583571429; oDFCMap[63] = 2.55994571429;
700  oDFCMap[56] = 2.60841857143; oDFCMap[49] = 2.68888;
701  oDFCMap[42] = 2.78583714286; oDFCMap[35] = 2.89091428571;
702  oDFCMap[31] = 2.97871428571; oDFCMap[28] = 3.05521428571;
703  oDFCMap[24] = 3.15177142857; oDFCMap[21] = 3.22164285714;
704  oDFCMap[17] = 3.32237142857; oDFCMap[14] = 3.38697142857;
705  oDFCMap[10] = 3.44204285714; oDFCMap[7] = 3.46202857143;
706  oDFCMap[5] = 3.47177142857; oDFCMap[3] = 3.4792;
707  oDFCMap[1] = 3.48947142857; // oDFCMap[0] = 3.49111428571;
708  return oDFCMap;
709  }
710 
715  DTDProbMap_T oDPMap;
716  oDPMap[-330] = 0; oDPMap[-150] = 0.1; oDPMap[-92] = 0.2;
717  oDPMap[-55] = 0.3; oDPMap[-34] = 0.4; oDPMap[-21] = 0.5;
718  oDPMap[-12] = 0.6; oDPMap[-6] = 0.7; oDPMap[-3] = 0.8;
719  oDPMap[-1] = 0.9; oDPMap[0] = 1.0;
720  return oDPMap;
721  }
722 
723  // ////////// Key and display related /////////////
726  const std::string DEFAULT_KEY_FLD_DELIMITER (";");
727 
730  const std::string DEFAULT_KEY_SUB_FLD_DELIMITER (",");
731 
733  const boost::char_separator<char> DEFAULT_KEY_TOKEN_DELIMITER (";, ");
734 
737 
738 
739  // ////////// BomManager-related constants ///////////
742  const std::string DISPLAY_LEVEL_STRING_ARRAY[51] =
743  { "", " ", " ", " ",
744  " ", " ", " ", " ",
745  " ", " ", " ",
746  " ", " ",
747  " ", " ",
748  " ", " ",
749  " ",
750  " ",
751  " ",
752  " ",
753  " ",
754  " ",
755  " ",
756  " ",
757  " ",
758  " ",
759  " ",
760  " ",
761  " ",
762  " ",
763  " ",
764  " ",
765  " ",
766  " ",
767  " ",
768  " ",
769  " ",
770  " ",
771  " ",
772  " ",
773  " ",
774  " ",
775  " ",
776  " ",
777  " ",
778  " ",
779  " ",
780  " ",
781  " ",
782  " " };
783 
784 
785 }