IntervalOptimisation.jl icon indicating copy to clipboard operation
IntervalOptimisation.jl copied to clipboard

Discontinuous function optimisation

Open mohamed82008 opened this issue 4 years ago • 4 comments

Hi! Let me start by saying thanks for this great package! I tried the following discontinuous function optimisation where the optimal solution is on the edge of the discontinuous function. However, the output of minimise seems wrong:

using IntervalArithmetic, IntervalOptimisation

obj = x -> log(x) + (x >= 2 ? 0 : Inf)
minimise(obj, 1..10)
# ([1.69833, 1.69839], Interval{Float64}[[5.46484, 5.46535]])

Any idea if there is a way to fix this? If this works, constraints can be trivially modeled with this discontinuous approach.

mohamed82008 avatar Feb 02 '21 06:02 mohamed82008

Hi, I'm glad you like the package!

Unfortunately interval methods cannot handle functions with conditionals in, and handling constraints is indeed non-trivial (work in progress).

For discontinuous functions you can use the piecewise approach that I posted here: https://discourse.julialang.org/t/latest-recommendations-for-global-optimization/17718/45

That would be good to add to IntervalArithmetic.jl.

dpsanders avatar Feb 02 '21 07:02 dpsanders

Cool, thanks for the suggestion. Really excited for the constraint handling work. Is there a branch I can follow to learn more or is it still private?

mohamed82008 avatar Feb 02 '21 16:02 mohamed82008

There have been a couple of attempts and even PRs, but I think they've all been flawed. Basically you need to integrate interval optimisation methods with IntervalConstraintProgramming.jl.

I showed that a bit at the end of this presentation: https://www.youtube.com/watch?v=bcm4hKhEfNo

But it turns out to be harder than you would think, unfortunately. It's something we're, let's say, thinking about actively-ish ;)

dpsanders avatar Feb 02 '21 17:02 dpsanders

I see. Thanks for the link. If this effort goes further, I would be happy to give it a spin then :)

mohamed82008 avatar Feb 02 '21 17:02 mohamed82008