rbmatlab  1.16.09
 All Classes Namespaces Files Functions Variables Modules Pages
stepsize_quotient.m
Go to the documentation of this file.
1 function [model, t, nr_fct, output] = stepsize_quotient(model, x, d, quot_step)
2 %function [model, t, nr_fct, output] = stepsize_quotient(model, model_data, output, x, d, quot_step)
3 %function [model, t_opt, output] = stepsize_quotient(model, model_data, output, x, d, quot_step)
4 
5 if(model.verbose>=8)
6  disp('entered stepsize_quotient')
7 end
8 
9 if isfield(model,'stepsize_coefficient')
10  stepsize_coefficient = model.stepsize_coefficient;
11 else
12  stepsize_coefficient = 7;
13  disp('No stepsize coefficient given in model!!!')
14 end
15 
16 if model.optimization.min_or_max == 'min'
17  min_or_max=1;
18 elseif model.optimization.min_or_max == 'max'
19  min_or_max=-1;
20 else disp('maximize or minimize? model.optimization.min_or_max not properly defined')
21  return
22 end
23 
24 %initializing
25 nr_fct = 0;
26 if isfield(model.optimization,'initial_stepsize')
27  t_initial = model.optimization.initial_stepsize;
28 else
29  t_initial=1;
30 end
31 
32 %reducing the stepsize
33 %t=t_initial/quot_step;
34 t=(t_initial-t_initial*quot_step/(quot_step+stepsize_coefficient));
35 %t=t_initial;
36 
37 %calculate new output value
38 %model=set_mu_to_optimize(model,x,t,d);
39 %output=[output; model.optimization.objective_function(model,model_data)*min_or_max]; nr_fct=nr_fct+1;
function r = verbose(level, message, messageId)
This function displays messages depending on a message-id and/or a level. Aditionally you can set/res...
Definition: verbose.m:17
function model = set_mu_to_optimize(model, x, varargin)
Funcion sets the parameters that are to be optimized to the values given by x Also usable for optimiz...
function [ model , t , nr_fct , output ] = stepsize_quotient(model, x, d, quot_step)
function [model, t_opt, output] = stepsize_quotient(model, model_data, output, x, d...