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

Uploaded Source

Built Distributions

dwave_optimization-0.4.1-cp313-cp313-win_amd64.whl (936.8 kB view details)

Uploaded CPython 3.13 Windows x86-64

dwave_optimization-0.4.1-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.1-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.1-cp313-cp313-macosx_11_0_arm64.whl (943.8 kB view details)

Uploaded CPython 3.13 macOS 11.0+ ARM64

dwave_optimization-0.4.1-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.1-cp312-cp312-win_amd64.whl (938.3 kB view details)

Uploaded CPython 3.12 Windows x86-64

dwave_optimization-0.4.1-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.1-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.1-cp312-cp312-macosx_11_0_arm64.whl (948.7 kB view details)

Uploaded CPython 3.12 macOS 11.0+ ARM64

dwave_optimization-0.4.1-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.1-cp311-cp311-win_amd64.whl (941.2 kB view details)

Uploaded CPython 3.11 Windows x86-64

dwave_optimization-0.4.1-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.1-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.1-cp311-cp311-macosx_11_0_arm64.whl (948.1 kB view details)

Uploaded CPython 3.11 macOS 11.0+ ARM64

dwave_optimization-0.4.1-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.1-cp310-cp310-win_amd64.whl (938.1 kB view details)

Uploaded CPython 3.10 Windows x86-64

dwave_optimization-0.4.1-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (2.5 MB view details)

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

dwave_optimization-0.4.1-cp310-cp310-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl (2.4 MB view details)

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

dwave_optimization-0.4.1-cp310-cp310-macosx_11_0_arm64.whl (944.7 kB view details)

Uploaded CPython 3.10 macOS 11.0+ ARM64

dwave_optimization-0.4.1-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.1-cp39-cp39-win_amd64.whl (938.6 kB view details)

Uploaded CPython 3.9 Windows x86-64

dwave_optimization-0.4.1-cp39-cp39-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (2.5 MB view details)

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

dwave_optimization-0.4.1-cp39-cp39-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl (2.4 MB view details)

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

dwave_optimization-0.4.1-cp39-cp39-macosx_11_0_arm64.whl (945.9 kB view details)

Uploaded CPython 3.9 macOS 11.0+ ARM64

dwave_optimization-0.4.1-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.1.tar.gz.

File metadata

  • Download URL: dwave_optimization-0.4.1.tar.gz
  • Upload date:
  • Size: 457.6 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.1.tar.gz
Algorithm Hash digest
SHA256 43d2343687bbf98450ffe31cc2798137e1638cc1e61d922d86baf91beb149ff2
MD5 c7c3346e24d8508629fbd8ca2c2bd739
BLAKE2b-256 836cf48157b60944db7bbae80a99dc31de4990108b3313ba7883478ea46aff18

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dwave_optimization-0.4.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 a1a1547edec17ca5f92c2951f9cd8f04ec5e1b7205fd7e36b44d44924fd9bb2b
MD5 848d698cd6c5ed9a920ef0bf32a16870
BLAKE2b-256 2d9c87b8deb4efedfc0d75ea668a5201c22bf0b9ceffb291cc02c4deed685d61

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dwave_optimization-0.4.1-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 0f113f2c38558320a3025a21978e8a2a6632c3d960eddd0d8be0ac09f8d54630
MD5 dec47709c03202d375874854f2ac4172
BLAKE2b-256 3e4cf945cee4116759363179886e104e5c3da032f360991386fdf261791a3325

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dwave_optimization-0.4.1-cp313-cp313-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 d0acc670f807877ee81398e4f970c01c8e6fb31af4069d38a6f1d24ed12037c0
MD5 b1b6027e5bff8218c0c1887380a216a6
BLAKE2b-256 e70f8efcc4c86afa4bfdba8a4ca4ef000cca3b651d561d6da72baa3364825aee

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dwave_optimization-0.4.1-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 dba22ce8ecda574b5c78277b124a67c513647a3c23257ee5546dcbf0bd616c99
MD5 868aef6d64706182e20e2abb7febd362
BLAKE2b-256 2124bc6b43f8782a7eb77b1d4d9605bf8e8b68c096cd8082d19a07e84b044a9b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dwave_optimization-0.4.1-cp313-cp313-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 a42d992c8d5dbc77bbf3494a269019b199f0d81d023a56f199d827ee0ff6605e
MD5 63d349d7002886dc9842a01f0919ac27
BLAKE2b-256 601cd48e14237844057c4e5573888ef4331b22962b010c077570763c0ec146fe

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dwave_optimization-0.4.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 0c75e0073ba9084fc2f007953662693948817705e7f774014a5ca3d8cfd27735
MD5 949d6778148b1da540d4d7c86167844b
BLAKE2b-256 db2e60d4a9f0d09bd1b220b54529f770015796475f9b08a9b451ff2509a5efd6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dwave_optimization-0.4.1-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 9691408f448dcf1ebe06538921071585dbf04bdca008949c6b6c54c10e026763
MD5 54e2e6ffbd5d0be1a9f4ec8e259c5d9c
BLAKE2b-256 b2164e9f50e0b8408a6d36c57fbd3a39009c149044ff1900475d98c05eaeb0ae

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dwave_optimization-0.4.1-cp312-cp312-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 e3aa5324ee1d9de6b90ade14f1b01d0a18689132eab2ca23fe120917aa7cf593
MD5 8150cbfdcb18438104208f6b5b3815e1
BLAKE2b-256 75d49907b00ced4ce2c3253118759d1a0aeaa2fd5422c7adc0421e08d4c14fcf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dwave_optimization-0.4.1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 cbd23a34932edccec1c348e899315db77caa24f56a212e17315202f6753d2e3c
MD5 b1b0f536d2bb99d79a415def2c17e19b
BLAKE2b-256 0fdec8ca0cdd5184bc7bbc167c683314f8b5c41ae267074279759a04fac9da4a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dwave_optimization-0.4.1-cp312-cp312-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 430e4a25e54a6323f581be71da4aa582ae08379d0abd05bcfdd0939dfdedc0ce
MD5 0a5c9ecf5c4c5017f4fe74e06040a53f
BLAKE2b-256 2c61de9ba41f4cb6e8abee0a8b8b08d29b5e6685f4af88a70a7a1d6bb42a2a3a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dwave_optimization-0.4.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 63118ca7c64958010e1a6de599b4f28a1420aec46f27d7d4c3606cf4a79d5eab
MD5 2c50d399ef37496249b8593652eed9ae
BLAKE2b-256 fc61b46a4f8f4f1fbc6dc261e70af4386283b16d36454aed004f771c0517caed

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dwave_optimization-0.4.1-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 5d9d04f4df594582d051a8256cf479626a77dee85a4d4b13a9566d4a718e03a2
MD5 adab5af09fb8d24ddc962d6da00c15f8
BLAKE2b-256 36bee3950a122208320298b66f1ec1e856338ed37b6da53df614f5f7868068f5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dwave_optimization-0.4.1-cp311-cp311-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 00766ecbb1c675213b1d4f40de4825125ede4b17b71a9a3b04a1a6b34f21e7c4
MD5 fa83a050ed1de62f1380379d53eeb6f5
BLAKE2b-256 2b70c267104520f45e52780101778fd825ac74c11fd838795a2989d7c3e825a9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dwave_optimization-0.4.1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d3eca153b591b6dca018a3f97610313df2e5e8ffab9854444176255494f02fe0
MD5 bbe29746f9fea5e0e495ea2d86e5b21b
BLAKE2b-256 1741be90a196a611f38abbee49340d601743848780683539788eef5553c60f53

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dwave_optimization-0.4.1-cp311-cp311-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 5d435392437b80273159a8e8337fa0925410e70f249403f6f052066ce042b968
MD5 178061cda6086751f4fc41774c0d5a71
BLAKE2b-256 b3399c8d012479b106e97cf5206f7c089f85de7fd9ef16843f6fc5b39e7c99b2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dwave_optimization-0.4.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 03a63ceddf1a5126fff7a7d7e3c5cbaa21b47fbbade629d8dd60240ace99e027
MD5 55d6e208fd9c343d133bc1393ff7e406
BLAKE2b-256 ce50066c50b5dffb2ed78a97ad01248ef8ff56489948f1d2c7d786aefc6e915f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dwave_optimization-0.4.1-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 41d3428095a21c21c92d0a30fa5e5f6860d91556d4940b515c0846346b04a591
MD5 8c170585fc997ae2d63808d8c827c039
BLAKE2b-256 9400350874a8a7867ea830b8ba2abe4f970de9106c14de9a6bb8ca19a4561c09

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dwave_optimization-0.4.1-cp310-cp310-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 a5d9493e56250b7c98cb3f935e715a4617f325de78191b05aba4f1796bf64d28
MD5 99f4488f5707346c169347c429d04d73
BLAKE2b-256 22be981d5d173ccf338a5b811065a7df63779bab9ee4b0dc3f1d9ae9685a6f66

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dwave_optimization-0.4.1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ea58097c593db59f789039cc8cec860c39e413fccab4246f6cbb92121d4d392c
MD5 e6b7874711460b27fbc2dc82bb25987f
BLAKE2b-256 8b90999843d857393842509d022be3086b44542767a292dbc59f1dcafe78e0ad

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dwave_optimization-0.4.1-cp310-cp310-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 48cbf83a1e9278b7e0eb4272d322df615decc93de4c065514b6ac89033c70f12
MD5 e395874d8f1de33e6f3137e8190c870b
BLAKE2b-256 ef3a3d9339da4453ceaa79cd867371e807f7364e80e8defd9e61da82f53548ea

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dwave_optimization-0.4.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 c4bb1ae27bd7b491083658b3f576a85d26f3c8aa0833564b1397f7f2fb06b3a6
MD5 9e094f8e24d321d9bee47618def06bc4
BLAKE2b-256 6e91cac97e9805b9b6399d7c09caa2944150a5169e90d88010a147de90cb4bab

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dwave_optimization-0.4.1-cp39-cp39-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 5f9f984bd200648303dbee5a5a6d2b1c87448d7b9ec0782fcfbe02eac68a03bc
MD5 4935334b14331c04ff10827eb2c152aa
BLAKE2b-256 714a63c97581df78766d473b11788668f1976269d71017b938c9db989e17d540

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dwave_optimization-0.4.1-cp39-cp39-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 a2856afbd6264ee1be877ab41a2714b4f95bf163f3329521e94de86049078f8e
MD5 f146f95038fb23ddf10ad7f701c71ee5
BLAKE2b-256 555e5de20e6fbfdb4360a2a7f8e4e891ca8e59124aba9a76e92cb1bbc1fb20c3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dwave_optimization-0.4.1-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 82196e0d30a5de1ebe54808f5e86d268ef696c2004e586b968e80bc7ffefc0bc
MD5 bb7857cd551d5fe485884c0911ce0635
BLAKE2b-256 41f21564a138e3dcfb6b87e4394d95063533b809ad124648942eeb0b5d398225

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dwave_optimization-0.4.1-cp39-cp39-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 f6ced32c9c52e78da560ea0671a3e3d1e3cd8750216e1a95298cb5690637bc5f
MD5 1351883cb4b65ac5f9891eb7f90c3576
BLAKE2b-256 f493d87cc5c6dd6983629490a524b01a270855ed4315bd2a9f7e970e46277745

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