QPALM
1.2.5
Proximal Augmented Lagrangian method for Quadratic Programs
Loading...
Searching...
No Matches
examples/matlab/qpalm_mex_nonconvex_demo.m
1
%A demo to show how the matlab
interface
for
qpalm
is called for a
2
%nonconvex QP
3
4
import
qpalm
.qpalm
5
6
%% Generate data
7
Q = sparse([2 0; 0 -3]);
8
q = [1;2];
9
m = 2;
10
A = speye(2);
11
lb = -2*ones(m,1);
12
ub = 2*ones(m,1);
13
14
%% Solve with
qpalm
15
solver =
qpalm
;
16
settings = solver.default_settings();
17
%IMPORTANT:
set
nonconvex to
true
for
nonconvex QPs
18
settings.nonconvex =
true
;
19
20
solver.setup(Q, q, A, lb, ub, settings);
21
res = solver.solve();
22
23
fprintf(
'Elapsed time: %f seconds\n'
, res.info.run_time);
24
fprintf(
'Status: %s\n'
, res.info.status);
25
res.x
qpalm
Definition
qpalm.hpp:19
Generated by
1.9.8