From 70d750f2b0bb794bf21c0c2145cdd558505cca63 Mon Sep 17 00:00:00 2001 From: hiwis <hiwis@irmb.tu-bs.de> Date: Tue, 16 Apr 2019 14:46:28 +0200 Subject: [PATCH] fixed typo, changed some street coordinates --- src/Traffic/Junction/Junction.h | 2 +- src/Traffic/Junction/JunctionRandom.cpp | 2 +- src/Traffic/Junction/JunctionRandom.h | 2 +- src/Traffic/TrafficMovementFactory.cpp | 2 +- targets/apps/LBM/Basel/resources/Streets.txt | 8 ++++---- targets/apps/LBM/TrafficTest/Traffic_Main.cpp | 9 +++++---- 6 files changed, 13 insertions(+), 12 deletions(-) diff --git a/src/Traffic/Junction/Junction.h b/src/Traffic/Junction/Junction.h index 20750f4e0..9f83a977b 100644 --- a/src/Traffic/Junction/Junction.h +++ b/src/Traffic/Junction/Junction.h @@ -13,7 +13,7 @@ class VF_PUBLIC Junction public: virtual void checkOutCellIndices(const uint roadLength) const = 0; - virtual void setCellIndecesForNoUTurn(std::vector<int> carCanNotEnterThisOutCell) = 0; + virtual void setCellIndicesForNoUTurn(std::vector<int> carCanNotEnterThisOutCell) = 0; virtual bool acceptsCar(uint cellIndex) = 0; //determines if a car can enter the junction virtual void registerCar(uint cellIndex, uint numberOfCellsAlreadyMoved, uint speed, uint oldSpeed) = 0; //registers all cars entering the junction diff --git a/src/Traffic/Junction/JunctionRandom.cpp b/src/Traffic/Junction/JunctionRandom.cpp index 26a3e6dd0..7e6815a2a 100644 --- a/src/Traffic/Junction/JunctionRandom.cpp +++ b/src/Traffic/Junction/JunctionRandom.cpp @@ -35,7 +35,7 @@ JunctionRandom::JunctionRandom(const std::vector<uint> &inCellIndices, const std } -void JunctionRandom::setCellIndecesForNoUTurn(std::vector<int> carCanNotEnterThisOutCell) +void JunctionRandom::setCellIndicesForNoUTurn(std::vector<int> carCanNotEnterThisOutCell) { try { diff --git a/src/Traffic/Junction/JunctionRandom.h b/src/Traffic/Junction/JunctionRandom.h index e14f3d68d..ff41237fb 100644 --- a/src/Traffic/Junction/JunctionRandom.h +++ b/src/Traffic/Junction/JunctionRandom.h @@ -20,7 +20,7 @@ public: JunctionRandom(const std::vector<uint> &inCellIndices, const std::vector<uint> &outCellIndices, uint trafficLightSwitchTime = 0); ~JunctionRandom() {}; - virtual void setCellIndecesForNoUTurn(std::vector<int> carCanNotEnterThisOutCell); + virtual void setCellIndicesForNoUTurn(std::vector<int> carCanNotEnterThisOutCell); virtual bool acceptsCar(uint cellIndex); //determines if a car can enter the junction virtual void registerCar(uint cellIndex, uint numberOfCellsAlreadyMoved, uint speed, uint oldSpeed); //registers all cars entering the junction diff --git a/src/Traffic/TrafficMovementFactory.cpp b/src/Traffic/TrafficMovementFactory.cpp index e974a4014..4d5774323 100644 --- a/src/Traffic/TrafficMovementFactory.cpp +++ b/src/Traffic/TrafficMovementFactory.cpp @@ -111,7 +111,7 @@ void TrafficMovementFactory::initTrafficMovement(std::string path, bool useGPU, std::vector <std::unique_ptr<Junction> > junctions; for (uint i = 0; i < junctionReader.junctions.size(); i++) { junctions.push_back(std::make_unique <JunctionRandom>(junctionReader.junctions[i].inCells, junctionReader.junctions[i].outCells, junctionReader.junctions[i].trafficLightSwitchTime)); - junctions[i]->setCellIndecesForNoUTurn(junctionReader.junctions[i].carCanNotEnterThisOutCell); + junctions[i]->setCellIndicesForNoUTurn(junctionReader.junctions[i].carCanNotEnterThisOutCell); } roadNetwork->setJunctions(move(junctions)); diff --git a/targets/apps/LBM/Basel/resources/Streets.txt b/targets/apps/LBM/Basel/resources/Streets.txt index d982a2b6e..f82c1e9ae 100644 --- a/targets/apps/LBM/Basel/resources/Streets.txt +++ b/targets/apps/LBM/Basel/resources/Streets.txt @@ -101,9 +101,9 @@ 256 -194 244 -192 1 227 -256 243 -196 1 238 -195 222 -256 1 - 244 -192 251 -93 1 + 244 -192 250 -93 1 244 -92 239 -191 1 - 251 -88 223 0 1 + 250 -88 223 0 1 218 0 244 -87 1 244 -87 177 -79 1 177 -79 73 -68 1 @@ -117,8 +117,8 @@ 68 -67 -105 -48 1 -241 -188 -256 -177 1 -256 -184 -246 -191 1 - 251 -93 256 -94 1 - 256 -89 251 -88 1 + 250 -93 256 -94 1 + 256 -89 250 -88 1 diff --git a/targets/apps/LBM/TrafficTest/Traffic_Main.cpp b/targets/apps/LBM/TrafficTest/Traffic_Main.cpp index 68171c9d5..6ef651e94 100644 --- a/targets/apps/LBM/TrafficTest/Traffic_Main.cpp +++ b/targets/apps/LBM/TrafficTest/Traffic_Main.cpp @@ -14,9 +14,9 @@ int main() //////Basel { - uint numberOfTimesteps = 1000; - bool useGPU = false; - + uint numberOfTimesteps = 100000; + bool useGPU = true; + //Stephans Logger logging::Logger::addStream(&std::cout); @@ -40,9 +40,10 @@ int main() //loop through timestep for (uint step = 1; step <= numberOfTimesteps; step++) { factory->calculateTimestep(step); - factory->writeTimestep(step); + //factory->writeReducedTimestep(step); } + //end simulation duration = (std::clock() - start) / (double)CLOCKS_PER_SEC; -- GitLab