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.10.tar.gz (395.4 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.10-cp314-cp314t-win_amd64.whl (9.4 MB view details)

Uploaded CPython 3.14tWindows x86-64

dwave_optimization-0.6.10-cp314-cp314t-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (15.1 MB view details)

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

dwave_optimization-0.6.10-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.10-cp314-cp314t-macosx_11_0_arm64.whl (21.7 MB view details)

Uploaded CPython 3.14tmacOS 11.0+ ARM64

dwave_optimization-0.6.10-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.10-cp312-abi3-win_amd64.whl (9.0 MB view details)

Uploaded CPython 3.12+Windows x86-64

dwave_optimization-0.6.10-cp312-abi3-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (14.6 MB view details)

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

dwave_optimization-0.6.10-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.10-cp312-abi3-macosx_11_0_arm64.whl (21.5 MB view details)

Uploaded CPython 3.12+macOS 11.0+ ARM64

dwave_optimization-0.6.10-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.10-cp311-cp311-win_amd64.whl (9.1 MB view details)

Uploaded CPython 3.11Windows x86-64

dwave_optimization-0.6.10-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.10-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.10-cp311-cp311-macosx_11_0_arm64.whl (21.6 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

dwave_optimization-0.6.10-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.10-cp310-cp310-win_amd64.whl (9.1 MB view details)

Uploaded CPython 3.10Windows x86-64

dwave_optimization-0.6.10-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (15.1 MB view details)

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

dwave_optimization-0.6.10-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.10-cp310-cp310-macosx_11_0_arm64.whl (21.6 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

dwave_optimization-0.6.10-cp310-cp310-macosx_10_13_x86_64.whl (21.7 MB view details)

Uploaded CPython 3.10macOS 10.13+ x86-64

File details

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

File metadata

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

File hashes

Hashes for dwave_optimization-0.6.10.tar.gz
Algorithm Hash digest
SHA256 25a86e1b3523be18546b425f7431b9c45565c8faf1c16e341e087da5acf1544d
MD5 719f849248a56adae1066803a047059e
BLAKE2b-256 a2f382e07c52887e03a3f9048c93322602cded0ca056e95e62301c6aa23fbbcd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dwave_optimization-0.6.10-cp314-cp314t-win_amd64.whl
Algorithm Hash digest
SHA256 8b7db2806620e0aa08702d3965fee6548ca4e3080c32c46cc6f698ed26e642da
MD5 e47ff10532e6b9c24dfe9aaa97cd2803
BLAKE2b-256 8a5ed34ee02b2810cb567066cf0cee5ff43f83b166fd5dc68db6d00e84667b2c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dwave_optimization-0.6.10-cp314-cp314t-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 cf06829918016620c22d8dd7befe0b687573f6748d38290cf9414a556a927d10
MD5 b928c420de3a0953afb3875699437382
BLAKE2b-256 16153f7343796a5a0ffb012be17e24c838a475a649b0083be6b7c2cec740a390

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dwave_optimization-0.6.10-cp314-cp314t-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 1433bec1256a13acc6d0f2556395302d477fa08bf2d2563d1e7a1a43fb818a1f
MD5 9683c079313bc2fc1d0fe49a3fbb41d1
BLAKE2b-256 15ba17e6ad61ba2a8c3982c8c9c87b9f5f24bcb6151de4d5b4f005cbcbe46a55

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dwave_optimization-0.6.10-cp314-cp314t-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 3b28742a2f5691d039cb5f7fef2724700a8779e8a4eaa5c13416a1d942cfc871
MD5 a55ee90ad699bcc7539f497a6d9dcd8a
BLAKE2b-256 0d6417b5b032b3858ea3c7802cb98389ae4b3b820c88eddaddcd7f12720ce31c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dwave_optimization-0.6.10-cp314-cp314t-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 14ab274687aa747d574cd683da460cf3f0ba93e6b34d6bfa9a3fc658814a12e6
MD5 f8ba41bc722a6fdab121e720d6a3b087
BLAKE2b-256 96e4442b453a1dd7680af5c3cf6e3dbda245dfc8062f19f8fc685a0d9ebdbc76

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dwave_optimization-0.6.10-cp312-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 853376782a5ac9193e9aaaacee6c8fe26357d25b6fbdc5ed7853c325291119a1
MD5 b231059399ef2b0a3f4e61901ff8b8dd
BLAKE2b-256 e10c0bb1e32f0a33ac13f54c3b8945449f1099162933e14a804a6ba3ff3bf186

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dwave_optimization-0.6.10-cp312-abi3-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 b4d2077e5fe3a4c255c934187b5a1fbfb0e469b7de342dc680a5dcebf22327dd
MD5 a67ecc0b18a206e6acf1a53262c695d7
BLAKE2b-256 ec973e740a26a4aba9fdc807147702cb660c628c5c721f73e30c6a2fdb5ead17

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dwave_optimization-0.6.10-cp312-abi3-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 5d61a70924e09c4f15f17ab962432dad703c65389c6d255fdddf86f3d062be4e
MD5 2ad67994d286c2006a784b9243a4d980
BLAKE2b-256 c44d848f768853b3487c66412f0345920f0a8e9ab4d28964eecac2e861d126fc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dwave_optimization-0.6.10-cp312-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ef87bb7e2ad20b40eea81b00a06ad5a7836d84888f3c66a0bb56baf63bbce41a
MD5 83a57440716d2c850a478e9a51fedac7
BLAKE2b-256 5cf707d0cf75dfe97e324265e221f6713383f2651a1418267f1ad2b1fd9dbaab

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dwave_optimization-0.6.10-cp312-abi3-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 405872738e7073380064c67b663533b6cce4bfb96abc2fd4149aba8c62a30b3f
MD5 487fb9cd38736df385681f10f8abf7ca
BLAKE2b-256 72b4977b6cfefe3335458c5c5b4d2b926ce506a3f0dd59aa5944330080afb8fe

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dwave_optimization-0.6.10-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 a03ffbcd7a5c4ae4dcc481f3f95b121d5d0d670fcabb8bb4d6cb5df21f80c1b1
MD5 8e6266fde8c292d3426f1575fd1b84b2
BLAKE2b-256 527e59743b79044d387baa322e075367831ea0e560ab636e0f4e7e877a096f9a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dwave_optimization-0.6.10-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 2b06c83871239f08f041f8c72e8e26693adb4fa729f388401f963f9ba2773103
MD5 78e2289c3725f4aa4b9f32fe2b38f7e9
BLAKE2b-256 6c717613d485d4fc326c1d87ecdbbb698a8ee2dc7b96a643cc53b82219930004

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dwave_optimization-0.6.10-cp311-cp311-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 5abb711578404db3826686696428d75b4bb7f9a652529f32eb3730a5bfa15e5c
MD5 e89e9aac7de88c0de02ddceb467976a1
BLAKE2b-256 3ad01fb8629901fa4cc2b217a71c05bf2c7340055145d03282021e21e068f2de

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dwave_optimization-0.6.10-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 854b034e3b73309c2087db59069fa7d12489e04d2b583e10edb6a34dbf6c3bd4
MD5 f5cf442e193fd14c534f1ef08ea1509a
BLAKE2b-256 d65bb6de6bd47ed9ed63032fbade33e8c040d25ea5b6a28d12b56c71c0de2aca

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dwave_optimization-0.6.10-cp311-cp311-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 da99bcb1af9b4ee65e6e48576804736458362dfe21a6604435027e3d295823db
MD5 7afc59b31c393673c189b54630b18518
BLAKE2b-256 8363c1a9bd7bc884c764596ae14383a3f685c95f0389034b39d9e462d9c1810e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dwave_optimization-0.6.10-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 9dc52a0565f50dbabed0b1c31cc1f1e2c7a2519a2223d55ca319eb3b26915754
MD5 543fbdf47b0e221946318487faf78195
BLAKE2b-256 337a726bcd80d34c9f8316539871d1e16b0ef5b46052288420964573c2e8a911

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dwave_optimization-0.6.10-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 e4093d0ade0d1a283c2793cd12b7f95b112db36cf507b8c8c94201cb6a148475
MD5 60a4e0d71c96f671e79602b26f351987
BLAKE2b-256 b88f5c33140ad7718788d5f3678c38369817bb78e5715dfcf17dd9a0a7a05e7f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dwave_optimization-0.6.10-cp310-cp310-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 e09b42c21fe1246d18685e1fb58447491658c55cde6c3e7346dbaa4aaad9b142
MD5 7982831abbeaf1b628619e87457d5484
BLAKE2b-256 9d32d4bbcb0acff73019ab60e859fdd6a070c4576a258c206e851fa643d7fab0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dwave_optimization-0.6.10-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 5b33a865f9a7edb01956a410dd603280d82320c7d92700ec8de0742ce6f4a905
MD5 423f7c402bf5fd8a5499b21c3df2f75f
BLAKE2b-256 428b53e4f1611ba5ca01a881e57175876de12a17990d035e8caa8b9db5055e97

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dwave_optimization-0.6.10-cp310-cp310-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 b322076310431eb373c3b8522cd178800dcadbf3f6e182947fb8997156811906
MD5 688ec584eea16d222a7fa9572e637e55
BLAKE2b-256 f6b841718d15df8943a9b3a2bd9827291853b817f7fcce4b37568f9e38124f40

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