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-2017 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 
38 // ===========================================================================
39 // member method definitions
40 // ===========================================================================
41 /* -------------------------------------------------------------------------
42  * methods from MSLogicJunction
43  * ----------------------------------------------------------------------- */
44 MSLogicJunction::MSLogicJunction(const std::string& id,
45  SumoXMLNodeType type,
46  const Position& position,
47  const PositionVector& shape,
48  std::vector<MSLane*> incoming
49  , std::vector<MSLane*> internal
50  ):
51  MSJunction(id, type, position, shape),
52  myIncomingLanes(incoming),
53  myInternalLanes(internal) {
54 }
55 
56 
58 
59 
60 void
62  /*
63  if(getID()=="1565") {
64  int bla = 0;
65  }
66  // inform links where they have to report approaching vehicles to
67  int requestPos = 0;
68  std::vector<MSLane*>::iterator i;
69  // going through the incoming lanes...
70  for(i=myIncomingLanes.begin(); i!=myIncomingLanes.end(); ++i) {
71  const MSLinkCont &links = (*i)->getLinkCont();
72  // ... set information for every link
73  for(MSLinkCont::const_iterator j=links.begin(); j!=links.end(); j++) {
74  (*j)->setRequestInformation(&myRequest, requestPos,
75  &myRespond, requestPos/, clearInfo/);
76  requestPos++;
77  }
78  }
79  // set information for the internal lanes
80  requestPos = 0;
81  for(i=myInternalLanes.begin(); i!=myInternalLanes.end(); ++i) {
82  // ... set information about participation
83  static_cast<MSInternalLane*>(*i)->setParentJunctionInformation(
84  &myInnerState, requestPos++);
85  }
86  */
87 }
88 
89 
90 
91 /****************************************************************************/
92 
The base class for an intersection.
Definition: MSJunction.h:64
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 ...
MSLogicJunction(const std::string &id, SumoXMLNodeType type, const Position &position, const PositionVector &shape, std::vector< MSLane *> incoming, std::vector< MSLane *> internal)
Constructor.