forked from coin-or/qpOASES
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added Matlab interface for sparse linear algebra.
SQProblemSchur now works with Matlab's shipped MA57 (libmwma57, libmwlapack, libmwblas).
- Loading branch information
Andreas Potschka
committed
Dec 17, 2015
1 parent
49efd57
commit ef41b2f
Showing
18 changed files
with
306 additions
and
28 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
% Requires Lukas Schork's Matlab repository of the Maros Meszaros test set | ||
QPsetDIR = '~/git/QPset/maros'; | ||
|
||
files = dir(QPsetDIR); | ||
|
||
options = qpOASES_options('default', ... | ||
'printLevel', 0, 'maxIter', 1e8);%, 'initialStatusBounds', 0); | ||
nQP = 0; | ||
for i = 1:length(files) | ||
clear mex | ||
try | ||
load([QPsetDIR, '/', files(i).name]); | ||
H = sparse(H); | ||
A = sparse(A); | ||
catch | ||
continue | ||
end | ||
|
||
if max(size(A)) > 2000 | ||
continue | ||
end | ||
|
||
startTime = tic; | ||
try | ||
[x,fval,exitflag,iter,lambda] = qpOASES(H,g,A,xl,xu,al,au,options); | ||
catch | ||
exitflag = 666; | ||
iter = 666; | ||
fval = 666; | ||
end | ||
elapsedTime = toc(startTime); | ||
|
||
if mod(nQP, 20) == 0 | ||
fprintf('\n%-10s %6s %6s %5s %7s %15s %9s\n', ... | ||
'name', 'nvar', 'ncon', 'eflag', 'iter', 'fval', 'time [s]'); | ||
end | ||
fprintf('%-10s %6d %6d %5d %7d %15g %9.3e\n', ... | ||
files(i).name(1:findstr(files(i).name, '.')-1), ... | ||
size(A,2), size(A,1), exitflag, iter, fval, elapsedTime); | ||
|
||
nQP = nQP + 1; | ||
end | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
m = 2000; | ||
n = 2*m+1; | ||
H = 2*speye(n); | ||
A = 0.5*H(1:m,:); | ||
g = zeros(n,1); | ||
lb = -ones(n,1); | ||
ub = -lb; | ||
lbA = 0.5*ones(m,1); | ||
ubA = 0.5*ones(m,1); | ||
|
||
options = qpOASES_options('default', 'printLevel', -1, 'maxIter', n+m+1, ... | ||
'enableEqualities', 0, 'initialStatusBounds', 1); | ||
|
||
%[x,fval,exitflag,iter,lambda] = qpOASES(full(H),g,full(A),lb,ub,lbA,ubA,options); | ||
[x,fval,exitflag,iter,lambda] = qpOASES(H,g,A,lb,ub,lbA,ubA,options); | ||
|
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
Oops, something went wrong.