How to solving SOCP and SDP by AmplNLWriter with these two solvers GUROBI 11.0.3 and Lindoapi 15?

hello, everyone,

what is wrong with the following code of


using JuMP
using AmplNLWriter
using LinearAlgebra
using SCS
using MathOptInterface
# import MathOptInterface as MOI

model = Model(() -> AmplNLWriter.Optimizer("Your_Path\\ampl\\gurobi.exe",["outlev=1"]))
# model = Model(() -> AmplNLWriter.Optimizer("Your_Path\\runlindo.exe",["-sol","-gop"]))
 
C = [1.0 -1.0; -1.0 2.0]
@variable(model, X[1:2, 1:2], PSD)
@variable(model, z[1:2] >= 0)
@objective(model, Min, tr(C*X))
@constraint(model, c1, X[1, 1] - z[1] == 1)
@constraint(model, c2, X[2, 2] - z[2] == 1)

optimize!(model)

It didn’t work with errors:

julia> optimize!(model)
ERROR: UnsupportedConstraint: `MathOptInterface.VectorOfVariables`-in-`MathOptInterface.PositiveSemidefiniteConeTriangle` constraints are not supported by the
solver you have chosen, and we could not reformulate your model into a
form that is supported.

To fix this error you must choose a different solver.

Owo, AmplNLWrite does not support Conic Optimization, SOCP and SDP with solvers GUROBI 11.0.3 and Lindoapi 15.

How to solving SOCP and SDP by AmplNLWriter with these two solvers GUROBI 11.0.3 and Lindoapi 15?

Thanks.
Aijunly WANG.

AmplNLWriter does not support PSD constraints, and neither does Gurobi.

Following the error message:

To fix this error you must choose a different solver.

You cannot solve this model using AmplNLWriter or Gurobi. You must pick a different solver (like SCS).

Ok, Thanks.