biogeme-optimization
Various optimization algorithms used for teaching and research. In particular, they are used by Biogeme.
Biogeme-facing optimizer API
The optimizer can be installed and used without installing the full biogeme
distribution:
uv add biogeme-optimization
The canonical imports are:
from biogeme_optimization.function import FunctionToMinimize
from biogeme_optimization.optimization import bfgs_trust_region_for_biogeme
bfgs_trust_region_for_biogeme accepts an objective, a one-dimensional NumPy
initial vector, one bound pair and variable name per parameter, and an options
mapping containing maxiter, tolerance, and objective_tolerance. It returns
a typed result with solution, convergence, and messages attributes.
The trust-region BFGS path requires only objective and gradient evaluation;
implementing a Hessian is optional. The historical bounds argument remains
part of the API, although this particular legacy trust-region BFGS algorithm
does not enforce finite bounds. The package does not import or depend on the
full biogeme distribution.
The package contains the following modules:
algebra
It contains functions dealing with linear algebra:
- A modified Cholesky factorization introduced by Schnabel and Eskow (1999)
- The calculation of a descent direction based on this factorization.
bfgs
The functions in this module calculate
- the BFGS update of the hessian approximation (see Eq. (13.12) in Bierlaire (2015)),
- the inverse BFGS update of the hessian approximation (see Eq. (13.13) in Bierlaire (2015)).
bounds
This module mainly defines the class Boundsthat manages the bound constraints.
diagnostics
This module defines the diagnostic of some optimization subproblems (dogleg, and comjugate gradient).
exceptions
It defines the OptimizationError exception.
format
It defines the class FormattedColumns that formats the information
reported at each iteration of an algorithm.
function
It defines the abstract class FunctionToMinimize that encapsulate
the calculation of the objective function and its derivatives.
hybrid_function
It defines the class HybridFunction that calculates the objective
function and its derivatives, where the second derivative can be
either the analytical hessian, or a BFGS approximation.
linesearch
This module implements the line search algorithms (see Chapter 11 in Bierlaire, 2015).
simple_bounds
This module implements the minimization algorithm under bound constraints proposed by Conn et al. (1988).
trust_region
This module implements the trust region algorithms (see Chapter 12 in Bierlaire, 2015).
References
- Bierlaire, M. (2015). Optimization: Principles and Algortihms. EPFL Press.
- Conn, A. R., Gould, N. I. M and Toint, Ph. L. (1988) Testing a Class of Methods for Solving Minimization Problems with Simple Bounds on the Variables. Mathematics of Computation, 50(182), 399-430.
- Schnabel, R. B. and Eskow, E. (1999) A Revised Modified Cholesky Factorization Algorithm. SIAM Journal on Optimization, 9(4), 1135-1148.
Release files for biogeme-optimization 0.0.12
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| biogeme_optimization-0.0.12.tar.gz | 73.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| biogeme_optimization-0.0.12-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 146.6 kB
Release files / biogeme_optimization-0.0.12.tar.gz
| Download URL | biogeme_optimization-0.0.12.tar.gz |
|---|---|
| Size | 73.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ae66d758b5a2191044632544585ddd170ca8a10112f9d17894a8fb63e93d1caf
|
|
BLAKE2b-256 checksum How to use checksums |
9c0fd2944f4af4bd342ffb9144d8fcbced767004116525dae801c7d5b02135cc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 12, 2026.
Transparency logRelease files / biogeme_optimization-0.0.12-py3-none-any.whl
| Download URL | biogeme_optimization-0.0.12-py3-none-any.whl |
|---|---|
| Size | 73.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1653e88bbfefa4c4a5815e26176cd9e6f7601d8442026f940cb6f497d7ce08ae
|
|
BLAKE2b-256 checksum How to use checksums |
7bd1730621ac07ff0e4496222994cece3eea9fed542a18addcc768bd4db54b2e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 12, 2026.
Transparency log