gEconpy.model.simplification.simplify_tryreduce#

gEconpy.model.simplification.simplify_tryreduce(try_reduce_vars, equations, variables, tryreduce_sub_dict=None)#

Attempt to reduce the number of equations in the system.

Reduction is performed by removing equations requested in the tryreduce block of the GCN file, and they are “safe” to remove. Equations are considered safe to remove if they are “self-contained” that is, if no other variables depend on their values.

Parameters:
try_reduce_varslist

The list of variables to try to reduce.

equationslist

The list of equations to simplify.

variableslist

The list of all variables in the system.

tryreduce_sub_dictdict, optional

A dictionary of substitutions to use when attempting to reduce the system. The default is None.

Returns:
reduced_equations: list of sp.Expr

The simplified list of equations.

reduced_variables: list of sp.Symbol

The variables that remain in the system.

eliminated_vars: list of sympy.Symbol

The variables that were removed.