diff --git a/src/Traffic/Junction/Junction.h b/src/Traffic/Junction/Junction.h index 20750f4e04c0af77258940a3dafa12bed8da9ea6..9f83a977bce3517e7343711263f8e22e969c2b5b 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 26a3e6dd053df9fa1c437f7017b6b0024108ca9c..7e6815a2a19193b6149e31e49e268a1606c7a3a7 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 e14f3d68d6723b546ffec12cf760f9a0eb284c09..ff41237fbc74813d9d98471512d1c7f2c4675b8e 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 e974a40147f29637fd79635aa43faf4914405c77..4d5774323c047bcbf35d021cb25af66414807210 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 d982a2b6e244ac011891ec2d9b2b73bc601c066e..f82c1e9ae0d990128a99d2c66d3eb08e94703296 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 68171c9d5076e59f268f2a251397db357e45262d..6ef651e949102a8b3fd2c9e42cc94561e90ff20a 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;