Closed geoffroyleconte closed 3 years ago
Great, thank you. Do this work for you in RipQP?
When you've converged on the right design, it would be great to add a test.
I'm working on it with RipQP. Is it a problem if SlackModel changes its argument? I did not found SlackModel! in NLPModels
Is it a problem if SlackModel changes its argument?
In what sense?
If the user wants to have the initial QuadraticModel and the QuadraticModel with the slack variables in two different objects.
I think the user will often want to keep the original QP separate from the slack QP, so it's fine to copy data as you did.
However, for QPs, it could also be useful to write SlackModel!
. I like the idea. Could you open an issue and open a separate PR?
I did not copy qp.data, I only copied qp.meta (I think). What about in this pull request? The two are similar. Or do you mean a pull request in NLPModels?
I'm sorry. I didn't realize that you were modifying qp.data
directly! I think what you implemented here is fine, but it doesn't match NLPModels.SlackModel
(which doesn't modify the user's problem). You could call your method SlackModel!
and only make it part of QuadraticModels
. It would be great to add a few tests though to validate the slack model.
Thank you! 🎉
This allows to get H and A faster after using SlackModel. I modified qp.data, and created another meta using the code already written in NLPModels.slack_meta.