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 /****************************************************************************/
9 // with one ore more logics.
10 /****************************************************************************/
11 // SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/
12 // Copyright (C) 2001-2012 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 #include "MSInternalLane.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  myInnerState(false) {}
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