Skip to content

Add support for quadratic objective functions #384

Description

@tpunnoose

I am trying to use Convex.jl to interface with the OSQP solver. However, for some reason I am unable to use quadform in the objective and still have it link to the OSQP optimizer.

using Convex
using LinearAlgebra
using OSQP

x = Variable(5)
P = Diagonal(ones(5))

problem = minimize(quadform(x, P))

solve!(problem, OSQP.Optimizer)

When this code runs I get the following error:

LoadError: MathOptInterface.UnsupportedConstraint{MathOptInterface.VectorAffineFunction{Float64},MathOptInterface.SecondOrderCone}("")

I don't understand why it throws an unsupported constraint error as there are no constraints.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions