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
Is there a way I could calculate a custom cost function to minimize it?
Use case: suppose I have a black box that is able to quickly score my routes. I want to inject it into VRP, so this cost is optimized, not just a linear combination of distance + time
The text was updated successfully, but these errors were encountered:
It is possible if you use the project as a library. Then you can have write your own extension. However, this would require some understanding how to do it which, I have to admit, is not yet fully documented. Anyway, let me explain it in short details.
In VRP solver, there are the following main relevant concepts:
An objective is a part of Feature definition: typical implementation requires not only comparing two solution based on their fitness, but also guiding the search in constructive heuristic. So you would need to write your feature with objective (you can also use state to cache some calculations to speed up), which will use your black box and then plug it in the goal context. I guess this could be a good starting point: https://github.com/reinterpretcat/vrp/blob/master/vrp-scientific/src/common/text_reader.rs#L10-L26
Is there a way I could calculate a custom cost function to minimize it?
Use case: suppose I have a black box that is able to quickly score my routes. I want to inject it into VRP, so this cost is optimized, not just a linear combination of distance + time
The text was updated successfully, but these errors were encountered: