Skip to main content

Fast quadratic programming tools (with CUDA support)

Project description

Dependencies

  • setuptools version 42 or later
  • pybind11 2.6.1 or newer
  • numpy
  • CUDA Toolkits for CUDA supports

Installation

Install from source (recommended)

CPU version (Install the package without CUDA support)

git clone https://gitee.com/clawfish/qptools.git
cd qptools
pip install .

CUDA version

git clone https://gitee.com/clawfish/qptools.git
cd qptools
export CUDA_HOME=(your cuda path)
export USE_CUDA=1
pip install .

Install from pip

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

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

qptools-1.0.2.tar.gz (14.7 kB view details)

Uploaded Source

File details

Details for the file qptools-1.0.2.tar.gz.

File metadata

  • Download URL: qptools-1.0.2.tar.gz
  • Upload date:
  • Size: 14.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for qptools-1.0.2.tar.gz
Algorithm Hash digest
SHA256 2996ff97e810c5dc87590ef77b4873fa00c9d3ad3b43cdbb2c6cb105cd49f554
MD5 09444b1600f7db5201f962c09b7370d0
BLAKE2b-256 45089096ce8d84e495996f1f36acbdf63709750eaff5a1d3016cb37eeabf020c

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