lincon

a quadratic programming solver with support for linear equality and inequality constraints

https://github.com/mirca/lincon

Science Score: 36.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
    Links to: sciencedirect.com
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (5.2%) to scientific vocabulary
Last synced: 10 months ago · JSON representation

Repository

a quadratic programming solver with support for linear equality and inequality constraints

Basic Info
Statistics
  • Stars: 6
  • Watchers: 3
  • Forks: 2
  • Open Issues: 0
  • Releases: 0
Created almost 7 years ago · Last pushed over 2 years ago
Metadata Files
Readme License

README.md

lincon

a quadratic programming solver with support for linear equality and inequality constraints, i.e.

minimize (1/2)x^TQx + q^Tx subject to Cx = c, Dx <= d

convergence rate: O (1/k^2)

references

documentation: https://mirca.github.io/lincon

Instalation

C++

just copy the file lincon/src/solver.h =)

Python

pip install lincon

Basic usage

C++

```{c++}

include "solver.h"

include

using namespace Eigen; using namespace std;

int main() { Eigen::MatrixXd Qmat(2, 2), Dmat(2, 2); Eigen::MatrixXd Cmat(1, 2); Eigen::VectorXd qvec(2), cvec(1), dvec(2), w0(2); Qmat << 2.,.5, .5,1.; w0 << .5, .5; qvec << 1.,1.; Cmat << 1.,1.; Dmat << -1.,0., 0.,-1.; cvec << 1.; dvec << 0.,0.; qpsolver* mysolver = new qpsolver(Qmat, qvec, Cmat, cvec, Dmat, dvec, w0); std::cout << mysolver->solve() << std::endl; } ```

Python

```{python} import numpy as np from lincon import qp

Qmat = np.array([[2., .5], [.5, 1]], dtype=np.float64) w0 = .5 * np.ones(2, dtype=np.float64) qvec = np.ones(2, dtype=np.float64) Cmat = np.atleast_2d(np.ones(2, dtype=np.float64)) Dmat = np.array([[-1, 0], [0, -1]], dtype=np.float64) cvec = np.ones(1, dtype=np.float64) dvec = np.zeros(2, dtype=np.float64)

x = qp.solve(Qmat=Qmat, qvec=qvec, Cmat=Cmat, cvec=cvec, Dmat=Dmat, dvec=dvec, w0=w0) ```

License

Copyright 2019 Ze Vinicius

This project is licensed under the terms of the MIT License.

Owner

  • Name: Zé Vinícius
  • Login: mirca
  • Kind: user
  • Location: Clear Water Bay, Hong Kong
  • Company: Morgan Stanley

GitHub Events

Total
  • Fork event: 1
Last Year
  • Fork event: 1

Committers

Last synced: over 2 years ago

All Time
  • Total Commits: 24
  • Total Committers: 1
  • Avg Commits per committer: 24.0
  • Development Distribution Score (DDS): 0.0
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
mirca j****a@g****m 24

Issues and Pull Requests

Last synced: 11 months ago

All Time
  • Total issues: 0
  • Total pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Total issue authors: 0
  • Total pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 6 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 1
  • Total versions: 1
  • Total maintainers: 1
pypi.org: lincon

a QP solver with support for general linear equality and inequality constraints

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 6 Last month
Rankings
Dependent packages count: 10.1%
Stargazers count: 20.3%
Dependent repos count: 21.6%
Forks count: 22.6%
Average: 27.7%
Downloads: 63.9%
Maintainers (1)
Last synced: 11 months ago

Dependencies

requirements.txt pypi
  • numpy *
  • pybind11 >=2.2
setup.py pypi
  • numpy *
  • pybind11 >=2.2
.github/workflows/pythonpackage.yml actions
  • actions/checkout v1 composite
  • actions/setup-python v1 composite