SUMO - Simulation of Urban MObility
MSNoLogicJunction.cpp
Go to the documentation of this file.
1 /****************************************************************************/
9 // -------------------
10 /****************************************************************************/
11 // SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/
12 // Copyright (C) 2002-2017 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 // ===========================================================================
25 // included modules
26 // ===========================================================================
27 #ifdef _MSC_VER
28 #include <windows_config.h>
29 #else
30 #include <config.h>
31 #endif
32 
33 #include "MSNoLogicJunction.h"
34 #include "MSLane.h"
35 #include <algorithm>
36 #include <cassert>
37 #include <cmath>
38 
39 
40 // ===========================================================================
41 // static member definitions
42 // ===========================================================================
43 
44 // ===========================================================================
45 // method definitions
46 // ===========================================================================
48  SumoXMLNodeType type,
49  const Position& position,
50  const PositionVector& shape,
51  std::vector<MSLane*> incoming, std::vector<MSLane*> internal):
52  MSJunction(id, type, position, shape),
53  myIncomingLanes(incoming),
54  myInternalLanes(internal) {
55 }
56 
57 
59 
60 
61 void
63  std::vector<MSLane*>::iterator i;
64  // inform links where they have to report approaching vehicles to
65  for (i = myIncomingLanes.begin(); i != myIncomingLanes.end(); ++i) {
66  const MSLinkCont& links = (*i)->getLinkCont();
67  for (MSLinkCont::const_iterator j = links.begin(); j != links.end(); j++) {
68  (*j)->setRequestInformation(-1, false, false, std::vector<MSLink*>(), std::vector<MSLane*>());
69  }
70  }
71 }
72 
73 
74 
75 /****************************************************************************/
76 
std::vector< MSLane * > myIncomingLanes
The base class for an intersection.
Definition: MSJunction.h:64
virtual ~MSNoLogicJunction()
Destructor.
MSNoLogicJunction(const std::string &id, SumoXMLNodeType type, const Position &position, const PositionVector &shape, std::vector< MSLane *> incoming, std::vector< MSLane *> internal)
Constructor.
A point in 2D or 3D with translation and scaling methods.
Definition: Position.h:46
A list of positions.
SumoXMLNodeType
Numbers representing special SUMO-XML-attribute values for representing node- (junction-) types used ...