Commit 6a3d2045 authored by ferhat's avatar ferhat
Browse files

Minor corrections:

- Bug in check.m with model without sparse options
- Display in simulate.dll
- "Model_InfoStatement" renamed "Model_InfoStatement" in ComputingTasks

git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@2010 ac1d8469-bf42-47a9-8791-bf33cf982152
parent a9be2e5f
......@@ -59,8 +59,11 @@ global it_
oo_.exo_simul = tempex;
eigenvalues_ = dr.eigval;
%nyf = nnz(dr.kstate(:,2)>M_.maximum_lag+1);
nyf = dr.nyf;
if(options_.model_mode == 1)
nyf = dr.nyf;
else
nyf = nnz(dr.kstate(:,2)>M_.maximum_lag+1);
end;
[m_lambda,i]=sort(abs(eigenvalues_));
n_explod = nnz(abs(eigenvalues_) > options_.qz_criterium);
......
No preview for this file type
No preview for this file type
......@@ -93,25 +93,25 @@ Interpreter::compute_block_time() /*throw(EvalException)*/
case eEndogenous :
var=get_code_int
lag=get_code_int
//#ifdef DEBUGC
#ifdef DEBUGC
if(var==153)
{
mexPrintf(" FLD y[var=%d,time=%d,lag=%d,%d]=%f\n",var,it_,lag,(it_+lag)*y_size+var,y[(it_+lag)*y_size+var]);
mexEvalString("drawnow;");
}
//#endif
#endif
Stack.push(y[(it_+lag)*y_size+var]);
break;
case eExogenous :
var=get_code_int
lag=get_code_int
//#ifdef DEBUGC
#ifdef DEBUGC
if(var==6)
{
mexPrintf(" FLD x[%d, time=%d, var=%d, lag=%d]=%f\n",it_+lag+var*nb_row_x,it_,var,lag,x[it_+lag+var*nb_row_x]);
mexEvalString("drawnow;");
}
//#endif
#endif
Stack.push(x[it_+lag+var*nb_row_x]);
break;
case eExogenousDet :
......
......@@ -68,17 +68,17 @@ CheckStatement::checkPass(ModFileStructure &mod_file_struct)
mod_file_struct.check_present = true;
}
Model_InfoStatement::Model_InfoStatement(const OptionsList &options_list_arg) :
ModelInfoStatement::ModelInfoStatement(const OptionsList &options_list_arg) :
options_list(options_list_arg)
{
}
void Model_InfoStatement::checkPass(ModFileStructure &mod_file_struct)
void ModelInfoStatement::checkPass(ModFileStructure &mod_file_struct)
{
//mod_file_struct.model_info_present = true;
}
void Model_InfoStatement::writeOutput(ostream &output, const string &basename) const
void ModelInfoStatement::writeOutput(ostream &output, const string &basename) const
{
options_list.writeOutput(output);
output << "model_info();\n";
......
......@@ -1566,44 +1566,6 @@ ModelTree::writeModelEquationsCodeOrdered(const string file_name, const Model_Bl
code_file.write(&FENDBLOCK, sizeof(FENDBLOCK));
code_file.write(&FEND, sizeof(FEND));
code_file.close();
/*int mx_blck=j;
for(j=0;j<mx_blck;j++)
{
if(ModelBlock->Block_List[j].Simulation_Type==SOLVE_BACKWARD_COMPLETE || ModelBlock->Block_List[j].Simulation_Type==SOLVE_FOREWARD_COMPLETE)
{
m=ModelBlock->Block_List[j].Max_Lag;
for(i=0;i<ModelBlock->Block_List[j].IM_lead_lag[m].size;i++)
{
int eqr=ModelBlock->Block_List[j].IM_lead_lag[m].Equ[i];
int v=ModelBlock->Block_List[j].Equation[eqr];
Uf[v].Ufl=Uf[v].Ufl_First;
while(Uf[v].Ufl)
{
Uf[v].Ufl_First=Uf[v].Ufl->pNext;
free(Uf[v].Ufl);
Uf[v].Ufl=Uf[v].Ufl_First;
}
}
}
else if(ModelBlock->Block_List[j].Simulation_Type==SOLVE_TWO_BOUNDARIES_COMPLETE || ModelBlock->Block_List[j].Simulation_Type==SOLVE_TWO_BOUNDARIES_SIMPLE)
{
for(m=0;m<=ModelBlock->Block_List[j].Max_Lead+ModelBlock->Block_List[j].Max_Lag;m++)
{
for(i=0;i<ModelBlock->Block_List[j].IM_lead_lag[m].size;i++)
{
int eqr=ModelBlock->Block_List[j].IM_lead_lag[m].Equ[i];
int v=ModelBlock->Block_List[j].Equation[eqr];
Uf[v].Ufl=Uf[v].Ufl_First;
while(Uf[v].Ufl)
{
Uf[v].Ufl_First=Uf[v].Ufl->pNext;
free(Uf[v].Ufl);
Uf[v].Ufl=Uf[v].Ufl_First;
}
}
}
}
}*/
}
......
......@@ -733,7 +733,7 @@ ParsingDriver::simul()
void
ParsingDriver::model_info()
{
mod_file->addStatement(new Model_InfoStatement(options_list));
mod_file->addStatement(new ModelInfoStatement(options_list));
options_list.clear();
}
......
......@@ -76,12 +76,12 @@ public:
virtual void writeOutput(ostream &output, const string &basename) const;
};
class Model_InfoStatement : public Statement
class ModelInfoStatement : public Statement
{
private:
const OptionsList options_list;
public:
Model_InfoStatement(const OptionsList &options_list_arg);
ModelInfoStatement(const OptionsList &options_list_arg);
virtual void checkPass(ModFileStructure &mod_file_struct);
virtual void writeOutput(ostream &output, const string &basename) const;
};
......
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