# JuMP with Pajarito/Pavito for a simple MINLP fails with solver does not support MathOptInterface.ScalarNonlinearFunction

**URL:** https://discourse.julialang.org/t/jump-with-pajarito-pavito-for-a-simple-minlp-fails-with-solver-does-not-support-mathoptinterface-scalarnonlinearfunction/106314
**Category:** Optimization (Mathematical)
**Created:** [November 16, 2023, 12:06pm UTC](https://discourse.julialang.org/t/jump-with-pajarito-pavito-for-a-simple-minlp-fails-with-solver-does-not-support-mathoptinterface-scalarnonlinearfunction/106314 "2023-11-16T12:06:59Z")
**Posts on this page:** 1
**Showing post:** 3

<div class="post-metadata">

### Author: ![jd-foster](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jd-foster/32/35824_2.png) [@jd-foster](https://discourse.julialang.org/u/jd-foster)
#### Post date: [November 16, 2023, 1:35pm UTC](https://discourse.julialang.org/t/jump-with-pajarito-pavito-for-a-simple-minlp-fails-with-solver-does-not-support-mathoptinterface-scalarnonlinearfunction/106314/3 "2023-11-16T13:35:37Z")

</div>

The issue is the term `sum(abs.(x)))`

This comes up fairly often, e.g.: [Abs in JuMP - #3 by odow](https://discourse.julialang.org/t/abs-in-jump/90811/3)

You need to reformulate `sum(abs.(x)))` as `sum(t)` where you’ve defined

```julia
@variable(vector_model, t[1:length(x)] >= 0)
@constraint(vector_model, [i=1:length(x)], x[i] <= t[i])
@constraint(vector_model, [i=1:length(x)], -t[i] <= x[i])

```

---

_[View the full topic](https://discourse.julialang.org/t/jump-with-pajarito-pavito-for-a-simple-minlp-fails-with-solver-does-not-support-mathoptinterface-scalarnonlinearfunction/106314)._
