%
% Status : main Dynare file
%
% Warning : this file is generated automatically by Dynare
%           from model file (.mod)

if isoctave || matlab_ver_less_than('8.6')
    clear all
else
    clearvars -global
    clear_persistent_variables(fileparts(which('dynare')), false)
end
tic0 = tic;
% Save empty dates and dseries objects in memory.
dates('initialize');
dseries('initialize');
% Define global variables.
global M_ options_ oo_ estim_params_ bayestopt_ dataset_ dataset_info estimation_info ys0_ ex0_
options_ = [];
M_.fname = 'Secteur_N';
M_.dynare_version = '4.5.7';
oo_.dynare_version = '4.5.7';
options_.dynare_version = '4.5.7';
%
% Some global variables initialization
%
global_initialization;
diary off;
diary('Secteur_N.log');
M_.exo_names = 'eps_A';
M_.exo_names_tex = 'eps\_A';
M_.exo_names_long = 'eps_A';
M_.exo_names = char(M_.exo_names, 'eps_B');
M_.exo_names_tex = char(M_.exo_names_tex, 'eps\_B');
M_.exo_names_long = char(M_.exo_names_long, 'eps_B');
M_.exo_names = char(M_.exo_names, 'eps_C');
M_.exo_names_tex = char(M_.exo_names_tex, 'eps\_C');
M_.exo_names_long = char(M_.exo_names_long, 'eps_C');
M_.exo_names = char(M_.exo_names, 'eps_D');
M_.exo_names_tex = char(M_.exo_names_tex, 'eps\_D');
M_.exo_names_long = char(M_.exo_names_long, 'eps_D');
M_.endo_names = 'L_A';
M_.endo_names_tex = 'L\_A';
M_.endo_names_long = 'L_A';
M_.endo_names = char(M_.endo_names, 'L_B');
M_.endo_names_tex = char(M_.endo_names_tex, 'L\_B');
M_.endo_names_long = char(M_.endo_names_long, 'L_B');
M_.endo_names = char(M_.endo_names, 'L_C');
M_.endo_names_tex = char(M_.endo_names_tex, 'L\_C');
M_.endo_names_long = char(M_.endo_names_long, 'L_C');
M_.endo_names = char(M_.endo_names, 'L_D');
M_.endo_names_tex = char(M_.endo_names_tex, 'L\_D');
M_.endo_names_long = char(M_.endo_names_long, 'L_D');
M_.endo_names = char(M_.endo_names, 'Y_A');
M_.endo_names_tex = char(M_.endo_names_tex, 'Y\_A');
M_.endo_names_long = char(M_.endo_names_long, 'Y_A');
M_.endo_names = char(M_.endo_names, 'Y_B');
M_.endo_names_tex = char(M_.endo_names_tex, 'Y\_B');
M_.endo_names_long = char(M_.endo_names_long, 'Y_B');
M_.endo_names = char(M_.endo_names, 'Y_C');
M_.endo_names_tex = char(M_.endo_names_tex, 'Y\_C');
M_.endo_names_long = char(M_.endo_names_long, 'Y_C');
M_.endo_names = char(M_.endo_names, 'Y_D');
M_.endo_names_tex = char(M_.endo_names_tex, 'Y\_D');
M_.endo_names_long = char(M_.endo_names_long, 'Y_D');
M_.endo_names = char(M_.endo_names, 'W_A');
M_.endo_names_tex = char(M_.endo_names_tex, 'W\_A');
M_.endo_names_long = char(M_.endo_names_long, 'W_A');
M_.endo_names = char(M_.endo_names, 'W_B');
M_.endo_names_tex = char(M_.endo_names_tex, 'W\_B');
M_.endo_names_long = char(M_.endo_names_long, 'W_B');
M_.endo_names = char(M_.endo_names, 'W_C');
M_.endo_names_tex = char(M_.endo_names_tex, 'W\_C');
M_.endo_names_long = char(M_.endo_names_long, 'W_C');
M_.endo_names = char(M_.endo_names, 'W_D');
M_.endo_names_tex = char(M_.endo_names_tex, 'W\_D');
M_.endo_names_long = char(M_.endo_names_long, 'W_D');
M_.endo_names = char(M_.endo_names, 'P_A');
M_.endo_names_tex = char(M_.endo_names_tex, 'P\_A');
M_.endo_names_long = char(M_.endo_names_long, 'P_A');
M_.endo_names = char(M_.endo_names, 'P_B');
M_.endo_names_tex = char(M_.endo_names_tex, 'P\_B');
M_.endo_names_long = char(M_.endo_names_long, 'P_B');
M_.endo_names = char(M_.endo_names, 'P_C');
M_.endo_names_tex = char(M_.endo_names_tex, 'P\_C');
M_.endo_names_long = char(M_.endo_names_long, 'P_C');
M_.endo_names = char(M_.endo_names, 'P_D');
M_.endo_names_tex = char(M_.endo_names_tex, 'P\_D');
M_.endo_names_long = char(M_.endo_names_long, 'P_D');
M_.endo_names = char(M_.endo_names, 'e_A');
M_.endo_names_tex = char(M_.endo_names_tex, 'e\_A');
M_.endo_names_long = char(M_.endo_names_long, 'e_A');
M_.endo_names = char(M_.endo_names, 'e_B');
M_.endo_names_tex = char(M_.endo_names_tex, 'e\_B');
M_.endo_names_long = char(M_.endo_names_long, 'e_B');
M_.endo_names = char(M_.endo_names, 'e_C');
M_.endo_names_tex = char(M_.endo_names_tex, 'e\_C');
M_.endo_names_long = char(M_.endo_names_long, 'e_C');
M_.endo_names = char(M_.endo_names, 'e_D');
M_.endo_names_tex = char(M_.endo_names_tex, 'e\_D');
M_.endo_names_long = char(M_.endo_names_long, 'e_D');
M_.endo_names = char(M_.endo_names, 'K_A');
M_.endo_names_tex = char(M_.endo_names_tex, 'K\_A');
M_.endo_names_long = char(M_.endo_names_long, 'K_A');
M_.endo_names = char(M_.endo_names, 'K_B');
M_.endo_names_tex = char(M_.endo_names_tex, 'K\_B');
M_.endo_names_long = char(M_.endo_names_long, 'K_B');
M_.endo_names = char(M_.endo_names, 'K_C');
M_.endo_names_tex = char(M_.endo_names_tex, 'K\_C');
M_.endo_names_long = char(M_.endo_names_long, 'K_C');
M_.endo_names = char(M_.endo_names, 'K_D');
M_.endo_names_tex = char(M_.endo_names_tex, 'K\_D');
M_.endo_names_long = char(M_.endo_names_long, 'K_D');
M_.endo_names = char(M_.endo_names, 'C_A');
M_.endo_names_tex = char(M_.endo_names_tex, 'C\_A');
M_.endo_names_long = char(M_.endo_names_long, 'C_A');
M_.endo_names = char(M_.endo_names, 'C_B');
M_.endo_names_tex = char(M_.endo_names_tex, 'C\_B');
M_.endo_names_long = char(M_.endo_names_long, 'C_B');
M_.endo_names = char(M_.endo_names, 'C_C');
M_.endo_names_tex = char(M_.endo_names_tex, 'C\_C');
M_.endo_names_long = char(M_.endo_names_long, 'C_C');
M_.endo_names = char(M_.endo_names, 'C_D');
M_.endo_names_tex = char(M_.endo_names_tex, 'C\_D');
M_.endo_names_long = char(M_.endo_names_long, 'C_D');
M_.endo_names = char(M_.endo_names, 'I_A');
M_.endo_names_tex = char(M_.endo_names_tex, 'I\_A');
M_.endo_names_long = char(M_.endo_names_long, 'I_A');
M_.endo_names = char(M_.endo_names, 'I_B');
M_.endo_names_tex = char(M_.endo_names_tex, 'I\_B');
M_.endo_names_long = char(M_.endo_names_long, 'I_B');
M_.endo_names = char(M_.endo_names, 'I_C');
M_.endo_names_tex = char(M_.endo_names_tex, 'I\_C');
M_.endo_names_long = char(M_.endo_names_long, 'I_C');
M_.endo_names = char(M_.endo_names, 'I_D');
M_.endo_names_tex = char(M_.endo_names_tex, 'I\_D');
M_.endo_names_long = char(M_.endo_names_long, 'I_D');
M_.endo_names = char(M_.endo_names, 'C');
M_.endo_names_tex = char(M_.endo_names_tex, 'C');
M_.endo_names_long = char(M_.endo_names_long, 'C');
M_.endo_names = char(M_.endo_names, 'L');
M_.endo_names_tex = char(M_.endo_names_tex, 'L');
M_.endo_names_long = char(M_.endo_names_long, 'L');
M_.endo_names = char(M_.endo_names, 'r');
M_.endo_names_tex = char(M_.endo_names_tex, 'r');
M_.endo_names_long = char(M_.endo_names_long, 'r');
M_.endo_names = char(M_.endo_names, 'Y');
M_.endo_names_tex = char(M_.endo_names_tex, 'Y');
M_.endo_names_long = char(M_.endo_names_long, 'Y');
M_.endo_names = char(M_.endo_names, 'M_AA');
M_.endo_names_tex = char(M_.endo_names_tex, 'M\_AA');
M_.endo_names_long = char(M_.endo_names_long, 'M_AA');
M_.endo_names = char(M_.endo_names, 'M_AB');
M_.endo_names_tex = char(M_.endo_names_tex, 'M\_AB');
M_.endo_names_long = char(M_.endo_names_long, 'M_AB');
M_.endo_names = char(M_.endo_names, 'M_AC');
M_.endo_names_tex = char(M_.endo_names_tex, 'M\_AC');
M_.endo_names_long = char(M_.endo_names_long, 'M_AC');
M_.endo_names = char(M_.endo_names, 'M_AD');
M_.endo_names_tex = char(M_.endo_names_tex, 'M\_AD');
M_.endo_names_long = char(M_.endo_names_long, 'M_AD');
M_.endo_names = char(M_.endo_names, 'M_BA');
M_.endo_names_tex = char(M_.endo_names_tex, 'M\_BA');
M_.endo_names_long = char(M_.endo_names_long, 'M_BA');
M_.endo_names = char(M_.endo_names, 'M_BB');
M_.endo_names_tex = char(M_.endo_names_tex, 'M\_BB');
M_.endo_names_long = char(M_.endo_names_long, 'M_BB');
M_.endo_names = char(M_.endo_names, 'M_BC');
M_.endo_names_tex = char(M_.endo_names_tex, 'M\_BC');
M_.endo_names_long = char(M_.endo_names_long, 'M_BC');
M_.endo_names = char(M_.endo_names, 'M_BD');
M_.endo_names_tex = char(M_.endo_names_tex, 'M\_BD');
M_.endo_names_long = char(M_.endo_names_long, 'M_BD');
M_.endo_names = char(M_.endo_names, 'M_CA');
M_.endo_names_tex = char(M_.endo_names_tex, 'M\_CA');
M_.endo_names_long = char(M_.endo_names_long, 'M_CA');
M_.endo_names = char(M_.endo_names, 'M_CB');
M_.endo_names_tex = char(M_.endo_names_tex, 'M\_CB');
M_.endo_names_long = char(M_.endo_names_long, 'M_CB');
M_.endo_names = char(M_.endo_names, 'M_CC');
M_.endo_names_tex = char(M_.endo_names_tex, 'M\_CC');
M_.endo_names_long = char(M_.endo_names_long, 'M_CC');
M_.endo_names = char(M_.endo_names, 'M_CD');
M_.endo_names_tex = char(M_.endo_names_tex, 'M\_CD');
M_.endo_names_long = char(M_.endo_names_long, 'M_CD');
M_.endo_names = char(M_.endo_names, 'M_DA');
M_.endo_names_tex = char(M_.endo_names_tex, 'M\_DA');
M_.endo_names_long = char(M_.endo_names_long, 'M_DA');
M_.endo_names = char(M_.endo_names, 'M_DB');
M_.endo_names_tex = char(M_.endo_names_tex, 'M\_DB');
M_.endo_names_long = char(M_.endo_names_long, 'M_DB');
M_.endo_names = char(M_.endo_names, 'M_DC');
M_.endo_names_tex = char(M_.endo_names_tex, 'M\_DC');
M_.endo_names_long = char(M_.endo_names_long, 'M_DC');
M_.endo_names = char(M_.endo_names, 'M_DD');
M_.endo_names_tex = char(M_.endo_names_tex, 'M\_DD');
M_.endo_names_long = char(M_.endo_names_long, 'M_DD');
M_.endo_partitions = struct();
M_.param_names = 'L_Ass';
M_.param_names_tex = 'L\_Ass';
M_.param_names_long = 'L_Ass';
M_.param_names = char(M_.param_names, 'L_Bss');
M_.param_names_tex = char(M_.param_names_tex, 'L\_Bss');
M_.param_names_long = char(M_.param_names_long, 'L_Bss');
M_.param_names = char(M_.param_names, 'L_Css');
M_.param_names_tex = char(M_.param_names_tex, 'L\_Css');
M_.param_names_long = char(M_.param_names_long, 'L_Css');
M_.param_names = char(M_.param_names, 'L_Dss');
M_.param_names_tex = char(M_.param_names_tex, 'L\_Dss');
M_.param_names_long = char(M_.param_names_long, 'L_Dss');
M_.param_names = char(M_.param_names, 'Y_Ass');
M_.param_names_tex = char(M_.param_names_tex, 'Y\_Ass');
M_.param_names_long = char(M_.param_names_long, 'Y_Ass');
M_.param_names = char(M_.param_names, 'Y_Bss');
M_.param_names_tex = char(M_.param_names_tex, 'Y\_Bss');
M_.param_names_long = char(M_.param_names_long, 'Y_Bss');
M_.param_names = char(M_.param_names, 'Y_Css');
M_.param_names_tex = char(M_.param_names_tex, 'Y\_Css');
M_.param_names_long = char(M_.param_names_long, 'Y_Css');
M_.param_names = char(M_.param_names, 'Y_Dss');
M_.param_names_tex = char(M_.param_names_tex, 'Y\_Dss');
M_.param_names_long = char(M_.param_names_long, 'Y_Dss');
M_.param_names = char(M_.param_names, 'W_Ass');
M_.param_names_tex = char(M_.param_names_tex, 'W\_Ass');
M_.param_names_long = char(M_.param_names_long, 'W_Ass');
M_.param_names = char(M_.param_names, 'W_Bss');
M_.param_names_tex = char(M_.param_names_tex, 'W\_Bss');
M_.param_names_long = char(M_.param_names_long, 'W_Bss');
M_.param_names = char(M_.param_names, 'W_Css');
M_.param_names_tex = char(M_.param_names_tex, 'W\_Css');
M_.param_names_long = char(M_.param_names_long, 'W_Css');
M_.param_names = char(M_.param_names, 'W_Dss');
M_.param_names_tex = char(M_.param_names_tex, 'W\_Dss');
M_.param_names_long = char(M_.param_names_long, 'W_Dss');
M_.param_names = char(M_.param_names, 'P_Ass');
M_.param_names_tex = char(M_.param_names_tex, 'P\_Ass');
M_.param_names_long = char(M_.param_names_long, 'P_Ass');
M_.param_names = char(M_.param_names, 'P_Bss');
M_.param_names_tex = char(M_.param_names_tex, 'P\_Bss');
M_.param_names_long = char(M_.param_names_long, 'P_Bss');
M_.param_names = char(M_.param_names, 'P_Css');
M_.param_names_tex = char(M_.param_names_tex, 'P\_Css');
M_.param_names_long = char(M_.param_names_long, 'P_Css');
M_.param_names = char(M_.param_names, 'P_Dss');
M_.param_names_tex = char(M_.param_names_tex, 'P\_Dss');
M_.param_names_long = char(M_.param_names_long, 'P_Dss');
M_.param_names = char(M_.param_names, 'C_Ass');
M_.param_names_tex = char(M_.param_names_tex, 'C\_Ass');
M_.param_names_long = char(M_.param_names_long, 'C_Ass');
M_.param_names = char(M_.param_names, 'C_Bss');
M_.param_names_tex = char(M_.param_names_tex, 'C\_Bss');
M_.param_names_long = char(M_.param_names_long, 'C_Bss');
M_.param_names = char(M_.param_names, 'C_Css');
M_.param_names_tex = char(M_.param_names_tex, 'C\_Css');
M_.param_names_long = char(M_.param_names_long, 'C_Css');
M_.param_names = char(M_.param_names, 'C_Dss');
M_.param_names_tex = char(M_.param_names_tex, 'C\_Dss');
M_.param_names_long = char(M_.param_names_long, 'C_Dss');
M_.param_names = char(M_.param_names, 'C_ss');
M_.param_names_tex = char(M_.param_names_tex, 'C\_ss');
M_.param_names_long = char(M_.param_names_long, 'C_ss');
M_.param_names = char(M_.param_names, 'L_ss');
M_.param_names_tex = char(M_.param_names_tex, 'L\_ss');
M_.param_names_long = char(M_.param_names_long, 'L_ss');
M_.param_names = char(M_.param_names, 'GAMMA_AA');
M_.param_names_tex = char(M_.param_names_tex, 'GAMMA\_AA');
M_.param_names_long = char(M_.param_names_long, 'GAMMA_AA');
M_.param_names = char(M_.param_names, 'GAMMA_AB');
M_.param_names_tex = char(M_.param_names_tex, 'GAMMA\_AB');
M_.param_names_long = char(M_.param_names_long, 'GAMMA_AB');
M_.param_names = char(M_.param_names, 'GAMMA_AC');
M_.param_names_tex = char(M_.param_names_tex, 'GAMMA\_AC');
M_.param_names_long = char(M_.param_names_long, 'GAMMA_AC');
M_.param_names = char(M_.param_names, 'GAMMA_AD');
M_.param_names_tex = char(M_.param_names_tex, 'GAMMA\_AD');
M_.param_names_long = char(M_.param_names_long, 'GAMMA_AD');
M_.param_names = char(M_.param_names, 'GAMMA_BA');
M_.param_names_tex = char(M_.param_names_tex, 'GAMMA\_BA');
M_.param_names_long = char(M_.param_names_long, 'GAMMA_BA');
M_.param_names = char(M_.param_names, 'GAMMA_BB');
M_.param_names_tex = char(M_.param_names_tex, 'GAMMA\_BB');
M_.param_names_long = char(M_.param_names_long, 'GAMMA_BB');
M_.param_names = char(M_.param_names, 'GAMMA_BC');
M_.param_names_tex = char(M_.param_names_tex, 'GAMMA\_BC');
M_.param_names_long = char(M_.param_names_long, 'GAMMA_BC');
M_.param_names = char(M_.param_names, 'GAMMA_BD');
M_.param_names_tex = char(M_.param_names_tex, 'GAMMA\_BD');
M_.param_names_long = char(M_.param_names_long, 'GAMMA_BD');
M_.param_names = char(M_.param_names, 'GAMMA_CA');
M_.param_names_tex = char(M_.param_names_tex, 'GAMMA\_CA');
M_.param_names_long = char(M_.param_names_long, 'GAMMA_CA');
M_.param_names = char(M_.param_names, 'GAMMA_CB');
M_.param_names_tex = char(M_.param_names_tex, 'GAMMA\_CB');
M_.param_names_long = char(M_.param_names_long, 'GAMMA_CB');
M_.param_names = char(M_.param_names, 'GAMMA_CC');
M_.param_names_tex = char(M_.param_names_tex, 'GAMMA\_CC');
M_.param_names_long = char(M_.param_names_long, 'GAMMA_CC');
M_.param_names = char(M_.param_names, 'GAMMA_CD');
M_.param_names_tex = char(M_.param_names_tex, 'GAMMA\_CD');
M_.param_names_long = char(M_.param_names_long, 'GAMMA_CD');
M_.param_names = char(M_.param_names, 'GAMMA_DA');
M_.param_names_tex = char(M_.param_names_tex, 'GAMMA\_DA');
M_.param_names_long = char(M_.param_names_long, 'GAMMA_DA');
M_.param_names = char(M_.param_names, 'GAMMA_DB');
M_.param_names_tex = char(M_.param_names_tex, 'GAMMA\_DB');
M_.param_names_long = char(M_.param_names_long, 'GAMMA_DB');
M_.param_names = char(M_.param_names, 'GAMMA_DC');
M_.param_names_tex = char(M_.param_names_tex, 'GAMMA\_DC');
M_.param_names_long = char(M_.param_names_long, 'GAMMA_DC');
M_.param_names = char(M_.param_names, 'GAMMA_DD');
M_.param_names_tex = char(M_.param_names_tex, 'GAMMA\_DD');
M_.param_names_long = char(M_.param_names_long, 'GAMMA_DD');
M_.param_names = char(M_.param_names, 'PHI_A');
M_.param_names_tex = char(M_.param_names_tex, 'PHI\_A');
M_.param_names_long = char(M_.param_names_long, 'PHI_A');
M_.param_names = char(M_.param_names, 'PHI_B');
M_.param_names_tex = char(M_.param_names_tex, 'PHI\_B');
M_.param_names_long = char(M_.param_names_long, 'PHI_B');
M_.param_names = char(M_.param_names, 'PHI_C');
M_.param_names_tex = char(M_.param_names_tex, 'PHI\_C');
M_.param_names_long = char(M_.param_names_long, 'PHI_C');
M_.param_names = char(M_.param_names, 'PHI_D');
M_.param_names_tex = char(M_.param_names_tex, 'PHI\_D');
M_.param_names_long = char(M_.param_names_long, 'PHI_D');
M_.param_names = char(M_.param_names, 'ALPHA_A');
M_.param_names_tex = char(M_.param_names_tex, 'ALPHA\_A');
M_.param_names_long = char(M_.param_names_long, 'ALPHA_A');
M_.param_names = char(M_.param_names, 'ALPHA_B');
M_.param_names_tex = char(M_.param_names_tex, 'ALPHA\_B');
M_.param_names_long = char(M_.param_names_long, 'ALPHA_B');
M_.param_names = char(M_.param_names, 'ALPHA_C');
M_.param_names_tex = char(M_.param_names_tex, 'ALPHA\_C');
M_.param_names_long = char(M_.param_names_long, 'ALPHA_C');
M_.param_names = char(M_.param_names, 'ALPHA_D');
M_.param_names_tex = char(M_.param_names_tex, 'ALPHA\_D');
M_.param_names_long = char(M_.param_names_long, 'ALPHA_D');
M_.param_names = char(M_.param_names, 'BETA_A');
M_.param_names_tex = char(M_.param_names_tex, 'BETA\_A');
M_.param_names_long = char(M_.param_names_long, 'BETA_A');
M_.param_names = char(M_.param_names, 'BETA_B');
M_.param_names_tex = char(M_.param_names_tex, 'BETA\_B');
M_.param_names_long = char(M_.param_names_long, 'BETA_B');
M_.param_names = char(M_.param_names, 'BETA_C');
M_.param_names_tex = char(M_.param_names_tex, 'BETA\_C');
M_.param_names_long = char(M_.param_names_long, 'BETA_C');
M_.param_names = char(M_.param_names, 'BETA_D');
M_.param_names_tex = char(M_.param_names_tex, 'BETA\_D');
M_.param_names_long = char(M_.param_names_long, 'BETA_D');
M_.param_names = char(M_.param_names, 'OMEGA');
M_.param_names_tex = char(M_.param_names_tex, 'OMEGA');
M_.param_names_long = char(M_.param_names_long, 'OMEGA');
M_.param_names = char(M_.param_names, 'MU');
M_.param_names_tex = char(M_.param_names_tex, 'MU');
M_.param_names_long = char(M_.param_names_long, 'MU');
M_.param_names = char(M_.param_names, 'PSI');
M_.param_names_tex = char(M_.param_names_tex, 'PSI');
M_.param_names_long = char(M_.param_names_long, 'PSI');
M_.param_names = char(M_.param_names, 'SIGMA');
M_.param_names_tex = char(M_.param_names_tex, 'SIGMA');
M_.param_names_long = char(M_.param_names_long, 'SIGMA');
M_.param_names = char(M_.param_names, 'RHO');
M_.param_names_tex = char(M_.param_names_tex, 'RHO');
M_.param_names_long = char(M_.param_names_long, 'RHO');
M_.param_names = char(M_.param_names, 'DELT');
M_.param_names_tex = char(M_.param_names_tex, 'DELT');
M_.param_names_long = char(M_.param_names_long, 'DELT');
M_.param_names = char(M_.param_names, 'DELTT');
M_.param_names_tex = char(M_.param_names_tex, 'DELTT');
M_.param_names_long = char(M_.param_names_long, 'DELTT');
M_.param_partitions = struct();
M_.exo_det_nbr = 0;
M_.exo_nbr = 4;
M_.endo_nbr = 52;
M_.param_nbr = 57;
M_.orig_endo_nbr = 52;
M_.aux_vars = [];
M_.Sigma_e = zeros(4, 4);
M_.Correlation_matrix = eye(4, 4);
M_.H = 0;
M_.Correlation_matrix_ME = 1;
M_.sigma_e_is_diagonal = 1;
M_.det_shocks = [];
options_.block=0;
options_.bytecode=0;
options_.use_dll=0;
M_.hessian_eq_zero = 1;
erase_compiled_function('Secteur_N_static');
erase_compiled_function('Secteur_N_dynamic');
M_.orig_eq_nbr = 52;
M_.eq_nbr = 52;
M_.ramsey_eq_nbr = 0;
M_.set_auxiliary_variables = exist(['./' M_.fname '_set_auxiliary_variables.m'], 'file') == 2;
M_.lead_lag_incidence = [
 0 9 0;
 0 10 0;
 0 11 0;
 0 12 0;
 0 13 61;
 0 14 62;
 0 15 63;
 0 16 64;
 0 17 0;
 0 18 0;
 0 19 0;
 0 20 0;
 0 21 65;
 0 22 66;
 0 23 67;
 0 24 68;
 1 25 0;
 2 26 0;
 3 27 0;
 4 28 0;
 5 29 0;
 6 30 0;
 7 31 0;
 8 32 0;
 0 33 0;
 0 34 0;
 0 35 0;
 0 36 0;
 0 37 0;
 0 38 0;
 0 39 0;
 0 40 0;
 0 41 69;
 0 42 0;
 0 43 0;
 0 44 0;
 0 45 0;
 0 46 0;
 0 47 0;
 0 48 0;
 0 49 0;
 0 50 0;
 0 51 0;
 0 52 0;
 0 53 0;
 0 54 0;
 0 55 0;
 0 56 0;
 0 57 0;
 0 58 0;
 0 59 0;
 0 60 0;]';
M_.nstatic = 35;
M_.nfwrd   = 9;
M_.npred   = 8;
M_.nboth   = 0;
M_.nsfwrd   = 9;
M_.nspred   = 8;
M_.ndynamic   = 17;
M_.equations_tags = {
  1 , 'name' , 'Consumption final goods from sector A' ;
  2 , 'name' , 'Consumption final goods from sector B' ;
  3 , 'name' , 'Consumption final goods from sector C' ;
  4 , 'name' , 'Consumption final goods from sector D' ;
  5 , 'name' , 'Labor supply for sector A' ;
  6 , 'name' , 'Labor supply for sector B' ;
  7 , 'name' , 'Labor supply for sector C' ;
  8 , 'name' , 'Labor supply for sector D' ;
  9 , 'name' , 'Labor index' ;
  10 , 'name' , 'Euler' ;
  11 , 'name' , 'Relatives prices' ;
  12 , 'name' , 'Labor demand for sector A' ;
  13 , 'name' , 'Labor demand for sector B' ;
  14 , 'name' , 'Labor demand for sector C' ;
  15 , 'name' , 'Labor demand for sector D' ;
  16 , 'name' , 'Input need from sector A to  sector A' ;
  17 , 'name' , 'Input need from sector B to  sector A' ;
  18 , 'name' , 'Input need from sector C to  sector A' ;
  19 , 'name' , 'Input need from sector D to  sector A' ;
  20 , 'name' , 'Input need from sector A to  sector B' ;
  21 , 'name' , 'Input need from sector B to  sector B' ;
  22 , 'name' , 'Input need from sector C to  sector B' ;
  23 , 'name' , 'Input need from sector D to  sector B' ;
  24 , 'name' , 'Input need from sector A to  sector C' ;
  25 , 'name' , 'Input need from sector B to  sector C' ;
  26 , 'name' , 'Input need from sector C to  sector C' ;
  27 , 'name' , 'Input need from sector D to  sector C' ;
  28 , 'name' , 'Input need from sector A to  sector D' ;
  29 , 'name' , 'Input need from sector B to  sector D' ;
  30 , 'name' , 'Input need from sector C to  sector D' ;
  31 , 'name' , 'Input need from sector D to  sector D' ;
  32 , 'name' , 'Capital need of sector A' ;
  33 , 'name' , 'Capital need of sector B' ;
  34 , 'name' , 'Capital need of sector C' ;
  35 , 'name' , 'Capital need of sector D' ;
  36 , 'name' , 'GDP' ;
  37 , 'name' , 'Law of motion of sector A ' ;
  38 , 'name' , 'Law of motion of sector B ' ;
  39 , 'name' , 'Law of motion of sector C ' ;
  40 , 'name' , 'Law of motion of sector D ' ;
  41 , 'name' , 'Resource constraint in output A' ;
  42 , 'name' , 'Resource constraint in output B' ;
  43 , 'name' , 'Resource constraint in output C' ;
  44 , 'name' , 'Resource constraint in output D' ;
  45 , 'name' , 'Production function of sector A ' ;
  46 , 'name' , 'Production function of sector B ' ;
  47 , 'name' , 'Production function of sector C ' ;
  48 , 'name' , 'Production function of sector D ' ;
  49 , 'name' , 'Sector A TFP shock' ;
  50 , 'name' , 'Sector B TFP shock' ;
  51 , 'name' , 'Sector C TFP shock' ;
  52 , 'name' , 'Sector D TFP shock' ;
};
M_.static_and_dynamic_models_differ = 0;
M_.exo_names_orig_ord = [1:4];
M_.maximum_lag = 1;
M_.maximum_lead = 1;
M_.maximum_endo_lag = 1;
M_.maximum_endo_lead = 1;
oo_.steady_state = zeros(52, 1);
M_.maximum_exo_lag = 0;
M_.maximum_exo_lead = 0;
oo_.exo_steady_state = zeros(4, 1);
M_.params = NaN(57, 1);
M_.NNZDerivatives = [217; -1; -1];
close all;
sec = [ "A", "B","C","D" ];
N=length(sec);
ss = "";
for a = ["P","W","C","L", "Y" ]
for b = [ "A", "B","C","D" ]
ss(end+1) = a+'_'+b+'ss';
end
end
liste = [] ;
Param = readtable('Param.csv');
Param = table2array(Param);
Gamma = readtable('Gamma.csv');
Gamma = table2array(Gamma);
M_.params( 43 ) = Param(1,1);
ALPHA_A = M_.params( 43 );
M_.params( 47 ) = Param(1,2);
BETA_A = M_.params( 47 );
M_.params( 39 ) = Param(1,3);
PHI_A = M_.params( 39 );
M_.params( 44 ) = Param(2,1);
ALPHA_B = M_.params( 44 );
M_.params( 48 ) = Param(2,2);
BETA_B = M_.params( 48 );
M_.params( 40 ) = Param(2,3);
PHI_B = M_.params( 40 );
M_.params( 45 ) = Param(3,1);
ALPHA_C = M_.params( 45 );
M_.params( 49 ) = Param(3,2);
BETA_C = M_.params( 49 );
M_.params( 41 ) = Param(3,3);
PHI_C = M_.params( 41 );
M_.params( 46 ) = Param(4,1);
ALPHA_D = M_.params( 46 );
M_.params( 50 ) = Param(4,2);
BETA_D = M_.params( 50 );
M_.params( 42 ) = Param(4,3);
PHI_D = M_.params( 42 );
M_.params( 23 ) = Gamma(1,1);
GAMMA_AA = M_.params( 23 );
M_.params( 24 ) = Gamma(2,1);
GAMMA_AB = M_.params( 24 );
M_.params( 25 ) = Gamma(3,1);
GAMMA_AC = M_.params( 25 );
M_.params( 26 ) = Gamma(4,1);
GAMMA_AD = M_.params( 26 );
M_.params( 27 ) = Gamma(1,2);
GAMMA_BA = M_.params( 27 );
M_.params( 28 ) = Gamma(2,2);
GAMMA_BB = M_.params( 28 );
M_.params( 29 ) = Gamma(3,2);
GAMMA_BC = M_.params( 29 );
M_.params( 30 ) = Gamma(4,2);
GAMMA_BD = M_.params( 30 );
M_.params( 31 ) = Gamma(1,3);
GAMMA_CA = M_.params( 31 );
M_.params( 32 ) = Gamma(2,3);
GAMMA_CB = M_.params( 32 );
M_.params( 33 ) = Gamma(3,3);
GAMMA_CC = M_.params( 33 );
M_.params( 34 ) = Gamma(4,3);
GAMMA_CD = M_.params( 34 );
M_.params( 35 ) = Gamma(1,4);
GAMMA_DA = M_.params( 35 );
M_.params( 36 ) = Gamma(2,4);
GAMMA_DB = M_.params( 36 );
M_.params( 37 ) = Gamma(3,4);
GAMMA_DC = M_.params( 37 );
M_.params( 38 ) = Gamma(4,4);
GAMMA_DD = M_.params( 38 );
if GAMMA_AA
end
if GAMMA_AB
end
if GAMMA_AC
end
if GAMMA_AD
end
if GAMMA_BA
end
if GAMMA_BB
end
if GAMMA_BC
end
if GAMMA_BD
end
if GAMMA_CA
end
if GAMMA_CB
end
if GAMMA_CC
end
if GAMMA_CD
end
if GAMMA_DA
end
if GAMMA_DB
end
if GAMMA_DC
end
if GAMMA_DD
end
M_.params( 53 ) = 1.2;
PSI = M_.params( 53 );
M_.params( 52 ) = 1.2;
MU = M_.params( 52 );
M_.params( 51 ) = (-0.1);
OMEGA = M_.params( 51 );
M_.params( 54 ) = 0.99;
SIGMA = M_.params( 54 );
M_.params( 55 ) = 0.97;
RHO = M_.params( 55 );
M_.params( 56 ) = 0.987;
DELT = M_.params( 56 );
M_.params( 57 ) = 0.02;
DELTT = M_.params( 57 );
VARIOUS = [OMEGA, MU, DELT, DELTT,SIGMA];
PHI=[];
ALPHA=[];
BETA=[];
GAMMA=[];
PHI(end+1) = PHI_A;
ALPHA(end+1) = ALPHA_A;
BETA(end+1) = BETA_A;
PHI(end+1) = PHI_B;
ALPHA(end+1) = ALPHA_B;
BETA(end+1) = BETA_B;
PHI(end+1) = PHI_C;
ALPHA(end+1) = ALPHA_C;
BETA(end+1) = BETA_C;
PHI(end+1) = PHI_D;
ALPHA(end+1) = ALPHA_D;
BETA(end+1) = BETA_D;
GAMMA(end+1) =  GAMMA_AA;
GAMMA(end+1) =  GAMMA_AB;
GAMMA(end+1) =  GAMMA_AC;
GAMMA(end+1) =  GAMMA_AD;
GAMMA(end+1) =  GAMMA_BA;
GAMMA(end+1) =  GAMMA_BB;
GAMMA(end+1) =  GAMMA_BC;
GAMMA(end+1) =  GAMMA_BD;
GAMMA(end+1) =  GAMMA_CA;
GAMMA(end+1) =  GAMMA_CB;
GAMMA(end+1) =  GAMMA_CC;
GAMMA(end+1) =  GAMMA_CD;
GAMMA(end+1) =  GAMMA_DA;
GAMMA(end+1) =  GAMMA_DB;
GAMMA(end+1) =  GAMMA_DC;
GAMMA(end+1) =  GAMMA_DD;
liste = Multi_Solverss(GAMMA,ALPHA,BETA,PHI,VARIOUS);
for i=1:5*N
set_param_value(ss(i+1),liste(i));
end
M_.params( 21 ) = liste(1+5*N);
C_ss = M_.params( 21 );
M_.params( 22 ) = liste(2+5*N);
L_ss = M_.params( 22 );
steady;
%
% SHOCKS instructions
%
M_.exo_det_length = 0;
M_.Sigma_e(1, 1) = (0.001)^2;
M_.Sigma_e(2, 2) = (0.001)^2;
M_.Sigma_e(3, 3) = (0.001)^2;
M_.Sigma_e(4, 4) = (0.001)^2;
options_.nograph = 1;
options_.order = 1;
options_.periods = 1000;
var_list_ = char();
info = stoch_simul(var_list_);
save('Secteur_N_results.mat', 'oo_', 'M_', 'options_');
if exist('estim_params_', 'var') == 1
  save('Secteur_N_results.mat', 'estim_params_', '-append');
end
if exist('bayestopt_', 'var') == 1
  save('Secteur_N_results.mat', 'bayestopt_', '-append');
end
if exist('dataset_', 'var') == 1
  save('Secteur_N_results.mat', 'dataset_', '-append');
end
if exist('estimation_info', 'var') == 1
  save('Secteur_N_results.mat', 'estimation_info', '-append');
end
if exist('dataset_info', 'var') == 1
  save('Secteur_N_results.mat', 'dataset_info', '-append');
end
if exist('oo_recursive_', 'var') == 1
  save('Secteur_N_results.mat', 'oo_recursive_', '-append');
end


disp(['Total computing time : ' dynsec2hms(toc(tic0)) ]);
if ~isempty(lastwarn)
  disp('Note: warning(s) encountered in MATLAB/Octave code')
end
diary off
