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.

(For explanations of the terminology, see the Ocean glossary.)

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)

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 editible installs for more details.

pip install -r requirements.txt
pip install --no-build-isolation --config-settings=editable-verbose=true --editable .

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 -r requirements.txt
meson setup build -Dbuildtype=debug

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

meson test -Cbuild

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.

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.4.2.tar.gz (459.4 kB view details)

Uploaded Source

Built Distributions

dwave_optimization-0.4.2-cp313-cp313-win_amd64.whl (942.6 kB view details)

Uploaded CPython 3.13 Windows x86-64

dwave_optimization-0.4.2-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (2.6 MB view details)

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

dwave_optimization-0.4.2-cp313-cp313-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl (2.5 MB view details)

Uploaded CPython 3.13 manylinux: glibc 2.24+ ARM64 manylinux: glibc 2.28+ ARM64

dwave_optimization-0.4.2-cp313-cp313-macosx_11_0_arm64.whl (955.7 kB view details)

Uploaded CPython 3.13 macOS 11.0+ ARM64

dwave_optimization-0.4.2-cp313-cp313-macosx_10_13_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.13 macOS 10.13+ x86-64

dwave_optimization-0.4.2-cp312-cp312-win_amd64.whl (943.2 kB view details)

Uploaded CPython 3.12 Windows x86-64

dwave_optimization-0.4.2-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (2.6 MB view details)

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

dwave_optimization-0.4.2-cp312-cp312-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl (2.5 MB view details)

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

dwave_optimization-0.4.2-cp312-cp312-macosx_11_0_arm64.whl (960.5 kB view details)

Uploaded CPython 3.12 macOS 11.0+ ARM64

dwave_optimization-0.4.2-cp312-cp312-macosx_10_13_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.12 macOS 10.13+ x86-64

dwave_optimization-0.4.2-cp311-cp311-win_amd64.whl (946.5 kB view details)

Uploaded CPython 3.11 Windows x86-64

dwave_optimization-0.4.2-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (2.6 MB view details)

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

dwave_optimization-0.4.2-cp311-cp311-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl (2.5 MB view details)

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

dwave_optimization-0.4.2-cp311-cp311-macosx_11_0_arm64.whl (959.8 kB view details)

Uploaded CPython 3.11 macOS 11.0+ ARM64

dwave_optimization-0.4.2-cp311-cp311-macosx_10_13_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.11 macOS 10.13+ x86-64

dwave_optimization-0.4.2-cp310-cp310-win_amd64.whl (945.1 kB view details)

Uploaded CPython 3.10 Windows x86-64

dwave_optimization-0.4.2-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (2.6 MB view details)

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

dwave_optimization-0.4.2-cp310-cp310-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl (2.5 MB view details)

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

dwave_optimization-0.4.2-cp310-cp310-macosx_11_0_arm64.whl (956.9 kB view details)

Uploaded CPython 3.10 macOS 11.0+ ARM64

dwave_optimization-0.4.2-cp310-cp310-macosx_10_13_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.10 macOS 10.13+ x86-64

dwave_optimization-0.4.2-cp39-cp39-win_amd64.whl (945.4 kB view details)

Uploaded CPython 3.9 Windows x86-64

dwave_optimization-0.4.2-cp39-cp39-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (2.6 MB view details)

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

dwave_optimization-0.4.2-cp39-cp39-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl (2.5 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.24+ ARM64 manylinux: glibc 2.28+ ARM64

dwave_optimization-0.4.2-cp39-cp39-macosx_11_0_arm64.whl (958.2 kB view details)

Uploaded CPython 3.9 macOS 11.0+ ARM64

dwave_optimization-0.4.2-cp39-cp39-macosx_10_13_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.9 macOS 10.13+ x86-64

File details

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

File metadata

  • Download URL: dwave_optimization-0.4.2.tar.gz
  • Upload date:
  • Size: 459.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.20

File hashes

Hashes for dwave_optimization-0.4.2.tar.gz
Algorithm Hash digest
SHA256 233e291699c3a7afb1fff8ee887090d198e2aad19acd84cda0c41e4ff4ffdd65
MD5 3cb77fb418476ebb04b54cffed6d8b37
BLAKE2b-256 b58fbf778153124600d336e77032baa5826f826d3478c5c40b8e14fcb2bc2e24

See more details on using hashes here.

File details

Details for the file dwave_optimization-0.4.2-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for dwave_optimization-0.4.2-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 093ebeed4dbfcaaae6111c3715a128de95d5a44a1c169e3fac9a5be99dceb645
MD5 842f24b9ee471cdcc1f89ba869f4883b
BLAKE2b-256 d8a96a7aec4b0fca55b3b354b56aae7169f0068ac4e97538f5736a439f005ffc

See more details on using hashes here.

File details

Details for the file dwave_optimization-0.4.2-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for dwave_optimization-0.4.2-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 a33b989592b64145a5679e4ecf149ded341749048a325958447d53d6010739f5
MD5 6caaf47d584afee52db5f565909d76a9
BLAKE2b-256 dbfab21e1eab09b971c95b4f97925c59da1afaa0df0ceb86b8f2480d3fac08dd

See more details on using hashes here.

File details

Details for the file dwave_optimization-0.4.2-cp313-cp313-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for dwave_optimization-0.4.2-cp313-cp313-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 dd90dbd60ecb18a11c81d8e00fae9ad27c3c0ab7083ec57232c460f8abdc2f1d
MD5 4533ec5dde0e6db9a1c1d041b1a54755
BLAKE2b-256 85ddd196425ab0936d236542caee79cebf3baabde0690991588ba3c5f13da42c

See more details on using hashes here.

File details

Details for the file dwave_optimization-0.4.2-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for dwave_optimization-0.4.2-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 aa7aed6df5b9ade7fa78007dfe0877b29831eebe0fd7d422d2b03312771bdbce
MD5 4a6d6227a66db87b27885900bd91cc6c
BLAKE2b-256 6819c79b3834b6cd8a2cd61004f9c46fa7494f8effd275c1441ae9388abc49f8

See more details on using hashes here.

File details

Details for the file dwave_optimization-0.4.2-cp313-cp313-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for dwave_optimization-0.4.2-cp313-cp313-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 8aa5a2721f5a0b6e0f47d88d8648f0ff9984625ba42e7b02a5b84b17970ca3c4
MD5 a68dfde297aa5b69d847dbeeed511817
BLAKE2b-256 4fb7cbe2f71447bc5a8578710e1164ca87b75a0e51d1b1913cee03232a241098

See more details on using hashes here.

File details

Details for the file dwave_optimization-0.4.2-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for dwave_optimization-0.4.2-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 a5415f999ba0e682ec6f6c294e81c6f7165e99f530e7b0c76efcc678ec9cbe25
MD5 4c5bb0f9f13d432a2a7c74f59cc5e0da
BLAKE2b-256 f66487984da35d8aa6e187c909324b98bd3dff9705c3f9c79ff6b14282d32a42

See more details on using hashes here.

File details

Details for the file dwave_optimization-0.4.2-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for dwave_optimization-0.4.2-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 14c80ea71aab7b7dcca77b9801814e2d4b43ac1b0b923faf33718f08b030d350
MD5 93cb9370c6e2d2d67e4f4ddce3076eb2
BLAKE2b-256 4fc0b55a1f9bec30da01e5d48daa4373c23ca05caa69117d1a9f9bc75ac8bc0b

See more details on using hashes here.

File details

Details for the file dwave_optimization-0.4.2-cp312-cp312-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for dwave_optimization-0.4.2-cp312-cp312-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 88b4e201c8873431505259b16a59c488e96de5f91530893723dd6ea19dfc607c
MD5 59b6f2a009aa7160ae3686b71d533b8d
BLAKE2b-256 b525985ce145529ad72863a26c48c8532fcd0ddb3d2af5f265a598d63d8341d1

See more details on using hashes here.

File details

Details for the file dwave_optimization-0.4.2-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for dwave_optimization-0.4.2-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 99fda932983071402d6202be842b82bcda00d7c8f9456728e3d376815f945938
MD5 af08b6a201459efa142357aabb72dbf6
BLAKE2b-256 5630f03897c09efbb8414366899389c3931f97875b90b277ac9502813b8bef5e

See more details on using hashes here.

File details

Details for the file dwave_optimization-0.4.2-cp312-cp312-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for dwave_optimization-0.4.2-cp312-cp312-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 4f91df07eb8b5cfb0963c951542be26e54434166ca528c637489745fb0e4bf4a
MD5 7cae72139e71771558c7baf1a7146ba8
BLAKE2b-256 d541ba819ccb4d12af9884b16de48b8ae1e809c1fd46eb57d60dd19927869ca8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dwave_optimization-0.4.2-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 9152734f47d6740d791d303e1a4e22ea9f5a76c32c7873bf1be1e78f6cd52c3f
MD5 cf49f73636bb095411aa7b63ec92fe1d
BLAKE2b-256 e91ddda1ea7b9b59c0ad44bb6368656179967a65e7eec24be63f88d0c0a29dc3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dwave_optimization-0.4.2-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 410bb7c35321ae1d58b1031fa6c7cb476d5a697e7213a5369d046e5a3931a2de
MD5 ed70c831fe15b1ed310ba0f56dd6ae1a
BLAKE2b-256 4dc2784a5d2613d444004487099ff1a3f65f2f1cd062a21bbfc2c5e39f63f534

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dwave_optimization-0.4.2-cp311-cp311-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 86233159350e10b72329c49461374880bab052b7ebda060a89010f82a730b234
MD5 acf45c95c6b4e25503834d782114efa6
BLAKE2b-256 cdbf9c18244c8186033a787e566eb19d413f75145fbcb345684761cd7273c8e0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dwave_optimization-0.4.2-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 69d345c7ef8782500f24c938d9de55bd8de1261c2c0655b8327f4a489afb69b1
MD5 7513500b93f0f38ff1dff2a4b4763302
BLAKE2b-256 b1090a82057acb74c48074b7de6dc2837d5349b00d243f0f24c32a4395161f2a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dwave_optimization-0.4.2-cp311-cp311-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 c10545bcd73fb8714a3e63e1710a3294b823b33edb7348ae0f7c394c58f3e8de
MD5 11fa138552ab8bb4b29f1baddc079ed7
BLAKE2b-256 9a2afbf92e06d3006a32a022268c97f6bd2ceddd3fb9eaef59affeabb81e24f5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dwave_optimization-0.4.2-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 a2ceebff90fd0718ab6b8350bfd9f65aabb0b8a2d9e940a6189704963b1fd906
MD5 65b0bcfa906e2f13cdffb50dabfe3f1d
BLAKE2b-256 1f4659573d51c994437b991e01a233fcbd0ba1ce81b6ea4bd386cf0c3536d81b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dwave_optimization-0.4.2-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 10ac5f4236ce897c94c26d5256acbcafe2b1d402257472b22abedfaeda5d06bc
MD5 22d0f9d76b7dbeaf29fc894026878105
BLAKE2b-256 9d4a3131f46ca9da8372cfe2e757750bcbd9825920b53a860e5d2171bff6229b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dwave_optimization-0.4.2-cp310-cp310-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 99d0ddf877c27d059ded92efacb1ac31d896cfa77e97912801cd836f0c051b7f
MD5 ca1aba51fa78e4be830c17d002ed3ef2
BLAKE2b-256 192a34899250f369aa6b9bbf604023b94fd13548a813f52ec73581e6f8efa2c3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dwave_optimization-0.4.2-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ecf58a28acf81bf3979bf599db4759497b86385ec380800bacb534426abb6df0
MD5 a8eb0cd2007c947b00196726d0ed62fb
BLAKE2b-256 cee259da3ae2266ca7901d063c64a1324510b444ba652101b7985550664200da

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dwave_optimization-0.4.2-cp310-cp310-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 38fe7b3bf1f85c21a0f8e6c97d039b38f6e287dceed56d450e76cc72afbee983
MD5 1fd3c8c842726e4f5dc893238ff33cc2
BLAKE2b-256 ef1d3bd504a883b82a07dfb2606cbcab2213801a81c00352cc2f0071235167ff

See more details on using hashes here.

File details

Details for the file dwave_optimization-0.4.2-cp39-cp39-win_amd64.whl.

File metadata

File hashes

Hashes for dwave_optimization-0.4.2-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 2fce6b68c0f0c9d6b7c8d161e54fdb5c8795bb52b42f1cd151167fb106648a13
MD5 a86b0df5446722567da32f4bce7b4169
BLAKE2b-256 ac96a26ccce9bbaa204a96fccd7b1cba81b2034c00e0c0aec9a6ecb4126dcbac

See more details on using hashes here.

File details

Details for the file dwave_optimization-0.4.2-cp39-cp39-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for dwave_optimization-0.4.2-cp39-cp39-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 9d22413b09081e1039307d5955f8eb4a71fc0c0b559f8e87389c248935a145a6
MD5 94286260fe45a21355833ed9c1181fed
BLAKE2b-256 f5ec8c0e1c6c8bf343bb4d6b66fb26394ea6f397610e2660a040a325666d9caf

See more details on using hashes here.

File details

Details for the file dwave_optimization-0.4.2-cp39-cp39-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for dwave_optimization-0.4.2-cp39-cp39-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 baea9520b522c0e131d588be87b7fa3dfa89d88cba70e0d39a7acd5d83326281
MD5 1b1272c64e1c41cc464058a983073d57
BLAKE2b-256 295d64fc0cc1a8fdf34567d632ab65df8341205aaf02f01ab55d267d693f1b4a

See more details on using hashes here.

File details

Details for the file dwave_optimization-0.4.2-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for dwave_optimization-0.4.2-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e23bf2d80ab92bfe2b15890ffac835804d06b72d744db4a62195b5b433d3b95c
MD5 fdff4e9d6e282fe81c0f6010fa432794
BLAKE2b-256 64ef674d6917d6202288b3403bbf12105e6f06fc0097e20f4abe4c7fff30492a

See more details on using hashes here.

File details

Details for the file dwave_optimization-0.4.2-cp39-cp39-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for dwave_optimization-0.4.2-cp39-cp39-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 755b7625eddb175f9f1584471bc722b71c904b801eeebf80074e84a1d14a7bff
MD5 686776fef539a05c93d2a8aa36dc2db7
BLAKE2b-256 94a0e30c1864b3a8bc5ad026f3bcea847192875cf2d8388d7a9f594c76d039b4

See more details on using hashes here.

Supported by

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