# Bilevel optimization

Bilevel optimization is a special kind of optimization where one problem is embedded (nested) within another. The outer optimization task is commonly referred to as the upper-level optimization task, and the inner optimization task is commonly referred to as the lower-level optimization task. These problems involve two kinds of variables, referred to as the upper-level variables and the lower-level variables.[1][2][3]

## Mathematical formulation of the problem

A general formulation of the bilevel optimization problem can be written as follows:

${\displaystyle \min \limits _{x\in X,y\in Y}\;\;F(x,y)}$

subject to: ${\displaystyle G_{i}(x,y)\leq 0}$, for ${\displaystyle i\in \{1,2,\ldots ,I\}}$

${\displaystyle y\in \arg \min \limits _{z\in Y}\{f(x,z):g_{j}(x,z)\leq 0,j\in \{1,2,\ldots ,J\}\}}$

where

${\displaystyle F,f:R^{n_{x}}\times R^{n_{y}}\to R}$
${\displaystyle G_{i},g_{j}:R^{n_{x}}\times R^{n_{y}}\to R}$
${\displaystyle X\subseteq R^{n_{x}}}$
${\displaystyle Y\subseteq R^{n_{y}}.}$

In the above formulation, ${\displaystyle F}$ represents the upper-level objective function and ${\displaystyle f}$ represents the lower-level objective function. Similarly ${\displaystyle x}$ represents the upper-level decision vector and ${\displaystyle y}$ represents the lower-level decision vector. ${\displaystyle G_{i}}$ and ${\displaystyle g_{j}}$ represent the inequality constraint functions at the upper and lower levels respectively. If some objective function is to be maximized, it is equivalent to minimize its negative. The formulation above is also capable of representing equality constraints, as these can be easily rewritten in terms of inequality constraints: for instance, ${\displaystyle h(x)=0}$ can be translated as ${\displaystyle \{h(x)\leq 0,\ -h(x)\leq 0\}}$. However, it is usually worthwhile to treat equality constraints separately, to deal with them more efficiently in a dedicated way; in the representation above, they have been omitted for brevity.

## Stackelberg competition

If the follower has more than one optimal response to a certain selection of the leader, there are two possible options: either the best or the worst follower's solution with respect to the leader's objective function is assumed, i.e. the follower is assumed to act either in a cooperative way or in an aggressive way. The resulting bilevel problem is called optimistic bilevel programming problem or pessimistic bilevel programming problem respectively.

## Applications

Bilevel optimization problems are commonly found in a number of real-world problems. This includes problems in the domain of transportation, economics, decision science, business, engineering, environmental economics etc. Some of the practical bilevel problems studied in the literature are briefly discussed.[4]

### Toll setting problem

In the field of transportation, bilevel optimization commonly appears in the toll-setting problem. Consider a network of highways that is operated by the government. The government wants to maximize its revenues by choosing the optimal toll setting for the highways. However, the government can maximize its revenues only by taking the highway users' problem into account. For any given tax structure the highway users solve their own optimization problem, where they minimize their traveling costs by deciding between utilizing the highways or an alternative route. Under these circumstances, the government's problem needs to be formulated as a bilevel optimization problem. The upper level consists of the government’s objectives and constraints, and the lower level consists of the highway users' objectives and constraints for a given tax structure. It is noteworthy that the government will be able to identify the revenue generated by a particular tax structure only by solving the lower level problem that determines to what extent the highways are used.

### Structural optimization

Structural optimization problems consist of two levels of optimization task and are commonly referred as mathematical programming problems with equilibrium constraints (MPEC). The upper level objective in such problems may involve cost minimization or weight minimization subject to bounds on displacements, stresses and contact forces. The decision variables at the upper level usually are shape of the structure, choice of materials, amount of material etc. However, for any given set of upper level variables, the state variables (displacement, stresses and contact forces) can only be figured out by solving the potential energy minimization problem that appears as an equilibrium satisfaction constraint or lower level minimization task to the upper level problem.

### Defense applications

Bilevel optimization has a number of applications in defense, like strategic offensive and defensive force structure design, strategic bomber force structure, and allocation of tactical aircraft to missions. The offensive entity in this case may be considered a leader and the defensive entity in this case may be considered a follower. If the leader wants to maximize the damage caused to the opponent, then it can only be achieved if the leader takes the reactions of the follower into account. A rational follower will always react optimally to the leaders offensive. Therefore, the leader's problem appears as an upper level optimization task, and the optimal response of the follower to the leader's actions is determined by solving the lower level optimization task.

### Workforce and Human Resources applications

Bilevel optimization can serve as a decision support tool for firms in real-life settings to improve workforce and human resources decisions. The first level reflects the company’s goal to maximize profitability. The second level reflects employees goal to minimize the gap between desired salary and a preferred work plan. The bilevel model provides an exact solution based on a mixed integer formulation and present a computational analysis based on changing employees behaviors in response to the firm’s strategy, thus demonstrate how the problem’s parameters influence the decision policy.[5]

## Solution methodologies

Bilevel optimization problems are hard to solve. One solution method is to reformulate bilevel optimization problems to optimization problems for which robust solution algorithms are available. Extended Mathematical Programming (EMP) is an extension to mathematical programming languages that provides several keywords for bilevel optimization problems. These annotations facilitate the automatic reformulation to Mathematical Programs with Equilibrium Constraints (MPECs) for which mature solver technology exists. EMP is available within GAMS.

### KKT reformulation

Certain bilevel programs, notably those having a convex lower level and satisfying a regularity condition (e.g. Slater's condition), can be reformulated to single level by replacing the lower-level problem by its Karush-Kuhn-Tucker conditions. This yields a single-level mathematical program with complementarity constraints, i.e., MPECs. If the lower level problem is not convex, with this approach the feasible set of the bilevel optimization problem is enlarged by local optimal solutions and stationary points of the lower level, which means that the single-level problem obtained is a relaxation of the original bilevel problem.

### Optimal value reformulation

Denoting by

${\displaystyle \phi (x)=\min \limits _{z\in Y}\{f(x,z):g_{j}(x,z)\leq 0,j\in \{1,2,\ldots ,J\}\}}$

the so-called optimal value function, a possible single-level reformulation of the bilevel problem is

${\displaystyle \min \limits _{x\in X,y\in Y}\;\;F(x,y)}$

subject to: ${\displaystyle G_{i}(x,y)\leq 0}$, for ${\displaystyle i\in \{1,2,\ldots ,I\}}$

${\displaystyle g_{j}(x,y)\leq 0,j\in \{1,2,\ldots ,J\}}$

${\displaystyle f(x,y)\leq \phi (x).}$

This is a nonsmooth optimization problem since the optimal value function is in general not differentiable, even if all the constraint functions and the objective function in the lower level problem are smooth.[6]

### Heuristic methods

For complex bilevel problems, classical methods mayfail due to difficulties like non-linearity, discreteness, non-differentiability, non-convexity etc. In such situations, heuristic methods may be used. Among them, evolutionary methods, though computationally demanding, often constitute an alternative tool to offset some of these difficulties encountered by exact methods, albeit without offering any optimality guarantee on the solutions they produce.[7]

## Multi-objective bilevel optimization

A bilevel optimization problem can be generalized to a multi-objective bilevel optimization problem with multiple objectives at one or both levels. A general multi-objective bilevel optimization problem can be formulated as follows:

${\displaystyle \min \limits _{x\in X,y\in Y}\;\;F(x,y)=(F_{1}(x,y),F_{2}(x,y),\ldots ,F_{p}(x,y))}$ In the Stackelberg games: Leader problem

subject to: ${\displaystyle G_{i}(x,y)\leq 0}$, for ${\displaystyle i\in \{1,2,\ldots ,I\}}$;

${\displaystyle y\in \arg \min \limits _{z\in Y}\{f(x,z)=(f_{1}(x,z),f_{2}(x,z),\ldots ,f_{q}(x,z)):g_{j}(x,z)\leq 0,j\in \{1,2,\ldots ,J\}\}}$ In the Stackelberg games: Follower problem

where

${\displaystyle F:R^{n_{x}}\times R^{n_{y}}\to R^{p}}$
${\displaystyle f:R^{n_{x}}\times R^{n_{y}}\to R^{q}}$
${\displaystyle G_{i},g_{j}:R^{n_{x}}\times R^{n_{y}}\to R}$
${\displaystyle X\subseteq R^{n_{x}}}$
${\displaystyle Y\subseteq R^{n_{y}}.}$

In the above formulation, ${\displaystyle F}$ represents the upper-level objective vector with ${\displaystyle p}$ objectives and ${\displaystyle f}$ represents the lower-level objective vector with ${\displaystyle q}$ objectives. Similarly, ${\displaystyle x}$ represents the upper-level decision vector and ${\displaystyle y}$ represents the lower-level decision vector. ${\displaystyle G_{i}}$ and ${\displaystyle g_{j}}$ represent the inequality constraint functions at the upper and lower levels respectively. Equality constraints may also be present in a bilevel program, but they have been omitted for brevity.

## References

1. ^ Dempe, Stephan (2002). Foundations of Bilevel Programming. Nonconvex Optimization and Its Applications. Vol. 61. Springer, Boston, MA. doi:10.1007/b101970. ISBN 1-4020-0631-4.[page needed]
2. ^ Vicente, L.N.; Calamai, P.H. (1994). "Bilevel and multilevel programming: A bibliography review". Journal of Global Optimization. 5 (3): 291–306. doi:10.1007/BF01096458. S2CID 26639305.
3. ^ Colson, Benoit; Marcotte, Patrice; Savard, Gilles (2005). "Bilevel programming: A survey". 4OR. 3 (2): 87–107. doi:10.1007/s10288-005-0071-0. S2CID 15686735.
4. ^ "Scope: Evolutionary Bilevel Optimization". www.bilevel.org. Retrieved 6 October 2013.
5. ^ Ben-Gal, Hila Chalutz; Forma, Iris A.; Singer, Gonen (March 2022). "A flexible employee recruitment and compensation model: A bi-level optimization approach". Computers & Industrial Engineering. 165: 107916. doi:10.1016/j.cie.2021.107916. PMC 9758963. PMID 36568877. S2CID 245625445.
6. ^ Dempe, Stephan; Kalashnikov, Vyacheslav; Prez-Valds, Gerardo A.; Kalashnykova, Nataliya (2015). Bilevel Programming Problems: Theory, Algorithms and Applications to Energy Networks. Springer-Verlag Berlin Heidelberg. doi:10.1007/978-3-662-45827-3. ISBN 978-3-662-45827-3.[page needed]
7. ^ Sinha, Ankur; Malo, Pekka; Deb, Kalyanmoy (April 2018). "A Review on Bilevel Optimization: From Classical to Evolutionary Approaches and Applications". IEEE Transactions on Evolutionary Computation. 22 (2): 276–295. arXiv:1705.06270. doi:10.1109/TEVC.2017.2712906. S2CID 4626744.