Added functions to interact with JuMP#17
Added functions to interact with JuMP#17guilhermebodin merged 5 commits intojump-dev:masterfrom caioluke:master
Conversation
…nterface, e.g MOI.is_empty, MOI.get, MOI.set, MOI.supports Creation of attribute 'parameters_name' in 'ParametricOptimizer' Creation of mutable struct 'ParameterRef'
|
I have an ideia to make it better. MOI.set(model, POI.ParameterValue(), y, 2.0)instead of: cy = MOI.get(backend(model), POI.ParameterRef(), index(y))
MOI.set(backend(model), MOI.ConstraintSet(), cy, POI.Parameter(2.0))some questions for you too... should we add JuMP as a Test/Doc dependency and avoid as much as we can add it as an actual dependency? Other suggestions? |
👍 Yeah this would be better. |
- Corrected a bug in which a ScalarQuadraticFunction was not treated as a ScalarAffineFunction when the quadratic term was a product of 2 parameters
- Added tests interacting with JuMP - JuMP model with linear constraints now supports POI.Parameter if the parameter is not multiplying a variable
blegat
left a comment
There was a problem hiding this comment.
Looking good overall, thanks! There are however a few that are currently incorrect, I would recommend at least leaving at TODO explaining why it's incorrect
|
@blegat with @guilhermebodin we addressed most of your comments and we left some TODO's for the future. If you have any tips on how to implement those changes that would be great. |
Codecov Report
@@ Coverage Diff @@
## master #17 +/- ##
==========================================
- Coverage 94.24% 90.38% -3.86%
==========================================
Files 1 1
Lines 330 416 +86
==========================================
+ Hits 311 376 +65
- Misses 19 40 +21
Continue to review full report at Codecov.
|
Added functions to interact with JuMP
closes #1
Creation of necessary functions in order to interact with the JuMP interface, e.g MOI.is_empty, MOI.get, MOI.set, MOI.supports
Creation of mutable struct 'ParameterValue' which is used to assign value to parameters
Correction of a bug in which a ScalarQuadraticFunction was not treated as a ScalarAffineFunction when the quadratic term was a product of 2 parameters
Added some tests with JuMP