Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
relf committed Oct 11, 2023
1 parent 9647ebd commit baa705e
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 5 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Changelog

## [Unreleased]

SLSQP optimizer in Rust (SLSQP stands for Sequential Least SQuares Programming).
SLSQP Rust code was generated from [NLopt](https://github.com/stevengj/nlopt) 2.7.1 SLSQP C code thanks to [c2rust](https://github.com/immunant/c2rust) transpiler then manually edited to make it work.
29 changes: 24 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,31 @@
# slsqp

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

## slsqp 0.1.x
This is a sequential quadratic programming (SQP) algorithm for nonlinearly constrained gradient-based optimization based on the implementation by Dieter Kraft and described in:

Dieter Kraft, "A software package for sequential quadratic programming", Technical Report DFVLR-FB 88-28, Institut für Dynamik der Flugsysteme, Oberpfaffenhofen, July 1988.
Dieter Kraft, "Algorithm 733: TOMP–Fortran modules for optimal control calculations," ACM Transactions on Mathematical Software, vol. 20, no. 3, pp. 262-281 (1994).

The Rust code was generated/adapted from the C code from the [NLopt](https://github.com/stevengj/nlopt) project (version 2.7.1).
The algorithme is available here as a `minimize` function.
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)
* [cobyla](https://github.com/relf/cobyla): As for `slsqp`, a pure Rust implementation of the COBYLA algorithm transpiled and manually edited from NLopt C code.

## License

The project is released under MIT License.

SLSQP optimizer in Rust (SLSQP stands for Sequential Least SQuares Programming).
SLSQP Rust code was generated from [NLopt](https://github.com/stevengj/nlopt) 2.7.1 SLSQP C code thanks to [c2rust](https://github.com/immunant/c2rust) transpiler then
manually edited to make it work.

0 comments on commit baa705e

Please sign in to comment.