SUMO - Simulation of Urban MObility
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.dlr.de/
13 // Copyright (C) 2001-2016 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  SumoXMLNodeType type,
50  const Position& position,
51  const PositionVector& shape,
52  std::vector<MSLane*> incoming
54  , std::vector<MSLane*> internal
55 #endif
56  ):
57  MSJunction(id, type, position, shape),
58  myIncomingLanes(incoming)
59 #ifdef HAVE_INTERNAL_LANES
60  , myInternalLanes(internal)
61 #endif
62 {}
63 
64 
66 
67 
68 void
70  /*
71  if(getID()=="1565") {
72  int bla = 0;
73  }
74  // inform links where they have to report approaching vehicles to
75  int requestPos = 0;
76  std::vector<MSLane*>::iterator i;
77  // going through the incoming lanes...
78  for(i=myIncomingLanes.begin(); i!=myIncomingLanes.end(); ++i) {
79  const MSLinkCont &links = (*i)->getLinkCont();
80  // ... set information for every link
81  for(MSLinkCont::const_iterator j=links.begin(); j!=links.end(); j++) {
82  (*j)->setRequestInformation(&myRequest, requestPos,
83  &myRespond, requestPos/, clearInfo/);
84  requestPos++;
85  }
86  }
87  #ifdef HAVE_INTERNAL_LANES
88  // set information for the internal lanes
89  requestPos = 0;
90  for(i=myInternalLanes.begin(); i!=myInternalLanes.end(); ++i) {
91  // ... set information about participation
92  static_cast<MSInternalLane*>(*i)->setParentJunctionInformation(
93  &myInnerState, requestPos++);
94  }
95  #endif
96  */
97 }
98 
99 
100 
101 /****************************************************************************/
102 
The base class for an intersection.
Definition: MSJunction.h:64
MSLogicJunction(const std::string &id, SumoXMLNodeType type, const Position &position, const PositionVector &shape, std::vector< MSLane *> incoming)
Constructor.
A point in 2D or 3D with translation and scaling methods.
Definition: Position.h:46
A list of positions.
virtual ~MSLogicJunction()
Destructor.
virtual void postloadInit()
initialises the junction after the whole net has been loaded
SumoXMLNodeType
Numbers representing special SUMO-XML-attribute values for representing node- (junction-) types used ...
#define HAVE_INTERNAL_LANES
Definition: config.h:56