4 % Calculate the full solution
for a given problem. This
function relies on
5 % the M.E.S.S.
package from the MPI!
7 % sim_data is a structure containing the following information
8 % Z ..................... The low rank factor, P = Z Z'
12 if ~exist(
'lrcf_nm_g_r3',
'function')
14 warning(['The function lrcf_nm_g_r3 could not be found. ', ...
15 '"care" will be used which can result in very poor performance!'])
16 sim_data.P = care(full(A),full(B),full(C'*C),full(R),full(B*0),full(E));
18 % Calculate the low rank factor:
19 [V,D] = eigs(sim_data.P, size(A,1)-1);
20 sim_data.Z = real(V*sqrt(D));
21 sim_data.Z(:, find(diag(sqrt(D)) < sqrt(eps))) = [];
24 if isfield(model_data, 'K_in')
25 K0 = model_data.K_in';
32 [Z,~,nmiter,adimax,rc,res_norm] = lrcf_nm_g_r3(A,B,C,E,K0,maxnm,maxadi);
34 solver_info.res_norm = res_norm;
36 solver_info.adimax = adimax;
37 solver_info.nmiter = nmiter;
38 sim_data.solver_info = solver_info;
function [ E , A , B , C , x0 ] = riccati_assemble_system_matrices(model, model_data)
model_data)
function sim_data = riccati_detailed_simulation(model, model_data)
sim_data = riccati_detailed_simulation(model, model_data)