gEconpy.model.block.Block.solve_optimization#

Block.solve_optimization(try_simplify=True)#

Solve the Block’s optimization program.

The optimization program is implied by the block structure as follows:

\[\begin{split}\begin{aligned} \max_{\text{[Controls]}} \quad & \sum_{t=0}^{\infty} \text{[Objective]} \\ \text{subject to} \quad & \text{[Constraints]} \end{aligned}\end{split}\]

By setting up the following Lagrangian:

..math::
nowrap:

L = Sum_{t=0}^infty text{Objective} - lambda_1 * text{constraint}_1 - … - lambda_n * text{constraint}_n

And taking the derivative with respect to each control variable in turn.

Parameters:
try_simplifybool

Whether to apply simplifications to the FoCs.

Returns:
None

Notes

All first order conditions, along with the constraints and objective are stored in the .system_equations method. No attempt is made to simplify the resulting system if try_simplify = False.