Skip to content

introduce command line options: `exclude_eqs` and `include_eqs`

Houtan Bastani requested to merge houtanb/preprocessor:exclude_eqs into master

Allows for the inclusion/exclusion of a set of equations, specified either on the command line or in a text file.

If the equation has a single endogenous variable on the LHS, then the equation is moved. If not, if the equation has an endogenous tag then that variable is removed along with this equation. If not, then an error is thrown.

As a command line argument, exclude_eqs can take the form (same syntax for include_eqs):

  • exclude_eqs=eq1 to remove all equations declared as [name=eq1]`
  • exclude_eqs=[eq 1, eq 2] to remove all equations declared as [name=eq 1] or [name=eq 2]
  • exclude_eqs=[tagname=X] to remove all equations declared as [tagname=X]
  • exclude_eqs=[tagname=(X, Y)] to remove all equations declared as [tagname=X] or [tagname=Y]

When declared in a file, the file should be of the form:

eq 1
eq 2

to remove all equations declared as [name=eq 1] or [name=eq 2].

It should be of the form:

tagname=
X
Y

to remove all equations declared as [tagname=X] or [tagname=Y].

Merge request reports

Loading