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

Uploaded CPython 3.14tWindows x86-64

dwave_optimization-0.6.11-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.11-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.11-cp314-cp314t-macosx_11_0_arm64.whl (21.8 MB view details)

Uploaded CPython 3.14tmacOS 11.0+ ARM64

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

Uploaded CPython 3.12+Windows x86-64

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

Uploaded CPython 3.12+macOS 11.0+ ARM64

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

Uploaded CPython 3.11Windows x86-64

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

Uploaded CPython 3.11macOS 11.0+ ARM64

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

Uploaded CPython 3.10Windows x86-64

dwave_optimization-0.6.11-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.11-cp310-cp310-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl (14.6 MB view details)

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

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

Uploaded CPython 3.10macOS 11.0+ ARM64

dwave_optimization-0.6.11-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.11.tar.gz.

File metadata

  • Download URL: dwave_optimization-0.6.11.tar.gz
  • Upload date:
  • Size: 405.2 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.11.tar.gz
Algorithm Hash digest
SHA256 3ed264d3248ba55e597958829bddf700e857fea7e34f6fb739c44bc81debe97e
MD5 f95f478ae56d825f3944cd13ac742b8e
BLAKE2b-256 60e8efbc53a2a5465838c2e5fccbfd6f8e456d6ac422d65fc454bb8779cebd0e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dwave_optimization-0.6.11-cp314-cp314t-win_amd64.whl
Algorithm Hash digest
SHA256 fd60f660093ffc1265a273fd9fd538a6049f9810e2fec77a9da1c83a84d5ffe8
MD5 45367114dd20485baf393123fe6bedc5
BLAKE2b-256 f6c27d765889058a8b5c1842f5d9e20406644a15101e99c40aebcbee0d3ae29e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dwave_optimization-0.6.11-cp314-cp314t-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 950ced8a74834dc00348aa33be38eb608f0b1e4a6b6da2ebfdbdb985fff9034b
MD5 e5f59b4a4e445f8667a6f10301e16516
BLAKE2b-256 55cd885f255f843e1cd7c7eacfffd0b92500c60dab82b83c83bfcdcad6866bb3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dwave_optimization-0.6.11-cp314-cp314t-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 e4e8dffc5af2df4b949cf07204d37c939a53f1665fd7b3331511e1146867df5a
MD5 47bccbe078c265db97c2cba87775fd04
BLAKE2b-256 17f26af1fc421dddb6eaca7ed6fc53fac2d63eb21425cba0a55bb1b18f7776a8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dwave_optimization-0.6.11-cp314-cp314t-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9fda081e436edd53d384a03e4b3269af93086077d8648ed876efad3dba139333
MD5 257b0b3718a59daa4d6a4cc671a49b63
BLAKE2b-256 69a7990604cff238e436fbbc2a109c15194eaee0d26adcc49528f69b318d4e08

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dwave_optimization-0.6.11-cp314-cp314t-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 7a962f451e24185af247a4f914e3bb5379ee1ea9b3a3b307a021b3199e2a79e7
MD5 c6348a02292a8a17467c987ba4bf74f4
BLAKE2b-256 571ef496f7a1fd8b4ed705f7c9252dafd735ba6eaa028835f5776de282016946

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dwave_optimization-0.6.11-cp312-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 cb75f419d66467bdbde33484babe2b15606c0e98a7dc734a0ad8afdec420178c
MD5 9edf56ce9723cd291bec122d08a551d6
BLAKE2b-256 c261842aacae5490ff0de83fc228866ba0ddbea34a3a78c06c0838c167ae081d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dwave_optimization-0.6.11-cp312-abi3-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 9e8d713bd5da54c45d2e4a1b8f41c8950e449f53bfb3f461cb854513f1c6b402
MD5 08c2fc2c249ef69232272f7cf8c9ff77
BLAKE2b-256 e21688bcf638d6630b2ed91a0ea8de402c943088c91a91e8be051bc7863503c5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dwave_optimization-0.6.11-cp312-abi3-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 d6ed59a02a4d051d0c33048ce736553932c0421cd50712466179d2c3c7e5bcb5
MD5 374bed58ef332bf3722fd974da1d6b46
BLAKE2b-256 a6546f555b4f4eee8c7ddce00e42e52cca419a28b6e8c62938e5e323be63c407

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dwave_optimization-0.6.11-cp312-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e3c424f7435803230a7769f25f94b13ef5d49f635eeef597edaaf81b8b3f8fb1
MD5 03d456d412bf0af1f31fba165b48a754
BLAKE2b-256 21d3547f2cfa236dca0a8d2e02b7fe4c1f63709cf1c8c4399fa91b15deb8e114

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dwave_optimization-0.6.11-cp312-abi3-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 58e53a300af50c8a0ac929dfc4b5bd11b1d4235e4f988171c53d4ac017394a1d
MD5 64c96be8e4e160223f618918780bfcaa
BLAKE2b-256 35714173b680b6463d3c9af695ecf795af3e56112689bf78e9a6fc4c1818499e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dwave_optimization-0.6.11-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 35bef7a16da228e765b8a8d4588dbd7b4ae24326ff263fb2ff9b4622752cddb5
MD5 9660e5f3131826d8dbbcfe5bc48c101e
BLAKE2b-256 2de354c69fd4207699b92ca0dda5bfac8991ea6330d56d7f5fccd9faa7758f9a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dwave_optimization-0.6.11-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 2a6e50afd694af762067fde0cedbed1b5480a2e2eb1b0fe4f150a50b6491c25c
MD5 baa18d2f426ae9b9c5fb7df4ec39ea6d
BLAKE2b-256 224c29de1634ee9c54e51834b7dcaa4ac081f2e2fce213e147bdcb72142dfda5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dwave_optimization-0.6.11-cp311-cp311-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 705f3a62071b42a848750859ec1a81b550b77c7504dc7b8eea5bb36aceb95779
MD5 92e2e4156504f21a1a143b31bbf7d771
BLAKE2b-256 c58e0da682f911fd87cde6c53ac47eb4ca298d1accc818d8a8dd6af0d43fa8f2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dwave_optimization-0.6.11-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 09d1a0e62320c05f8de3412934f2d656ba3bc2b9282ccc2658aeee40eb5bda04
MD5 ad4f80e22ee06f323f727e5496a2a356
BLAKE2b-256 1ee39f7aa43ef0a81a4ae4b8a9b4a36fca2868bcd0f67dbe691aa86f8c1b758f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dwave_optimization-0.6.11-cp311-cp311-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 32b692d98ac2a6f579f663e290a82dba94bde0e89da647e4d209a40213dbd80c
MD5 0b89238d541a6386f7ad06faace8fe4f
BLAKE2b-256 ddda8dfc00724e43f973bc9363910a3b64b4f91562bfa968535b5a5a631f71b4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dwave_optimization-0.6.11-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 cf40b5da756a34e82e7f53f95bf22dc03e3979aecb1868d7f570b376e9e60a92
MD5 cae8c4ed7a7f09cdb6e099938a49df58
BLAKE2b-256 ef96a73817594f0e7f2b637bf365d35db97264c55cf69bf5ad01a1dd93b64ade

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dwave_optimization-0.6.11-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 0ce637c4fabc90168da2499b3633108c9ab6469dca7c998c8c3a72151f2b117c
MD5 cb865f46f8f7b286a852095b5f9834f4
BLAKE2b-256 d9db84ac0f3e2f415e082544ed64cad7c6ef266abe4ec18194c67c10421f7e09

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dwave_optimization-0.6.11-cp310-cp310-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 32e32bb381eaf277ebaccb21ddb0b677600b6b9c264ba120fd8d557f9c14b303
MD5 8740571d76be1d0290b476fa54d501af
BLAKE2b-256 6bf99c23deefa3d715976fee0e9bf11acbac3d59d953dc45091dc95adccc955c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dwave_optimization-0.6.11-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 1fd2ce57d487adec58b815b6f3f4bf42104231bd6394bc1e9f54c200f6d25361
MD5 5edf7a7887733ce0bdd5dbb170a950b9
BLAKE2b-256 2ac78c6114d43ebfd224086e25589ce2302909b6523b1e8608c8fdebb971bc44

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dwave_optimization-0.6.11-cp310-cp310-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 9d370ed649af24f0b1b52519d903a40acf0da6f4ce7c149a740c9a217d5fe224
MD5 206c33b08bb47b40d3e0df36c54ba7ad
BLAKE2b-256 8adcc9134776e623708a81178d7720ed8c8c5d5ea0bda93102f30b039dc5af3f

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