# Mixed-integer quadratic programming doesn't seem to be working correctly

**URL:** https://discourse.julialang.org/t/mixed-integer-quadratic-programming-doesnt-seem-to-be-working-correctly/118551
**Category:** Optimization (Mathematical)
**Created:** [August 24, 2024, 7:43am UTC](https://discourse.julialang.org/t/mixed-integer-quadratic-programming-doesnt-seem-to-be-working-correctly/118551 "2024-08-24T07:43:13Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Tarny\_GG\_Channie](https://avatars.discourse-cdn.com/v4/letter/t/3bc359/32.png) [@Tarny\_GG\_Channie](https://discourse.julialang.org/u/Tarny_GG_Channie)
#### Post date: [August 24, 2024, 7:43am UTC](https://discourse.julialang.org/t/mixed-integer-quadratic-programming-doesnt-seem-to-be-working-correctly/118551/1 "2024-08-24T07:43:13Z")

</div>

DAQP was supposedly solving convex mixed-binary quadratic programming until I tried.  
The GitHub page

> **[About](https://darnstrom.github.io/daqp/)**
>
> DAQP is a dual active-set solver for convex quadratic programs

said that the matrix must be positive semi-definite, which it is. (The objective expression literally cannot be less than zero.)

```julia
using DAQP

using JuMP

function main()
    model = Model(DAQP.Optimizer)
    @variable(model, x, Bin)
    @variable(model, y, Bin)
    @objective(model,Min, (2*x+y)^2)

    println(model)
    optimize!(model)
    solution_summary(model)
    #println(value(x))

end

main()

```

This gave an infeasible result even though the problem is quite obviously a positive semi-definite matrix as required. It gave “infeasible” result, even though you could literally just have put any number in the system.

And if you do

```julia
using DAQP

using JuMP

function main()
    model = Model(DAQP.Optimizer)
    @variable(model, 0<=x<=3, Int)
    @objective(model,Min, (x)^2)

    println(model)
    optimize!(model)
    solution_summary(model)
    #println(value(x))

end

main()

```

AssertionError: DAQP requires the objective to be strictly convex to support binary variables  
Is this non-convex?

Maybe something is wrong here?

---

<div class="post-metadata">

### Author: ![odow](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/odow/32/28685_2.png) [@odow](https://discourse.julialang.org/u/odow)
#### Post date: [August 24, 2024, 9:30am UTC](https://discourse.julialang.org/t/mixed-integer-quadratic-programming-doesnt-seem-to-be-working-correctly/118551/2 "2024-08-24T09:30:50Z")

</div>

These seem like bugs in DAQP.jl. Perhaps you should open an issue? [Issues · darnstrom/DAQP.jl · GitHub](https://github.com/darnstrom/DAQP.jl/issues)
