- Correction of a bug in the Jacobian Matrix computation for a non block-decomposed model using bytecode
parent
8d79ed5db9
commit
88cdf0193c
|
@ -501,23 +501,26 @@ StaticModel::writeModelEquationsCode(const string file_name, const string bin_ba
|
||||||
{
|
{
|
||||||
FLDR_ fldr(i);
|
FLDR_ fldr(i);
|
||||||
fldr.write(code_file, instruction_number);
|
fldr.write(code_file, instruction_number);
|
||||||
for(vector<pair<int, int> >::const_iterator it = derivatives[i].begin();
|
if (derivatives[i].size())
|
||||||
it != derivatives[i].end(); it++)
|
|
||||||
{
|
{
|
||||||
FLDSU_ fldsu(it->second);
|
for(vector<pair<int, int> >::const_iterator it = derivatives[i].begin();
|
||||||
fldsu.write(code_file, instruction_number);
|
it != derivatives[i].end(); it++)
|
||||||
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);
|
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);
|
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_ fstpsu(i);
|
||||||
fstpsu.write(code_file, instruction_number);
|
fstpsu.write(code_file, instruction_number);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue