-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmup_init_design.m
71 lines (64 loc) · 1.18 KB
/
mup_init_design.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
% MUP_INIT_DESIGN
%
% Script MUP_INIT_DESIGN initializes structures for RMPC design.
%
%
%
% Some Preset Parameters
%
if(exist('rmpc_kwd') == 0)
rmpc_kwd = '';
end % if
if(exist('rmpc_optimizer') == 0)
rmpc_optimizer = [];
end % if
if(exist('row') == 0)
row = -Inf;
end % if
if(exist('col') == 0)
col = -Inf;
end % if
if(exist('opt_type') == 0)
opt_type = '';
end % if
if(exist('param') == 0)
param = '';
end % if
if(exist('vbs') == 0)
vbs = 1;
end % if
if(exist('vbsy') == 0)
vbsy = 1;
end % if
if(exist('solver') == 0)|(exist('solver') == 7)
solver = 'sedumi';
end % if
if(exist('chk_feas') == 0)
chk_feas = 'on';
end % if
if(exist('feas_toler') == 0)
feas_toler = -1e-6;
end % if
% Initialize Structure DATA
%
if(exist('data') == 0)
data = [];
end % if
% Initialize Structure DESIGN
%
design.rmpc_method = rmpc_method;
design.rmpc_kwd = rmpc_kwd;
design.opt_type = opt_type;
% Store Problem Sizes
%
problem.nv = length(A);
problem.nx = size(A{1},2);
problem.nu = size(B{1},2);
% Initialize Structure SETUP
%
setup.chk_feas = chk_feas;
setup.vbs = vbs;
setup.solver = solver;
setup.feas_toler = feas_toler;
setup.vbsy = vbsy;