fixed precision for runtime output
This commit is contained in:
parent
57ee83644e
commit
194f37fcd5
1 changed files with 5 additions and 4 deletions
|
@ -12,6 +12,7 @@
|
||||||
#include <thread>
|
#include <thread>
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
||||||
#include "ad/cppgtfs/gtfs/Feed.h"
|
#include "ad/cppgtfs/gtfs/Feed.h"
|
||||||
#include "pfaedle/Def.h"
|
#include "pfaedle/Def.h"
|
||||||
#include "pfaedle/gtfs/Feed.h"
|
#include "pfaedle/gtfs/Feed.h"
|
||||||
|
@ -317,7 +318,8 @@ std::pair<std::vector<LINE>, Stats> ShapeBuilder::shapeL(Trip* trip) {
|
||||||
stats.totNumTrips = 1;
|
stats.totNumTrips = 1;
|
||||||
stats.dijkstraIters = EDijkstra::ITERS;
|
stats.dijkstraIters = EDijkstra::ITERS;
|
||||||
std::map<uint32_t, double> colors;
|
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
|
// print to line
|
||||||
return {getGeom(hops, getRAttrs(trip), &colors), stats};
|
return {getGeom(hops, getRAttrs(trip), &colors), stats};
|
||||||
} catch (const std::runtime_error& e) {
|
} catch (const std::runtime_error& e) {
|
||||||
|
@ -442,8 +444,8 @@ Stats ShapeBuilder::shapeify(pfaedle::netgraph::Graph* outNg) {
|
||||||
|
|
||||||
stats.solveTime = TOOK(tStart, TIME());
|
stats.solveTime = TOOK(tStart, TIME());
|
||||||
|
|
||||||
LOG(INFO) << "Matched " << stats.totNumTrips << " trips in "
|
LOG(INFO) << "Matched " << stats.totNumTrips << " trips in " << std::fixed
|
||||||
<< stats.solveTime << " ms.";
|
<< std::setprecision(2) << stats.solveTime << " ms.";
|
||||||
|
|
||||||
// merge colors
|
// merge colors
|
||||||
for (auto& cols : colors) {
|
for (auto& cols : colors) {
|
||||||
|
@ -776,7 +778,6 @@ EdgeCandMap ShapeBuilder::getECM(
|
||||||
double avgChildT = 0;
|
double avgChildT = 0;
|
||||||
if (chldTrNd.trips) avgChildT = chldTrNd.accTime / chldTrNd.trips;
|
if (chldTrNd.trips) avgChildT = chldTrNd.accTime / chldTrNd.trips;
|
||||||
|
|
||||||
|
|
||||||
double timeDiff = avgChildT - avgT;
|
double timeDiff = avgChildT - avgT;
|
||||||
if (timeDiff < 0) timeDiff = 0;
|
if (timeDiff < 0) timeDiff = 0;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue