Commit 88cdf019 authored by Ferhat Mihoubi's avatar Ferhat Mihoubi Committed by Sébastien Villemot
Browse files

- Correction of a bug in the Jacobian Matrix computation for a non...

- Correction of a bug in the Jacobian Matrix computation for a non block-decomposed model using bytecode
parent 8d79ed5d
......@@ -501,23 +501,26 @@ StaticModel::writeModelEquationsCode(const string file_name, const string bin_ba
{
FLDR_ fldr(i);
fldr.write(code_file, instruction_number);
for(vector<pair<int, int> >::const_iterator it = derivatives[i].begin();
it != derivatives[i].end(); it++)
if (derivatives[i].size())
{
FLDSU_ fldsu(it->second);
fldsu.write(code_file, instruction_number);
FLDSV_ fldsv(eEndogenous, it->first);
fldsv.write(code_file, instruction_number);
FBINARY_ fbinary(oTimes);
fbinary.write(code_file, instruction_number);
if (it != derivatives[i].begin())
for(vector<pair<int, int> >::const_iterator it = derivatives[i].begin();
it != derivatives[i].end(); it++)
{
FBINARY_ fbinary(oPlus);
FLDSU_ fldsu(it->second);
fldsu.write(code_file, instruction_number);
FLDSV_ fldsv(eEndogenous, it->first);
fldsv.write(code_file, instruction_number);
FBINARY_ fbinary(oTimes);
fbinary.write(code_file, instruction_number);
if (it != derivatives[i].begin())
{
FBINARY_ fbinary(oPlus);
fbinary.write(code_file, instruction_number);
}
}
FBINARY_ fbinary(oMinus);
fbinary.write(code_file, instruction_number);
}
FBINARY_ fbinary(oMinus);
fbinary.write(code_file, instruction_number);
FSTPSU_ fstpsu(i);
fstpsu.write(code_file, instruction_number);
}
......
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