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)
9 if isfield(model,'stepsize_coefficient')
10 stepsize_coefficient = model.stepsize_coefficient;
12 stepsize_coefficient = 7;
13 disp('No stepsize coefficient given in model!!!')
16 if model.optimization.min_or_max == 'min'
18 elseif model.optimization.min_or_max == 'max'
20 else disp('maximize or minimize? model.optimization.min_or_max not properly defined')
26 if isfield(model.optimization,'initial_stepsize')
27 t_initial = model.optimization.initial_stepsize;
32 %reducing the stepsize
33 %t=t_initial/quot_step;
34 t=(t_initial-t_initial*quot_step/(quot_step+stepsize_coefficient));
37 %calculate new output value
39 %output=[output; model.optimization.objective_function(model,model_data)*min_or_max]; nr_fct=nr_fct+1;