Lightweight package for convex programming written in Modern Fortran.
Status : Prototype
LightConvex is an experiment about writing convex programming solvers in Modern Fortran. It aims at providing an easy-to-use API for solving both dense and sparse convex programs, including linear programs, e.g.
and quadratic programs, e.g.
where the inequalities are applied element-wise, and LightConvex focuses on designing the structure of the package and its interface. For that purpose, LightConvex is thus currently restricted to linear programs.
Linear programming (LP) is a method to achieve the best outcome (such as maximizing profit or minimizing cost) in a mathematical model whose requirements and objective are represented by linear relationships. The standard form of an LP reads
with
Below is a tentative list of features to be included in the first working prototype of LightConvex:
- Support for dense LP
- Standard primal simplex algorithm
- Standard dual simplex algorithm
- Revised dual simplex algorithm
- Support for sparse LP
- Primal simplex algorithm
- Revised dual simplex algorithm
- Primal Affine Scaling
- High-level interfaces
-
problem = LP(c, A, b)for dense and sparse LP. -
solution = solve(problem, alg)for dense and sparse LP.
-
- Preprocessing
- Conversion of any LP into standard equality form
- Idiot Crash Algorithm
- Utilities
- (Compressed) MPS file reader
- Examples
- Max Flow / Min Cut
- Documentation
- In-code documentation
- Online documentation using
FORD
- Continuous integration and documentation
- Unit tests based on the netlib LP test suite
- CI based on setup-fortran-conda with
fpmbuild system and automatic documentation withFORD - Add code coverage using
codecov
For the sake of simplicity, only double precision arithmetic is currently supported.
The library can be build with the Fortran Package Manager fpm using the provided fpm.toml like so:
fpm build --releaseOnly double precision (real64) is currently supported.
To use LightConvex within your fpm project, add the following line to your fpm.toml file:
[dependencies]
LightConvex = {git="https://github.com/loiseaujc/LightConvex.git"}- Boyd, Stephen P., and Lieven Vandenberghe. Convex optimization. Cambridge university press, 2004.