some updates to shapevl

This commit is contained in:
Patrick Brosi 2022-01-07 17:35:30 +01:00
parent 3a08b63d8e
commit 6b445b84d1
5 changed files with 68 additions and 46 deletions

View file

@ -346,10 +346,15 @@ int main(int argc, char** argv) {
if (cfg.writeStats) {
util::json::Dict graphSizes;
double numNodesTot = 0;
double numEdgesTot = 0;
for (const auto& gd : graphDimensions) {
util::json::Dict a;
a["num_nodes"] = gd.second.first;
a["num_edges"] = gd.second.second;
numNodesTot += gd.second.first;
numEdgesTot += gd.second.second;
graphSizes[gd.first] = a;
}
@ -358,7 +363,10 @@ int main(int argc, char** argv) {
util::json::Dict{
{"gtfs_num_stations", gtfs[0].getStops().size()},
{"gtfs_num_trips", gtfs[0].getTrips().size()},
{"gtfs_has_shapes", gtfs[0].getShapes().size() > 1},
{"graph_dimension", graphSizes},
{"num_nodes_tot", numNodesTot},
{"num_edges_tot", numEdgesTot},
{"num_tries", stats.numTries},
{"num_trie_leafs", stats.numTrieLeafs},
{"dijkstra_iters", stats.dijkstraIters},

View file

@ -206,12 +206,7 @@ void ConfigReader::read(Config* cfg, int argc, char** argv) {
cfg->noHopCache = true;
break;
case 'v':
std::cout << "pfaedle " << VERSION_FULL << " (built " << __DATE__ << " "
<< __TIME__ << " with geometry precision <"
<< PFDL_PREC_STR << ">)\n"
<< "(C) " << YEAR << " " << COPY << "\n"
<< "Authors: " << AUTHORS << "\nGNU General Public "
"License v3.0\n";
std::cout << "pfaedle " << VERSION_FULL << std::endl;
exit(0);
case 'p':
printOpts = true;

View file

@ -31,6 +31,7 @@ inline Stats operator+ (const Stats& c1, const Stats& c2) {
Stats ret = c1;
ret.totNumTrips += c2.totNumTrips;
ret.numTries += c2.numTries;
ret.numTrieLeafs += c2.numTrieLeafs;
ret.solveTime += c2.solveTime;
ret.dijkstraIters += c2.dijkstraIters;
return ret;