Commit dc5cced1 authored by ferhat's avatar ferhat
Browse files

- Adding SOLVE_FORWARD_COMPLETE and SOLVE_BACKWARD_COMPLETE simulation type for sparse model option

- Adding dyn2vec at the end of a deterministic simulation with sparse or sparse_dll option

git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@2178 ac1d8469-bf42-47a9-8791-bf33cf982152
parent 623bde1b
......@@ -381,7 +381,7 @@ BlockTriangular::Allocate_Block(int size, int *count_Equ, int *count_Block, Bloc
else if((Lead > 0) && (Lag == 0))
ModelBlock->Block_List[*count_Block].Simulation_Type = SOLVE_BACKWARD_SIMPLE;
else
ModelBlock->Block_List[*count_Block].Simulation_Type = SOLVE_FOREWARD_SIMPLE;
ModelBlock->Block_List[*count_Block].Simulation_Type = SOLVE_FORWARD_SIMPLE;
ModelBlock->Block_List[*count_Block].IM_lead_lag = (IM_compact*)malloc((Lead + Lag + 1) * sizeof(IM_compact));
ModelBlock->Block_List[*count_Block].Nb_Lead_Lag_Endo = nb_lead_lag_endo;
if(nb_lead_lag_endo)
......@@ -528,14 +528,14 @@ BlockTriangular::Allocate_Block(int size, int *count_Equ, int *count_Block, Bloc
if(Lead > 0)
ModelBlock->Block_List[*count_Block].Simulation_Type = SOLVE_BACKWARD_COMPLETE;
else
ModelBlock->Block_List[*count_Block].Simulation_Type = SOLVE_FOREWARD_COMPLETE;
ModelBlock->Block_List[*count_Block].Simulation_Type = SOLVE_FORWARD_COMPLETE;
}
else
{
if(Lead > 0)
ModelBlock->Block_List[*count_Block].Simulation_Type = SOLVE_BACKWARD_SIMPLE;
else
ModelBlock->Block_List[*count_Block].Simulation_Type = SOLVE_FOREWARD_SIMPLE;
ModelBlock->Block_List[*count_Block].Simulation_Type = SOLVE_FORWARD_SIMPLE;
}
ModelBlock->Block_List[*count_Block].Max_Lag = Lag;
ModelBlock->Block_List[*count_Block].Max_Lead = Lead;
......
......@@ -135,6 +135,7 @@ SimulSparseStatement::writeOutput(ostream &output, const string &basename) const
//output << "oo_.endo_simul=" << basename << "_dynamic();\n";
output << basename << "_dynamic;\n";
}
output << "dyn2vec;\n";
}
StochSimulStatement::StochSimulStatement(const SymbolList &symbol_list_arg,
......
This diff is collapsed.
......@@ -96,16 +96,16 @@ public:
{
switch (type)
{
case EVALUATE_FOREWARD:
case EVALUATE_FOREWARD_R:
return ("EVALUATE FOREWARD ");
case EVALUATE_FORWARD:
case EVALUATE_FORWARD_R:
return ("EVALUATE FORWARD ");
break;
case EVALUATE_BACKWARD:
case EVALUATE_BACKWARD_R:
return ("EVALUATE BACKWARD ");
break;
case SOLVE_FOREWARD_SIMPLE:
return ("SOLVE FOREWARD SIMPLE ");
case SOLVE_FORWARD_SIMPLE:
return ("SOLVE FORWARD SIMPLE ");
break;
case SOLVE_BACKWARD_SIMPLE:
return ("SOLVE BACKWARD SIMPLE ");
......@@ -113,8 +113,8 @@ public:
case SOLVE_TWO_BOUNDARIES_SIMPLE:
return ("SOLVE TWO BOUNDARIES SIMPLE ");
break;
case SOLVE_FOREWARD_COMPLETE:
return ("SOLVE FOREWARD COMPLETE ");
case SOLVE_FORWARD_COMPLETE:
return ("SOLVE FORWARD COMPLETE ");
break;
case SOLVE_BACKWARD_COMPLETE:
return ("SOLVE BACKWARD COMPLETE ");
......
......@@ -52,15 +52,15 @@ enum BlockType
enum BlockSimulationType
{
UNKNOWN = -1, //!< Unknown simulation type
EVALUATE_FOREWARD = 0, //!< Simple evaluation, normalized variable on left-hand side, forward
EVALUATE_FORWARD = 0, //!< Simple evaluation, normalized variable on left-hand side, forward
EVALUATE_BACKWARD = 1, //!< Simple evaluation, normalized variable on left-hand side, backward
SOLVE_FOREWARD_SIMPLE = 2, //!< Block of one equation, newton solver needed, forward
SOLVE_FORWARD_SIMPLE = 2, //!< Block of one equation, newton solver needed, forward
SOLVE_BACKWARD_SIMPLE = 3, //!< Block of one equation, newton solver needed, backward
SOLVE_TWO_BOUNDARIES_SIMPLE = 4, //!< Block of one equation, newton solver needed, forward & ackward
SOLVE_FOREWARD_COMPLETE = 5, //!< Block of several equations, newton solver needed, forward
SOLVE_FORWARD_COMPLETE = 5, //!< Block of several equations, newton solver needed, forward
SOLVE_BACKWARD_COMPLETE = 6, //!< Block of several equations, newton solver needed, backward
SOLVE_TWO_BOUNDARIES_COMPLETE = 7, //!< Block of several equations, newton solver needed, forward and backwar
EVALUATE_FOREWARD_R = 8, //!< Simple evaluation, normalized variable on right-hand side, forward
EVALUATE_FORWARD_R = 8, //!< Simple evaluation, normalized variable on right-hand side, forward
EVALUATE_BACKWARD_R = 9 //!< Simple evaluation, normalized variable on right-hand side, backward
};
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment