TraDemGen Logo  1.00.0
C++ Simulated Travel Demand Generation Library
 All Classes Namespaces Files Functions Variables Typedefs Friends Pages
DemandManager.hpp
Go to the documentation of this file.
1 #ifndef __TRADEMGEN_CMD_DEMANDMANAGER_HPP
2 #define __TRADEMGEN_CMD_DEMANDMANAGER_HPP
3 
4 // //////////////////////////////////////////////////////////////////////
5 // Import section
6 // //////////////////////////////////////////////////////////////////////
7 // StdAir
8 #include <stdair/stdair_basic_types.hpp>
9 #include <stdair/basic/RandomGeneration.hpp>
10 #include <stdair/basic/DemandGenerationMethod.hpp>
11 #include <stdair/bom/BookingRequestTypes.hpp>
12 #include <stdair/command/CmdAbstract.hpp>
13 // SEvMgr
14 #include <sevmgr/SEVMGR_Types.hpp>
15 // TraDemGen
19 
20 // Forward declarations
21 namespace stdair {
22  class EventStruct;
23  struct ProgressStatusSet;
24  struct TravelSolutionStruct;
25 }
26 
27 namespace TRADEMGEN {
28 
29  // Forward declarations
30  struct DemandDistribution;
31  struct DemandStruct;
32  class DemandStream;
33  namespace DemandParserHelper {
34  struct doEndDemand;
35  }
36 
40  class DemandManager : public stdair::CmdAbstract {
42  friend class TRADEMGEN_Service;
43 
44  private:
45  // //////// Business methodes //////////
125  static void buildSampleBomStd (SEVMGR::SEVMGR_ServicePtr_T,
126  stdair::RandomGeneration&,
127  const POSProbabilityMass_T&);
128 
129  // Demand sample bom for partnerships study.
130  static void buildSampleBom (SEVMGR::SEVMGR_ServicePtr_T,
131  stdair::RandomGeneration&,
132  const POSProbabilityMass_T&);
133 
143  static void createDemandCharacteristics (SEVMGR::SEVMGR_ServicePtr_T,
144  stdair::RandomGeneration&,
145  const POSProbabilityMass_T&,
146  const DemandStruct&);
147 
155  static stdair::RandomSeed_T generateSeed (stdair::RandomGeneration&);
156 
177  static DemandStream&
178  createDemandStream (SEVMGR::SEVMGR_ServicePtr_T,
179  const DemandStreamKey&,
186  const stdair::ChangeFeesRatio_T&,
187  const stdair::Disutility_T&,
188  const stdair::NonRefundableRatio_T&,
189  const stdair::Disutility_T&,
191  const stdair::WTP_T&,
193  const DemandDistribution&, stdair::BaseGenerator_T&,
194  const stdair::RandomSeed_T&,
195  const stdair::RandomSeed_T&,
196  const POSProbabilityMass_T&);
197 
215  static const bool
216  stillHavingRequestsToBeGenerated (SEVMGR::SEVMGR_ServicePtr_T,
217  const stdair::DemandStreamKeyStr_T&,
218  stdair::ProgressStatusSet&,
219  const stdair::DemandGenerationMethod&);
220 
236  static stdair::Count_T generateFirstRequests (SEVMGR::SEVMGR_ServicePtr_T,
237  stdair::RandomGeneration&,
238  const stdair::DemandGenerationMethod&);
239 
268  static stdair::BookingRequestPtr_T
269  generateNextRequest (SEVMGR::SEVMGR_ServicePtr_T, stdair::RandomGeneration&,
270  const stdair::DemandStreamKeyStr_T&,
271  const stdair::DemandGenerationMethod&);
272 
282  static void reset (SEVMGR::SEVMGR_ServicePtr_T, stdair::BaseGenerator_T&);
283 
287  static bool generateCancellation (stdair::RandomGeneration&,
288  const stdair::TravelSolutionStruct&,
289  const stdair::PartySize_T&,
290  const stdair::DateTime_T&,
291  const stdair::Date_T&,
292  stdair::EventStruct& ioEventStruct);
293  };
294 
295 }
296 #endif // __TRADEMGEN_CMD_DEMANDMANAGER_HPP