Created
July 15, 2016 11:34
-
-
Save jgillis/25ea8fe2c44823ff9492217ce060ed50 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from casadi import * | |
H = DM([[1,-1],[-1,2]]) | |
G = DM([-2,-6]) | |
A = DM([[1, 1],[-1, 2],[2, 1]]) | |
LBA = DM([-inf]*3) | |
UBA = DM([2, 2, 3]) | |
LBX = DM([0]*2) | |
UBX = DM([inf]*2) | |
solver = casadi.qpsol("mysolver","qpoases",{'h':H.sparsity(),'a':A.sparsity()}) | |
print solver(h=H,g=G,a=A,lbx=LBX,ubx=UBX,lba=LBA,uba=UBA) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment