diff --git a/docs/src/man/optional_dependencies.md b/docs/src/man/optional_dependencies.md index 0b0894cdd8..11d4414499 100644 --- a/docs/src/man/optional_dependencies.md +++ b/docs/src/man/optional_dependencies.md @@ -58,8 +58,6 @@ The package [`IntervalLinearAlgebra`](https://github.com/JuliaIntervals/Interval |[`IntervalMatrices`](https://github.com/JuliaReach/IntervalMatrices.jl) | Set operations that involve matrices whose coefficients are intervals.| |[`TaylorModels`](https://github.com/JuliaIntervals/TaylorModels.jl) |Taylor expansion of functions with rigorous interval remainder.| -Note: `IntervalConstraintProgramming` is currently not tested due to compatibility issues. - ## Optimization algorithms Some computations require use of external numerical optimization solvers. The modeling language [`JuMP`](https://github.com/jump-dev/JuMP.jl) is loaded by default, together with the [GLPK](https://en.wikipedia.org/wiki/GNU_Linear_Programming_Kit) solver for linear programs (LPs). Other solvers can be loaded on-demand, even commercial ones, provided that you have the appropriate license. See JuMP's [documentation page on supported solvers](https://jump.dev/JuMP.jl/stable/installation/#Supported-solvers) for further details. diff --git a/src/Approximations/overapproximate.jl b/src/Approximations/overapproximate.jl index 87efa67aad..52ccff7fb9 100644 --- a/src/Approximations/overapproximate.jl +++ b/src/Approximations/overapproximate.jl @@ -641,7 +641,7 @@ function load_paving_overapproximation() converted into hyperrectangles, and then calculates the support function of the set along each direction in dirs, to compute the `HPolyhedron` constraints. - ### Requires IntervalConstraintProgramming + This algorithm requires the IntervalConstraintProgramming package. """ function overapproximate(p::Paving{L,N}, dirs::AbstractDirections{N,VN}) where {L,N,VN} # enclose outer approximation diff --git a/test/Approximations/overapproximate.jl b/test/Approximations/overapproximate.jl index 912b4c28c4..fd3f63991f 100644 --- a/test/Approximations/overapproximate.jl +++ b/test/Approximations/overapproximate.jl @@ -513,13 +513,12 @@ for N in [Float64] cap = overapproximate(Z ∩ L, OctDirections) @test (L ∩ Z) ⊆ cap - # NOTE: ICP currently leads to unsatisfiable package requirements # overapproximate a nonlinear constraint with an HPolyhedron - # dom = IntervalBox(interval(-2, 2), interval(-2, 2)) - # C = @constraint x^2 + y^2 <= 1 - # p = pave(C, dom, 0.01) - # dirs = OctDirections(2) - # H = overapproximate(p, dirs) - # B2 = Ball2(N[0, 0], N(1)) - # @test B2 ⊆ H + dom = IntervalBox(interval(-2, 2), interval(-2, 2)) + C = ICP.@constraint x^2 + y^2 <= 1 + p = ICP.pave(C, dom, 0.01) + dirs = OctDirections(2) + H = overapproximate(p, dirs) + B2 = Ball2(N[0, 0], N(1)) + @test B2 ⊆ H end diff --git a/test/Project.toml b/test/Project.toml index cd4e7632f6..ade357c5dc 100644 --- a/test/Project.toml +++ b/test/Project.toml @@ -7,6 +7,7 @@ ExponentialUtilities = "d4d017d3-3776-5f7e-afef-a10c40355c18" GLPK = "60bf3e95-4087-53dc-ae20-288a0d20c6a6" GR = "28b8d3ca-fb5f-59d9-8090-bfdbd6d07a71" IntervalArithmetic = "d1acc4aa-44c8-5952-acd4-ba5d80a2a253" +IntervalConstraintProgramming = "138f1668-1576-5ad7-91b9-7425abbf3153" IntervalMatrices = "5c1f47dc-42dd-5697-8aaa-4d102d140ba9" Ipopt = "b6b21f68-93f8-5de0-b562-5493be1d77c9" JuMP = "4076af6c-e467-56ae-b986-b466b2749572" @@ -37,6 +38,7 @@ ExponentialUtilities = "1" GLPK = "0.11 - 0.15, 1" GR = "0" IntervalArithmetic = "0.15 - 0.21, =0.21.2" # v0.22 removed IntervalBox +IntervalConstraintProgramming = "0.9 - 0.13" IntervalMatrices = "0.8 - 0.10" Ipopt = "1" JuMP = "0.21 - 0.23, 1" diff --git a/test/runtests.jl b/test/runtests.jl index 18e9891695..2fb87d8747 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -10,7 +10,8 @@ Random.seed!(1234) # Optional dependencies # ======================== import Distributions, ExponentialUtilities, Expokit, IntervalMatrices, Ipopt, - MiniQhull, Optim, RangeEnclosures, SCS, SetProg, TaylorModels + MiniQhull, Optim, PkgVersion, RangeEnclosures, SCS, SetProg, TaylorModels +import IntervalConstraintProgramming as ICP import IntervalArithmetic as IA using IntervalArithmetic: IntervalBox, interval @static if VERSION >= v"1.9" @@ -23,8 +24,6 @@ else end using IntervalMatrices: ±, IntervalMatrix using TaylorModels: set_variables, TaylorModelN -# ICP currently leads to unsatisfiable package requirements -# using IntervalConstraintProgramming using Symbolics # ==============================