We could have GenericModel parametrized by the objective type so that a solver can set it to MOI.ScalarAffineFunction{Float64} in its OptimizerCache type so that it won't have to worry about other cases.
For instance,
https://github.com/jump-dev/Clp.jl/pull/114/files#diff-18c6af231f3facc5ba10dd45231da349efda22ecd8d68a4661dee8027bc413a7R296-R297
is incorrect as it will throw a convert error if the objective is quadratic instead of an UnsupportedAttribute error.
We could have GenericModel parametrized by the objective type so that a solver can set it to
MOI.ScalarAffineFunction{Float64}in itsOptimizerCachetype so that it won't have to worry about other cases.For instance,
https://github.com/jump-dev/Clp.jl/pull/114/files#diff-18c6af231f3facc5ba10dd45231da349efda22ecd8d68a4661dee8027bc413a7R296-R297
is incorrect as it will throw a convert error if the objective is quadratic instead of an UnsupportedAttribute error.