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
MSLogicJunction.cpp
Go to the documentation of this file.
1
/****************************************************************************/
9
// with one ore more logics.
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
23
// ===========================================================================
24
// included modules
25
// ===========================================================================
26
#ifdef _MSC_VER
27
#include <
windows_config.h
>
28
#else
29
#include <
config.h
>
30
#endif
31
32
#include "
MSLinkCont.h
"
33
#include "
MSLogicJunction.h
"
34
#include "
MSLane.h
"
35
36
#ifdef CHECK_MEMORY_LEAKS
37
#include <
foreign/nvwa/debug_new.h
>
38
#endif // CHECK_MEMORY_LEAKS
39
40
41
// ===========================================================================
42
// member method definitions
43
// ===========================================================================
44
/* -------------------------------------------------------------------------
45
* methods from MSLogicJunction
46
* ----------------------------------------------------------------------- */
47
MSLogicJunction::MSLogicJunction
(
const
std::string&
id
,
48
const
Position
& position,
49
const
PositionVector
& shape,
50
std::vector<MSLane*> incoming
51
#ifdef
HAVE_INTERNAL_LANES
52
, std::vector<MSLane*>
internal
53
#endif
54
):
55
MSJunction
(id, position, shape),
56
myIncomingLanes(incoming)
57
#ifdef HAVE_INTERNAL_LANES
58
, myInternalLanes(internal)
59
#endif
60
{}
61
62
63
MSLogicJunction::~MSLogicJunction
() {}
64
65
66
void
67
MSLogicJunction::postloadInit
() {
68
/*
69
if(getID()=="1565") {
70
int bla = 0;
71
}
72
// inform links where they have to report approaching vehicles to
73
size_t requestPos = 0;
74
std::vector<MSLane*>::iterator i;
75
// going through the incoming lanes...
76
for(i=myIncomingLanes.begin(); i!=myIncomingLanes.end(); ++i) {
77
const MSLinkCont &links = (*i)->getLinkCont();
78
// ... set information for every link
79
for(MSLinkCont::const_iterator j=links.begin(); j!=links.end(); j++) {
80
(*j)->setRequestInformation(&myRequest, requestPos,
81
&myRespond, requestPos/, clearInfo/);
82
requestPos++;
83
}
84
}
85
#ifdef HAVE_INTERNAL_LANES
86
// set information for the internal lanes
87
requestPos = 0;
88
for(i=myInternalLanes.begin(); i!=myInternalLanes.end(); ++i) {
89
// ... set information about participation
90
static_cast<MSInternalLane*>(*i)->setParentJunctionInformation(
91
&myInnerState, requestPos++);
92
}
93
#endif
94
*/
95
}
96
97
98
99
/****************************************************************************/
100
build
buildd
sumo-0.18~dfsg
src
microsim
MSLogicJunction.cpp
Generated on Wed Oct 23 2013 01:15:09 for SUMO - Simulation of Urban MObility by
1.8.4