Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing docs link #36

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .DS_Store
Binary file not shown.
3 changes: 3 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -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.

Expand Down
24 changes: 24 additions & 0 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -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"]
57 changes: 2 additions & 55 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand All @@ -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

Expand Down
7 changes: 0 additions & 7 deletions REQUIRE

This file was deleted.

Binary file added docs/.DS_Store
Binary file not shown.
2 changes: 0 additions & 2 deletions docs/.gitignore

This file was deleted.

6 changes: 6 additions & 0 deletions docs/Project.toml
Original file line number Diff line number Diff line change
@@ -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"
14 changes: 5 additions & 9 deletions docs/make.jl
Original file line number Diff line number Diff line change
@@ -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
Expand Down
80 changes: 76 additions & 4 deletions docs/src/index.md
Original file line number Diff line number Diff line change
@@ -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.