pareto_dp
Simple multi-objective optimization using dynamic programming to approximate the Pareto frontier.
Written in Rust, published as a Python PyPI package with PyO3 and maturin.
Problem specification
This library solves a multi-objective multiple-choice combinatorial optimization problem with additive separable objectives, designed for scenarios with precomputed data for independent decision points.
Here's an introductory blogpost that provides more motivation for the problem.
Core user-facing properties
- Independent groups: The problem consists of
nindependent groups (e.g., decision stages, components) with no interdependencies. - Additive objective aggregation: The total objective vector for a configuration is the sum of per-group contributions. For a configuration
x(one scenario chosen per group), thev-dimensional objective is: $$ F(x) = \sum_{i=1}^n a_{i,x_i} \in \mathbb{R}^v $$ wherea_{i,j}is the precomputed objective vector for groupi, scenarioj. - Precomputed lookup table: All per-group, per-scenario objective values are precomputed (table-lookup/black-box). The library takes this 3D lookup table as direct input.
Formal structure
nindependent groups- Each group
ihasm_iscenarios - Multiple-choice constraint: A configuration selects exactly one scenario per group
vobjectives, precomputed asa_{i,j} ∈ ℝᵛ- Goal: Compute the Pareto-optimal frontier in the
v-dimensional objective space
Scale challenge
The configuration space size is |X| = ∏_{i=1}^n m_i, which grows exponentially with n. Exhaustive search is infeasible for large n, so the library uses dynamic programming with epsilon-dominance pruning to efficiently approximate the Pareto front.
Installation
pip install pareto-dp
Usage
from pareto_dp import find_pareto_front
# Define your multi-objective optimization problem
# Each stand has multiple scenarios, each scenario has objective values
data = [
[[3.0, 2.1], [2.0, 1.0]], # Stand 0: 2 scenarios, 2 objectives
[[1.0, 1.0], [2.0, 0.5]], # Stand 1: 2 scenarios, 2 objectives
]
# Find Pareto-optimal solutions with epsilon precision
solutions = find_pareto_front(data, epsilon=0.01)
for sol in solutions:
print(f"Design: {sol.design_vector}, Objectives: {sol.target_vector}")
API
find_pareto_front(data, epsilon)
Finds all Pareto-optimal solutions for a multi-objective optimization problem.
Parameters:
data(List[List[List[float]]]): A 3D list where:- First dimension: decision points
- Second dimension: options for each decision point
- Third dimension: objective variable values (e.g., [cost, time, quality])
epsilon(float): Precision parameter for epsilon-dominance pruning
(Note: the context in which this problem originated is forestry land-use, so decision points are called stands in the code, and options are called scenarios).
Returns:
- List of
ParetoFrontSolutionobjects, each with:design_vector(List[int]): Which scenario to pick for each standtarget_vector(List[float]): The summed objective values for that design
Raises:
ValueError: If data is empty, has only one stand, or has inconsistent dimensions
Algorithm
The algorithm uses dynamic programming to efficiently find the Pareto front:
- Data Validation: Validates input structure and dimensions
- Shift to Positive Space: Shifts all objective values to positive space for numerical stability
- DP Tree Construction: Builds partial Pareto fronts iteratively for each stand
- Epsilon-Dominance Pruning: Uses logarithmic binning to prune dominated solutions
- Solution Reconstruction: Traces back through parent pointers to reconstruct full solutions
Requirements
- Python >= 3.9
- Compatible with CPython and PyPy
License
MIT License - see LICENSE file for details.
Repository
Metadata
Release files for pareto_dp 0.1.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pareto_dp-0.1.7.tar.gz | 17.7 kB | Details |
Built distributions (wheels)
Total release size: 5.1 MB
Release files / pareto_dp-0.1.7.tar.gz
| Download URL | pareto_dp-0.1.7.tar.gz |
|---|---|
| Size | 17.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2e04d926368f232e5e641863f5edfcb39c43e8b6ddc4ce02c206b0a6a8be32f4
|
|
BLAKE2b-256 checksum How to use checksums |
98cb0716499487aa34282e1421e0336a8a7aefce07369c9d5bfe33c45df0f1a2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / pareto_dp-0.1.7-cp39-abi3-win_arm64.whl
| Download URL | pareto_dp-0.1.7-cp39-abi3-win_arm64.whl |
|---|---|
| Size | 162.7 kB |
| Tags | CPython 3.9 Windows ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
267b17d2bdd08bce9abe2b0d47da2716c17d7616eb137be97334493e11a5d9af
|
|
BLAKE2b-256 checksum How to use checksums |
c491ff14b52d21353c2d26eae673091ca5c9915938e7b6886c547d4fd746417c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / pareto_dp-0.1.7-cp39-abi3-win_amd64.whl
| Download URL | pareto_dp-0.1.7-cp39-abi3-win_amd64.whl |
|---|---|
| Size | 167.4 kB |
| Tags | CPython 3.9 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
f3c1c174f1bebcb9210dc13becd0dc47c555fd990b1a1ed43af65050f36f8d60
|
|
BLAKE2b-256 checksum How to use checksums |
c1b33ac3047b9f59b8e224a18748606c07c6a0491acf6d30cb871a4321d6e61b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / pareto_dp-0.1.7-cp39-abi3-musllinux_1_2_x86_64.whl
| Download URL | pareto_dp-0.1.7-cp39-abi3-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 519.9 kB |
| Tags | CPython 3.9 Linux musl 1.2+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
4efc1ce903e1e05d2833ddfd7f8f268c464f7d7802492301e4b7e587e0128104
|
|
BLAKE2b-256 checksum How to use checksums |
5dd7116df0025a0dc0e6d8825dc81c918d15da588afa0c49235f5cfec8af4a25
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / pareto_dp-0.1.7-cp39-abi3-musllinux_1_2_i686.whl
| Download URL | pareto_dp-0.1.7-cp39-abi3-musllinux_1_2_i686.whl |
|---|---|
| Size | 548.7 kB |
| Tags | CPython 3.9 Linux musl 1.2+ x86-32 abi3 |
|
SHA-256 checksum How to use checksums |
a7d25dde09956a4f4b3f864cb1bc9ef3f477f8535dbdeb416e5d9c09544abccd
|
|
BLAKE2b-256 checksum How to use checksums |
bef75b6b719742ed50979d08f7b0d29f496bbbed54168e0284c1a401d1325923
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / pareto_dp-0.1.7-cp39-abi3-musllinux_1_2_armv7l.whl
| Download URL | pareto_dp-0.1.7-cp39-abi3-musllinux_1_2_armv7l.whl |
|---|---|
| Size | 584.5 kB |
| Tags | CPython 3.9 Linux musl 1.2+ ARMv7l abi3 |
|
SHA-256 checksum How to use checksums |
3070479f0a5790f32f8239412d8c00f5fa106640f3eb6345302c332b052a86d1
|
|
BLAKE2b-256 checksum How to use checksums |
15b425e435bfdbfbbedec2a4a80194d0d7594342de56b1a71dd8f248a34413d8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / pareto_dp-0.1.7-cp39-abi3-musllinux_1_2_aarch64.whl
| Download URL | pareto_dp-0.1.7-cp39-abi3-musllinux_1_2_aarch64.whl |
|---|---|
| Size | 486.4 kB |
| Tags | CPython 3.9 Linux musl 1.2+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
b7bf91b92fa2b4d0be1f55cd08b9967e1225af143c9a79fa45a5342e8ddce2b6
|
|
BLAKE2b-256 checksum How to use checksums |
8a09af8e164807c1a62b9f98c8e1d999d7fd59f96a723b4399731560a51911ad
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / pareto_dp-0.1.7-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | pareto_dp-0.1.7-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 317.4 kB |
| Tags | CPython 3.9 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
7473d4308a12f459d1f2c6b0d4168a11512ca702095e3237c0187305757263a7
|
|
BLAKE2b-256 checksum How to use checksums |
2a6dcb82a679de979a25725d698106f6eda7279cd04d80d4924d5cd54de8da40
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / pareto_dp-0.1.7-cp39-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
| Download URL | pareto_dp-0.1.7-cp39-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl |
|---|---|
| Size | 337.0 kB |
| Tags | CPython 3.9 Linux glibc 2.17+ IBM System/390x abi3 |
|
SHA-256 checksum How to use checksums |
aee05965a13c4b77837e8b2c9c1438c8ee9562b50e526fa046f0cb216d531ca0
|
|
BLAKE2b-256 checksum How to use checksums |
a2689dfa0dd92c2f94e3af7db4908daecc9053048938cb67f069fbfdd7981c94
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / pareto_dp-0.1.7-cp39-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
| Download URL | pareto_dp-0.1.7-cp39-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl |
|---|---|
| Size | 432.7 kB |
| Tags | CPython 3.9 Linux glibc 2.17+ PowerPC 64-le abi3 |
|
SHA-256 checksum How to use checksums |
b86d4bffe917dbc202753bfb7a7c5c98efa0641f17494893592c2a0afe3b61d8
|
|
BLAKE2b-256 checksum How to use checksums |
9dc4798104e4cfe192ad600318f772191fd151ae1e503d141dc80c694a85e935
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / pareto_dp-0.1.7-cp39-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
| Download URL | pareto_dp-0.1.7-cp39-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl |
|---|---|
| Size | 312.8 kB |
| Tags | CPython 3.9 Linux glibc 2.17+ ARMv7l abi3 |
|
SHA-256 checksum How to use checksums |
78f801fe3badc483fa2ed146ffb82515027a3355399edd2df2eb991f02830cc5
|
|
BLAKE2b-256 checksum How to use checksums |
7ea4586c7357ceb5bd827cedd5718a24a6872be3e0fed9475e511caf216920f3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / pareto_dp-0.1.7-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | pareto_dp-0.1.7-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 310.6 kB |
| Tags | CPython 3.9 Linux glibc 2.17+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
6f86c924f51554e2a67df5879ccf251f27a84ca3098bbadc820cc723d1b528f5
|
|
BLAKE2b-256 checksum How to use checksums |
598b8fa0abb8111ec26048eb1e52036cc1de5a268f065b199c62654a4a3a6d41
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / pareto_dp-0.1.7-cp39-abi3-manylinux_2_5_i686.manylinux1_i686.whl
| Download URL | pareto_dp-0.1.7-cp39-abi3-manylinux_2_5_i686.manylinux1_i686.whl |
|---|---|
| Size | 332.4 kB |
| Tags | CPython 3.9 Linux glibc 2.5+ x86-32 abi3 |
|
SHA-256 checksum How to use checksums |
3b53b7a29b64f2b486fa4b547e05d12dd9bf3c963495afa3b74a9cbfbdb88b2c
|
|
BLAKE2b-256 checksum How to use checksums |
69b16947a561abdaf71824cb25da9aecd071320386f6a8851ab2690b5660bbfa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / pareto_dp-0.1.7-cp39-abi3-macosx_11_0_arm64.whl
| Download URL | pareto_dp-0.1.7-cp39-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 272.1 kB |
| Tags | CPython 3.9 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
474c88766d1504d7932a02cd70cb7c2304536cb439cc7b88b8647870a3000940
|
|
BLAKE2b-256 checksum How to use checksums |
bd0b4d23f86f01536bcac7c427a7363c8e9f3684a87a80be7873420318a4acc3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / pareto_dp-0.1.7-cp39-abi3-macosx_10_12_x86_64.whl
| Download URL | pareto_dp-0.1.7-cp39-abi3-macosx_10_12_x86_64.whl |
|---|---|
| Size | 276.8 kB |
| Tags | CPython 3.9 abi3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
7ad4175bad97ae3face9d48117ebf440f0b5a728d6f8cf6c8094fdf5a1ef0f18
|
|
BLAKE2b-256 checksum How to use checksums |
00ef71b32242f08dca1e2876820832f575325d74711bab8160e89d7c44be33f8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|