SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ROLoader.h
Go to the documentation of this file.
1 /****************************************************************************/
10 // Loader for networks and route imports
11 /****************************************************************************/
12 // SUMO, Simulation of Urban MObility; see http://sumo-sim.org/
13 // Copyright (C) 2002-2014 DLR (http://www.dlr.de/) and contributors
14 /****************************************************************************/
15 //
16 // This file is part of SUMO.
17 // SUMO is free software: you can redistribute it and/or modify
18 // it under the terms of the GNU General Public License as published by
19 // the Free Software Foundation, either version 3 of the License, or
20 // (at your option) any later version.
21 //
22 /****************************************************************************/
23 #ifndef ROLoader_h
24 #define ROLoader_h
25 
26 
27 // ===========================================================================
28 // included modules
29 // ===========================================================================
30 #ifdef _MSC_VER
31 #include <windows_config.h>
32 #else
33 #include <config.h>
34 #endif
35 
36 #include <utils/common/SUMOTime.h>
41 
42 
43 // ===========================================================================
44 // class declarations
45 // ===========================================================================
46 class OptionsCont;
48 class RONet;
49 class ROVehicle;
50 
51 
52 // ===========================================================================
53 // class definitions
54 // ===========================================================================
63 class ROLoader {
64 public:
71  ROLoader(OptionsCont& oc, const bool emptyDestinationsAllowed, const bool logSteps);
72 
73 
75  virtual ~ROLoader();
76 
78  virtual void loadNet(RONet& toFill, ROAbstractEdgeBuilder& eb);
79 
81  bool loadWeights(RONet& net, const std::string& optionName,
82  const std::string& measure, bool useLanes);
83 
85  void openRoutes(RONet& net);
86 
88  void processRoutes(SUMOTime start, SUMOTime end,
90 
91 #ifdef HAVE_INTERNAL // catchall for internal stuff
92 
93  void processAllRoutesWithBulkRouter(SUMOTime start, SUMOTime end,
95 #endif
96 
97 protected:
119  bool openTypedRoutes(const std::string& optionName, RONet& net);
120 
121 
128  public:
131 
134 
143  void addEdgeWeight(const std::string& id,
144  SUMOReal val, SUMOReal beg, SUMOReal end) const;
145 
146  private:
149 
150  };
151 
152 
159  public:
162 
165 
174  void addEdgeWeight(const std::string& id,
175  SUMOReal val, SUMOReal beg, SUMOReal end) const;
176 
177  private:
180 
181  };
182 
183 
184 
185 protected:
186  void writeStats(SUMOTime time, SUMOTime start, int absNo);
187 
188 
189 private:
192 
195 
197  const bool myLogSteps;
198 
201 
202 
203 private:
205  ROLoader(const ROLoader& src);
206 
208  ROLoader& operator=(const ROLoader& src);
209 };
210 
211 
212 #endif
213 
214 /****************************************************************************/
215