IntervalOptimisation.jl
IntervalOptimisation.jl copied to clipboard
Discontinuous function optimisation
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.
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.
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?
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 ;)
I see. Thanks for the link. If this effort goes further, I would be happy to give it a spin then :)