CollInt: Erroneous warning about nonlinear DAE
The current check uses the is_affine
method. We use .expand()
there to make it a bit more reliable. The flipside is that weird variable aliasing may occur if not all variables in the expression are part of the function input. Simply put, the affinity check only passes collocated variables in, but skips over the constant/fixed inputs (which can still very much be part of the DAE). The same goes for symbolic parameters I guess. The expanded jacobian will then change these symbols with some other random symbol that was passed in, resulting in a nonlinear DAE (looking at the collocated/integrated variables).
A better way would probably be to replace all parameters/constant inputs in the to-be-checked DAE with random numeric values in (0, 1). I'm not sure we should check in is_affine whether all symvars of the expression e
have been passed in as v
; that's probably slow.