# How to build a numerical model III: Which model type to choose?

In Step 3.6 you have learned that the choice of optimization or equilibrium formulation is often more a choice of preferences in model design and the underlying economic thinking than a strict necessity. In this step you will see that there is also a mathematical reasoning behind the fact that most problems can be formulated as both model types.

In general, each optimization problem can be transferred into an equilibrium formulation. This can be visualized via the so called Karush–Kuhn–Tucker (KKT) conditions. Taking the simple general optimization problem from Step 3.3 as starting point:

st | |

we can derive the solution by setting up the **Lagrange function** of this problem (by introducing the Lagrangian multiplier µ for the equality constraints and λ for the inequality constraints)

and obtain the necessary KKT conditions for a minimum:

(1)

(2)

(3)

(4)

(5)

Equation 1 is the simple optimality criterion that the first-order conditions with respect to the decision variables (X) need to equal zero. Equation 2 and 3 are the feasibility constraints imposed by the side constraints. Equation 4 is called the complementary slackness condition and results from inequality constraints. Equation 5 the non-negativity restriction on the multipliers of the inequalities. Technically, those equations state the conditions the system has to fulfil in the optimal equilibrium; so basically this is an equilibrium formulation of the above designed optimization problem.

Let’s rephrase the conditions a little bit to obtain the same logic we have learned in Step 3.4 about equilibrium problems. For this we need so called **complementarity conditions**. In general, two variables are complementary to each other if the following holds:

which is often written as |

It basically tells us that either X or Y needs to be zero.

Given the Lagrange formulation of our minimization:

we can derive our equilibrium formulation via those **complementarity conditions**, first for the choice variable:

This tells us that the product of the first-order condition with the respective variable has to equal zero either the variable is zero or the derivative. This is equivalent to the economic logic introduced for equilibrium models. Either my decision variable X (eg my output) is positive, in which case the respective first-order condition has to equal zero (my zero-profit condition), or my decision variable is zero (eg I don’t produce as the obtainable profit is too low).

The same holds for the multipliers on the equality and inequality constraints:

Either my side constraint is binding (eg the production capacity limit is reached) in which case my multiplier has a positive value (eg the shadow price of capacity), or it is not binding and the multiplier has to be zero. Note that for equality constraints the multiplier is free in sign as the enforced equality basically ensures that the derivative has to be zero. The important point with this reformulation is that it is equivalent to the above formulated KKT conditions which are the solution of the optimization. In other words, if we have an optimization formulation we can reformulate it as an equilibrium problem and obtain the same result. The reverse is not true, as not all equilibrium models can be transferred into optimization models. Consequently, there are some problems where only equilibrium approaches are feasible. This is the case if more than one actor has to be included in the model design (ie in case of oligopolistic competition) and we lack a single objective that we can optimize.

Summarizing, each optimization formulation can be transferred into an equilibrium formulation. Therefore, many model designs can be realized via both approaches. Often computational restrictions make one or the other formulation more suited for the problem at hand (more on this in Week 5). But you should not limit you model design by those aspects in the first place. Take you real world problem, come up with an economic logic how to transfer it into a model formulation, and then do exactly that.

## Recommended readings:

The literature recommendation below takes up on the combined representation of natural gas and electricity market we already recommended in *Step 3.4*. The model is an extension of the static model formulation presented in Abrell and Weigt (2010) to account for investments. Besides presenting an example of how to design a potential investment decision, the paper also shows the relation between optimization and equilibrium. Within the paper the different market actors are described using their respective profit maximizations and side constraints. This logic is then transferred into an equilibrium formulation in the Annex using the above described relation.

#### Abrell, J. & Weigt, H. (2014). Investments in a Combined Energy Network Model: Substitution between Natural Gas And Electricity? WWZ, University Basel

© University of Basel