SUMO - Simulation of Urban MObility
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.dlr.de/
13 // Copyright (C) 2002-2016 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>
40 #include "RORoutable.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, const bool useLanes, const bool boundariesOverride);
83 
85  void openRoutes(RONet& net);
86 
88  void processRoutes(const SUMOTime start, const SUMOTime end, const SUMOTime increment,
89  RONet& net, const RORouterProvider& provider);
90 
91 protected:
113  bool openTypedRoutes(const std::string& optionName, RONet& net);
114 
115 
122  public:
125 
128 
137  void addEdgeWeight(const std::string& id,
138  SUMOReal val, SUMOReal beg, SUMOReal end) const;
139 
140  private:
143 
144  };
145 
146 
153  public:
156 
159 
168  void addEdgeWeight(const std::string& id,
169  SUMOReal val, SUMOReal beg, SUMOReal end) const;
170 
171  private:
174 
175  };
176 
177 
178 
179 protected:
180  void writeStats(const SUMOTime time, const SUMOTime start, const SUMOTime absNo, bool endGiven);
181 
182 
183 private:
186 
189 
191  const bool myLogSteps;
192 
195 
196 
197 private:
199  ROLoader(const ROLoader& src);
200 
202  ROLoader& operator=(const ROLoader& src);
203 };
204 
205 
206 #endif
207 
208 /****************************************************************************/
209 
EdgeFloatTimeLineRetriever & operator=(const EdgeFloatTimeLineRetriever &)
Interface for a class which obtains read weights for named edges.
long long int SUMOTime
Definition: SUMOTime.h:43
RONet & myNet
The network edges shall be obtained from.
Definition: ROLoader.h:173
void openRoutes(RONet &net)
Builds and opens all route loaders.
Definition: ROLoader.cpp:165
EdgeFloatTimeLineRetriever_EdgeWeight(RONet &net)
Constructor.
Definition: ROLoader.h:124
const bool myLogSteps
Information whether the routing steps should be logged.
Definition: ROLoader.h:191
void writeStats(const SUMOTime time, const SUMOTime start, const SUMOTime absNo, bool endGiven)
Definition: ROLoader.cpp:311
Interface for building instances of router-edges.
void addEdgeWeight(const std::string &id, SUMOReal val, SUMOReal beg, SUMOReal end) const
Adds an effort for a given edge and time period.
Definition: ROLoader.cpp:91
OptionsCont & myOptions
Options to use.
Definition: ROLoader.h:185
virtual ~ROLoader()
Destructor.
Definition: ROLoader.cpp:119
A vehicle as used by router.
Definition: ROVehicle.h:60
Obtains edge weights from a weights handler and stores them within the edges.
Definition: ROLoader.h:121
The data loader.
Definition: ROLoader.h:63
SUMORouteLoaderControl myLoaders
List of route loaders.
Definition: ROLoader.h:194
const bool myEmptyDestinationsAllowed
Information whether empty destinations are allowed.
Definition: ROLoader.h:188
bool openTypedRoutes(const std::string &optionName, RONet &net)
Opens route handler of the given type.
Definition: ROLoader.cpp:233
EdgeFloatTimeLineRetriever_EdgeTravelTime(RONet &net)
Constructor.
Definition: ROLoader.h:155
virtual void loadNet(RONet &toFill, ROAbstractEdgeBuilder &eb)
Loads the network.
Definition: ROLoader.cpp:124
The router&#39;s network representation.
Definition: RONet.h:76
Obtains edge travel times from a weights handler and stores them within the edges.
Definition: ROLoader.h:152
void processRoutes(const SUMOTime start, const SUMOTime end, const SUMOTime increment, RONet &net, const RORouterProvider &provider)
Loads routes from all previously build route loaders.
Definition: ROLoader.cpp:201
A storage for options typed value containers)
Definition: OptionsCont.h:99
#define SUMOReal
Definition: config.h:213
ROLoader(OptionsCont &oc, const bool emptyDestinationsAllowed, const bool logSteps)
Constructor.
Definition: ROLoader.cpp:111
bool loadWeights(RONet &net, const std::string &optionName, const std::string &measure, const bool useLanes, const bool boundariesOverride)
Loads the net weights.
Definition: ROLoader.cpp:268
RONet & myNet
The network edges shall be obtained from.
Definition: ROLoader.h:142