Open rruusu opened 3 weeks ago
There are some performance issues when using KINSol for algebraic loops (i.e. the default).
The state of the KINSol solver is not mainteined between successive solutions
The last residual is always evaluated twice in succession
Repeated evaluation of the last residual (via calls to fmi2SetReal / fmi2GetReal) is entirely unnecessary.
fmi2SetReal
fmi2GetReal
Solution iterations can be greatly reduced by keeping information from previous solutions.
I will push a solution for this to my fork shortly.
@rruusu Thank you for the feedback! Please feel free to open a pull request with your changes.
Description
There are some performance issues when using KINSol for algebraic loops (i.e. the default).
The state of the KINSol solver is not mainteined between successive solutions
The last residual is always evaluated twice in succession
Expected behavior
Repeated evaluation of the last residual (via calls to
fmi2SetReal
/fmi2GetReal
) is entirely unnecessary.Solution iterations can be greatly reduced by keeping information from previous solutions.
Version and OS