Skip to content

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

Merged
merged 5 commits into from
Jun 14, 2018
Merged

Update Model #389

merged 5 commits into from
Jun 14, 2018

Conversation

blegat
Copy link
Member

@blegat blegat commented Jun 14, 2018

Test still fails for the bridges because of the ambiguity mentioned in #388 (comment)

@blegat blegat requested a review from odow June 14, 2018 07:17
Copy link
Member

@odow odow left a 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.

@blegat
Copy link
Member Author

blegat commented Jun 14, 2018

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.
It was confusing that ConstraintSet and ConstraintFunction where only gettable and it was confusing that modify could have three different changes.
Merging modifyconstraint and modifyobjective is even better since it allow to implements both with one method for layers (e.g. mockoptimizer, cachingoptimizer, bridges, ...)

@odow
Copy link
Member

odow commented Jun 14, 2018

Okay, I'm going to merge this across and have a go at getting the tests to pass.

@odow odow merged commit 98f82af into odow/new-modifications Jun 14, 2018
@odow odow deleted the bl/new-modif-updates branch June 14, 2018 07:53
mlubin pushed a commit that referenced this pull request Jun 20, 2018
* 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants