Skip to content
Snippets Groups Projects
Verified Commit f44155d4 authored by Sébastien Villemot's avatar Sébastien Villemot
Browse files

Fix logic of include_eqs in the presence of [static]/[dynamic] equations

In a model with [static]/[dynamic] equations, if the user was using include_eqs
with a list of equations that does *not* contain equations marked
[static]/[dynamic], then the call to ModelTree::includeExcludeEquations(…,
static_equations=true) would have an empty list of equation tags (as stored
in tag_eqns).

The right behaviour in this case is to exclude all static equations. However,
the code would exclude none, and this would disrupt the equilibrium between
[static] and [dynamic] equations (since all [dynamic] equations were excluded
by the other call to the same method).

The fix consists in removing the shortcut that returns from the method if
tag_eqns is empty.

(cherry picked from commit a73b0d91)
parent 4deb397d
Branches
Tags
Loading
Checking pipeline status
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment