I am getting this error when I use a quadratic term in the objective while using Mosek.

`The solver does not support an objective function of type MathOptInterface.ScalarQuadraticFunction{Float64}.`

Is this something that can be fixed?

I am getting this error when I use a quadratic term in the objective while using Mosek.

`The solver does not support an objective function of type MathOptInterface.ScalarQuadraticFunction{Float64}.`

Is this something that can be fixed?

1 Like

Do you have a reproducible example? This should probably have been bridged.

Otherwise, instead of

```
model = Model()
@variable(model, x)
@objective(model, Min, x^2)
```

do

```
model = Model()
@variable(model, x)
@variable(model, t)
@constraint(model, t >= x^2)
@objective(model, Min, t)
```

Here you are:

```
model = direct_model(Mosek.Optimizer())
@expression(model, Y[s=1:n], sum(X[s,i]^2 * a[s,i] ) for i=1:m))
@objective(model, min, sum(Y[s] for s in 1:n))
```

I am using `Y`

Expression somewhere else as well.

Mosek doesn’t natively support quadratic functions and constraints. They need to be reformulated into second order cones.

Use `model = Model(Mosek.Optimizer)`

.

See Models · JuMP for more details.

1 Like