rbmatlab  1.16.09
 All Classes Namespaces Files Functions Variables Modules Pages
scm_lower_bound.m
Go to the documentation of this file.
1 function [constant_LB, constant_UB] = scm_lower_bound(model, reduced_data)
2 %[constant_LB, constant_UB] = scm_lower_bound(model, reduced_data)
3 %
4 % function which prepares the inputarguments for the online-phase of the
5 % SCM using the scm_offline_data via reduced_data.scm_offline_data. Then
6 % the function performs the online-phase of the scm for the current para-
7 % meter set in model. Output is the lower and optionally also the upper bound.
8 
9 % Dominik Garmatter 03.09 2012
10 
11 
12 % preparing the input for the Online-Phase
13 mu = get_mu(model);
14 scm_offline_data = reduced_data.scm_offline_data;
15 M_alpha = scm_offline_data.M_alpha;
16 M_plus = scm_offline_data.M_plus;
17 desired_constant = scm_offline_data.desired_constant;
18 % preparing the coefficients to the current mu
19 old_decomp_mode = model.decomp_mode;
20 model.decomp_mode = 2;
21 if strcmp(model.rb_problem_type, 'lin_evol') == 1
22  [L_I,L_E] = model.operators_ptr(model);
23  coeffs = [1;L_E;L_I]; % this equals the form of the components used in the offline stage of the SCM
24 elseif strcmp(model.rb_problem_type, 'lin_stat') == 1
25  coeffs = model.operators(model);
26  coeffs = coeffs(:);
27 else
28  error('rb_problem_type unknown!')
29 end
30 model.decomp_mode = old_decomp_mode;
31 % compute \Theta(mu)
32 if desired_constant == 1
33  Theta_mu = coeffs(:);
34 elseif desired_constant == 2
35  Q = size(coeffs,1);
36  Theta_mu = zeros(Q^2,1);
37  for i = 1:Q
38  for j = 1:Q
39  Theta_mu((i-1)*Q+j) = coeffs(i)*coeffs(j);
40  end
41  end
42 end
43 % Online-Phase
44 scm_results = scm_online(mu, Theta_mu, scm_offline_data, M_alpha, M_plus, desired_constant);
45 % Output
46 constant_LB = scm_results.Lower_Bound;
47 if nargout > 1
48  constant_UB = scm_results.Upper_Bound;
49 end
function [ constant_LB , constant_UB ] = scm_lower_bound(model, reduced_data)
[constant_LB, constant_UB] = scm_lower_bound(model, reduced_data)
function scm_results = scm_online(mu, Theta_mu, scm_offline_data, M_alpha, M_plus, desired_constant)
scm_results = scm_online(mu, Theta_mu, scm_offline_data, M_alpha, M_plus, desired_constant) ...
Definition: scm_online.m:17