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-sim.org/
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
138
void
clearPendingVehicles
(std::string& route);
139
140
141
private
:
156
unsigned
int
tryInsert
(
SUMOTime
time,
SUMOVehicle
* veh,
157
MSVehicleContainer::VehicleVector
& refusedEmits);
158
159
164
void
checkFlowWait
(
SUMOVehicle
* veh);
165
166
172
void
checkPrevious
(
SUMOTime
time);
173
174
181
unsigned
int
checkFlows
(
SUMOTime
time,
182
MSVehicleContainer::VehicleVector
& refusedEmits);
183
184
185
private
:
187
MSVehicleControl
&
myVehicleControl
;
188
190
MSVehicleContainer
myAllVeh
;
191
193
MSVehicleContainer::VehicleVector
myRefusedEmits1
,
myRefusedEmits2
;
194
196
std::set<SUMOVehicle*>
myAbortedEmits
;
197
201
struct
Flow
{
203
SUMOVehicleParameter
*
pars
;
205
bool
isVolatile
;
207
SUMOVehicle
*
vehicle
;
208
};
209
211
std::vector<Flow>
myFlows
;
212
214
SUMOTime
myMaxDepartDelay
;
215
217
bool
myCheckEdgesOnce
;
218
219
220
private
:
222
MSInsertionControl
(
const
MSInsertionControl
&);
223
225
MSInsertionControl
&
operator=
(
const
MSInsertionControl
&);
226
227
228
};
229
230
231
#endif
232
233
/****************************************************************************/
234
home
delphi
sumo
src
microsim
MSInsertionControl.h
Generated by
1.8.2