SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MSInternalLane.cpp
Go to the documentation of this file.
1 /****************************************************************************/
9 // Representation of a lane over a junction
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 
33 #include <utils/common/StdDefs.h>
34 #include "MSEdge.h"
35 #include "MSJunction.h"
36 #include "MSLogicJunction.h"
37 #include "MSLink.h"
38 #include "MSInternalLane.h"
39 #include <cmath>
40 #include <bitset>
41 #include <iostream>
42 #include <cassert>
43 #include <functional>
44 #include <algorithm>
45 #include <iterator>
46 #include <exception>
47 #include <climits>
49 #include <utils/common/ToString.h>
51 
52 #ifdef CHECK_MEMORY_LEAKS
53 #include <foreign/nvwa/debug_new.h>
54 #endif // CHECK_MEMORY_LEAKS
55 
56 
57 // ===========================================================================
58 // member method definitions
59 // ===========================================================================
60 MSInternalLane::MSInternalLane(const std::string& id, SUMOReal maxSpeed,
61  SUMOReal length, MSEdge* const edge, unsigned int numericalID,
62  const PositionVector& shape, SUMOReal width,
63  SVCPermissions permissions):
64  MSLane(id, maxSpeed, length, edge, numericalID, shape, width, permissions),
65  myFoesIndex(-1)
66 {}
67 
68 
70 
71 
72 void
74  unsigned int foesIdx) {
75  myFoesCont = foescont;
76  myFoesIndex = (int) foesIdx;
77 }
78 
79 
80 void
82  myPassPosition = passPos;
83 }
84 
85 
86 bool
88  assert(myVehicles.size() > 0);
89  if (myFoesIndex >= 0) {
90  (*myFoesCont)[myFoesIndex] = true;
91  }
92  return MSLane::moveCritical(t);
93 }
94 
95 
96 /****************************************************************************/
97