The solution I had, for using JuMP.jl is discarding those volatile inequalities.
So the function I created, for reference, is:
using JuMP;
using Gurobi;
function SolveQpJump(mP, vQ, mA, vL, vU; hOptFun = nothing)
if (isnothing(hOptFun))
hOptFun = Gurobi.Optimizer;
end
jumpModel = Model(hOptFun);
@variable(jumpModel, vT[1:numElements]);
@objective(jumpModel, Min, 0.5 * (vT' * mP * vT) + (vT' * vQ));
vV = vL .≠ -Inf;
@constraint(jumpModel, vL[vV] .<= mA[vV, :] * vT);
vV .= vU .≠ Inf;
@constraint(jumpModel, mA[vV, :] * vT .<= vU[vV]);
optimize!(jumpModel);
return value.(vT);
end
I still wonder what’s the proper way to define Inf in JuMP.jl.