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
RORouteHandler.h
Go to the documentation of this file.
1
/****************************************************************************/
9
// Parser and container for routes during their loading
10
/****************************************************************************/
11
// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/
12
// Copyright (C) 2001-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 RORouteHandler_h
23
#define RORouteHandler_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 <string>
36
#include <vector>
37
#include <
utils/common/RandomDistributor.h
>
38
#include <
utils/common/SUMOTime.h
>
39
#include <
utils/common/PedestrianRouter.h
>
40
#include <
utils/xml/SUMORouteHandler.h
>
41
42
43
// ===========================================================================
44
// class declarations
45
// ===========================================================================
46
class
OutputDevice_String
;
47
class
ROEdge
;
48
class
ROLane
;
49
class
RONet
;
50
class
RORoute
;
51
class
RORouteDef
;
52
53
54
// ===========================================================================
55
// class definitions
56
// ===========================================================================
65
class
RORouteHandler
:
public
SUMORouteHandler
{
66
public
:
68
RORouteHandler
(
RONet
& net,
const
std::string& file,
69
const
bool
tryRepair,
70
const
bool
emptyDestinationsAllowed,
71
const
bool
ignoreErrors);
72
74
virtual
~RORouteHandler
();
75
76
protected
:
78
79
87
virtual
void
myStartElement
(
int
element,
88
const
SUMOSAXAttributes
& attrs);
89
90
97
virtual
void
myEndElement
(
int
element);
99
100
107
void
parseFromViaTo
(std::string element,
108
const
SUMOSAXAttributes
& attrs);
109
110
112
void
openVehicleTypeDistribution
(
const
SUMOSAXAttributes
& attrs);
113
115
void
closeVehicleTypeDistribution
();
116
118
void
openRoute
(
const
SUMOSAXAttributes
& attrs);
119
125
void
closeRoute
(
const
bool
mayBeDisconnected =
false
);
126
128
void
openRouteDistribution
(
const
SUMOSAXAttributes
& attrs);
129
131
void
closeRouteDistribution
();
132
134
void
closeVehicle
();
135
137
void
closePerson
();
138
140
void
closeFlow
();
141
143
void
addStop
(
const
SUMOSAXAttributes
& attrs);
144
146
void
parseEdges
(
const
std::string& desc, std::vector<const ROEdge*>& into,
147
const
std::string& rid);
148
150
bool
routePedestrian
(
const
SUMOSAXAttributes
& attrs,
OutputDevice
& plan);
151
152
protected
:
154
typedef
PedestrianRouterDijkstra<ROEdge, ROLane, RONode>
ROPedestrianRouterDijkstra
;
155
ROPedestrianRouterDijkstra
*
myPedestrianRouter
;
156
158
RONet
&
myNet
;
159
161
std::vector<const ROEdge*>
myActiveRoute
;
162
164
OutputDevice_String
*
myActivePlan
;
165
167
int
myActivePlanSize
;
168
170
const
bool
myTryRepair
;
171
173
const
bool
myEmptyDestinationsAllowed
;
174
176
MsgHandler
*
const
myErrorOutput
;
177
179
RandomDistributor<SUMOVTypeParameter*>
*
myCurrentVTypeDistribution
;
180
182
std::string
myCurrentVTypeDistributionID
;
183
185
RORouteDef
*
myCurrentAlternatives
;
186
188
SUMOReal
myCurrentCosts
;
189
190
private
:
192
RORouteHandler
(
const
RORouteHandler
& s);
193
195
RORouteHandler
&
operator=
(
const
RORouteHandler
& s);
196
197
};
198
199
200
#endif
201
202
/****************************************************************************/
203
tmp
buildd
sumo-0.21.0+dfsg
src
router
RORouteHandler.h
Generated on Thu Nov 20 2014 19:49:59 for SUMO - Simulation of Urban MObility by
1.8.1.2