Does modification on presolved model affect original model?
AnsweredSuppose m is the original model and p = m.presolve()
If I do some modifications on p (e.g. optimize or modify variable bounds), will the original model be modified?
-
Hi Liu,
If you optimize p, this will not affect the original model object m.
Concerning the modification of variable bounds on p, this also does not affect the original model object m. However, please note that the variables in the presolved model p do in general not match the variables in the original model m, so a modification of the bounds in p might not directly translate to a modification of the bounds in m.
The article How does presolve work? explains this in detail.
Best regards,
Elisabeth
0 -
Thanks a lot! Can I just assume that when I call p = m.presolve(), then p and m are independent, modifications on either model will not affect the other?
0 -
Yes, p and m are independent objects, so modifying one will not affect the other.
Best,
Elisabeth
0
Please sign in to leave a comment.
Comments
3 comments