What is Big M?
The Big M method is a technique in optimization with mixed-integer linear programming (MILP) that makes it possible to represent logical conditions and discrete decisions in linear models and, in particular, to link binary variables with linear constraints. Big M is a very large positive number that is used to model either-or conditions. For example, the Big M method can be used to formulate constraints such as \( x \le M \cdot y \) and \( x \ge -M \cdot y \), where \(x \) is a continuous variable, \(y\) is a binary variable, and \(M \) is the Big M. If \(y=0 \), the inequalities force \(x=0 \). If \(y=1 \), the conditions \(x \le M \) and \(x \ge-M \) apply, i.e., \(x\) is only limited by \(M\).
Big M in TOP-Energy
In TOP-Energy, you can directly specify Big Ms in Programmable control components and Operational side conditions. Many other components contain Big M formulations that adopt the maximum power or mass flow rates as values. For example, a Big M formulation in the Electricity_Supplier sets the limits for the Maximum delivery power and Maximum feed-in power as Big Ms. This formulation distinguishes between the delivery and feed-in states and only accepts one of each. For projects with numerical difficulties, it is advisable to adjust these values.
Realistic Size
Choose M as small as possible, but large enough to cover all possible values of the continuous variables in the model. If M is too large, this can lead to numerical instabilities and longer solution times.
Numerical Stability
Be careful when choosing M to avoid numerical problems. Too large values can lead to problems with accuracy, especially in the numerical solution of LP relaxations.
The correct choice of the Big M value is crucial for the efficiency and stability of the MILP solution. A well-chosen Big M can significantly reduce the computing time and improve the quality of the solutions.
