A modern Fortran simulated annealing optimization method

Find us on…

GitHub

simulated-annealing

simulated-annealing

A modern Fortran simulated annealing optimization method.

Status

Language CI Status GitHub release codecov

Building

A Fortran Package Manager manifest file is included, so that the library and test cases can be compiled with FPM. For example:

fpm build --profile release
fpm test --profile release

To use simulated-annealing within your fpm project, add the following to your fpm.toml file:

[dependencies]
simulated-annealing = { git="https://github.com/jacobwilliams/simulated-annealing.git" }

To generate the documentation using ford, run: ford ford.md

Features

The library contains an implementation of a simulated annealing optimization method. See the references for more details. The main class is simulated_annealing_type. It also includes the ability to submit function evaluations to parallel workers (the exact parallel implementation is up to the user to implement).

The library also exports a C interface, which can also be called from Python. A Python package is also included (see the sa_fortran class). To use the Python interface, first build and install the shared library using:

fpm install --prefix ./sa_fortran/lib --profile release

Then refer to the two python examples python_example.py and parallel_example.py for how to use it.

Example

2D Optimization Visualization

See also

  • https://www.netlib.org/opt/simann.f

Documentation

The latest API documentation can be found here. This was generated from the source code using FORD.

References

Developer Info

Jacob Williams