In python api, is model.copy() deep copy or not
AnsweredSuppose model_1 is read from file.
model_2 = model_1.copy()
if i modify model_2(fix variables or add constraints), will model_1 still keep the original form?
0
-
Yes. Please try this.
Cheers,
David0 -
Yes, it should keep the original form.
You may also add/remove constraints/fixations from a single model, which may be easier in some cases. See this other answer for more information.
1
Please sign in to leave a comment.
Comments
2 comments