StdAir Logo  0.45.1
C++ Standard Airline IT Object Library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
BasConst.cpp
Go to the documentation of this file.
1 // //////////////////////////////////////////////////////////////////////
2 // Import section
3 // //////////////////////////////////////////////////////////////////////
4 // StdAir
15 
16 namespace stdair {
17 
18  // ///////// General /////////
20  const std::string DEFAULT_BOM_ROOT_KEY (" -- ROOT -- ");
21 
23  const double DEFAULT_EPSILON_VALUE (0.0001);
24 
26  const unsigned int DEFAULT_FLIGHT_SPEED (900);
27 
30 
32  const Duration_T NULL_BOOST_TIME_DURATION (-1, -1, -1);
33 
35  const unsigned int DEFAULT_NB_OF_DAYS_IN_A_YEAR (365);
36 
38  const unsigned int DEFAULT_NUMBER_OF_SUBDIVISIONS (1000);
39 
40  // //////// (Flight-)Period-related BOM ///////
43 
45  const DatePeriod_T BOOST_DEFAULT_DATE_PERIOD (Date_T (2007, 1, 1),
46  Date_T (2007, 1, 1));
47 
49  const std::string DOW_STR[] =
50  {"Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"};
51 
53  const DOW_String_T DEFAULT_DOW_STRING ("0000000");
54 
57 
58 
59  // // //////// General ///////
61  const Date_T DEFAULT_DATE (2010, boost::gregorian::Jan, 1);
62 
65 
67  const Duration_T DEFAULT_EPSILON_DURATION (0, 0, 0, 1);
68 
70  const Count_T SECONDS_IN_ONE_DAY (86400);
71 
74 
76  const RandomSeed_T DEFAULT_RANDOM_SEED (120765987);
77 
78  // //////// Default BOM tree objects /////// ///////
80  const AirportCode_T AIRPORT_LHR ("LHR");
81 
83  const AirportCode_T AIRPORT_SYD ("SYD");
84 
86  const CityCode_T POS_LHR ("LHR");
87 
89  const Date_T DATE_20110115 (2011, boost::gregorian::Jan, 15);
90  const Date_T DATE_20111231 (2011, boost::gregorian::Dec, 31);
91 
94 
96  const SaturdayStay_T SATURDAY_STAY (true);
97 
99  const SaturdayStay_T NO_SATURDAY_STAY (false);
100 
102  const ChangeFees_T CHANGE_FEES (true);
103 
105  const ChangeFees_T NO_CHANGE_FEES (false);
106 
108  const NonRefundable_T NON_REFUNDABLE (true);
109 
111  const NonRefundable_T No_NON_REFUNDABLE (false);
112 
115 
118 
121 
124 
126  const AirlineCode_T AIRLINE_CODE_BA ("BA");
127 
129  const CabinCode_T CABIN_Y ("Y");
130 
132  const ClassCode_T CLASS_CODE_Y ("Y");
133 
134  // //////// Travel solutions related objects///////
136  const ClassCode_T CLASS_CODE_Q ("Q");
137 
138  // //////// Booking request related objects///////
140  const AirportCode_T AIRPORT_SIN ("SIN");
141 
143  const AirportCode_T AIRPORT_BKK ("BKK");
144 
146  const CityCode_T POS_SIN ("SIN");
147 
149  const CabinCode_T CABIN_ECO ("Eco");
150 
153 
154  // //////// Default ///////
156  const ClassCode_T DEFAULT_FAMILY_CODE ("0");
157 
160 
163 
164  // //////// Booking-class-related BOM ///////
167 
170 
174 
178 
181 
184 
187 
190 
193 
196 
199 
201  const BlockSpace_T DEFAULT_BLOCK_SPACE (0.0);
202 
205 
208 
210  const Availability_T MAXIMAL_AVAILABILITY (9999.0);
211 
212 
213  // //////// (Segment-)Class-related BOM ///////
217 
221  std::vector<CensorshipFlag_T>();
222 
225 
228 
231 
234 
237 
240 
242  const Fare_T DEFAULT_FARE_VALUE (0.0);
243 
246 
248  const Revenue_T DEFAULT_REVENUE_VALUE (0.0);
249 
252 
253 
254  // //////// (Leg-)YieldRange-related BOM ///////
256  const Yield_T DEFAULT_YIELD_VALUE (0.0);
257 
259  const Yield_T DEFAULT_YIELD_MAX_VALUE (std::numeric_limits<double>::max());
260 
263 
266 
269 
272 
275 
279 
282 
285 
286 
287  // //////// OnD-related BOM ///////
289  const Fare_T DEFAULT_OND_FARE_VALUE (0.0);
290 
291 
292  // //////// Event Generation /////////
294  const EventQueueID_T DEFAULT_EVENT_QUEUE_ID ("EQ01");
295 
298 
301  const Date_T DEFAULT_EVENT_OLDEST_DATE (2008, boost::gregorian::Jan, 1);
302 
307 
308 
309  // //////// Booking Request /////////
312 
315 
317  const WTP_T DEFAULT_WTP (1000.0);
318 
321 
324 
327 
331 
333  const Duration_T DEFAULT_REQUEST_TIME (8, 0, 0);
334 
338 
341 
343  const CityCode_T DEFAULT_POS ("ALL");
344 
346  const ChannelLabel_T DEFAULT_CHANNEL ("DC");
347 
349  const ChannelLabel_T CHANNEL_DN ("DN");
350 
352  const ChannelLabel_T CHANNEL_IN ("IN");
353 
355  const TripType_T TRIP_TYPE_ONE_WAY ("OW");
356 
358  const TripType_T TRIP_TYPE_ROUND_TRIP ("RT");
359 
361  const TripType_T TRIP_TYPE_INBOUND ("RI");
362 
364  const TripType_T TRIP_TYPE_OUTBOUND ("RO");
365 
367  const FrequentFlyer_T DEFAULT_FF_TIER ("N");
368 
370  const PriceValue_T DEFAULT_VALUE_OF_TIME (100.0);
371 
372 
373  // //////// Travel Solutions ///////
376 
379 
382 
384  const PriceCurrency_T DEFAULT_CURRENCY ("EUR");
385 
388 
391 
392  // //////// Inventory-related BOM ///////
394  const AirlineCode_T DEFAULT_AIRLINE_CODE ("XX");
395 
398 
401 
404 
407 
409  const Date_T DEFAULT_DEPARTURE_DATE (1900, boost::gregorian::Jan, 1);
410 
412  const AirportCode_T DEFAULT_AIRPORT_CODE ("XXX");
413 
416 
418  const AirportCode_T DEFAULT_ORIGIN ("XXX");
419 
421  const AirportCode_T DEFAULT_DESTINATION ("XXX");
422 
424  const CabinCode_T DEFAULT_CABIN_CODE ("X");
425 
427  const FamilyCode_T DEFAULT_FARE_FAMILY_CODE ("EcoSaver");
428 
431 
433  const ClassCode_T DEFAULT_CLASS_CODE ("X");
434 
437 
440 
442  const BidPrice_T DEFAULT_BID_PRICE (0.0);
443 
445  const BidPriceVector_T DEFAULT_BID_PRICE_VECTOR = std::vector<BidPrice_T>();
446 
450  const unsigned short MAXIMAL_NUMBER_OF_LEGS_IN_FLIGHT (7);
451 
454  const unsigned short MAXIMAL_NUMBER_OF_SEGMENTS_IN_OND (3);
455 
458 
460  const std::string DEFAULT_FARE_FAMILY_VALUE_TYPE ("FF");
461 
463  const std::string DEFAULT_SEGMENT_CABIN_VALUE_TYPE ("SC");
464 
466  const int DEFAULT_MAX_DTD = 365;
467 
471  DCPList_T oDCPList;
472  //oDCPList.push_back (72);
473  oDCPList.push_back (63);oDCPList.push_back (56);oDCPList.push_back (49);
474  oDCPList.push_back (42);oDCPList.push_back (35);oDCPList.push_back (31);
475  oDCPList.push_back (27);oDCPList.push_back (23);oDCPList.push_back (19);
476  oDCPList.push_back (16);oDCPList.push_back (13);oDCPList.push_back (10);
477  oDCPList.push_back (7); oDCPList.push_back (5); oDCPList.push_back (3);
478  oDCPList.push_back (1); oDCPList.push_back (0);
479  // oDCPList.push_back (63); oDCPList.push_back (49);
480  // oDCPList.push_back (35); oDCPList.push_back (23);
481  // oDCPList.push_back (16); oDCPList.push_back (10);
482  // oDCPList.push_back (5); oDCPList.push_back (1);
483  // oDCPList.push_back (0);
484  return oDCPList;
485  }
490  DTDFratMap_T oDFCMap;
491  oDFCMap[71] = 2.50583571429; oDFCMap[63] = 2.55994571429;
492  oDFCMap[56] = 2.60841857143; oDFCMap[49] = 2.68888;
493  oDFCMap[42] = 2.78583714286; oDFCMap[35] = 2.89091428571;
494  oDFCMap[31] = 2.97871428571; oDFCMap[28] = 3.05521428571;
495  oDFCMap[24] = 3.15177142857; oDFCMap[21] = 3.22164285714;
496  oDFCMap[17] = 3.32237142857; oDFCMap[14] = 3.38697142857;
497  oDFCMap[10] = 3.44204285714; oDFCMap[7] = 3.46202857143;
498  oDFCMap[5] = 3.47177142857; oDFCMap[3] = 3.4792;
499  oDFCMap[1] = 3.48947142857; // oDFCMap[0] = 3.49111428571;
500  return oDFCMap;
501  }
502 
507  DTDProbMap_T oDPMap;
508  oDPMap[-330] = 0; oDPMap[-150] = 0.1; oDPMap[-92] = 0.2;
509  oDPMap[-55] = 0.3; oDPMap[-34] = 0.4; oDPMap[-21] = 0.5;
510  oDPMap[-12] = 0.6; oDPMap[-6] = 0.7; oDPMap[-3] = 0.8;
511  oDPMap[-1] = 0.9; oDPMap[0] = 1.0;
512  return oDPMap;
513  }
514 
515 
516  // ////////// Key and display related /////////////
519  const std::string DEFAULT_KEY_FLD_DELIMITER (";");
520 
523  const std::string DEFAULT_KEY_SUB_FLD_DELIMITER (",");
524 
526  const boost::char_separator<char> DEFAULT_KEY_TOKEN_DELIMITER (";, ");
527 
530 
531 
532  // ////////// BomManager-related constants ///////////
535  const std::string DISPLAY_LEVEL_STRING_ARRAY[51] =
536  { "", " ", " ", " ",
537  " ", " ", " ", " ",
538  " ", " ", " ",
539  " ", " ",
540  " ", " ",
541  " ", " ",
542  " ",
543  " ",
544  " ",
545  " ",
546  " ",
547  " ",
548  " ",
549  " ",
550  " ",
551  " ",
552  " ",
553  " ",
554  " ",
555  " ",
556  " ",
557  " ",
558  " ",
559  " ",
560  " ",
561  " ",
562  " ",
563  " ",
564  " ",
565  " ",
566  " ",
567  " ",
568  " ",
569  " ",
570  " ",
571  " ",
572  " ",
573  " ",
574  " ",
575  " " };
576 
577 
578 }