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
/****************************************************************************/
9
// A device that performs vehicle rerouting based on current edge speeds
10
/****************************************************************************/
11
// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/
12
// Copyright (C) 2007-2014 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 MSDevice_Routing_h
23
#define MSDevice_Routing_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 <set>
36
#include <vector>
37
#include <map>
38
#include <
utils/common/SUMOTime.h
>
39
#include <
utils/common/WrappingCommand.h
>
40
#include <
utils/common/SUMOAbstractRouter.h
>
41
#include <
microsim/MSVehicle.h
>
42
#include "
MSDevice.h
"
43
44
45
// ===========================================================================
46
// class declarations
47
// ===========================================================================
48
class
MSLane
;
49
50
// ===========================================================================
51
// class definitions
52
// ===========================================================================
71
class
MSDevice_Routing
:
public
MSDevice
{
72
public
:
76
static
void
insertOptions
(
OptionsCont
& oc);
77
78
96
static
void
buildVehicleDevices
(
SUMOVehicle
& v, std::vector<MSDevice*>& into);
97
98
100
static
void
cleanup
();
101
102
103
104
public
:
106
~MSDevice_Routing
();
107
108
109
112
131
bool
notifyEnter
(
SUMOVehicle
& veh,
MSMoveReminder::Notification
reason);
133
134
135
private
:
143
MSDevice_Routing
(
SUMOVehicle
& holder,
const
std::string&
id
,
SUMOTime
period,
SUMOTime
preInsertionPeriod);
144
145
157
SUMOTime
preInsertionReroute
(
SUMOTime
currentTime);
158
159
174
SUMOTime
wrappedRerouteCommandExecute
(
SUMOTime
currentTime);
175
176
191
static
SUMOReal
getEffort
(
const
MSEdge
*
const
e,
const
SUMOVehicle
*
const
v,
SUMOReal
t);
192
193
194
197
209
static
SUMOTime
adaptEdgeEfforts
(
SUMOTime
currentTime);
211
212
213
215
static
SUMOAbstractRouter<MSEdge, SUMOVehicle>
&
getRouter
();
216
217
218
219
private
:
221
SUMOTime
myPeriod
;
222
224
SUMOTime
myPreInsertionPeriod
;
225
227
WrappingCommand< MSDevice_Routing >
*
myRerouteCommand
;
228
230
static
Command
*
myEdgeWeightSettingCommand
;
231
233
static
std::vector<SUMOReal>
myEdgeEfforts
;
234
236
static
SUMOReal
myAdaptationWeight
;
237
239
static
SUMOTime
myAdaptationInterval
;
240
242
static
bool
myWithTaz
;
243
245
static
std::map<std::pair<const MSEdge*, const MSEdge*>,
const
MSRoute
*>
myCachedRoutes
;
246
248
static
SUMOAbstractRouter<MSEdge, SUMOVehicle>
*
myRouter
;
249
250
251
private
:
253
MSDevice_Routing
(
const
MSDevice_Routing
&);
254
256
MSDevice_Routing
&
operator=
(
const
MSDevice_Routing
&);
257
258
259
};
260
261
262
#endif
263
264
/****************************************************************************/
265
tmp
buildd
sumo-0.21.0+dfsg
src
microsim
devices
MSDevice_Routing.h
Generated on Thu Nov 20 2014 19:49:55 for SUMO - Simulation of Urban MObility by
1.8.1.2