Skip to main content

Enables the formulation of nonlinear models for industrial optimization problems.

Project description

https://img.shields.io/pypi/v/dwave-optimization.svg https://img.shields.io/pypi/pyversions/dwave-optimization.svg https://circleci.com/gh/dwavesystems/dwave-optimization.svg?style=svg

dwave-optimization

dwave-optimization enables the formulation of nonlinear models for industrial optimization problems. The package includes:

  • A class for nonlinear models used by the Leap service’s quantum-classical hybrid nonlinear-program solver.

  • Model generators for common optimization problems.

Example Usage

The flow-shop scheduling problem is a variant of the renowned job-shop scheduling optimization problem. Given n jobs to schedule on m machines, with specified processing times for each job per machine, minimize the makespan (the total length of the schedule for processing all the jobs). For every job, the i-th operation is executed on the i-th machine. No machine can perform more than one operation simultaneously.

This small example builds a model for optimizing the schedule for processing two jobs on three machines.

from dwave.optimization.generators import flow_shop_scheduling

processing_times = [[10, 5, 7], [20, 10, 15]]
model = flow_shop_scheduling(processing_times=processing_times)

For explanations of the terminology, see the Ocean glossary.

See the documentation for more examples.

Installation

Installation from PyPI:

pip install dwave-optimization

During package development, it is often convenient to use an editable install. See meson-python’s editable installs for more details.

pip install --group dev --group blas
pip install --editable . \
    --no-build-isolation \
    --config-settings=editable-verbose=true \
    --config-settings=setup-args="-Dblas=enabled"

Testing

All code should be thoroughly tested and all pull requests should include tests.

To run the Python tests, first install the package using an editable install as described above. The tests can then be run with unittest.

python -m unittest

To run the C++ tests, first install the project dependencies, then setup a meson build directory. You must configure the build as a debug build for the tests to run.

pip install --group dev --group blas
meson setup build -Dbuildtype=debug -Dblas=enabled

You can then run the tests using meson’s test framework.

meson test -Cbuild

To run the doctests, install the docs requirements:

pip install --group docs

You can then run them using the docs/Makefile.

make -C docs doctest

License

Released under the Apache License 2.0. See LICENSE file.

Contributing

Ocean’s contributing guide has guidelines for contributing to Ocean packages.

dwave-optimization includes some formatting customization in the .clang-format and setup.cfg files.

Release Notes

dwave-optimization makes use of reno to manage its release notes.

When making a contribution to dwave-optimization that will affect users, create a new release note file by running

reno new your-short-descriptor-here

You can then edit the file created under releasenotes/notes/. Remove any sections not relevant to your changes. Commit the file along with your changes.

See reno’s user guide for details.

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

dwave_optimization-0.6.12.tar.gz (408.7 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

dwave_optimization-0.6.12-cp314-cp314t-win_amd64.whl (9.4 MB view details)

Uploaded CPython 3.14tWindows x86-64

dwave_optimization-0.6.12-cp314-cp314t-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (15.2 MB view details)

Uploaded CPython 3.14tmanylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

dwave_optimization-0.6.12-cp314-cp314t-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl (14.5 MB view details)

Uploaded CPython 3.14tmanylinux: glibc 2.24+ ARM64manylinux: glibc 2.28+ ARM64

dwave_optimization-0.6.12-cp314-cp314t-macosx_11_0_arm64.whl (21.8 MB view details)

Uploaded CPython 3.14tmacOS 11.0+ ARM64

dwave_optimization-0.6.12-cp314-cp314t-macosx_10_15_x86_64.whl (21.8 MB view details)

Uploaded CPython 3.14tmacOS 10.15+ x86-64

dwave_optimization-0.6.12-cp312-abi3-win_amd64.whl (9.0 MB view details)

Uploaded CPython 3.12+Windows x86-64

dwave_optimization-0.6.12-cp312-abi3-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (14.7 MB view details)

Uploaded CPython 3.12+manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

dwave_optimization-0.6.12-cp312-abi3-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl (14.0 MB view details)

Uploaded CPython 3.12+manylinux: glibc 2.24+ ARM64manylinux: glibc 2.28+ ARM64

dwave_optimization-0.6.12-cp312-abi3-macosx_11_0_arm64.whl (21.5 MB view details)

Uploaded CPython 3.12+macOS 11.0+ ARM64

dwave_optimization-0.6.12-cp312-abi3-macosx_10_13_x86_64.whl (21.6 MB view details)

Uploaded CPython 3.12+macOS 10.13+ x86-64

dwave_optimization-0.6.12-cp311-cp311-win_amd64.whl (9.1 MB view details)

Uploaded CPython 3.11Windows x86-64

dwave_optimization-0.6.12-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (15.2 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

dwave_optimization-0.6.12-cp311-cp311-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl (14.6 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.24+ ARM64manylinux: glibc 2.28+ ARM64

dwave_optimization-0.6.12-cp311-cp311-macosx_11_0_arm64.whl (21.6 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

dwave_optimization-0.6.12-cp311-cp311-macosx_10_13_x86_64.whl (21.7 MB view details)

Uploaded CPython 3.11macOS 10.13+ x86-64

dwave_optimization-0.6.12-cp310-cp310-win_amd64.whl (9.1 MB view details)

Uploaded CPython 3.10Windows x86-64

dwave_optimization-0.6.12-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (15.2 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

dwave_optimization-0.6.12-cp310-cp310-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl (14.5 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.24+ ARM64manylinux: glibc 2.28+ ARM64

dwave_optimization-0.6.12-cp310-cp310-macosx_11_0_arm64.whl (21.6 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

dwave_optimization-0.6.12-cp310-cp310-macosx_10_13_x86_64.whl (21.8 MB view details)

Uploaded CPython 3.10macOS 10.13+ x86-64

File details

Details for the file dwave_optimization-0.6.12.tar.gz.

File metadata

  • Download URL: dwave_optimization-0.6.12.tar.gz
  • Upload date:
  • Size: 408.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.20

File hashes

Hashes for dwave_optimization-0.6.12.tar.gz
Algorithm Hash digest
SHA256 75300d0c5ced4768ed28f6a60d36420203f29c60c1aee9a2520f1d518bad799a
MD5 f384be1215325f8eddc649c439d7ec23
BLAKE2b-256 ffeffa2638cd5153b2354cd4ff83a7990291533538175b2e636566fd8fd73b8f

See more details on using hashes here.

File details

Details for the file dwave_optimization-0.6.12-cp314-cp314t-win_amd64.whl.

File metadata

File hashes

Hashes for dwave_optimization-0.6.12-cp314-cp314t-win_amd64.whl
Algorithm Hash digest
SHA256 c6a36673ceb1c8dd7df256023911b48617127301e97c3b6cd2dcf071e313d0bc
MD5 6a4e7b42c4543b044260aa65e8c0c7c8
BLAKE2b-256 c0f4337fa1b78e99d659fbd8889201709bcff77cb4c1783d1d89b3499f522172

See more details on using hashes here.

File details

Details for the file dwave_optimization-0.6.12-cp314-cp314t-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for dwave_optimization-0.6.12-cp314-cp314t-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 229ab258ea0f7389c343a3aa4358dafc456578db1a4973fb4cec36b88c62a108
MD5 283617bf19fad8f60d1dcf3cd6960850
BLAKE2b-256 ec6d11d59893383c1cce81748c5cd618a048ccccc5670fb482bfb0c77bf0eb12

See more details on using hashes here.

File details

Details for the file dwave_optimization-0.6.12-cp314-cp314t-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for dwave_optimization-0.6.12-cp314-cp314t-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 ffd7bf3ec6d56287bb5bab37b8363995cad0cc3bb4634bb4280372c8908185f1
MD5 b60aef7c0f1a4cdea863b193a378bfa3
BLAKE2b-256 84bcea539d8fc063cffb231b3a45e6b3002b690c96cb26891625f05d0bbdde0c

See more details on using hashes here.

File details

Details for the file dwave_optimization-0.6.12-cp314-cp314t-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for dwave_optimization-0.6.12-cp314-cp314t-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b14859a5862aec21efde1e9bc6ba91dc40f26d397e69bbb90fe0ad86831ef371
MD5 258861d43a5ee1559f870ecf14c37e15
BLAKE2b-256 6a1042216ae3ba5cf61117a4b2a5e59435c9fabe2fa021565caaf3fe63e985fc

See more details on using hashes here.

File details

Details for the file dwave_optimization-0.6.12-cp314-cp314t-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for dwave_optimization-0.6.12-cp314-cp314t-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 5274bad6c702c76a8f8d7fde8efcbdd2fd3606309e5b7f10071cc5c54bf30ba2
MD5 a9ab50a72823b8661a599ce6f4086819
BLAKE2b-256 4735716be4e75cbbc5fe3d0fb9f09a1965e591ae35818b576ea72a5ddd211fc4

See more details on using hashes here.

File details

Details for the file dwave_optimization-0.6.12-cp312-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for dwave_optimization-0.6.12-cp312-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 be032bc7b7de68e4ce540525bbf96a3bdfbc27e3949f34e9d27da17227ec0e66
MD5 f1bac83017e958565704edf68b4b2268
BLAKE2b-256 a689cf8c5879d58e10a0aa8c9bcb2f08e1302fada9a368fd6a259052c88fa9c1

See more details on using hashes here.

File details

Details for the file dwave_optimization-0.6.12-cp312-abi3-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for dwave_optimization-0.6.12-cp312-abi3-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 76d6df3111418b6e8d9e71cdca3179fff303f78664ef3cb0ecc183897842135e
MD5 a805058228461c8b4fc2275f30bdfa46
BLAKE2b-256 f6aae780881e04e9a86bf53f0bbdb0745501039d68e1f7d8657bf8f8bb72aad5

See more details on using hashes here.

File details

Details for the file dwave_optimization-0.6.12-cp312-abi3-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for dwave_optimization-0.6.12-cp312-abi3-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 fdded0f7a472bd3eba05e69c684f132a9b38a6fc15b7101fdf55e3f4db189ce9
MD5 54f18e4297926699879a80fada1d181c
BLAKE2b-256 ff2a8b9b7948cb04135edabf23695f7feff5b1473b97be6c86394d297b0722d9

See more details on using hashes here.

File details

Details for the file dwave_optimization-0.6.12-cp312-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for dwave_optimization-0.6.12-cp312-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 1232594a87ccd009b89dd5d321c80b68789f870b21494e466a9f91c15311cf28
MD5 01b0ac02c18367e159f27c3445103d26
BLAKE2b-256 fe2a2eb04ad7dd1ec2ab18a9814c8201997683a6965d8af6a0efa62a71152e5a

See more details on using hashes here.

File details

Details for the file dwave_optimization-0.6.12-cp312-abi3-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for dwave_optimization-0.6.12-cp312-abi3-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 1e1bdedb9d3a7d57c538c24122cdb1b992cb088234a57187513a67cf881fa0d9
MD5 195890105844095aa50d670f54217dbf
BLAKE2b-256 6a92c054f612adf15429c715b7cd26cfe0dcd77264b748fff392050b8a50c072

See more details on using hashes here.

File details

Details for the file dwave_optimization-0.6.12-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for dwave_optimization-0.6.12-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 7abe35c8686401f1c45fc5a1ad17a61ce05d95e206d5fe2f3a18e9d8a732f993
MD5 dbf7db4c97eaed8fd25fb21bbd3dfde7
BLAKE2b-256 72be48d52b55200696b875c09a5686f72da6a09f59f0dde1ef8dd408083083b0

See more details on using hashes here.

File details

Details for the file dwave_optimization-0.6.12-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for dwave_optimization-0.6.12-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 98328c0dce1d378204aca940dc61a766d84c82333bcf354e583692a87ac9e6b0
MD5 b86da2db831834e97541d8e9f0313860
BLAKE2b-256 410b909d84d7b6c22e6a0af9357cf84b947f13c55203305fc1a751beecdd59a1

See more details on using hashes here.

File details

Details for the file dwave_optimization-0.6.12-cp311-cp311-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for dwave_optimization-0.6.12-cp311-cp311-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 4119ada96e753a5d0be921c80943ce8c3cf181a535f0e1ca04a5782553e82cdb
MD5 41fe361b62592b19f2076258c44649b8
BLAKE2b-256 1c198798a55310ec757b31a7b068ac897d088a334f80caef8c0eb09cffdaf6e7

See more details on using hashes here.

File details

Details for the file dwave_optimization-0.6.12-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for dwave_optimization-0.6.12-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a346e48615c62f8d6d1db7cb7b2e2ae227809c99853b49a4ef31038d4c036758
MD5 ebfe5e73e0c8dc8ab3cea9fe37786280
BLAKE2b-256 d0a8f11c1c076b112aaec1fe1859372e28205d18097777770c8bfbb8e762430d

See more details on using hashes here.

File details

Details for the file dwave_optimization-0.6.12-cp311-cp311-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for dwave_optimization-0.6.12-cp311-cp311-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 a00d3b19b75b699efd4b93f98a0ded0768f50293f8da35f4a754a410539663ac
MD5 1d12d9310b0b17b4f5fdbbca3a215844
BLAKE2b-256 266cb04c6a0124eeba38e6abdbd2c09e38083c643b6a347bb67a270ca8badb9f

See more details on using hashes here.

File details

Details for the file dwave_optimization-0.6.12-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for dwave_optimization-0.6.12-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 8c17f80ffb6364c8c1f2b4b6c501d3c0e642c111e3705378827d5db71b60ff4d
MD5 a1bd0ec06bd12827b581e11c5cc6dc3b
BLAKE2b-256 d8b830bf37f10533750e0ccc98f30c4b81c6bdde53f9a123377744c0f04b266c

See more details on using hashes here.

File details

Details for the file dwave_optimization-0.6.12-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for dwave_optimization-0.6.12-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 0d7d459c2bafcde4689d5e72576ae14851bcb8a706140a6df9e63ca3abaf940f
MD5 d8de380211ca3ca7aa7dd1bfaf80eb94
BLAKE2b-256 64a8104e55f8890d12bfac1e205005c7a747f203ce8af2e6ba978053b5c6d908

See more details on using hashes here.

File details

Details for the file dwave_optimization-0.6.12-cp310-cp310-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for dwave_optimization-0.6.12-cp310-cp310-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 9a847069909669e46d69e202b1781a26c548e1de530aa9bbd9ffab21ded180a9
MD5 5d4fa122697757e287181e38744f6ec0
BLAKE2b-256 95372d74c6b076ca0b5f831b0ed97369e5a2134c4483a98c101247bc3749ef35

See more details on using hashes here.

File details

Details for the file dwave_optimization-0.6.12-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for dwave_optimization-0.6.12-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d292f2850a272b427c329858b0eda30d5c3ed5117718d1325a1e610651fad6a7
MD5 3947088f532a4b646cddf0ab0a79eafd
BLAKE2b-256 a39af8d7807856653ff90f3e922f76a4838decf66860c6b98f825f9cc944b71c

See more details on using hashes here.

File details

Details for the file dwave_optimization-0.6.12-cp310-cp310-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for dwave_optimization-0.6.12-cp310-cp310-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 7dfc81ae9eebe3c67dd196d13a61f78ab8e7983deb1bf3ede5010579bd8b344f
MD5 ee9f928aff6676e8322475006ee8ca38
BLAKE2b-256 874dd1ad512275898f4bd3ad7295547bf4908a54c41bfd5fda4bf91bf1aef6e3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page