I’m working with a large linear SDP problem with JuMP
and COSMO
and is trying to find whether low float precision contributes to the convergence problem. So I want to change the float type of a smaller problem that works well with Float64
to see whether the convergence problem recurs. Here is what I did:
model = Model(COSMO.Optimizer{Float16})
# And pass to the model Float16 version of constraints and objective function
However, an error occurs:
ERROR: MathOptInterface.UnsupportedAttribute{MathOptInterface.ObjectiveFunction{MathOptInterface.ScalarAffineFunction{Float64}}}: Attribute MathOptInterface.ObjectiveFunction{MathOptInterface.ScalarAffineFunction{Float64}}() is not supported by the model.
So I check the type of the objective function, and it seems the sum of two VariableRef
s is of type GenericAffExpr{Float64,VariableRef}
by default, which explains the error.
So, is there any method to work around the problem? Can I build an objective function with type GenericAffExpr{Float16,VariableRef}
?