Skip to content

Commit

Permalink
fixed precision for runtime output
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickbr committed Sep 6, 2023
1 parent 57ee836 commit 194f37f
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/pfaedle/router/ShapeBuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include <thread>
#include <unordered_map>
#include <utility>

#include "ad/cppgtfs/gtfs/Feed.h"
#include "pfaedle/Def.h"
#include "pfaedle/gtfs/Feed.h"
Expand Down Expand Up @@ -317,7 +318,8 @@ std::pair<std::vector<LINE>, Stats> ShapeBuilder::shapeL(Trip* trip) {
stats.totNumTrips = 1;
stats.dijkstraIters = EDijkstra::ITERS;
std::map<uint32_t, double> colors;
LOG(INFO) << "Matched 1 trip in " << stats.solveTime << " ms.";
LOG(INFO) << "Matched 1 trip in " << std::fixed << std::setprecision(2)
<< stats.solveTime << " ms.";
// print to line
return {getGeom(hops, getRAttrs(trip), &colors), stats};
} catch (const std::runtime_error& e) {
Expand Down Expand Up @@ -442,8 +444,8 @@ Stats ShapeBuilder::shapeify(pfaedle::netgraph::Graph* outNg) {

stats.solveTime = TOOK(tStart, TIME());

LOG(INFO) << "Matched " << stats.totNumTrips << " trips in "
<< stats.solveTime << " ms.";
LOG(INFO) << "Matched " << stats.totNumTrips << " trips in " << std::fixed
<< std::setprecision(2) << stats.solveTime << " ms.";

// merge colors
for (auto& cols : colors) {
Expand Down Expand Up @@ -776,7 +778,6 @@ EdgeCandMap ShapeBuilder::getECM(
double avgChildT = 0;
if (chldTrNd.trips) avgChildT = chldTrNd.accTime / chldTrNd.trips;


double timeDiff = avgChildT - avgT;
if (timeDiff < 0) timeDiff = 0;

Expand Down

0 comments on commit 194f37f

Please sign in to comment.