rbmatlab  1.16.09
 All Classes Namespaces Files Functions Variables Modules Pages
porsche_circle_x3opt_y3opt_r10_get_Hessian_eq_constr.m
1 function hessian_H_j = porsche_circle_x3opt_y3opt_r10_get_Hessian_eq_constr(model,data)
2 %function hessian_H_j = porsche_get_Hessian_eq_constr(model,data)
3 %
4 % This function calculates the matrices \nabla^2 h_j in my diploma-thesis,
5 % either detailed or reduced according to model.optimimzation.opt_mode.
6 % The corresponding data (model_data or reduced_data) must be passed to
7 % this function.
8 %
9 %
10 
11 nr_constr = model.optimization.nr_constraints;
12 hessian_H_j = cell(1,nr_constr);
13 l=1;
14 for k=1:nr_constr
15  hessian_H_j{k} = zeros(length(model.mu_names));
16  hessian_H_j{k}(l,l) = 2;
17  hessian_H_j{k}(l+1,l+1) = 2;
18  l=l+2;
19 end