Hello,

I have a problem where I need to find the closest (min norm) point to my data which is feasible under some (non convex) polynomial constraints. What would be the best framework/ libraries to use for a problem like this?

JuMP.jl is probably your best bet for the framework. You can look at the nonlinear solvers offered there.

1 Like

@rakshith95, here’s something to get you started:

```
using JuMP, Ipopt
N = 10
point = rand(N)
model = Model(Ipopt.Optimizer)
@variable(model, x[1:N])
@objective(model, Min, sum((x[i] - point[i])^2 for i in 1:N))
@NLconstraint(model, x[1]^2 - x[2]^2 <= 1) # Or something
optimize!(model)
value.(x)
```

It would be easy to model your problem in pure Julia using ADNLPModels provided the constraints are smooth. You will also want to minimize the squared distance (assuming you are talking about Euclidean distance).

Then you can pass your model to Percival or Ipopt for solution.

Thank you for the suggestions. I tried JuMP+Ipopt but it’s a bit slower than I need, and has too many parameters I need to look at, so I’m just going to write an iterative algorithm for my problem.