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
MSVehicleTransfer.h
Go to the documentation of this file.
1
/****************************************************************************/
9
// A mover of vehicles that got stucked due to grid locks
10
// This class also serves as container for parking vehicles
11
/****************************************************************************/
12
// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/
13
// Copyright (C) 2003-2014 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 MSVehicleTransfer_h
24
#define MSVehicleTransfer_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
#include <map>
39
#include <set>
40
41
42
// ===========================================================================
43
// class declarations
44
// ===========================================================================
45
class
MSVehicle
;
46
class
MSEdge
;
47
class
MSLane
;
48
49
50
// ===========================================================================
51
// class definitions
52
// ===========================================================================
68
class
MSVehicleTransfer
{
69
public
:
71
virtual
~MSVehicleTransfer
();
72
73
82
void
add
(
const
SUMOTime
t,
MSVehicle
* veh);
83
84
92
void
remove
(
MSVehicle
* veh);
93
94
103
void
checkInsertions
(
SUMOTime
time);
104
105
110
bool
hasPending
()
const
;
111
113
const
std::set<const MSVehicle*>&
getParkingVehicles
(
const
MSLane
* lane)
const
;
114
118
static
MSVehicleTransfer
*
getInstance
();
119
121
static
const
SUMOReal
TeleportMinSpeed
;
122
123
private
:
125
MSVehicleTransfer
();
126
127
128
protected
:
133
struct
VehicleInformation
{
135
MSVehicle
*
myVeh
;
137
SUMOTime
myProceedTime
;
139
bool
myParking
;
140
146
VehicleInformation
(
MSVehicle
* veh,
SUMOTime
proceedTime,
bool
parking)
147
:
myVeh
(veh),
myProceedTime
(proceedTime),
myParking
(parking) { }
148
149
};
150
151
153
typedef
std::vector<VehicleInformation>
VehicleInfVector
;
154
156
VehicleInfVector
myVehicles
;
157
159
typedef
std::map<const MSLane*, std::set<const MSVehicle*> >
ParkingVehicles
;
160
ParkingVehicles
myParkingVehicles
;
161
163
static
MSVehicleTransfer
*
myInstance
;
164
166
static
const
std::set<const MSVehicle*>
myEmptyVehicleSet
;
167
168
};
169
170
171
#endif
172
173
/****************************************************************************/
174
tmp
buildd
sumo-0.21.0+dfsg
src
microsim
MSVehicleTransfer.h
Generated on Thu Nov 20 2014 19:49:56 for SUMO - Simulation of Urban MObility by
1.8.1.2