Multi-objective optimization using dynamic programming to find Pareto-optimal solutions
Project description
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
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pareto_dp-0.1.7.tar.gz.
File metadata
- Download URL: pareto_dp-0.1.7.tar.gz
- Upload date:
- Size: 17.7 kB
- Tags: Source
- Uploaded using 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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2e04d926368f232e5e641863f5edfcb39c43e8b6ddc4ce02c206b0a6a8be32f4
|
|
| MD5 |
ffa1f1fb8c16999201b987412fb08918
|
|
| BLAKE2b-256 |
98cb0716499487aa34282e1421e0336a8a7aefce07369c9d5bfe33c45df0f1a2
|
File details
Details for the file pareto_dp-0.1.7-cp39-abi3-win_arm64.whl.
File metadata
- Download URL: pareto_dp-0.1.7-cp39-abi3-win_arm64.whl
- Upload date:
- Size: 162.7 kB
- Tags: CPython 3.9+, Windows ARM64
- Uploaded using 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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
267b17d2bdd08bce9abe2b0d47da2716c17d7616eb137be97334493e11a5d9af
|
|
| MD5 |
ac1ca3d8d6a244f1f1552d3592e38b2b
|
|
| BLAKE2b-256 |
c491ff14b52d21353c2d26eae673091ca5c9915938e7b6886c547d4fd746417c
|
File details
Details for the file pareto_dp-0.1.7-cp39-abi3-win_amd64.whl.
File metadata
- Download URL: pareto_dp-0.1.7-cp39-abi3-win_amd64.whl
- Upload date:
- Size: 167.4 kB
- Tags: CPython 3.9+, Windows x86-64
- Uploaded using 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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f3c1c174f1bebcb9210dc13becd0dc47c555fd990b1a1ed43af65050f36f8d60
|
|
| MD5 |
64aca007c66927031a10e8e23a053f38
|
|
| BLAKE2b-256 |
c1b33ac3047b9f59b8e224a18748606c07c6a0491acf6d30cb871a4321d6e61b
|
File details
Details for the file pareto_dp-0.1.7-cp39-abi3-musllinux_1_2_x86_64.whl.
File metadata
- Download URL: pareto_dp-0.1.7-cp39-abi3-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 519.9 kB
- Tags: CPython 3.9+, musllinux: musl 1.2+ x86-64
- Uploaded using 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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4efc1ce903e1e05d2833ddfd7f8f268c464f7d7802492301e4b7e587e0128104
|
|
| MD5 |
3cf8fb5bf510e4652716dc0413169e71
|
|
| BLAKE2b-256 |
5dd7116df0025a0dc0e6d8825dc81c918d15da588afa0c49235f5cfec8af4a25
|
File details
Details for the file pareto_dp-0.1.7-cp39-abi3-musllinux_1_2_i686.whl.
File metadata
- Download URL: pareto_dp-0.1.7-cp39-abi3-musllinux_1_2_i686.whl
- Upload date:
- Size: 548.7 kB
- Tags: CPython 3.9+, musllinux: musl 1.2+ i686
- Uploaded using 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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a7d25dde09956a4f4b3f864cb1bc9ef3f477f8535dbdeb416e5d9c09544abccd
|
|
| MD5 |
c8c46c02e876c6a255e4ba930e87c857
|
|
| BLAKE2b-256 |
bef75b6b719742ed50979d08f7b0d29f496bbbed54168e0284c1a401d1325923
|
File details
Details for the file pareto_dp-0.1.7-cp39-abi3-musllinux_1_2_armv7l.whl.
File metadata
- Download URL: pareto_dp-0.1.7-cp39-abi3-musllinux_1_2_armv7l.whl
- Upload date:
- Size: 584.5 kB
- Tags: CPython 3.9+, musllinux: musl 1.2+ ARMv7l
- Uploaded using 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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3070479f0a5790f32f8239412d8c00f5fa106640f3eb6345302c332b052a86d1
|
|
| MD5 |
0179a7731a93dd6f5fdfd2262477e7a3
|
|
| BLAKE2b-256 |
15b425e435bfdbfbbedec2a4a80194d0d7594342de56b1a71dd8f248a34413d8
|
File details
Details for the file pareto_dp-0.1.7-cp39-abi3-musllinux_1_2_aarch64.whl.
File metadata
- Download URL: pareto_dp-0.1.7-cp39-abi3-musllinux_1_2_aarch64.whl
- Upload date:
- Size: 486.4 kB
- Tags: CPython 3.9+, musllinux: musl 1.2+ ARM64
- Uploaded using 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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b7bf91b92fa2b4d0be1f55cd08b9967e1225af143c9a79fa45a5342e8ddce2b6
|
|
| MD5 |
f6b5c3ea4b0a3ead5593e2157442f831
|
|
| BLAKE2b-256 |
8a09af8e164807c1a62b9f98c8e1d999d7fd59f96a723b4399731560a51911ad
|
File details
Details for the file pareto_dp-0.1.7-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: pareto_dp-0.1.7-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 317.4 kB
- Tags: CPython 3.9+, manylinux: glibc 2.17+ x86-64
- Uploaded using 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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7473d4308a12f459d1f2c6b0d4168a11512ca702095e3237c0187305757263a7
|
|
| MD5 |
0a3f2b403d4050ef4e3de0967c9df839
|
|
| BLAKE2b-256 |
2a6dcb82a679de979a25725d698106f6eda7279cd04d80d4924d5cd54de8da40
|
File details
Details for the file pareto_dp-0.1.7-cp39-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl.
File metadata
- Download URL: pareto_dp-0.1.7-cp39-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
- Upload date:
- Size: 337.0 kB
- Tags: CPython 3.9+, manylinux: glibc 2.17+ s390x
- Uploaded using 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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aee05965a13c4b77837e8b2c9c1438c8ee9562b50e526fa046f0cb216d531ca0
|
|
| MD5 |
a1c8f9c384c1f4d844193cbc56e5a6e2
|
|
| BLAKE2b-256 |
a2689dfa0dd92c2f94e3af7db4908daecc9053048938cb67f069fbfdd7981c94
|
File details
Details for the file pareto_dp-0.1.7-cp39-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl.
File metadata
- Download URL: pareto_dp-0.1.7-cp39-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
- Upload date:
- Size: 432.7 kB
- Tags: CPython 3.9+, manylinux: glibc 2.17+ ppc64le
- Uploaded using 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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b86d4bffe917dbc202753bfb7a7c5c98efa0641f17494893592c2a0afe3b61d8
|
|
| MD5 |
448227169390a01b2f455b2314e2ed16
|
|
| BLAKE2b-256 |
9dc4798104e4cfe192ad600318f772191fd151ae1e503d141dc80c694a85e935
|
File details
Details for the file pareto_dp-0.1.7-cp39-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl.
File metadata
- Download URL: pareto_dp-0.1.7-cp39-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
- Upload date:
- Size: 312.8 kB
- Tags: CPython 3.9+, manylinux: glibc 2.17+ ARMv7l
- Uploaded using 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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
78f801fe3badc483fa2ed146ffb82515027a3355399edd2df2eb991f02830cc5
|
|
| MD5 |
bb2fb88f09c2867ec26b99d096260307
|
|
| BLAKE2b-256 |
7ea4586c7357ceb5bd827cedd5718a24a6872be3e0fed9475e511caf216920f3
|
File details
Details for the file pareto_dp-0.1.7-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: pareto_dp-0.1.7-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 310.6 kB
- Tags: CPython 3.9+, manylinux: glibc 2.17+ ARM64
- Uploaded using 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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6f86c924f51554e2a67df5879ccf251f27a84ca3098bbadc820cc723d1b528f5
|
|
| MD5 |
d40b54685ba48c0350c8fb2767add00d
|
|
| BLAKE2b-256 |
598b8fa0abb8111ec26048eb1e52036cc1de5a268f065b199c62654a4a3a6d41
|
File details
Details for the file pareto_dp-0.1.7-cp39-abi3-manylinux_2_5_i686.manylinux1_i686.whl.
File metadata
- Download URL: pareto_dp-0.1.7-cp39-abi3-manylinux_2_5_i686.manylinux1_i686.whl
- Upload date:
- Size: 332.4 kB
- Tags: CPython 3.9+, manylinux: glibc 2.5+ i686
- Uploaded using 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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3b53b7a29b64f2b486fa4b547e05d12dd9bf3c963495afa3b74a9cbfbdb88b2c
|
|
| MD5 |
aa052f5864e971807973b0bad46f6cf0
|
|
| BLAKE2b-256 |
69b16947a561abdaf71824cb25da9aecd071320386f6a8851ab2690b5660bbfa
|
File details
Details for the file pareto_dp-0.1.7-cp39-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: pareto_dp-0.1.7-cp39-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 272.1 kB
- Tags: CPython 3.9+, macOS 11.0+ ARM64
- Uploaded using 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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
474c88766d1504d7932a02cd70cb7c2304536cb439cc7b88b8647870a3000940
|
|
| MD5 |
04ee2e2ed276818e6c496c0cb7a2b8c3
|
|
| BLAKE2b-256 |
bd0b4d23f86f01536bcac7c427a7363c8e9f3684a87a80be7873420318a4acc3
|
File details
Details for the file pareto_dp-0.1.7-cp39-abi3-macosx_10_12_x86_64.whl.
File metadata
- Download URL: pareto_dp-0.1.7-cp39-abi3-macosx_10_12_x86_64.whl
- Upload date:
- Size: 276.8 kB
- Tags: CPython 3.9+, macOS 10.12+ x86-64
- Uploaded using 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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7ad4175bad97ae3face9d48117ebf440f0b5a728d6f8cf6c8094fdf5a1ef0f18
|
|
| MD5 |
16a39f5fb26084d218878a74d1a1560c
|
|
| BLAKE2b-256 |
00ef71b32242f08dca1e2876820832f575325d74711bab8160e89d7c44be33f8
|