Refactor .objective field of Utilities.Model into a struct#1485
Conversation
|
Could we do something like: struct UnionScalarFunction{T}
single_variable::Union{Nothing,MOI.SingleVariable}
scalar_affine::Union{Nothing,MOI.ScalarAffineFunction{T}}
scalar_quadratic::Union{Nothing,MOI.ScalarQuadraticFunction{T}}
endand have mutable struct ObjectiveFunctionContainer{T,F} <: MOI.ModelLike
...
objective_function::Union{Nothing,F}
endand |
Currently needs test_broken due to the isapprox issue #1484
|
Coverage failure is because of poor testing of |
blegat
left a comment
There was a problem hiding this comment.
This is a nice improvement but it does not closes #1470. #1485 (comment) would close it but it can be done in a separate PR.
This simplifies the
Utilities.Modelquite a bit.Currently needs test_broken due to the isapprox issue #1484