Utilizing variable values during model.optimize()
回答済みMe and my partner are implementing a ridesharing optimization code. A brief description is as follows: We have sets of drivers and passengers with associated origin and destination nodes, where drivers need to pick up all passengers before delivery any of them at their delivery nodes before the driver travels to its destination node. All participants have time windows intervals at their destinations, and also a max_ride_time defining the max amount of time participants wish to stay in the car during the ride.
We want to somehow use the information of which route the drives takes and who the driver chooses to pick up during the model.optimize().
Is it possible to retrieve values the variables have taken and use it? Meaning, is it possible to somehow "open" model.optimize() and take advantage of the choices the optimization chooses during the optimization itself? And then use the variable values to change/influence sets the constraints uses, in order to add new constraints during the optimization?
-
正式なコメント
This post is more than three years old. Some information may not be up to date. For current information, please check the Gurobi Documentation or Knowledge Base. If you need more help, please create a new post in the community forum, or try Gurobot, our chatbot interface offering instant, expert-level support. -
Hi Jacob,
You can use Callbacks to interact with the solver during the solving process. Please refer to the linked reference page and also check out our various examples for further information on how to use callbacks in Gurobi.
Cheers,
Matthias0
投稿コメントは受け付けていません。
コメント
2件のコメント