Fix bytecode for block+mfs>0 in static model
Variable indices would be incorrect in the evaluated Jacobian if recursive
variables were present. This would lead to incorrect results and/or crashes in
bytecode MEX. This bug has been exposed by commit
f45a99fc68
, which actually enabled mfs>0 for
static models.
master
parent
7acf278370
commit
715ec9e4bc
|
@ -87,7 +87,8 @@ private:
|
|||
int
|
||||
getBlockJacobianEndoCol([[maybe_unused]] int blk, int var, [[maybe_unused]] int lag) const override
|
||||
{
|
||||
return var;
|
||||
assert(var >= blocks[blk].getRecursiveSize());
|
||||
return var - blocks[blk].getRecursiveSize();
|
||||
}
|
||||
|
||||
// Write the block structure of the model in the driver file
|
||||
|
|
Loading…
Reference in New Issue