SUMO - Simulation of Urban MObility
Main Page
Related Pages
Modules
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
MSDevice_Routing.h
Go to the documentation of this file.
1
/****************************************************************************/
8
// A device that performs vehicle rerouting based on current edge speeds
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 MSDevice_Routing_h
22
#define MSDevice_Routing_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 <set>
35
#include <vector>
36
#include <map>
37
#include <
utils/common/SUMOTime.h
>
38
#include <
utils/common/WrappingCommand.h
>
39
#include <
utils/common/SUMOAbstractRouter.h
>
40
#include <
microsim/MSVehicle.h
>
41
#include "
MSDevice.h
"
42
43
44
// ===========================================================================
45
// class declarations
46
// ===========================================================================
47
class
MSLane
;
48
49
// ===========================================================================
50
// class definitions
51
// ===========================================================================
70
class
MSDevice_Routing
:
public
MSDevice
{
71
public
:
74
static
void
insertOptions
();
75
76
94
static
void
buildVehicleDevices
(
SUMOVehicle
& v, std::vector<MSDevice*>& into);
95
97
static
void
cleanup
();
98
99
public
:
102
121
bool
notifyEnter
(
SUMOVehicle
& veh,
MSMoveReminder::Notification
reason);
123
124
126
~MSDevice_Routing
();
127
128
129
private
:
137
MSDevice_Routing
(
SUMOVehicle
& holder,
const
std::string&
id
,
SUMOTime
period,
138
SUMOTime
preInsertionPeriod);
139
140
152
SUMOTime
preInsertionReroute
(
SUMOTime
currentTime);
153
154
169
SUMOTime
wrappedRerouteCommandExecute
(
SUMOTime
currentTime);
170
171
186
static
SUMOReal
getEffort
(
const
MSEdge
*
const
e,
const
SUMOVehicle
*
const
v,
SUMOReal
t);
187
188
191
203
static
SUMOTime
adaptEdgeEfforts
(
SUMOTime
currentTime);
205
206
208
static
SUMOAbstractRouter<MSEdge, SUMOVehicle>
&
getRouter
();
209
210
private
:
212
SUMOTime
myPeriod
;
213
215
SUMOTime
myPreInsertionPeriod
;
216
218
WrappingCommand< MSDevice_Routing >
*
myRerouteCommand
;
219
221
static
Command
*
myEdgeWeightSettingCommand
;
222
224
static
std::map<const MSEdge*, SUMOReal>
myEdgeEfforts
;
225
227
static
SUMOReal
myAdaptationWeight
;
228
230
static
SUMOTime
myAdaptationInterval
;
231
233
static
bool
myWithTaz
;
234
236
static
std::map<std::pair<const MSEdge*, const MSEdge*>,
const
MSRoute
*>
myCachedRoutes
;
237
239
static
SUMOAbstractRouter<MSEdge, SUMOVehicle>
*
myRouter
;
240
242
static
std::set<std::string>
myExplicitIDs
;
243
244
245
private
:
247
MSDevice_Routing
(
const
MSDevice_Routing
&);
248
250
MSDevice_Routing
&
operator=
(
const
MSDevice_Routing
&);
251
252
253
};
254
255
256
#endif
257
258
/****************************************************************************/
259
build
buildd
sumo-0.17.1~dfsg
src
microsim
devices
MSDevice_Routing.h
Generated on Sun Jun 16 2013 17:30:16 for SUMO - Simulation of Urban MObility by
1.8.3.1