Fast quadratic programming tools (with CUDA support)
Project description
qptools
Fast quadratic programming tools.
Platforms
- Windows: To Do
- Linux: Supports CPU and CUDA versions
- MacOS: Supports CPU version
Dependencies
setuptoolspybind11numpy- CUDA Toolkits for CUDA supports
Installation
CPU version
Install the package without CUDA support
pip install qptools
CUDA version
export CUDA_HOME=(your cuda path)
export USE_CUDA=1
pip install qptools
Solving Quadratic Programming Problems
qp1: Basic Quadratic Programming
$$ \min_{x} \frac12 x^TPx+q^Tx \ \text{s.t. } lb \leq x \leq rb, \ Gx \leq h $$
where $P$ is a $n\times n$ positive definite matrix, $q$ is an $n$-dimensional vector, $G$ is a $g\times n$ matrix, $h$ is a $g$-dimensional vector, and $lb,rb$ are $n$-dimensional vectors defining the lower and upper bounds for variable $x$.
qp2: Quadratic Programming with Standardized Variables
$$ \min_{x} \frac12 x^TPx+q^Tx \ \text{s.t. } lb \leq \frac{x}{\text{sum}(x)} \leq rb, \ Gx \leq h $$
where $P$ is a $(n,n)$ positive definite matrix, $q$ is an $n$-dimensional vector, $G$ is a $(g,n)$ matrix, $h$ is a $g$-dimensional vector, and $lb,rb$ are $n$-dimensional vectors defining the lower and upper bounds for standardized variable $\frac{x}{\sum(x)}$.
Example
- Python (CPU): ./example/cpu.ipynb
- Python (CUDA): ./example/cuda.ipynb
- C++ (CPU): ./c/core/test/test.cpp
- C++ (CUDA): ./c/core/test/test.cu
References
-
Nesterov, Y., & Todd, M. J. (1997). Self-scaled barriers and interior-point methods for convex programming. Mathematics of Operations Research, 22(1), 1-42.
-
Nesterov, Y., & Todd, M. J. (1998). Primal-dual interior-point methods for self-scaled cones. SIAM Journal on Optimization, 8(2), 324-364.
-
Mehrotra, S. (1992). On the implementation of a primal-dual interior point method. SIAM Journal on Optimization, 2(4), 575-601.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file qptools-1.0.3.tar.gz.
File metadata
- Download URL: qptools-1.0.3.tar.gz
- Upload date:
- Size: 11.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b6e8e4e6cda859620e4d42ec24ce1724ae00b1f0f5b6a70b6d58e178a2066b58
|
|
| MD5 |
527eaa41ebfcc4b641f549fea0f4ff15
|
|
| BLAKE2b-256 |
5198b682c6aad87482de32e2ba8c8df7c9460f1fa97e5bddc1761af1083f5fb5
|
File details
Details for the file qptools-1.0.3-cp312-cp312-macosx_11_0_arm64.whl.
File metadata
- Download URL: qptools-1.0.3-cp312-cp312-macosx_11_0_arm64.whl
- Upload date:
- Size: 90.7 kB
- Tags: CPython 3.12, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
56cdd6f07327b928d48e771e07d9dbf06ead701c0cd0358ffd961b878ffc08a5
|
|
| MD5 |
202614eef7e6fe19c68e12ba5169ef19
|
|
| BLAKE2b-256 |
69f7b6ba46eaf9e7d6cfdd6a69dfbeb6877aea63ae3e41e65f60179f105161f3
|