Skip to content

Commit

Permalink
Replace tutorial.md by link to tutorial (#124)
Browse files Browse the repository at this point in the history
  • Loading branch information
tmigot authored Jul 24, 2023
1 parent 4c53c42 commit f68fd13
Showing 1 changed file with 1 addition and 58 deletions.
59 changes: 1 addition & 58 deletions docs/src/tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,61 +6,4 @@
Pages = ["tutorial.md"]
```

## Fine-tune CaNNOLeS

CaNNOLeS.jl exports the function `cannoles`:
```
cannoles(nlp :: AbstractNLPModel; kwargs...)
```

Find below a list of the main options of `cannoles`.

### Tolerances on the problem

```
| Parameters | Type | Default | Description |
| -------------------- | ------------- | --------------- | -------------------------------------------------- |
| atol | AbstractFloat | √eps(T) | absolute tolerance. |
| rtol | AbstractFloat | √eps(T) | relative tolerance. |
| unbounded_threshold | AbstractFloat | -1e5 | below this threshold the problem is unbounded. |
| max_eval | Integer | 100000 | evaluation limit, e.g. `neval_residual(nls) + neval_cons(nls) > max_eval` |
| max_time | AbstractFloat | 30. | maximum number of seconds. |
| max_inner | Integer | 10000 | maximum number of iterations. |
```

### Algorithmic parameters

```
| Parameters | Type | Default | Description |
| --------------------------- | -------------- | ----------------- | -------------------------------------------------- |
| x | AbstractVector | copy(nls.meta.x0) | initial guess. |
| λ | AbstractVector | T[] | initial guess for the Lagrange mutlipliers. |
| method | Symbol | :Newton | method to compute direction, `:Newton`, `:LM`, `:Newton_noFHess`, or `:Newton_vanishing`. |
| linsolve | Symbol | :ma57 | solver use to compute the factorization: `:ma57`, `:ma97`, `:ldlfactorizations` |
| check_small_residual | Bool | false | |
| always_accept_extrapolation | Bool | false | |
| δdec | Real | T(0.1) | |
```

## Examples

```@example ex1
using CaNNOLeS, ADNLPModels
# Rosenbrock
nls = ADNLSModel(x -> [x[1] - 1; 10 * (x[2] - x[1]^2)], [-1.2; 1.0], 2)
stats = cannoles(nls, atol = 1e-5, x = ones(2))
```

```@example ex1
# Constrained
nls = ADNLSModel(
x -> [x[1] - 1; 10 * (x[2] - x[1]^2)],
[-1.2; 1.0],
2,
x -> [x[1] * x[2] - 1],
[0.0],
[0.0],
)
stats = cannoles(nls, max_time = 10.)
```
You can check an [Introduction to CaNNOLeS.jl tutorial](https://jso.dev/tutorials/introduction-to-cannoles/) on our site, [JSO.dev](https://jso.dev).

0 comments on commit f68fd13

Please sign in to comment.