7
$\begingroup$

If I obtain a relaxed version of my model using r = model.relax() then add variables and constraints to the original model, will the relaxed version automatically update? Additionally, if I optimize the relaxed version, will this information be used to speed up the solution time of the original model?

Basically, how tied together are the original and relaxed versions of the model?

$\endgroup$
7
$\begingroup$

Calling model.relax() creates a new Model instance that is not connected to the original model. If you call relax() on a model that is already continuous, you would get end up with the same result as if you copied the model using model.copy().

Solving the original model does not benefit from solving the relaxed model before. You don't even apply the same presolving steps for continuous and integer models.

| improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.