Will have to think this through again and it might be a bug but it’ll probably occur seldom or even never especially as the virtual edge weight is much smaller than the total weight.
There are likely improvements possible and it would be really great to get this faster, so thanks for taking care of it !
Probably the code in the following is more clear and is this what you meant?
if (reverse) {
fromWeightInt = lms.getFromWeight(landmarkIndex, node) - activeFromIntWeights[activeLMIdx] + virtEdgeWeightInt;
// your suggestion?
// fromWeightInt = lms.getFromWeight(landmarkIndex, node) - activeFromIntWeights[activeLMIdx] - virtEdgeWeightInt;
toWeightInt = activeToIntWeights[activeLMIdx] - lms.getToWeight(landmarkIndex, node) - virtEdgeWeightInt;
} else {
fromWeightInt = activeFromIntWeights[activeLMIdx] - lms.getFromWeight(landmarkIndex, node) - virtEdgeWeightInt;
toWeightInt = lms.getToWeight(landmarkIndex, node) - activeToIntWeights[activeLMIdx] - virtEdgeWeightInt;
}
BTW: would be interested to get your feedback about this new branch: Flexible Vehicle Profiles