User Discussions > Other Discussion

Incorrect total mileage calculation

(1/3) > >>

michih:
There's a problem that some system mileage is more than the corresponding region mileage: http://tm.teresco.org/user/?u=cinx

The total mileage (preview+active) of the BIH region is 2238.76mi.
The total mileage of bihm system is 2275.34mi though!

The total mileage of the LTU region is 1166.80mi.
The total mileage of ltua system is 1185.63mi though!

The total mileage of the MKD region is 536.59mi.
The total mileage of mkda system is 557.95mi though!

The total mileage of the MLT region is 110.92mi.
The total mileage of mltt system is 113.49mi though!

si404:
Is system mileage not removing concurrencies, but region mileage is?

michih:
If it is, I think it's not a feature but a bug...

mapcat:
This has been the case for a while...thought someone already reported it.

Another example: I have 1148.52 mi on Quebec freeways in Quebec but only 1120.02 mi in Quebec overall. I added my total mileage for each of the individual routes in the set and got 1148.50, so it obviously isn't accounting for some/all concurrencies (the A-20 and A-55 have a concurrency of around 37 km / 23 mi).

Jim:
OK, so the problem is in the SQL query in user/index.php, which attempts to compute the total system mileage by adding up all the routes in the system, not taking into account concurrencies. It looks to me like the stats generated by the site update in the logs directory are correct.  So I think we're good with the site update program itself.  I will see if I can come up with an SQL query that will get the correct sum from the existing DB info, or if I need to put more into the DB to get this right.

Navigation

[0] Message Index

[#] Next page

Go to full version