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
SUMOVehicle.h
Go to the documentation of this file.
1
/****************************************************************************/
9
// Abstract base class for vehicle representations
10
/****************************************************************************/
11
// SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/
12
// Copyright (C) 2001-2012 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 SUMOVehicle_h
23
#define SUMOVehicle_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 <vector>
36
#include <
utils/common/SUMOTime.h
>
37
#include <
utils/common/SUMOAbstractRouter.h
>
38
#include <
utils/common/SUMOVehicleParameter.h
>
39
40
41
// ===========================================================================
42
// class declarations
43
// ===========================================================================
44
class
MSVehicleType
;
45
class
MSRoute
;
46
class
MSEdge
;
47
class
MSLane
;
48
class
MSDevice
;
49
class
MSPerson
;
50
51
typedef
std::vector<const MSEdge*>
MSEdgeVector
;
52
53
54
// ===========================================================================
55
// class definitions
56
// ===========================================================================
61
class
SUMOVehicle
{
62
public
:
64
virtual
~SUMOVehicle
() {}
65
69
virtual
const
std::string&
getID
()
const
= 0;
70
74
virtual
SUMOReal
getPositionOnLane
()
const
= 0;
75
79
virtual
SUMOReal
getMaxSpeed
()
const
= 0;
80
84
virtual
SUMOReal
getSpeed
()
const
= 0;
85
89
virtual
const
MSVehicleType
&
getVehicleType
()
const
= 0;
90
92
virtual
const
MSRoute
&
getRoute
()
const
= 0;
93
101
virtual
const
MSEdge
*
succEdge
(
unsigned
int
nSuccs)
const
= 0;
102
107
virtual
SUMOReal
adaptMaxSpeed
(
SUMOReal
referenceSpeed) = 0;
108
110
virtual
bool
replaceRouteEdges
(
const
MSEdgeVector
& edges,
bool
onInit =
false
) = 0;
111
113
virtual
bool
replaceRoute
(
const
MSRoute
* route,
bool
onInit =
false
) = 0;
114
124
virtual
void
reroute
(
SUMOTime
t,
SUMOAbstractRouter<MSEdge, SUMOVehicle>
&router,
bool
withTaz =
false
) = 0;
125
129
virtual
SUMOReal
getPreDawdleAcceleration
()
const
= 0;
130
135
virtual
const
MSEdge
*
getEdge
()
const
= 0;
136
141
virtual
const
SUMOVehicleParameter
&
getParameter
()
const
= 0;
142
148
virtual
void
onDepart
() = 0;
149
153
virtual
bool
isOnRoad
()
const
= 0;
154
158
virtual
SUMOTime
getDeparture
()
const
= 0;
159
163
virtual
unsigned
int
getNumberReroutes
()
const
= 0;
164
168
virtual
const
std::vector<MSDevice*> &
getDevices
()
const
= 0;
169
176
virtual
void
addPerson
(
MSPerson
* person) = 0;
177
184
virtual
bool
addStop
(
const
SUMOVehicleParameter::Stop
& stopPar,
SUMOTime
untilOffset=0) = 0;
185
189
virtual
bool
isStopped
()
const
= 0;
190
191
192
};
193
194
195
#endif
196
197
/****************************************************************************/
build
buildd
sumo-0.15.0~dfsg
src
utils
common
SUMOVehicle.h
Generated on Wed Jul 18 2012 22:58:36 for SUMO - Simulation of Urban MObility by
1.8.1.1