my colleague from Italy asked me this question in the context of PTV Developer:
My response: NO. And here's why: whether this approach returns compareable results or not depends on different factors - take some moments to understand the underlying effects:Daniele wrote:A customer of us using PTV DEV asked how to retrieve back the emissions for each countries touched by the routing; my suggestion was to activate border events and divide the initial routing into subrouting from start waypoint to first coordinates of border events + first coordinates of first border events to second coordinates of second border events+...+n-1 coordinates of n-1 border events to end waypoint;
In a note an excel in which I did a test of a routing from Perugia (IT) to a location in DE.
You finde the PTV DEV requests and emisions total that is exactly the sum of the partial ones:
I obtained two border events, that contains coordinate of CH border and coordinates of DE Border.
So I created the routing request with same date/hour for start waypoint to first border coordinates event and obtained the
emission in IT (SUBROUTE1)
Then I created another routing from first border coordinates event and coordinates of DE Border events, so I obtained the emission in CH (subroute 2).
Last part is the routing from coordinates of DE Border events to end waypooints, so I obtained DE emission (subroute 3).
This is the values I obtained with a quick test..if you sum the values of subroute 1,2,3 of each value you obtain the correspondant values of the TOT routing:Is this the way to follow?
Scope fuelConsumption co2eTankToWheel co2eWellToWheel energyUseTankToWheel energyUseWellToWheel TOTAL 464.37.. 1490.22.. 1808.36.. 20037.122.. 23832.45.. Subroute 1 187.40 601.39 729.77.. 8086.135 9617.77 Subroute 2 115.19 369.66 448.58 4970.38 5911.84 Subroute 3 161.78 519.19 630.03 6980.99 8303.29
- The emission calculation on a "route", a single "leg" or a "segment" may depend on more than just the "relative length": Some emission standards such as HBEFA based ones use more attributes of a segment, e.g. the elevation. That means that two segments with equal length could return different emission values.
- Furthermore the loading status of a vehicle can change from one wayoint to another. If the standard you use uses the total weight ( or load weight) of a transport vehicle the linear approach fails, too.
Under some cicrumstances you could apply the business logic described above - but not in general.
Thanks to Daniele for asking the question - thanks to Sebastien for guiding us through the obstacle!
Bernd