You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
in Path.java I note the following method which sums the length of edges in the route including partial lengths of the source and target edges. In both cases this proportion is calculated as 1 - edge.fraction(). If I understand what is going on this should only be true for source whereas the proportion for the target edge should just be target.fraction(). The proportion of the source is the length of the edge less how far the vehicle is already along it, whereas the proportion of the target is how far the vehicle is along it.
`/**
* Gets cost value of the path for an arbitrary {@link Cost} function.
*
* @param cost {@link Cost} function to be used.
* @return Cost value of the path.
*/
public double cost(Cost cost) {
double value = cost.cost(source.edge(), 1 - source.fraction());
for (int i = 1; i < edges.size(); ++i) {
value += cost.cost(edges.get(i));
}
value -= cost.cost(target.edge(), 1 - target.fraction());
return value;
}`
The text was updated successfully, but these errors were encountered:
in
Path.java
I note the following method which sums the length of edges in the route including partial lengths of the source and target edges. In both cases this proportion is calculated as1 - edge.fraction()
. If I understand what is going on this should only be true for source whereas the proportion for the target edge should just betarget.fraction()
. The proportion of the source is the length of the edge less how far the vehicle is already along it, whereas the proportion of the target is how far the vehicle is along it.`/**
* Gets cost value of the path for an arbitrary {@link Cost} function.
*
* @param cost {@link Cost} function to be used.
* @return Cost value of the path.
*/
public double cost(Cost cost) {
double value = cost.cost(source.edge(), 1 - source.fraction());
The text was updated successfully, but these errors were encountered: