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