Closed mforets closed 3 years ago
These days I would tend to do that using ModelingToolkit and a standard Julia function instead:
using IntervalConstraintProgramming, IntervalArithmetic, ModelingToolkit, Plots
dom = IntervalBox(-2..2, -2..2)
gg(x, y) = (x^4 + y^4 - 1) * (x^2 + y^2 - 2) + x^5 * y
vars = @variables x, y
C = Separator(vars, gg(x, y) < 0)
p = pave(C, dom, 0.05)
plot(p.inner, lw=0, ratio=1, lab="f(x, y) ≤ 0", title="")
plot!(p.boundary, lw=0, ratio=1, lab="boundary")
We have an example about ModelingToolkit with ICP.jl in the webpage now: https://juliaintervals.github.io/pages/tutorials/tutorialConstraintProgramming/#constraint_programming_with_modelingtoolkit
=> this issue can be closed i suppose.
We could add an example in https://juliaintervals.github.io/IntervalConstraintProgramming.jl/latest/
Example: