Open ilibar-zpt opened 9 months ago
That's possible to do, however, technically, solver uses not only cost calculated as linear combination of time and distance, but additionally applies some penalties to guide search in proper direction (specified by local objectives which might be different from global ones).
Maybe you can give a bit more insights what kind of the problem you need to solve with custom costs.
I think the easiest and less surprising way would be to model these costs not like replacement of duration/distance, but rather add it on top. This could be done relatively easily I guess.
Yeah, that should do
Would be great to have an option to provide a custom costs matrix alongside
travelTimes
anddistances
.As far as I understand using custom costs matrix is the only viable way to explicitly disincentivize taking frequent A->B routes without affecting either distances or times calculation.
In case such a matrix is provided then
fleet.vehicles.costs.{distance,time}
should be ignored/disallowed.