diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..ca2b787 Binary files /dev/null and b/.DS_Store differ diff --git a/NEWS.md b/NEWS.md index 97b117c..3dc4f92 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,8 @@ # NEWS for IntervalOptimisation.jl +## v0.4 +- Drop support for Julia 0.7 + ## v0.3 - Drop support for Julia 0.6. The package is now fully compatible with Julia 1.0. diff --git a/Project.toml b/Project.toml new file mode 100644 index 0000000..49498eb --- /dev/null +++ b/Project.toml @@ -0,0 +1,24 @@ +name = "IntervalOptimisation" +uuid = "c7c68f13-a4a2-5b9a-b424-07d005f8d9d2" +version = "0.4.0" + +[compat] +DataStructures = "≥ 0.9.0" +ForwardDiff = "≥ 0.8.0" +IntervalArithmetic = "≥ 0.15.0" +IntervalConstraintProgramming = "≥ 0.9.0" +IntervalRootFinding = "≥ 0.4.0" +julia = "≥ 1.0.0" + +[deps] +DataStructures = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8" +ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210" +IntervalArithmetic = "d1acc4aa-44c8-5952-acd4-ba5d80a2a253" +IntervalConstraintProgramming = "138f1668-1576-5ad7-91b9-7425abbf3153" +IntervalRootFinding = "d2bf35a9-74e0-55ec-b149-d360ff49b807" + +[extras] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[targets] +test = ["Test"] diff --git a/README.md b/README.md index 55f9dd0..a2a4583 100644 --- a/README.md +++ b/README.md @@ -4,8 +4,6 @@ [![appveyor badge][appveyor_badge]][appveyor_url] [![codecov badge][codecov_badge]][codecov_url] -## Documentation [here][documenter_latest] - [travis_badge]: https://travis-ci.org/JuliaIntervals/IntervalOptimisation.jl.svg?branch=master [travis_url]: https://travis-ci.org/JuliaIntervals/IntervalOptimisation.jl @@ -16,7 +14,6 @@ [codecov_url]: http://codecov.io/github/JuliaIntervals/IntervalOptimisation.jl?branch=master [documenter_stable]: https://JuliaIntervals.github.io/IntervalOptimisation.jl/stable -[documenter_latest]: https://JuliaIntervals.github.io/IntervalOptimisation.jl/latest ## Rigorous global optimisation using Julia @@ -25,59 +22,9 @@ This package provides rigorous global optimisation routines written in pure Juli Currently, the package uses an implementation of the Moore-Skelboe algorithm. -## Usage - -Functions `minimise` and `maximise` are provided to find the **global** minimum or maximum, respectively, of a standard Julia function `f` of one or several variables. - -They return an `Interval` that is guaranteed to contain the global minimum (maximum), and a `Vector` of `Interval`s or `IntervalBox`es whose union contains all the minimisers. - -### Examples - - -#### 1D -``` -using IntervalArithmetic, IntervalOptimisation - -julia> @time global_min, minimisers = minimise(x -> (x^2 - 2)^2, -10..11); - 0.046620 seconds (36.07 k allocations: 1.586 MiB) - -julia> global_min -[0, 1.50881e-09] - -julia> minimisers -2-element Array{IntervalArithmetic.Interval{Float64},1}: - [1.41387, 1.41453] - [-1.41428, -1.41363] -``` - -#### 2D - -``` -julia> @time global_min, minimisers = minimise( X -> ( (x,y) = X; x^2 + y^2 ), - (-10000..10001) × (-10000..10001) ); - 0.051122 seconds (46.80 k allocations: 2.027 MiB) - -julia> global_min -[0, 2.33167e-08] - -julia> minimisers -3-element Array{IntervalArithmetic.IntervalBox{2,Float64},1}: - [-0.000107974, 0.000488103] × [-0.000107974, 0.000488103] - [-0.000107974, 0.000488103] × [-0.000704051, -0.000107973] - [-0.000704051, -0.000107973] × [-0.000107974, 0.000488103] -``` -Note that the last two `IntervalBox`es do not actually contain the global minimum; -decreasing the tolerance (maximum allowed box diameter) removes them: - -``` -julia> @time global_min, minimisers = minimise( X -> ( (x,y) = X; x^2 + y^2 ), - (-10000..10001) × (-10000..10001), 1e-5 ); - 0.047196 seconds (50.72 k allocations: 2.180 MiB) +## Documentation +Documentation of this package is available [here](https://JuliaIntervals.github.io/IntervalOptimisation.jl/latest/) -julia> minimisers -1-element Array{IntervalArithmetic.IntervalBox{2,Float64},1}: - [-5.52321e-06, 3.79049e-06] × [-5.52321e-06, 3.79049e-06] - ``` ## Author diff --git a/REQUIRE b/REQUIRE deleted file mode 100644 index 3161ea8..0000000 --- a/REQUIRE +++ /dev/null @@ -1,7 +0,0 @@ -julia 0.7 - -IntervalArithmetic 0.15 -IntervalRootFinding 0.4 -IntervalConstraintProgramming 0.9 -DataStructures 0.9 -ForwardDiff 0.8 diff --git a/docs/.DS_Store b/docs/.DS_Store new file mode 100644 index 0000000..1ff2e1e Binary files /dev/null and b/docs/.DS_Store differ diff --git a/docs/.gitignore b/docs/.gitignore deleted file mode 100644 index a303fff..0000000 --- a/docs/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -build/ -site/ diff --git a/docs/Project.toml b/docs/Project.toml new file mode 100644 index 0000000..2b9e501 --- /dev/null +++ b/docs/Project.toml @@ -0,0 +1,6 @@ +name = "docs" +uuid = "6854bdac-4683-567a-be4f-b22094e82ce7" + +[deps] +Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" +IntervalOptimisation = "c7c68f13-a4a2-5b9a-b424-07d005f8d9d2" diff --git a/docs/make.jl b/docs/make.jl index 17d7b79..375381e 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -1,20 +1,16 @@ -import Documenter +using Documenter, IntervalOptimisation -Documenter.makedocs( +makedocs( modules = [IntervalOptimisation], - format = :html, + format = Documenter.HTML(), sitename = "IntervalOptimisation.jl", - root = joinpath(dirname(dirname(@__FILE__)), "docs"), - pages = Any["Home" => "index.md"], - strict = true, - linkcheck = true, - checkdocs = :exports, + pages = ["Home" => "index.md"], authors = "David Sanders" ) Documenter.deploydocs( - repo = "github.com/dpsanders/IntervalOptimisation.jl.git", + repo = "github.com/JuliaIntervals/IntervalOptimisation.jl.git", target = "build", deps = nothing, make = nothing diff --git a/docs/src/index.md b/docs/src/index.md index 21bc5ef..adcc3c9 100644 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -1,8 +1,80 @@ -# IntervalOptimisation.jl +# `IntervalOptimisation.jl` -```@index +## Rigorous global optimisation using Julia + +This package provides rigorous global optimisation routines written in pure Julia, using interval arithmetic provided by the author's [IntervalArithmetic.jl](https://github.com/JuliaIntervals/IntervalArithmetic.jl) package. + +Currently, the package uses an implementation of the Moore-Skelboe algorithm. + +## Usage + +Functions `minimise` and `maximise` are provided to find the **global** minimum or maximum, respectively, of a standard Julia function `f` of one or several variables. + +They return an `Interval` that is guaranteed to contain the global minimum (maximum), and a `Vector` of `Interval`s or `IntervalBox`es whose union contains all the minimisers. + +### Examples + + +#### 1D +``` +using IntervalArithmetic, IntervalOptimisation + +julia> @time global_min, minimisers = minimise(x -> (x^2 - 2)^2, -10..11); + 0.046620 seconds (36.07 k allocations: 1.586 MiB) + +julia> global_min +[0, 1.50881e-09] + +julia> minimisers +2-element Array{IntervalArithmetic.Interval{Float64},1}: + [1.41387, 1.41453] + [-1.41428, -1.41363] +``` + +#### 2D + +``` +julia> @time global_min, minimisers = minimise( X -> ( (x,y) = X; x^2 + y^2 ), + (-10000..10001) × (-10000..10001) ); + 0.051122 seconds (46.80 k allocations: 2.027 MiB) + +julia> global_min +[0, 2.33167e-08] + +julia> minimisers +3-element Array{IntervalArithmetic.IntervalBox{2,Float64},1}: + [-0.000107974, 0.000488103] × [-0.000107974, 0.000488103] + [-0.000107974, 0.000488103] × [-0.000704051, -0.000107973] + [-0.000704051, -0.000107973] × [-0.000107974, 0.000488103] ``` +Note that the last two `IntervalBox`es do not actually contain the global minimum; +decreasing the tolerance (maximum allowed box diameter) removes them: -```@autodocs -Modules = [IntervalOptimisation] ``` +julia> @time global_min, minimisers = minimise( X -> ( (x,y) = X; x^2 + y^2 ), + (-10000..10001) × (-10000..10001), 1e-5 ); + 0.047196 seconds (50.72 k allocations: 2.180 MiB) + +julia> minimisers +1-element Array{IntervalArithmetic.IntervalBox{2,Float64},1}: + [-5.52321e-06, 3.79049e-06] × [-5.52321e-06, 3.79049e-06] + ``` + +## Author + +- [David P. Sanders](http://sistemas.fciencias.unam.mx/~dsanders), +Departamento de Física, Facultad de Ciencias, Universidad Nacional Autónoma de México (UNAM) + + +## References: + +- *Validated Numerics: A Short Introduction to Rigorous Computations*, W. Tucker, Princeton University Press (2010) + +- *Applied Interval Analysis*, Luc Jaulin, Michel Kieffer, Olivier Didrit, Eric Walter (2001) + +- van Emden M.H., Moa B. (2004). Termination Criteria in the Moore-Skelboe Algorithm for Global Optimization by Interval Arithmetic. In: Floudas C.A., Pardalos P. (eds), *Frontiers in Global Optimization. Nonconvex Optimization and Its Applications*, vol. 74. Springer, Boston, MA. [Preprint](http://webhome.cs.uvic.ca/~vanemden/Publications/mooreSkelb.pdf) + +- H. Ratschek and J. Rokne, [*New Computer Methods for Global Optimization*](http://pages.cpsc.ucalgary.ca/~rokne/global_book.pdf) + +## Acknowledements +Financial support is acknowledged from DGAPA-UNAM PAPIIT grant IN-117117.