1 function alpha = SCMonline(mu, model,
operator, SCM_data, opt)
2 %
function alpha = SCMonline(mu, model,
operator, SCM_data, opt)
4 % Online program of the successive constraint method (scm) for stability
6 % Returns the fast computed stability factor.
8 % Requires a offline computation via SCM(model,params,...) first!
10 % mu: the parameter which stability factor is wanted
11 % opt (optional) = 'ub' : upperbound
12 % = 'lb' (default) : lowerbound (infsup/coercive constant)
14 % Alternative call: alpha=SCMonline(mu, model, model_data, SCM_data, opt)
15 % See SCM(model,...) for details
17 % David Kreplin 05.01.2015
20 % Allows the call alpha=SCMonline(mu, model, model_data, SCM_data, opt)
21 if ~isa(operator, 'function_handle')
22 operator =@ (model) model.operators(model,operator);
25 % no options => lower bound
28 if strcmp(SCM_data.params.type,'coercive');
33 if strcmp(SCM_data.params.type,'infsup');
38 % options => upper bound possible
43 if strcmp(SCM_data.params.type,'coercive');
44 alpha = scm_ub(mu,model,operator,SCM_data);
47 if strcmp(SCM_data.params.type,'infsup');
48 alpha = sqrt(scm_infsup_ub(mu,model,operator,SCM_data));
55 if strcmp(SCM_data.params.type,'coercive');
60 if strcmp(SCM_data.params.type,'infsup');
69 % coercive case - upper boundary
70 function alpha_UB = scm_ub(mu,model,operator,SCM_data)
72 model = set_mu(model,mu);
74 [theta_q,~] = operator(model);
75 alpha_UB=min(theta_q'*SCM_data.C.UBVector);
80 % infsup case - upper boundary
81 function alpha_UB = scm_infsup_ub(mu,model,operator,SCM_data)
82 ind =@ (i,j,q) j + (i-1)*q - i*(i-1)/2;
84 model = set_mu(model,mu);
86 [A,~] = operator(model);
87 factor= zeros(1,(SCM_data.params.Q)*(SCM_data.params.Q+1)/2);
89 for i=1:SCM_data.params.Q
90 for j=i:SCM_data.params.Q
91 factor(ind(i,j,SCM_data.params.Q)) = (2-(i==j))*(A(i)*A(j));
95 alpha_UB=min(factor*SCM_data.C.UBVector);
function alpha_LB = scm_coercive_lb(mu, model, operator, SCM_data)
alpha_LB = scm_lb(mu,model,model_data) computation of the lowerbound of the coercive constant equal t...
function alpha_LB = scm_infsup_lb(mu, model, operator, SCM_data)
alpha_LB = scm_infsup_lb(mu,model,model_data) computation of the lowerbound of the coercive constant ...