SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MSEdgeWeightsStorage.h
Go to the documentation of this file.
1 /****************************************************************************/
8 // A storage for edge travel times and efforts
9 /****************************************************************************/
10 // SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/
11 // Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors
12 /****************************************************************************/
13 //
14 // This file is part of SUMO.
15 // SUMO is free software: you can redistribute it and/or modify
16 // it under the terms of the GNU General Public License as published by
17 // the Free Software Foundation, either version 3 of the License, or
18 // (at your option) any later version.
19 //
20 /****************************************************************************/
21 #ifndef MSEdgeWeightsStorage_h
22 #define MSEdgeWeightsStorage_h
23 
24 
25 // ===========================================================================
26 // included modules
27 // ===========================================================================
28 #ifdef _MSC_VER
29 #include <windows_config.h>
30 #else
31 #include <config.h>
32 #endif
33 
34 #include <utils/common/SUMOTime.h>
36 
37 
38 // ===========================================================================
39 // class declarations
40 // ===========================================================================
41 class MSEdge;
42 class SUMOVehicle;
43 
44 
45 // ===========================================================================
46 // class definitions
47 // ===========================================================================
53 public:
56 
57 
60 
61 
69  bool retrieveExistingTravelTime(const MSEdge* const e, const SUMOVehicle* const v,
70  SUMOReal t, SUMOReal& value) const;
71 
72 
80  bool retrieveExistingEffort(const MSEdge* const e, const SUMOVehicle* const v,
81  SUMOReal t, SUMOReal& value) const;
82 
83 
90  void addTravelTime(const MSEdge* const e, SUMOReal begin, SUMOReal end, SUMOReal value);
91 
92 
99  void addEffort(const MSEdge* const e, SUMOReal begin, SUMOReal end, SUMOReal value);
100 
101 
105  void removeTravelTime(const MSEdge* const e);
106 
107 
111  void removeEffort(const MSEdge* const e);
112 
113 
118  bool knowsTravelTime(const MSEdge* const e) const;
119 
120 
125  bool knowsEffort(const MSEdge* const e) const;
126 
127 
128 private:
130  std::map<MSEdge*, ValueTimeLine<SUMOReal> > myTravelTimes;
131 
133  std::map<MSEdge*, ValueTimeLine<SUMOReal> > myEfforts;
134 
135 
136 private:
139 
142 
143 
144 };
145 
146 
147 #endif
148 
149 /****************************************************************************/
150