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
Add support for constraint dual #1129
Conversation
Codecov Report
@@ Coverage Diff @@
## jump/moi #1129 +/- ##
============================================
+ Coverage 28.72% 28.91% +0.18%
============================================
Files 20 20
Lines 3648 3659 +11
============================================
+ Hits 1048 1058 +10
- Misses 2600 2601 +1
Continue to review full report at Codecov.
|
src/JuMP.jl
Outdated
@@ -100,6 +100,9 @@ mutable struct Model <: AbstractModel | |||
# obj#::QuadExpr | |||
# objSense::Symbol | |||
|
|||
# We use the constraint reference value to have a concrete type | |||
constrainttosolverconstraint::Dict{UInt64,UInt64} |
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.
- I don't like how this is untyped.
- I think it's incorrect, because constraint reference values are allowed to overlap if they're of different types.
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.
I knew you were not going to like it :D
src/JuMP.jl
Outdated
@@ -100,6 +100,9 @@ mutable struct Model <: AbstractModel | |||
# obj#::QuadExpr | |||
# objSense::Symbol | |||
|
|||
# We use the constraint reference value to have a concrete type |
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.
Comment should be updated.
src/JuMP.jl
Outdated
@@ -100,6 +100,9 @@ mutable struct Model <: AbstractModel | |||
# obj#::QuadExpr | |||
# objSense::Symbol | |||
|
|||
# We use the constraint reference value to have a concrete type | |||
constrainttosolverconstraint::Dict{MOICON,MOICON} |
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.
Doesn't this field need to be initialized in the Model() constructor? Why doesn't this code crash?
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.
I am doing the same than what you did with variabletosolvervariable
. It is initialized in every call of attach
. If the variable is accessed before attach
is ever called, there will be an Undef...
error but this does not happen since the dictionary only have sense once a solver is attached.
Closes #1127