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
RORoute.h
Go to the documentation of this file.
1
/****************************************************************************/
8
// A complete router's route
9
/****************************************************************************/
10
// SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/
11
// Copyright (C) 2001-2012 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 RORoute_h
22
#define RORoute_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 <string>
35
#include <
utils/common/Named.h
>
36
#include <
utils/common/RGBColor.h
>
37
#include <
utils/common/SUMOAbstractRouter.h
>
38
39
40
// ===========================================================================
41
// class declarations
42
// ===========================================================================
43
class
ROEdge
;
44
class
ROVehicle
;
45
class
OutputDevice
;
46
47
48
// ===========================================================================
49
// class definitions
50
// ===========================================================================
58
class
RORoute
:
public
Named
{
59
public
:
70
RORoute
(
const
std::string&
id
,
SUMOReal
costs,
SUMOReal
prob,
71
const
std::vector<const ROEdge*>& route,
const
RGBColor
*
const
color);
72
73
78
RORoute
(
const
RORoute
& src);
79
80
82
~RORoute
();
83
84
90
void
add
(
ROEdge
* edge);
91
92
97
const
ROEdge
*
getFirst
()
const
{
98
return
myRoute
[0];
99
}
100
101
106
const
ROEdge
*
getLast
()
const
{
107
return
myRoute
.back();
108
}
109
110
116
SUMOReal
getCosts
()
const
{
117
return
myCosts
;
118
}
119
120
126
SUMOReal
getProbability
()
const
{
127
return
myProbability
;
128
}
129
130
135
void
setCosts
(
SUMOReal
costs);
136
137
142
void
setProbability
(
SUMOReal
prob);
143
144
149
unsigned
int
size
()
const
{
150
return
(
unsigned
int
)
myRoute
.size();
151
}
152
153
158
const
std::vector<const ROEdge*>&
getEdgeVector
()
const
{
159
return
myRoute
;
160
}
161
166
const
RGBColor
*
getColor
()
const
{
167
return
myColor
;
168
}
169
170
173
void
recheckForLoops
();
174
175
OutputDevice
&
176
writeXMLDefinition
(
OutputDevice
& dev,
const
ROVehicle
*
const
veh,
177
const
bool
withCosts,
const
bool
withExitTimes)
const
;
178
179
180
private
:
182
SUMOReal
myCosts
;
183
185
SUMOReal
myProbability
;
186
188
std::vector<const ROEdge*>
myRoute
;
189
191
const
RGBColor
*
myColor
;
192
193
private
:
195
RORoute
&
operator=
(
const
RORoute
& src);
196
197
};
198
199
200
#endif
201
202
/****************************************************************************/
203
build
buildd
sumo-0.16.0~dfsg
src
router
RORoute.h
Generated on Tue Apr 16 2013 01:32:20 for SUMO - Simulation of Urban MObility by
1.8.3.1