I want to minimize (A*x - b)^2 subject to x ∈ [lower, upper] and sum(x) <= 1.
With Optim.jl, I can easily solve this problem with the box constraints, but I don’t see a way to add the constraint on sum(x). Should I be using something like Jump.jl or Convex.jl instead?
Good question. Following because I’m also interested in constrained optimization, I’m looking for argmax f(x) where f(x) is a computational function (not something with simple symbolic form, think of it as some kind of weighted average of data) subject to sum(abs.(x)) == C.
So far, I’ve been doing it with NLopt and the COBYLA algorithm, which works, but it only finds a local optimum so I restart it multiple times. It’s a bit cumbersome. Would like to know what other options there are.
Hi @robsmith11, I am new to Julia and I could not find out how to use the package Optim.jl (or any) to solve the problem you mention (but without the sum constraint)
I want to minimize (A*x - b)^2 subject to x ∈ [lower, upper]
With Optim.jl, I can easily solve this problem with the box constraints
I see that you figured out a way to use Optim.jl for it could you please share the syntax you used?