From 67f1f94da708e727bc14c86b31e2dcdbc13aaa88 Mon Sep 17 00:00:00 2001 From: Yashvardhan Sharma Date: Tue, 4 Jun 2019 06:05:37 +0530 Subject: [PATCH 1/8] Adding Project.toml --- Project.toml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 Project.toml diff --git a/Project.toml b/Project.toml new file mode 100644 index 0000000..0bbb941 --- /dev/null +++ b/Project.toml @@ -0,0 +1,23 @@ +name = "IntervalOptimisation" +uuid = "c7c68f13-a4a2-5b9a-b424-07d005f8d9d2" + +[compat] +DataStructures = "≥ 0.9.0" +ForwardDiff = "≥ 0.8.0" +IntervalArithmetic = "≥ 0.15.0" +IntervalConstraintProgramming = "≥ 0.9.0" +IntervalRootFinding = "≥ 0.4.0" +julia = "≥ 0.7.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"] From 91e063100f2cc877e25f5cbead6c9b85d8714a3f Mon Sep 17 00:00:00 2001 From: Yashvardhan Sharma Date: Tue, 4 Jun 2019 19:11:55 +0530 Subject: [PATCH 2/8] few additions --- NEWS.md | 3 +++ Project.toml | 3 ++- REQUIRE | 7 ------- 3 files changed, 5 insertions(+), 8 deletions(-) delete mode 100644 REQUIRE diff --git a/NEWS.md b/NEWS.md index 97b117c..8b2a1bd 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,8 @@ # NEWS for IntervalOptimisation.jl +## v0.4 +- This version have some new features added. + ## 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 index 0bbb941..49498eb 100644 --- a/Project.toml +++ b/Project.toml @@ -1,5 +1,6 @@ name = "IntervalOptimisation" uuid = "c7c68f13-a4a2-5b9a-b424-07d005f8d9d2" +version = "0.4.0" [compat] DataStructures = "≥ 0.9.0" @@ -7,7 +8,7 @@ ForwardDiff = "≥ 0.8.0" IntervalArithmetic = "≥ 0.15.0" IntervalConstraintProgramming = "≥ 0.9.0" IntervalRootFinding = "≥ 0.4.0" -julia = "≥ 0.7.0" +julia = "≥ 1.0.0" [deps] DataStructures = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8" 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 From c88fe9d9fb9543303b67327001818215eb55fef2 Mon Sep 17 00:00:00 2001 From: Yashvardhan Sharma Date: Tue, 4 Jun 2019 19:36:56 +0530 Subject: [PATCH 3/8] Correct comment in NEWS.md --- NEWS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NEWS.md b/NEWS.md index 8b2a1bd..3dc4f92 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,7 +1,7 @@ # NEWS for IntervalOptimisation.jl ## v0.4 -- This version have some new features added. +- Drop support for Julia 0.7 ## v0.3 - Drop support for Julia 0.6. The package is now fully compatible with Julia 1.0. From 31bff1e9f471c4525c1f790099bfcf4a25d632a4 Mon Sep 17 00:00:00 2001 From: Yashvardhan Sharma Date: Thu, 6 Jun 2019 22:27:59 +0530 Subject: [PATCH 4/8] Fixing link --- README.md | 57 ++------------------------------- docs/src/index.md | 80 ++++++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 78 insertions(+), 59 deletions(-) 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/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. From f9d657831cbd175fc139446b08322617adb399e2 Mon Sep 17 00:00:00 2001 From: Yashvardhan Sharma Date: Thu, 6 Jun 2019 22:56:09 +0530 Subject: [PATCH 5/8] test --- .DS_Store | Bin 0 -> 6148 bytes docs/make.jl | 7 ++++--- 2 files changed, 4 insertions(+), 3 deletions(-) create mode 100644 .DS_Store diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..ca2b7874ee44cef1857d5487e8c8184223131c55 GIT binary patch literal 6148 zcmeH~F$w}f3`G;&La^D=avBfd4F=H@>;(h`8(BfodXDZ-CJ2t!BJu;tpJXO1`-+{7 zi0JxuSc&u^GJ~7S(n4d3ypw~RWiQwJa2ZeM@rat$Cvn!+@Lrnz*rt#G36KB@kN^q% z5COZlVY7KvMiL+a5_l4@??Zx{=Fn2rKOG1@0zf;I-LUpq0-CG<&7q|#Dlm=dL8DcD z46(YmLsOi~p`~hV7meXV4M3`}dgXhH(h?7~0-B+w9;*1Wg-e+&OK|2Hj6Nq_|Y zjDU8VVY9|d#ohY$dRE^>)z$?L_2URHKLJSWDqg_du%B!J&7q|#Dlq;CI0gn1_$q-1 D?w=C8 literal 0 HcmV?d00001 diff --git a/docs/make.jl b/docs/make.jl index 17d7b79..94aa095 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -1,6 +1,7 @@ -import Documenter +using Documenter +using IntervalArithmetic, IntervalOptimisation -Documenter.makedocs( +makedocs( modules = [IntervalOptimisation], format = :html, sitename = "IntervalOptimisation.jl", @@ -13,7 +14,7 @@ Documenter.makedocs( ) -Documenter.deploydocs( +deploydocs( repo = "github.com/dpsanders/IntervalOptimisation.jl.git", target = "build", deps = nothing, From d0ab1874260d568f3812ffba5590555c2ffc3d79 Mon Sep 17 00:00:00 2001 From: Yashvardhan Sharma Date: Fri, 7 Jun 2019 04:55:43 +0530 Subject: [PATCH 6/8] changes in make.jl --- docs/make.jl | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/docs/make.jl b/docs/make.jl index 94aa095..14a458c 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -3,19 +3,15 @@ using IntervalArithmetic, IntervalOptimisation 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, authors = "David Sanders" ) -deploydocs( - repo = "github.com/dpsanders/IntervalOptimisation.jl.git", +Documenter.deploydocs( + repo = "github.com/JuliaIntervals/IntervalOptimisation.jl.git", target = "build", deps = nothing, make = nothing From 58076f472478cb6475c6750cd45a7fdab731b820 Mon Sep 17 00:00:00 2001 From: Yashvardhan Sharma Date: Fri, 7 Jun 2019 05:11:39 +0530 Subject: [PATCH 7/8] more changes in make.jl --- docs/.DS_Store | Bin 0 -> 6148 bytes docs/.gitignore | 2 -- docs/make.jl | 2 +- 3 files changed, 1 insertion(+), 3 deletions(-) create mode 100644 docs/.DS_Store delete mode 100644 docs/.gitignore diff --git a/docs/.DS_Store b/docs/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..291864bb8a7d82ab112b7d68098a3389bf3ade09 GIT binary patch literal 6148 zcmeHKO-lnY5Pi{t3toEkm|tM^A1tLk6hu++?nebH)t2sV!Q1|H-+U;p?pdnLK=LM& znMwA+CK&)}+{{mbA%KESFp1J5V(y*Vb7#S%IcB)R6nS0WpYSt!v$lb0CD!fDU$S30(a7LKGVGmo$QQM@Ewo%XEm zNTp%)!9Xz3WnkZiL%IK_{AGHJ{BB5$f`MS*pD~aIlk3TtALV!JkI$34HnZKbiHKh- n3Wa*-5x{|*BS$)E^I3HIm5!~UWD&cD6XPMEghUq%`~m~-XQV9G literal 0 HcmV?d00001 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/make.jl b/docs/make.jl index 14a458c..49536f6 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -5,7 +5,7 @@ makedocs( modules = [IntervalOptimisation], format = Documenter.HTML(), sitename = "IntervalOptimisation.jl", - pages = Any["Home" => "index.md"], + pages = ["Home" => "index.md"], authors = "David Sanders" ) From ec96f7c7aa25f31064c4ae07244fcc054f83a68a Mon Sep 17 00:00:00 2001 From: Yashvardhan Sharma Date: Fri, 7 Jun 2019 05:28:25 +0530 Subject: [PATCH 8/8] changing the link --- docs/.DS_Store | Bin 6148 -> 6148 bytes docs/Project.toml | 6 ++++++ docs/make.jl | 3 +-- 3 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 docs/Project.toml diff --git a/docs/.DS_Store b/docs/.DS_Store index 291864bb8a7d82ab112b7d68098a3389bf3ade09..1ff2e1e921816c32f8cbd2d875fafdd8264bc63e 100644 GIT binary patch delta 70 zcmZoMXfc=&$5v319%MSpZOcC1v delta 71 zcmZoMXfc=&$Ht&gP?F>``5@!+$p#`Uf*cG%46Y1;45193V3xvUImUcU(am!h)7dt& IbNuB80BcDQJ^%m! 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 49536f6..375381e 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -1,5 +1,4 @@ -using Documenter -using IntervalArithmetic, IntervalOptimisation +using Documenter, IntervalOptimisation makedocs( modules = [IntervalOptimisation],