Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
relf committed Oct 11, 2023
1 parent b185c07 commit d8d9c63
Showing 1 changed file with 20 additions and 3 deletions.
23 changes: 20 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,34 @@
# cobyla
# cobyla - a pure Rust implementation

[![tests](https://github.com/relf/cobyla/workflows/tests/badge.svg)](https://github.com/relf/cobyla/actions?query=workflow%3Atests)
[![crates.io](https://img.shields.io/crates/v/cobyla)](https://crates.io/crates/cobyla)
[![docs](https://docs.rs/cobyla/badge.svg)](https://docs.rs/cobyla)

COBYLA an algorithm for minimizing a function of many variables. The method is derivatives free (only the function values are needed) and take into account constraints on the variables. The algorithm is described in:
COBYLA is an algorithm for minimizing a function of many variables. The method is derivatives free (only the function values are needed) and take into account constraints on the variables. The algorithm is described in:

> M.J.D. Powell, "A direct search optimization method that models the objective and constraint functions by linear interpolation," in
> Advances in Optimization and Numerical Analysis Mathematics and Its Applications, vol. 275 (eds. Susana Gomez and Jean-Pierre Hennart),
> Kluwer Academic Publishers, pp. 51-67 (1994).
The algorithm comes into two flavours :
* As an [argmin solver](), the Rust code was generated from the C code from [here](https://github.com/emmt/Algorithms/tree/master/cobyla)
* As a function `minimize`, the Rust code was generated from the C code the [NLopt](https://github.com/stevengj/nlopt) project (version 2.7.1)

In both cases, an initial transpilation was done with [c2rust](https://github.com/immunant/c2rust) then the code was manually edited to make it work. Note that the callback mechanism
is inspired from the excellent Rust binding of NLopt, namely [rust-nlopt](https://github.com/adwhit/rust-nlopt)

## Example

```bash
cargo run --example paraboloid
```
```

## Related projects

* [rust-nlopt](https://github.com/adwhit/rust-nlopt): the Rust binding of the [NLopt project](https://nlopt.readthedocs.io)
* [argmin](https://github.com/argmin-rs/argmin): the pure-Rust optimization framework
* [slsqp](https://github.com/relf/slsqp): As for `cobyla`, a pure Rust implementation of SLSQP transpiled and manually edited from NLopt C code.

## License

The project is released under MIT License.

0 comments on commit d8d9c63

Please sign in to comment.