-
Notifications
You must be signed in to change notification settings - Fork 92
Update Model #389
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update Model #389
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be honest, now that I've thought on it, I'm not even sure if changing the API is worth it. It's a lot of churn for little gain.
I think it is a strict improvement. I expect that the cost of doing this change now will be lower than the cost of not having this improvement. |
Okay, I'm going to merge this across and have a go at getting the tests to pass. |
* Begin refactor from `modifyconstraint(m, c, set)` to `set!(m, ConstraintSet(), c, set)`. This patch currently errors as it needs to be implemented for src/Utilities/model.jl, but I'm not sure where to start. * Update Model (#389) Updates from @blegat * Resolve ambiguity errors relating to canset and set! ConstraintSet. * Fixes to get tests passing * Refactor modfiyconstraint!(m,c,f) to set!(m,ConstraintFunction(),c,f) * Refactor modifyconstraint! to modify! and canmodifycontraint to canmodify. These functions now only apply to AbstractFunctionModification changes. * Fix definition of canmodify. This patch does not pass tests due to problems with canmodify in the bridge code. * Add broken tests * Add unit tests for setting ConstraintSet * Refactor modifyobjective! to modify!(m, ObjectiveFunction, change). * Add more tests for modifications * Begin documentation of problem modificatino * Add more modification tests * Add test for modifying constraint function. There is a broken test and one commented out as MockOptimizer fails getting the constraint function. * Fix bridges tests * Fix set! ConstraintFunction for mock optimizer * Add more tests for default fallbacks * Add more documentation, tests for MultirowChange, and fix associated bug. * Refactor transformconstraint! to transform!. Currently this is not tested as transform! is not implemented in MockOptimizer * Update modification docs with comments from @mlubin * Address method ambiguity * Refactor canset and set! to reduce method ambiguities * Fix typo * Fix cantransform * Address comments by @blegat * Re-enable transform test * Address comments by @mlubin
Test still fails for the bridges because of the ambiguity mentioned in #388 (comment)