Extract Variable values during optimization
Hello,
Suppose we have defined a variable say X which and a variable Y which is dependent on X values.
When we assign a lower and upper bound for X it can take any continuous value. In my problem Y is dependent on all the values of X that the solver selected during the model run before giving the final optimal variable values.
1. How can we extract these values of X that solver selected during the course of execution?
2. How do we loopback these values and assign them one by one to Y during the course of execution?
Regards,
Vaibhav
-
Official comment
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 why not try our AI Gurobot?. -
Hi,
Can you give us some more details on this dependency? For example is \( X \leq Y \) or something similar? You might also find this introduction helpful.
Best regards,
Sonja
0 -
It sounds like you need a constraint - perhaps a lazy constraint.
0
Post is closed for comments.
Comments
3 comments