MSInternalLane.cpp
Go to the documentation of this file.00001
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifdef _MSC_VER
00024 #include <windows_config.h>
00025 #else
00026 #include <config.h>
00027 #endif
00028
00029 #include <utils/common/UtilExceptions.h>
00030 #include <utils/common/StdDefs.h>
00031 #include "MSEdge.h"
00032 #include "MSJunction.h"
00033 #include "MSLogicJunction.h"
00034 #include "MSLink.h"
00035 #include "MSInternalLane.h"
00036 #include <cmath>
00037 #include <bitset>
00038 #include <iostream>
00039 #include <cassert>
00040 #include <functional>
00041 #include <algorithm>
00042 #include <iterator>
00043 #include <exception>
00044 #include <climits>
00045 #include <utils/common/MsgHandler.h>
00046 #include <utils/common/ToString.h>
00047 #include <utils/options/OptionsCont.h>
00048
00049 #ifdef CHECK_MEMORY_LEAKS
00050 #include <foreign/nvwa/debug_new.h>
00051 #endif // CHECK_MEMORY_LEAKS
00052
00053
00054
00055
00056
00057 MSInternalLane::MSInternalLane(const std::string &id, SUMOReal maxSpeed,
00058 SUMOReal length, MSEdge * const edge, unsigned int numericalID,
00059 const Position2DVector &shape,
00060 const std::vector<SUMOVehicleClass> &allowed,
00061 const std::vector<SUMOVehicleClass> &disallowed) throw()
00062 : MSLane(id, maxSpeed, length, edge, numericalID, shape, allowed, disallowed),
00063 myFoesIndex(-1) {}
00064
00065
00066 MSInternalLane::~MSInternalLane() throw() {}
00067
00068
00069 void
00070 MSInternalLane::setParentJunctionInformation(MSLogicJunction::InnerState * const foescont,
00071 unsigned int foesIdx) throw() {
00072 myFoesCont = foescont;
00073 myFoesIndex = (int) foesIdx;
00074 }
00075
00076
00077 void
00078 MSInternalLane::setPassPosition(SUMOReal passPos) throw() {
00079 myPassPosition = passPos;
00080 }
00081
00082
00083 bool
00084 MSInternalLane::moveCritical(SUMOTime t) {
00085 assert(myVehicles.size()>0);
00086 if (myFoesIndex>=0) {
00087 (*myFoesCont)[myFoesIndex] = true;
00088 }
00089 return MSLane::moveCritical(t);
00090 }
00091
00092
00093
00094