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 /****************************************************************************/
9 // Loader for networks and route imports
10 /****************************************************************************/
11 // SUMO, Simulation of Urban MObility; see http://sumo-sim.org/
12 // Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors
13 /****************************************************************************/
14 //
15 // This file is part of SUMO.
16 // SUMO is free software: you can redistribute it and/or modify
17 // it under the terms of the GNU General Public License as published by
18 // the Free Software Foundation, either version 3 of the License, or
19 // (at your option) any later version.
20 //
21 /****************************************************************************/
22 #ifndef ROLoader_h
23 #define ROLoader_h
24 
25 
26 // ===========================================================================
27 // included modules
28 // ===========================================================================
29 #ifdef _MSC_VER
30 #include <windows_config.h>
31 #else
32 #include <config.h>
33 #endif
34 
35 #include <utils/common/SUMOTime.h>
40 
41 
42 // ===========================================================================
43 // class declarations
44 // ===========================================================================
45 class OptionsCont;
47 class RONet;
48 class ROVehicle;
49 
50 
51 // ===========================================================================
52 // class definitions
53 // ===========================================================================
62 class ROLoader {
63 public:
70  ROLoader(OptionsCont& oc, const bool emptyDestinationsAllowed, const bool logSteps);
71 
72 
74  virtual ~ROLoader();
75 
77  virtual void loadNet(RONet& toFill, ROAbstractEdgeBuilder& eb);
78 
80  bool loadWeights(RONet& net, const std::string& optionName,
81  const std::string& measure, bool useLanes);
82 
84  void openRoutes(RONet& net);
85 
87  void processRoutes(SUMOTime start, SUMOTime end,
89 
90 #ifdef HAVE_INTERNAL // catchall for internal stuff
91 
92  void processAllRoutesWithBulkRouter(SUMOTime start, SUMOTime end,
94 #endif
95 
96 protected:
118  bool openTypedRoutes(const std::string& optionName, RONet& net);
119 
120 
127  public:
130 
133 
142  void addEdgeWeight(const std::string& id,
143  SUMOReal val, SUMOReal beg, SUMOReal end) const;
144 
145  private:
148 
149  };
150 
151 
158  public:
161 
164 
173  void addEdgeWeight(const std::string& id,
174  SUMOReal val, SUMOReal beg, SUMOReal end) const;
175 
176  private:
179 
180  };
181 
182 
183 
184 protected:
185  void writeStats(SUMOTime time, SUMOTime start, int absNo);
186 
187 
188 private:
191 
194 
196  const bool myLogSteps;
197 
200 
201 
202 private:
204  ROLoader(const ROLoader& src);
205 
207  ROLoader& operator=(const ROLoader& src);
208 };
209 
210 
211 #endif
212 
213 /****************************************************************************/
214