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
MSInsertionControl.h
Go to the documentation of this file.
1
/****************************************************************************/
9
// Inserts vehicles into the network when their departure time is reached
10
/****************************************************************************/
11
// SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/
12
// Copyright (C) 2001-2013 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 MSInsertionControl_h
23
#define MSInsertionControl_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 "
MSVehicleContainer.h
"
36
#include <vector>
37
#include <map>
38
#include <string>
39
40
41
// ===========================================================================
42
// class declarations
43
// ===========================================================================
44
class
MSVehicle
;
45
class
MSVehicleControl
;
46
47
48
// ===========================================================================
49
// class definitions
50
// ===========================================================================
66
class
MSInsertionControl
{
67
public
:
74
MSInsertionControl
(
MSVehicleControl
& vc,
SUMOTime
maxDepartDelay,
bool
checkEdgesOnce);
75
76
78
~MSInsertionControl
();
79
80
97
unsigned
int
emitVehicles
(
SUMOTime
time);
98
99
106
void
add
(
SUMOVehicle
* veh);
107
108
113
void
add
(
SUMOVehicleParameter
* pars);
114
115
123
unsigned
int
getWaitingVehicleNo
()
const
;
124
125
130
int
getPendingFlowCount
()
const
;
131
132
134
void
descheduleDeparture
(
SUMOVehicle
* veh);
135
136
137
private
:
152
unsigned
int
tryInsert
(
SUMOTime
time,
SUMOVehicle
* veh,
153
MSVehicleContainer::VehicleVector
& refusedEmits);
154
155
160
void
checkFlowWait
(
SUMOVehicle
* veh);
161
162
168
void
checkPrevious
(
SUMOTime
time);
169
170
177
unsigned
int
checkFlows
(
SUMOTime
time,
178
MSVehicleContainer::VehicleVector
& refusedEmits);
179
180
181
private
:
183
MSVehicleControl
&
myVehicleControl
;
184
186
MSVehicleContainer
myAllVeh
;
187
189
MSVehicleContainer::VehicleVector
myRefusedEmits1
,
myRefusedEmits2
;
190
192
std::set<SUMOVehicle*>
myAbortedEmits
;
193
197
struct
Flow
{
199
SUMOVehicleParameter
*
pars
;
201
bool
isVolatile
;
203
SUMOVehicle
*
vehicle
;
204
};
205
207
std::vector<Flow>
myFlows
;
208
210
SUMOTime
myMaxDepartDelay
;
211
213
bool
myCheckEdgesOnce
;
214
215
216
private
:
218
MSInsertionControl
(
const
MSInsertionControl
&);
219
221
MSInsertionControl
&
operator=
(
const
MSInsertionControl
&);
222
223
224
};
225
226
227
#endif
228
229
/****************************************************************************/
230
home
gladk
tmp
05
sumo-0.17.1~dfsg
src
microsim
MSInsertionControl.h
Generated on Sun Jun 16 2013 07:07:34 for SUMO - Simulation of Urban MObility by
1.8.1.2