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
NLTriggerBuilder.h
Go to the documentation of this file.
1
/****************************************************************************/
10
// Builds trigger objects for microsim
11
/****************************************************************************/
12
// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/
13
// Copyright (C) 2001-2013 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 NLTriggerBuilder_h
24
#define NLTriggerBuilder_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 <string>
37
#include <vector>
38
39
40
// ===========================================================================
41
// class declarations
42
// ===========================================================================
43
class
MSTrigger
;
44
class
MSNet
;
45
class
MSLaneSpeedTrigger
;
46
class
NLHandler
;
47
class
MSTriggeredRerouter
;
48
class
MSLane
;
49
class
MSEdge
;
50
class
MSBusStop
;
51
class
MSCalibrator
;
52
class
MSRouteProbe
;
53
54
#ifdef HAVE_INTERNAL
55
class
METriggeredCalibrator;
56
#endif
57
58
59
// ===========================================================================
60
// class definitions
61
// ===========================================================================
70
class
NLTriggerBuilder
{
71
public
:
73
NLTriggerBuilder
();
74
75
77
virtual
~NLTriggerBuilder
();
78
79
84
void
setHandler
(
NLHandler
* handler);
85
86
96
void
buildVaporizer
(
const
SUMOSAXAttributes
& attrs);
97
98
103
104
119
void
parseAndBuildLaneSpeedTrigger
(
MSNet
& net,
const
SUMOSAXAttributes
& attrs,
120
const
std::string& base);
121
122
130
void
parseAndBuildRerouter
(
MSNet
& net,
const
SUMOSAXAttributes
& attrs,
131
const
std::string& base);
132
133
140
void
parseAndBuildBusStop
(
MSNet
& net,
const
SUMOSAXAttributes
& attrs);
141
142
150
void
parseAndBuildCalibrator
(
MSNet
& net,
const
SUMOSAXAttributes
& attrs,
151
const
std::string& base);
153
154
155
protected
:
164
165
177
virtual
MSLaneSpeedTrigger
*
buildLaneSpeedTrigger
(
MSNet
& net,
178
const
std::string&
id
,
const
std::vector<MSLane*>& destLanes,
179
const
std::string& file);
180
181
194
virtual
void
buildBusStop
(
MSNet
& net,
195
const
std::string&
id
,
const
std::vector<std::string>& lines,
196
MSLane
* lane,
SUMOReal
frompos,
SUMOReal
topos);
197
198
210
virtual
MSCalibrator
*
buildCalibrator
(
MSNet
& net,
211
const
std::string&
id
,
MSEdge
* edge,
SUMOReal
pos,
212
const
std::string& file,
const
std::string& outfile,
213
const
SUMOTime
freq,
MSRouteProbe
* probe);
214
#ifdef HAVE_INTERNAL
215
226
virtual
METriggeredCalibrator* buildMECalibrator(
MSNet
& net,
227
const
std::string&
id
,
const
MSEdge
* edge,
SUMOReal
pos,
228
const
std::string& file,
const
std::string& outfile,
229
const
SUMOTime
freq,
MSRouteProbe
* probe);
230
#endif
231
232
243
virtual
MSTriggeredRerouter
*
buildRerouter
(
MSNet
& net,
244
const
std::string&
id
, std::vector<MSEdge*>& edges,
245
SUMOReal
prob,
const
std::string& file,
bool
off);
247
248
249
protected
:
252
264
std::string
getFileName
(
const
SUMOSAXAttributes
& attrs,
265
const
std::string& base,
266
const
bool
allowEmpty =
false
);
267
268
280
MSLane
*
getLane
(
const
SUMOSAXAttributes
& attrs,
281
const
std::string& tt,
const
std::string& tid);
282
283
297
SUMOReal
getPosition
(
const
SUMOSAXAttributes
& attrs,
298
MSLane
* lane,
const
std::string& tt,
const
std::string& tid);
300
301
302
protected
:
304
NLHandler
*
myHandler
;
305
306
307
};
308
309
310
#endif
311
312
/****************************************************************************/
313
home
delphi
sumo
src
netload
NLTriggerBuilder.h
Generated by
1.8.2