<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://optimization.cbe.cornell.edu/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Smu29</id>
	<title>Cornell University Computational Optimization Open Textbook - Optimization Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://optimization.cbe.cornell.edu/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Smu29"/>
	<link rel="alternate" type="text/html" href="https://optimization.cbe.cornell.edu/index.php?title=Special:Contributions/Smu29"/>
	<updated>2026-05-01T06:33:33Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.0</generator>
	<entry>
		<id>https://optimization.cbe.cornell.edu/index.php?title=McCormick_envelopes&amp;diff=5169</id>
		<title>McCormick envelopes</title>
		<link rel="alternate" type="text/html" href="https://optimization.cbe.cornell.edu/index.php?title=McCormick_envelopes&amp;diff=5169"/>
		<updated>2021-12-12T12:21:40Z</updated>

		<summary type="html">&lt;p&gt;Smu29: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Author: Susan Urban (SYSEN 5800 Fall 2021) &lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
The McCormick Envelope, originally developed by Dr. Garth McCormick, is a type of convex relaxation used for the optimization of bilinear &amp;lt;math&amp;gt;(e.g., x*y, e^xy + y, sin(x+y) - x^2)&lt;br /&gt;
&amp;lt;/math&amp;gt; non-linear programming (NLP) problems&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;. Optimization of these non-convex functions f(x) is challenging since they may have multiple locally optimal solutions or no solution. It can take a significant amount of time, computing resources, and effort to determine if the solution is global or the problem has no feasible solution&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;. Different techniques are used to address this challenge depending on the characteristics of the problem.  &lt;br /&gt;
== Theory, Methodology and Algorithmic Discussions ==&lt;br /&gt;
[[File:Image of updated estimators and envelopes.png|thumb|Figure 1: Relationships between the given function, concave over-estimators, convex under-estimators, a concave envelope, and a convex envelope. ]]&lt;br /&gt;
As McCormick noted, McCormick Envelopes are based on the key assumption that convex and concave envelopes can be constructed for the given function&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;. The concave envelope, and respectively the convex envelope, is the concave over-estimator and convex under-estimator for the given function providing the tightest fit to the given function&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;.  The envelope surrounds the given function, like an envelope encloses a letter, and limits the feasible solution space the most in comparison to all other concave over-estimators and convex under-estimators. Multiple concave over-estimators and multiple convex under-estimators may exist but there is only one concave envelope and one convex envelope for a given function and domain.  Figure 1 depicts the relationship between the given function f(x), multiple concave over-estimators, multiple convex under-estimators, a convex envelope, and a concave envelope.   &lt;br /&gt;
&lt;br /&gt;
Each bilinear term is replaced with a new variable and four sets of constraints are added&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;. The non-linear programming is converted to a relaxed convex linear programming (LP) which can be more easily solved. &lt;br /&gt;
&lt;br /&gt;
The LP solution gives a lower (L) bound and any feasible solution to the problem gives an upper (U) bound.&lt;br /&gt;
&lt;br /&gt;
As noted by Scott et al, McCormick envelopes are effective since they are recursive, can be applied to a variety of applications, and are typically stronger than those resulting from convexification or linearization procedures&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
The following is a derivation of the McCormick Envelopes for a given bilinear function&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;Let \ w = xy&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^{L}\leq x\leq x^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;y^{L}\leq y\leq y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;x^{L}, x^{U}, y^{L}, y^{U} &amp;lt;/math&amp;gt;are   upper  and   lower  bound  values  for  &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;y&amp;lt;/math&amp;gt;, respectively.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left (x-x^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left (y-y^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
a and b are both positive resulting in a positive product&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a * b\geq 0&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a * b=\left ( x-x^{L} \right )\left ( y-y^{L} \right )=xy-x^{L}y-xy^{L}+x^{L}y^{L}\geq 0 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
substituting w=xy and reformulating the inequality produces&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{L}y+xy^{L}-x^{L}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Following the same sequence of steps, the remaining inequalities are produced:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x^{U}-x \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b = \left ( y^{U} -y\right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{U}y+xy^{U}-x^{U}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x^{U}-x\right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left ( y-y^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq x^{U}y+xy^{L}-x^{U}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x-x^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left ( y^{U}-y \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq xy^{U}+x^{L}y-x^{L}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The under-estimators of the function are represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{L}y+xy^{L}-x^{L}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{U}y+xy^{U}-x^{U}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The over-estimators of the function are represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq x^{U}y+xy^{L}-x^{U}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq xy^{U}+x^{L}y-x^{L}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following shows the relaxation of a non-convex problem using McCormick Envelopes:&lt;br /&gt;
&lt;br /&gt;
The original non-convex problem: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\min Z= \textstyle \sum_{i=1} \sum_{j=1}  c_{i,j}x_i x_j +g_0(x)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \sum_{i=1}\sum_{j=1} c_{i,j}^l x_i x_j + g_l (x) \leq 0,\forall l \in L&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^ L \leq x \leq x^U&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Replacing &amp;lt;math&amp;gt;u_{i,j} = x_i x_j&amp;lt;/math&amp;gt;, we obtain a relaxed, convex problem using McCormick Envelopes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\min Z= \textstyle \sum_{i=1} \sum_{j=1}  c_{i,j} u_{i,j} +g_0(x)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \sum_{i=1}\sum_{j=1} c_{i,j}^l u_{i,j}+ g_l (x) \leq 0,\forall l \in L&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^L x_j + x_i x_j^L - {x_i}^L {x_j}^L, \forall  i,j \ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^U x_j + x_i x_j^U - {x_i}^U {x_j}^U, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \leq x_i^L x_j + x_i x_j^U - {x_i}^L {x_j}^U, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \leq x_i^U x_j + x_i x_j^L - {x_i}^U {x_j}^L, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^L \leq x \leq x^U,   \ \ u^L \leq u \leq u^U&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Similar steps are taken to derive the McCormick Envelopes for given functions with different formats e.g., e&amp;lt;sup&amp;gt;xy&amp;lt;/sup&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Good lower and upper bounds focus and minimize the feasible solution space; they reduce the number of iterations to find the optimal solution.  &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Piecewise McCormick Relaxation&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
As discussed by Hazaji, global optimization solvers focus initially on optimizing the lower and upper bounds, and when necessary, focus on domain partitioning&amp;lt;sup&amp;gt;4&amp;lt;/sup&amp;gt;.  By dividing the domain of a given variable into partitions or smaller regions, the solver is able to tailor and further tighten the convex relaxations of each partition. This strategy is known as the Piecewise McCormick relaxation&amp;lt;sup&amp;gt;5&amp;lt;/sup&amp;gt;.   &lt;br /&gt;
&lt;br /&gt;
== Example: Numerical ==&lt;br /&gt;
For the given problem, &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;min \  Z = xy + 6x + y&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \ xy \leq 18&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;0 \leq x \leq 10&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;0 \leq y \leq 2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;Let\   w = xy &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^L = 0  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^U = 10&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;y^L = 0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;y^U = 2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Substituting these values into the original problem and the McCormick Envelopes, the problem is reformulated:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;min \ Z = w + 6x + y&lt;br /&gt;
&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \ w \leq 18&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{L}y+xy^{L}-x^{L}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 0*y + x * 0 - 0*0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{U}y+xy^{U}-x^{U}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 10*y + x*2 - 10*2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 10y + 2x - 20&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq x^{U}y+xy^{L}-x^{U}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq 10*y + x*0 - 10*0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq 10y &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq xy^{U}+x^{L}y-x^{L}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq x*2 + 0*y -0*2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq 2x&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using GAMS to solve the reformulated problem, the solution is z= -76.2, x=10, y=1.8.&lt;br /&gt;
&lt;br /&gt;
== Applications ==&lt;br /&gt;
Bilinear functions occur in numerous engineering and natural science applications where McCormick Envelopes can be utilized.  &lt;br /&gt;
&lt;br /&gt;
For example, an application involves the modeling of dynamic biological processes based on experimental data&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;.  The challenge for this model is establishing model parameter values that align or calibrate the model response with observed data.  These model parameter values can be estimated using optimization techniques, including McCormick Envelopes, to minimize the difference between observed and simulated data.  &lt;br /&gt;
&lt;br /&gt;
Another application involves the optimization of financial objectives and risk management for energy conversion for a large scale operation such as a college campus or a municipality&amp;lt;sup&amp;gt;6&amp;lt;/sup&amp;gt;.  This operation involves flexibility of energy sources and several facets of uncertainty involved with pricing. This model uses McCormick Envelopes to optimize the bilinear nonconvex components.  &lt;br /&gt;
&lt;br /&gt;
A third application involves the optimized efficiency and reliability of the operation of the electricity grid.  Optimal power flow (OPF) and unit commitment (UC) are two optimization problems that support the electricity market operations&amp;lt;sup&amp;gt;7&amp;lt;/sup&amp;gt;. McCormick Envelopes are used to strengthen the second-order cone (SOC) relaxation of the alternate current optimal power flow (ACOPF)&amp;lt;sup&amp;gt;8&amp;lt;/sup&amp;gt;.&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
Non-convex NLPs are challenging to solve and may require a significant amount of time, computing resources, and effort to determine if the solution is global or the problem has no feasible solution.  McCormick Envelopes provide a relaxation technique for bilinear non-convex nonlinear programming problems.  McCormick Envelopes provide a straightforward technique of replacing each bilinear term with a new variable and adding four constraints. Due to the recursive nature of this technique, it may be applied to a wide variety of engineering and scientific applications involving bilinear terms.   &lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
# G. P. McCormick, &amp;quot;Computability of Global Solutions To Factorable Nonconvex Solutions: Part I: Convex Underestimating Problems,&amp;quot; &#039;&#039;Mathematical Programming,&#039;&#039; vol. 10, pp. 147-175, 1976. &lt;br /&gt;
# A. Miro, C. Pozo, G. Guillen-Gosalbez, J. Egea and L. Jimenez, &amp;quot;Deterministic global optimization algorithm based on outer approximation for the parameter estimation of nonlinear dynamic biological systems,&amp;quot; &#039;&#039;BMC Bioinformatics,&#039;&#039; vol. 13, 2012.&lt;br /&gt;
# J. K. Scott, M. D. Stuber and P. I. Barton, &amp;quot;Generalized McCormick Relaxations,&amp;quot; &#039;&#039;Journal of Global Optimization,&#039;&#039; vol. 51, pp. 569-606, 2011.&lt;br /&gt;
# H. Hijazi, &amp;quot;[https://www.google.com/url?sa=t&amp;amp;rct=j&amp;amp;q=&amp;amp;esrc=s&amp;amp;source=web&amp;amp;cd=&amp;amp;ved=2ahUKEwjSr7eu8K70AhVYmHIEHUJzCVsQFnoECAIQAQ&amp;amp;url=http%3A%2F%2Fwww.optimization-online.org%2FDB_FILE%2F2015%2F03%2F4841.pdf&amp;amp;usg=AOvVaw1xf9B1f-EPw0mG1LOqRfm9 Perspective Envelopes for Bilinear Functions&amp;quot;]&lt;br /&gt;
# P. Castro, &amp;quot;Tightening piecewise McCormick relaxations for bilinear problems,&amp;quot; &#039;&#039;Computers &amp;amp; Chemical Engineering&#039;&#039;, vol. 72, pp. 300-311, 2015.  &lt;br /&gt;
# J. Kantor and P. Mousaw, &amp;quot;A class of bilinear models for the optimization of energy conversion networks,&amp;quot; &#039;&#039;Chemical Engineering Science,&#039;&#039; vol. 67&#039;&#039;,&#039;&#039; pp. 131-138, 2012.&lt;br /&gt;
# Jeremy Lin; Fernando H. Magnago, &amp;quot;Optimal Power Flow,&amp;quot; in Electricity Markets: Theories and Applications , IEEE, 2017, pp.147-171, doi: 10.1002/9781119179382.ch6.&lt;br /&gt;
#B. Michael, A. Castillo, J. Watson and C. Laird, &amp;quot;Strengthened SOCP Relaxations for ACOPF with McCormick Envelopes and Bounds Tightening,&amp;quot; &#039;&#039;Computer Aided Chemical Engineering,&#039;&#039; vol. 44&#039;&#039;,&#039;&#039; pp. 1555-1560, 2018.&lt;br /&gt;
#&lt;/div&gt;</summary>
		<author><name>Smu29</name></author>
	</entry>
	<entry>
		<id>https://optimization.cbe.cornell.edu/index.php?title=McCormick_envelopes&amp;diff=5168</id>
		<title>McCormick envelopes</title>
		<link rel="alternate" type="text/html" href="https://optimization.cbe.cornell.edu/index.php?title=McCormick_envelopes&amp;diff=5168"/>
		<updated>2021-12-12T12:14:39Z</updated>

		<summary type="html">&lt;p&gt;Smu29: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Author: Susan Urban (SYSEN 5800 Fall 2021) &lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
The McCormick Envelope, originally developed by Dr. Garth McCormick, is a type of convex relaxation used for the optimization of bilinear &amp;lt;math&amp;gt;(e.g., x*y, e^xy + y, sin(x+y) - x^2)&lt;br /&gt;
&amp;lt;/math&amp;gt; non-linear programming (NLP) problems&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;. Optimization of these non-convex functions f(x) is challenging since they may have multiple locally optimal solutions or no solution. It can take a significant amount of time, computing resources, and effort to determine if the solution is global or the problem has no feasible solution&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;. Different techniques are used to address this challenge depending on the characteristics of the problem.  &lt;br /&gt;
== Theory, Methodology and Algorithmic Discussions ==&lt;br /&gt;
[[File:Image of updated estimators and envelopes.png|thumb|Figure 1: Relationships between the given function, concave over-estimators, convex under-estimators, a concave envelope, and a convex envelope. ]]&lt;br /&gt;
As McCormick noted, McCormick Envelopes are based on the key assumption that convex and concave envelopes can be constructed for the given function&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;. The concave envelope, and respectively the convex envelope, is the concave over-estimator and convex under-estimator for the given function providing the tightest fit to the given function.  The envelope surrounds the given function, like an envelope encloses a letter, and limits the feasible solution space the most in comparison to all other concave over-estimators and convex under-estimators. Multiple concave over-estimators and multiple convex under-estimators may exist but there is only one concave envelope and one convex envelope for a given function and domain.  Figure 1 depicts the relationship between the given function f(x), multiple concave over-estimators, multiple convex under-estimators, a convex envelope, and a concave envelope.   &lt;br /&gt;
&lt;br /&gt;
Each bilinear term is replaced with a new variable and four sets of constraints are added&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;. The non-linear programming is converted to a relaxed convex linear programming (LP) which can be more easily solved. &lt;br /&gt;
&lt;br /&gt;
The LP solution gives a lower (L) bound and any feasible solution to the problem gives an upper (U) bound.&lt;br /&gt;
&lt;br /&gt;
As noted by Scott et al, McCormick envelopes are effective since they are recursive, can be applied to a variety of applications, and are typically stronger than those resulting from convexification or linearization procedures&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
The following is a derivation of the McCormick Envelopes for a given bilinear function&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;Let \ w = xy&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^{L}\leq x\leq x^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;y^{L}\leq y\leq y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;x^{L}, x^{U}, y^{L}, y^{U} &amp;lt;/math&amp;gt;are   upper  and   lower  bound  values  for  &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;y&amp;lt;/math&amp;gt;, respectively.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left (x-x^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left (y-y^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
a and b are both positive resulting in a positive product&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a * b\geq 0&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a * b=\left ( x-x^{L} \right )\left ( y-y^{L} \right )=xy-x^{L}y-xy^{L}+x^{L}y^{L}\geq 0 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
substituting w=xy and reformulating the inequality produces&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{L}y+xy^{L}-x^{L}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Following the same sequence of steps, the remaining inequalities are produced:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x^{U}-x \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b = \left ( y^{U} -y\right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{U}y+xy^{U}-x^{U}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x^{U}-x\right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left ( y-y^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq x^{U}y+xy^{L}-x^{U}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x-x^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left ( y^{U}-y \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq xy^{U}+x^{L}y-x^{L}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The under-estimators of the function are represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{L}y+xy^{L}-x^{L}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{U}y+xy^{U}-x^{U}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The over-estimators of the function are represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq x^{U}y+xy^{L}-x^{U}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq xy^{U}+x^{L}y-x^{L}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following shows the relaxation of a non-convex problem using McCormick Envelopes:&lt;br /&gt;
&lt;br /&gt;
The original non-convex problem: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\min Z= \textstyle \sum_{i=1} \sum_{j=1}  c_{i,j}x_i x_j +g_0(x)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \sum_{i=1}\sum_{j=1} c_{i,j}^l x_i x_j + g_l (x) \leq 0,\forall l \in L&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^ L \leq x \leq x^U&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Replacing &amp;lt;math&amp;gt;u_{i,j} = x_i x_j&amp;lt;/math&amp;gt;, we obtain a relaxed, convex problem using McCormick Envelopes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\min Z= \textstyle \sum_{i=1} \sum_{j=1}  c_{i,j} u_{i,j} +g_0(x)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \sum_{i=1}\sum_{j=1} c_{i,j}^l u_{i,j}+ g_l (x) \leq 0,\forall l \in L&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^L x_j + x_i x_j^L - {x_i}^L {x_j}^L, \forall  i,j \ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^U x_j + x_i x_j^U - {x_i}^U {x_j}^U, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \leq x_i^L x_j + x_i x_j^U - {x_i}^L {x_j}^U, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \leq x_i^U x_j + x_i x_j^L - {x_i}^U {x_j}^L, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^L \leq x \leq x^U,   \ \ u^L \leq u \leq u^U&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Similar steps are taken to derive the McCormick Envelopes for given functions with different formats e.g., e&amp;lt;sup&amp;gt;xy&amp;lt;/sup&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Good lower and upper bounds focus and minimize the feasible solution space; they reduce the number of iterations to find the optimal solution.  &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Piecewise McCormick Relaxation&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
As discussed by Hazaji, global optimization solvers focus initially on optimizing the lower and upper bounds, and when necessary, focus on domain partitioning&amp;lt;sup&amp;gt;4&amp;lt;/sup&amp;gt;.  By dividing the domain of a given variable into partitions or smaller regions, the solver is able to tailor and further tighten the convex relaxations of each partition. This strategy is known as the Piecewise McCormick relaxation&amp;lt;sup&amp;gt;5&amp;lt;/sup&amp;gt;.   &lt;br /&gt;
&lt;br /&gt;
== Example: Numerical ==&lt;br /&gt;
For the given problem, &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;min \  Z = xy + 6x + y&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \ xy \leq 18&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;0 \leq x \leq 10&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;0 \leq y \leq 2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;Let\   w = xy &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^L = 0  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^U = 10&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;y^L = 0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;y^U = 2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Substituting these values into the original problem and the McCormick Envelopes, the problem is reformulated:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;min \ Z = w + 6x + y&lt;br /&gt;
&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \ w \leq 18&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{L}y+xy^{L}-x^{L}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 0*y + x * 0 - 0*0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{U}y+xy^{U}-x^{U}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 10*y + x*2 - 10*2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 10y + 2x - 20&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq x^{U}y+xy^{L}-x^{U}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq 10*y + x*0 - 10*0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq 10y &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq xy^{U}+x^{L}y-x^{L}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq x*2 + 0*y -0*2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq 2x&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using GAMS to solve the reformulated problem, the solution is z= -76.2, x=10, y=1.8.&lt;br /&gt;
&lt;br /&gt;
== Applications ==&lt;br /&gt;
Bilinear functions occur in numerous engineering and natural science applications where McCormick Envelopes can be utilized.  &lt;br /&gt;
&lt;br /&gt;
For example, an application involves the modeling of dynamic biological processes based on experimental data&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;.  The challenge for this model is establishing model parameter values that align or calibrate the model response with observed data.  These model parameter values can be estimated using optimization techniques, including McCormick Envelopes, to minimize the difference between observed and simulated data.  &lt;br /&gt;
&lt;br /&gt;
Another application involves the optimization of financial objectives and risk management for energy conversion for a large scale operation such as a college campus or a municipality&amp;lt;sup&amp;gt;6&amp;lt;/sup&amp;gt;.  This operation involves flexibility of energy sources and several facets of uncertainty involved with pricing. This model uses McCormick Envelopes to optimize the bilinear nonconvex components.  &lt;br /&gt;
&lt;br /&gt;
A third application involves the optimized efficiency and reliability of the operation of the electricity grid.  Optimal power flow (OPF) and unit commitment (UC) are two optimization problems that support the electricity market operations&amp;lt;sup&amp;gt;7&amp;lt;/sup&amp;gt;. McCormick Envelopes are used to strengthen the second-order cone (SOC) relaxation of the alternate current optimal power flow (ACOPF)&amp;lt;sup&amp;gt;8&amp;lt;/sup&amp;gt;.&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
Non-convex NLPs are challenging to solve and may require a significant amount of time, computing resources, and effort to determine if the solution is global or the problem has no feasible solution.  McCormick Envelopes provide a relaxation technique for bilinear non-convex nonlinear programming problems.  McCormick Envelopes provide a straightforward technique of replacing each bilinear term with a new variable and adding four constraints. Due to the recursive nature of this technique, it may be applied to a wide variety of engineering and scientific applications involving bilinear terms.   &lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
# G. P. McCormick, &amp;quot;Computability of Global Solutions To Factorable Nonconvex Solutions: Part I: Convex Underestimating Problems,&amp;quot; &#039;&#039;Mathematical Programming,&#039;&#039; vol. 10, pp. 147-175, 1976. &lt;br /&gt;
# A. Miro, C. Pozo, G. Guillen-Gosalbez, J. Egea and L. Jimenez, &amp;quot;Deterministic global optimization algorithm based on outer approximation for the parameter estimation of nonlinear dynamic biological systems,&amp;quot; &#039;&#039;BMC Bioinformatics,&#039;&#039; vol. 13, 2012.&lt;br /&gt;
# J. K. Scott, M. D. Stuber and P. I. Barton, &amp;quot;Generalized McCormick Relaxations,&amp;quot; &#039;&#039;Journal of Global Optimization,&#039;&#039; vol. 51, pp. 569-606, 2011.&lt;br /&gt;
# H. Hijazi, &amp;quot;[https://www.google.com/url?sa=t&amp;amp;rct=j&amp;amp;q=&amp;amp;esrc=s&amp;amp;source=web&amp;amp;cd=&amp;amp;ved=2ahUKEwjSr7eu8K70AhVYmHIEHUJzCVsQFnoECAIQAQ&amp;amp;url=http%3A%2F%2Fwww.optimization-online.org%2FDB_FILE%2F2015%2F03%2F4841.pdf&amp;amp;usg=AOvVaw1xf9B1f-EPw0mG1LOqRfm9 Perspective Envelopes for Bilinear Functions&amp;quot;]&lt;br /&gt;
# P. Castro, &amp;quot;Tightening piecewise McCormick relaxations for bilinear problems,&amp;quot; &#039;&#039;Computers &amp;amp; Chemical Engineering&#039;&#039;, vol. 72, pp. 300-311, 2015.  &lt;br /&gt;
# J. Kantor and P. Mousaw, &amp;quot;A class of bilinear models for the optimization of energy conversion networks,&amp;quot; &#039;&#039;Chemical Engineering Science,&#039;&#039; vol. 67&#039;&#039;,&#039;&#039; pp. 131-138, 2012.&lt;br /&gt;
# Jeremy Lin; Fernando H. Magnago, &amp;quot;Optimal Power Flow,&amp;quot; in Electricity Markets: Theories and Applications , IEEE, 2017, pp.147-171, doi: 10.1002/9781119179382.ch6.&lt;br /&gt;
#B. Michael, A. Castillo, J. Watson and C. Laird, &amp;quot;Strengthened SOCP Relaxations for ACOPF with McCormick Envelopes and Bounds Tightening,&amp;quot; &#039;&#039;Computer Aided Chemical Engineering,&#039;&#039; vol. 44&#039;&#039;,&#039;&#039; pp. 1555-1560, 2018.&lt;br /&gt;
#&lt;/div&gt;</summary>
		<author><name>Smu29</name></author>
	</entry>
	<entry>
		<id>https://optimization.cbe.cornell.edu/index.php?title=McCormick_envelopes&amp;diff=5126</id>
		<title>McCormick envelopes</title>
		<link rel="alternate" type="text/html" href="https://optimization.cbe.cornell.edu/index.php?title=McCormick_envelopes&amp;diff=5126"/>
		<updated>2021-12-11T14:45:49Z</updated>

		<summary type="html">&lt;p&gt;Smu29: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Author: Susan Urban (SYSEN 5800 Fall 2021) &lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
The McCormick Envelope, originally developed by Dr. Garth McCormick, is a type of convex relaxation used for the optimization of bilinear &amp;lt;math&amp;gt;(e.g., x*y, e^xy + y, sin(x+y) - x^2)&lt;br /&gt;
&amp;lt;/math&amp;gt; non-linear programming (NLP) problems&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;. Optimization of these non-convex functions f(x) is challenging since they may have multiple locally optimal solutions or no solution. It can take a significant amount of time, computing resources, and effort to determine if the solution is global or the problem has no feasible solution&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;. Different techniques are used to address this challenge depending on the characteristics of the problem.  &lt;br /&gt;
== Theory, Methodology and Algorithmic Discussions ==&lt;br /&gt;
[[File:Image of updated estimators and envelopes.png|thumb|Figure 1: Relationships between the given function, concave over-estimators, convex under-estimators, a concave envelope, and a convex envelope. ]]&lt;br /&gt;
As McCormick noted, McCormick Envelopes are based on the key assumption that convex and concave envelopes can be constructed for the given function&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;. The concave envelope, and respectively the convex envelope, is the concave over-estimator and convex under-estimator for the given function providing the tightest fit to the given function.  The envelope surrounds the given function, like an envelope encloses a letter, and limits the feasible solution space the most in comparison to all other concave over-estimators and convex under-estimators. Multiple concave over-estimators and multiple convex under-estimators may exist but there is only one concave envelope and one convex envelope for a given function and domain.  Figure 1 depicts the relationship between the given function f(x), multiple concave over-estimators, multiple convex under-estimators, a convex envelope, and a concave envelope.   &lt;br /&gt;
&lt;br /&gt;
Each bilinear term is replaced with a new variable and four sets of constraints are added&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;. The non-linear programming is converted to a relaxed convex linear programming (LP) which can be more easily solved. &lt;br /&gt;
&lt;br /&gt;
The LP solution gives a lower (L) bound and any feasible solution to the problem gives an upper (U) bound.&lt;br /&gt;
&lt;br /&gt;
As noted by Scott et al, McCormick envelopes are effective since they are recursive, can be applied to a variety of applications, and are typically stronger than those resulting from convexification or linearization procedures&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
The following is a derivation of the McCormick Envelopes for a given bilinear function&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;Let \ w = xy&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^{L}\leq x\leq x^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;y^{L}\leq y\leq y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;x^{L}, x^{U}, y^{L}, y^{U} &amp;lt;/math&amp;gt;are   upper  and   lower  bound  values  for  &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;y&amp;lt;/math&amp;gt;, respectively.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left (x-x^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left (y-y^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
a and b are both positive resulting in a positive product&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a * b\geq 0&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a * b=\left ( x-x^{L} \right )\left ( y-y^{L} \right )=xy-x^{L}y-xy^{L}+x^{L}y^{L}\geq 0 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
substituting w=xy and reformulating the inequality produces&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{L}y+xy^{L}-x^{L}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Following the same sequence of steps, the remaining inequalities are produced:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x^{U}-x \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b = \left ( y^{U} -y\right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{U}y+xy^{U}-x^{U}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x^{U}-x\right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left ( y-y^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq x^{U}y+xy^{L}-x^{U}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x-x^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left ( y^{U}-y \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq xy^{U}+x^{L}y-x^{L}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The under-estimators of the function are represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{L}y+xy^{L}-x^{L}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{U}y+xy^{U}-x^{U}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The over-estimators of the function are represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq x^{U}y+xy^{L}-x^{U}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq xy^{U}+x^{L}y-x^{L}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following shows the relaxation of a non-convex problem using McCormick Envelopes:&lt;br /&gt;
&lt;br /&gt;
The original non-convex problem: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\min Z= \textstyle \sum_{i=1} \sum_{j=1}  c_{i,j}x_i x_j +g_0(x)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \sum_{i=1}\sum_{j=1} c_{i,j}^l x_i x_j + g_l (x) \leq 0,\forall l \in L&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^ L \leq x \leq x^U&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Replacing &amp;lt;math&amp;gt;u_{i,j} = x_i x_j&amp;lt;/math&amp;gt;, we obtain a relaxed, convex problem using McCormick Envelopes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\min Z= \textstyle \sum_{i=1} \sum_{j=1}  c_{i,j} u_{i,j} +g_0(x)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \sum_{i=1}\sum_{j=1} c_{i,j}^l u_{i,j}+ g_l (x) \leq 0,\forall l \in L&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^L x_j + x_i x_j^L - {x_i}^L {x_j}^L, \forall  i,j \ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^U x_j + x_i x_j^U - {x_i}^U {x_j}^U, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^L x_j + x_i x_j^U - {x_i}^L {x_j}^U, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^U x_j + x_i x_j^L - {x_i}^U {x_j}^L, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^L \leq x \leq x^U,   \ \ u^L \leq u \leq u^U&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Similar steps are taken to derive the McCormick Envelopes for given functions with different formats e.g., e&amp;lt;sup&amp;gt;xy&amp;lt;/sup&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Good lower and upper bounds focus and minimize the feasible solution space; they reduce the number of iterations to find the optimal solution.  &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Piecewise McCormick Relaxation&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
As discussed by Hazaji, global optimization solvers focus initially on optimizing the lower and upper bounds, and when necessary, focus on domain partitioning&amp;lt;sup&amp;gt;4&amp;lt;/sup&amp;gt;.  By dividing the domain of a given variable into partitions or smaller regions, the solver is able to tailor and further tighten the convex relaxations of each partition. This strategy is known as the Piecewise McCormick relaxation&amp;lt;sup&amp;gt;5&amp;lt;/sup&amp;gt;.   &lt;br /&gt;
&lt;br /&gt;
== Example: Numerical ==&lt;br /&gt;
For the given problem, &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;min \  Z = xy + 6x + y&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \ xy \leq 18&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;0 \leq x \leq 10&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;0 \leq y \leq 2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;Let\   w = xy &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^L = 0  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^U = 10&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;y^L = 0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;y^U = 2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Substituting these values into the original problem and the McCormick Envelopes, the problem is reformulated:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;min \ Z = w + 6x + y&lt;br /&gt;
&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \ w \leq 18&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{L}y+xy^{L}-x^{L}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 0*y + x * 0 - 0*0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{U}y+xy^{U}-x^{U}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 10*y + x*2 - 10*2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 10y + 2x - 20&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq x^{U}y+xy^{L}-x^{U}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq 10*y + x*0 - 10*0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq 10y &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq xy^{U}+x^{L}y-x^{L}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq x*2 + 0*y -0*2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq 2x&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using GAMS to solve the reformulated problem, the solution is z= -76.2, x=10, y=1.8.&lt;br /&gt;
&lt;br /&gt;
== Applications ==&lt;br /&gt;
Bilinear functions occur in numerous engineering and natural science applications where McCormick Envelopes can be utilized.  &lt;br /&gt;
&lt;br /&gt;
For example, an application involves the modeling of dynamic biological processes based on experimental data&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;.  The challenge for this model is establishing model parameter values that align or calibrate the model response with observed data.  These model parameter values can be estimated using optimization techniques, including McCormick Envelopes, to minimize the difference between observed and simulated data.  &lt;br /&gt;
&lt;br /&gt;
Another application involves the optimization of financial objectives and risk management for energy conversion for a large scale operation such as a college campus or a municipality&amp;lt;sup&amp;gt;6&amp;lt;/sup&amp;gt;.  This operation involves flexibility of energy sources and several facets of uncertainty involved with pricing. This model uses McCormick Envelopes to optimize the bilinear nonconvex components.  &lt;br /&gt;
&lt;br /&gt;
A third application involves the optimized efficiency and reliability of the operation of the electricity grid.  Optimal power flow (OPF) and unit commitment (UC) are two optimization problems that support the electricity market operations&amp;lt;sup&amp;gt;7&amp;lt;/sup&amp;gt;. McCormick Envelopes are used to strengthen the second-order cone (SOC) relaxation of the alternate current optimal power flow (ACOPF)&amp;lt;sup&amp;gt;8&amp;lt;/sup&amp;gt;.&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
Non-convex NLPs are challenging to solve and may require a significant amount of time, computing resources, and effort to determine if the solution is global or the problem has no feasible solution.  McCormick Envelopes provide a relaxation technique for bilinear non-convex nonlinear programming problems.  McCormick Envelopes provide a straightforward technique of replacing each bilinear term with a new variable and adding four constraints. Due to the recursive nature of this technique, it may be applied to a wide variety of engineering and scientific applications involving bilinear terms.   &lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
# G. P. McCormick, &amp;quot;Computability of Global Solutions To Factorable Nonconvex Solutions: Part I: Convex Underestimating Problems,&amp;quot; &#039;&#039;Mathematical Programming,&#039;&#039; vol. 10, pp. 147-175, 1976. &lt;br /&gt;
# A. Miro, C. Pozo, G. Guillen-Gosalbez, J. Egea and L. Jimenez, &amp;quot;Deterministic global optimization algorithm based on outer approximation for the parameter estimation of nonlinear dynamic biological systems,&amp;quot; &#039;&#039;BMC Bioinformatics,&#039;&#039; vol. 13, 2012.&lt;br /&gt;
# J. K. Scott, M. D. Stuber and P. I. Barton, &amp;quot;Generalized McCormick Relaxations,&amp;quot; &#039;&#039;Journal of Global Optimization,&#039;&#039; vol. 51, pp. 569-606, 2011.&lt;br /&gt;
# H. Hijazi, &amp;quot;[https://www.google.com/url?sa=t&amp;amp;rct=j&amp;amp;q=&amp;amp;esrc=s&amp;amp;source=web&amp;amp;cd=&amp;amp;ved=2ahUKEwjSr7eu8K70AhVYmHIEHUJzCVsQFnoECAIQAQ&amp;amp;url=http%3A%2F%2Fwww.optimization-online.org%2FDB_FILE%2F2015%2F03%2F4841.pdf&amp;amp;usg=AOvVaw1xf9B1f-EPw0mG1LOqRfm9 Perspective Envelopes for Bilinear Functions&amp;quot;]&lt;br /&gt;
# P. Castro, &amp;quot;Tightening piecewise McCormick relaxations for bilinear problems,&amp;quot; &#039;&#039;Computers &amp;amp; Chemical Engineering&#039;&#039;, vol. 72, pp. 300-311, 2015.  &lt;br /&gt;
# J. Kantor and P. Mousaw, &amp;quot;A class of bilinear models for the optimization of energy conversion networks,&amp;quot; &#039;&#039;Chemical Engineering Science,&#039;&#039; vol. 67&#039;&#039;,&#039;&#039; pp. 131-138, 2012.&lt;br /&gt;
# Jeremy Lin; Fernando H. Magnago, &amp;quot;Optimal Power Flow,&amp;quot; in Electricity Markets: Theories and Applications , IEEE, 2017, pp.147-171, doi: 10.1002/9781119179382.ch6.&lt;br /&gt;
#B. Michael, A. Castillo, J. Watson and C. Laird, &amp;quot;Strengthened SOCP Relaxations for ACOPF with McCormick Envelopes and Bounds Tightening,&amp;quot; &#039;&#039;Computer Aided Chemical Engineering,&#039;&#039; vol. 44&#039;&#039;,&#039;&#039; pp. 1555-1560, 2018.&lt;br /&gt;
#&lt;/div&gt;</summary>
		<author><name>Smu29</name></author>
	</entry>
	<entry>
		<id>https://optimization.cbe.cornell.edu/index.php?title=McCormick_envelopes&amp;diff=5125</id>
		<title>McCormick envelopes</title>
		<link rel="alternate" type="text/html" href="https://optimization.cbe.cornell.edu/index.php?title=McCormick_envelopes&amp;diff=5125"/>
		<updated>2021-12-11T14:40:17Z</updated>

		<summary type="html">&lt;p&gt;Smu29: /* Applications */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Author: Susan Urban (SYSEN 5800 Fall 2021) &lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
The McCormick Envelope, originally developed by Dr. Garth McCormick, is a type of convex relaxation used for the optimization of bilinear &amp;lt;math&amp;gt;(e.g., x*y, e^xy + y, sin(x+y) - x^2)&lt;br /&gt;
&amp;lt;/math&amp;gt; non-linear programming (NLP) problems&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;. Optimization of these non-convex functions f(x) is challenging since they may have multiple locally optimal solutions or no solution. It can take a significant amount of time, computing resources, and effort to determine if the solution is global or the problem has no feasible solution&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;. Different techniques are used to address this challenge depending on the characteristics of the problem.  &lt;br /&gt;
== Theory, Methodology and Algorithmic Discussions ==&lt;br /&gt;
[[File:Image of updated estimators and envelopes.png|thumb|Figure 1: Relationships between the given function, concave over-estimators, convex under-estimators, a concave envelope, and a convex envelope. ]]&lt;br /&gt;
As McCormick noted, McCormick Envelopes are based on the key assumption that convex and concave envelopes can be constructed for the given function&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;. The concave envelope, and respectively the convex envelope, is the concave over-estimator and convex under-estimator for the given function providing the tightest fit to the given function.  The envelope surrounds the given function, like an envelope encloses a letter, and limits the feasible solution space the most in comparison to all other concave over-estimators and convex under-estimators. Multiple concave over-estimators and multiple convex under-estimators may exist but there is only one concave envelope and one convex envelope for a given function and domain.  Figure 1 depicts the relationship between the given function f(x), multiple concave over-estimators, multiple convex under-estimators, a convex envelope, and a concave envelope.   &lt;br /&gt;
&lt;br /&gt;
Each bilinear term is replaced with a new variable and four sets of constraints are added&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;. The non-linear programming is converted to a relaxed convex linear programming (LP) which can be more easily solved. &lt;br /&gt;
&lt;br /&gt;
The LP solution gives a lower (L) bound and any feasible solution to the problem gives an upper (U) bound.&lt;br /&gt;
&lt;br /&gt;
As noted by Scott et al, McCormick envelopes are effective since they are recursive, can be applied to a variety of applications, and are typically stronger than those resulting from convexification or linearization procedures&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
The following is a derivation of the McCormick Envelopes for a given bilinear function&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;Let \ w = xy&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^{L}\leq x\leq x^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;y^{L}\leq y\leq y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;x^{L}, x^{U}, y^{L}, y^{U} &amp;lt;/math&amp;gt;are   upper  and   lower  bound  values  for  &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;y&amp;lt;/math&amp;gt;, respectively.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left (x-x^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left (y-y^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
a and b are both positive resulting in a positive product&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a * b\geq 0&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a * b=\left ( x-x^{L} \right )\left ( y-y^{L} \right )=xy-x^{L}y-xy^{L}+x^{L}y^{L}\geq 0 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
substituting w=xy and reformulating the inequality produces&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{L}y+xy^{L}-x^{L}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Following the same sequence of steps, the remaining inequalities are produced:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x^{U}-x \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b = \left ( y^{U} -y\right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{U}y+xy^{U}-x^{U}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x^{U}-x\right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left ( y-y^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq x^{U}y+xy^{L}-x^{U}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x-x^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left ( y^{U}-y \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq xy^{U}+x^{L}y-x^{L}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The under-estimators of the function are represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{L}y+xy^{L}-x^{L}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{U}y+xy^{U}-x^{U}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The over-estimators of the function are represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq x^{U}y+xy^{L}-x^{U}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq xy^{U}+x^{L}y-x^{L}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following shows the relaxation of a non-convex problem using McCormick Envelopes:&lt;br /&gt;
&lt;br /&gt;
The original non-convex problem: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\min Z= \textstyle \sum_{i=1} \sum_{j=1}  c_{i,j}x_i x_j +g_0(x)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \sum_{i=1}\sum_{j=1} c_{i,j}^l x_i x_j + g_l (x) \leq 0,\forall l \in L&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^ L \leq x \leq x^U&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Replacing &amp;lt;math&amp;gt;u_{i,j} = x_i x_j&amp;lt;/math&amp;gt;, we obtain a relaxed, convex problem using McCormick Envelopes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\min Z= \textstyle \sum_{i=1} \sum_{j=1}  c_{i,j} u_{i,j} +g_0(x)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \sum_{i=1}\sum_{j=1} c_{i,j}^l u_{i,j}+ g_l (x) \leq 0,\forall l \in L&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^L x_j + x_i x_j^L - {x_i}^L {x_j}^L, \forall  i,j \ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^U x_j + x_i x_j^U - {x_i}^U {x_j}^U, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^L x_j + x_i x_j^U - {x_i}^L {x_j}^U, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^U x_j + x_i x_j^L - {x_i}^U {x_j}^L, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^L \leq x \leq x^U,   \ \ u^L \leq u \leq u^U&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Similar steps are taken to derive the McCormick Envelopes for given functions with different formats e.g., e&amp;lt;sup&amp;gt;xy&amp;lt;/sup&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Good lower and upper bounds focus and minimize the feasible solution space; they reduce the number of iterations to find the optimal solution.  &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Piecewise McCormick Relaxation&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
As discussed by Hazaji, global optimization solvers focus initially on optimizing the lower and upper bounds, and when necessary, focus on domain partitioning&amp;lt;sup&amp;gt;4&amp;lt;/sup&amp;gt;.  By dividing the domain of a given variable into partitions or smaller regions, the solver is able to tailor and further tighten the convex relaxations of each partition. This strategy is known as the Piecewise McCormick relaxation&amp;lt;sup&amp;gt;5&amp;lt;/sup&amp;gt;.   &lt;br /&gt;
&lt;br /&gt;
== Example: Numerical ==&lt;br /&gt;
For the given problem, &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;min \  Z = xy + 6x + y&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \ xy \leq 18&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;0 \leq x \leq 10&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;0 \leq y \leq 2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;Let\   w = xy &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^L = 0  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^U = 10&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;y^L = 0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;y^U = 2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Substituting these values into the original problem and the McCormick Envelopes, the problem is reformulated:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;min \ Z = w + 6x + y&lt;br /&gt;
&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \ w \leq 18&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{L}y+xy^{L}-x^{L}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 0*y + x * 0 - 0*0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{U}y+xy^{U}-x^{U}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 10*y + x*2 - 10*2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 10y + 2x - 20&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq x^{U}y+xy^{L}-x^{U}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq 10*y + x*0 - 10*0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq 10y &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq xy^{U}+x^{L}y-x^{L}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq x*2 + 0*y -0*2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq 2x&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using GAMS to solve the reformulated problem, the solution is z= -76.2, x=10, y=1.8.&lt;br /&gt;
&lt;br /&gt;
== Applications ==&lt;br /&gt;
Bilinear functions occur in numerous engineering and natural science applications where McCormick Envelopes can be utilized.  &lt;br /&gt;
&lt;br /&gt;
For example, an application involves the modeling of dynamic biological processes based on experimental data&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;.  The challenge for this model is establishing model parameter values that align or calibrate the model response with observed data.  These model parameter values can be estimated using optimization techniques, including McCormick Envelopes, to minimize the difference between observed and simulated data.  &lt;br /&gt;
&lt;br /&gt;
Another application involves the optimization of financial objectives and risk management for energy conversion for a large scale operation such as a college campus or a municipality&amp;lt;sup&amp;gt;6&amp;lt;/sup&amp;gt;.  This operation involves flexibility of energy sources and several facets of uncertainty involved with pricing. This model uses McCormick Envelopes to optimize the bilinear nonconvex components.  &lt;br /&gt;
&lt;br /&gt;
A third application involves the optimized efficiency and reliability of the operation of the electricity grid.  Optimal power flow (OPF) and unit commitment (UC) are two optimization problems that support the electricity market operations&amp;lt;sup&amp;gt;8&amp;lt;/sup&amp;gt;. McCormick Envelopes are used to strengthen the second-order cone (SOC) relaxation of the alternate current optimal power flow (ACOPF)&amp;lt;sup&amp;gt;9&amp;lt;/sup&amp;gt;.&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
Non-convex NLPs are challenging to solve and may require a significant amount of time, computing resources, and effort to determine if the solution is global or the problem has no feasible solution.  McCormick Envelopes provide a relaxation technique for bilinear non-convex nonlinear programming problems.  McCormick Envelopes provide a straightforward technique of replacing each bilinear term with a new variable and adding four constraints. Due to the recursive nature of this technique, it may be applied to a wide variety of engineering and scientific applications involving bilinear terms.   &lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
# G. P. McCormick, &amp;quot;Computability of Global Solutions To Factorable Nonconvex Solutions: Part I: Convex Underestimating Problems,&amp;quot; &#039;&#039;Mathematical Programming,&#039;&#039; vol. 10, pp. 147-175, 1976. &lt;br /&gt;
# A. Miro, C. Pozo, G. Guillen-Gosalbez, J. Egea and L. Jimenez, &amp;quot;Deterministic global optimization algorithm based on outer approximation for the parameter estimation of nonlinear dynamic biological systems,&amp;quot; &#039;&#039;BMC Bioinformatics,&#039;&#039; vol. 13, 2012.&lt;br /&gt;
# J. K. Scott, M. D. Stuber and P. I. Barton, &amp;quot;Generalized McCormick Relaxations,&amp;quot; &#039;&#039;Journal of Global Optimization,&#039;&#039; vol. 51, pp. 569-606, 2011.&lt;br /&gt;
# H. Hijazi, &amp;quot;[https://www.google.com/url?sa=t&amp;amp;rct=j&amp;amp;q=&amp;amp;esrc=s&amp;amp;source=web&amp;amp;cd=&amp;amp;ved=2ahUKEwjSr7eu8K70AhVYmHIEHUJzCVsQFnoECAIQAQ&amp;amp;url=http%3A%2F%2Fwww.optimization-online.org%2FDB_FILE%2F2015%2F03%2F4841.pdf&amp;amp;usg=AOvVaw1xf9B1f-EPw0mG1LOqRfm9 Perspective Envelopes for Bilinear Functions&amp;quot;]&lt;br /&gt;
# P. Castro, &amp;quot;Tightening piecewise McCormick relaxations for bilinear problems,&amp;quot; &#039;&#039;Computers &amp;amp; Chemical Engineering&#039;&#039;, vol. 72, pp. 300-311, 2015.  &lt;br /&gt;
# &lt;br /&gt;
#M. Bergamini, P. Aguirre, and I. Grossman, &amp;quot;Logic-based outer approximation for globally optimal synthesis of process networks,&amp;quot; &#039;&#039;Computers and Chemical Engineering,&#039;&#039; vol. 29, pp. &#039;&#039;1&#039;&#039;914–1933, 2005.&lt;br /&gt;
#M. Chandraker and D. Kriegman, &amp;quot;Globally Optimal Bilinear Programming for Computer Vision Applications,&amp;quot; presented at the IEEE Computer Society Conference on &#039;&#039;Computer Vision and Pattern Recognition,&#039;&#039; 2008&#039;&#039;.&#039;&#039; &lt;br /&gt;
#J. Kantor and P. Mousaw, &amp;quot;A class of bilinear models for the optimization of energy conversion networks,&amp;quot; &#039;&#039;Chemical Engineering Science,&#039;&#039; vol. 67&#039;&#039;,&#039;&#039; pp. 131-138, 2012.&lt;br /&gt;
#Jeremy Lin; Fernando H. Magnago, &amp;quot;Optimal Power Flow,&amp;quot; in Electricity Markets: Theories and Applications , IEEE, 2017, pp.147-171, doi: 10.1002/9781119179382.ch6.&lt;br /&gt;
#B. Michael, A. Castillo, J. Watson and C. Laird, &amp;quot;Strengthened SOCP Relaxations for ACOPF with McCormick Envelopes and Bounds Tightening,&amp;quot; &#039;&#039;Computer Aided Chemical Engineering,&#039;&#039; vol. 44&#039;&#039;,&#039;&#039; pp. 1555-1560, 2018.&lt;/div&gt;</summary>
		<author><name>Smu29</name></author>
	</entry>
	<entry>
		<id>https://optimization.cbe.cornell.edu/index.php?title=McCormick_envelopes&amp;diff=5124</id>
		<title>McCormick envelopes</title>
		<link rel="alternate" type="text/html" href="https://optimization.cbe.cornell.edu/index.php?title=McCormick_envelopes&amp;diff=5124"/>
		<updated>2021-12-11T14:13:24Z</updated>

		<summary type="html">&lt;p&gt;Smu29: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Author: Susan Urban (SYSEN 5800 Fall 2021) &lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
The McCormick Envelope, originally developed by Dr. Garth McCormick, is a type of convex relaxation used for the optimization of bilinear &amp;lt;math&amp;gt;(e.g., x*y, e^xy + y, sin(x+y) - x^2)&lt;br /&gt;
&amp;lt;/math&amp;gt; non-linear programming (NLP) problems&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;. Optimization of these non-convex functions f(x) is challenging since they may have multiple locally optimal solutions or no solution. It can take a significant amount of time, computing resources, and effort to determine if the solution is global or the problem has no feasible solution&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;. Different techniques are used to address this challenge depending on the characteristics of the problem.  &lt;br /&gt;
== Theory, Methodology and Algorithmic Discussions ==&lt;br /&gt;
[[File:Image of updated estimators and envelopes.png|thumb|Figure 1: Relationships between the given function, concave over-estimators, convex under-estimators, a concave envelope, and a convex envelope. ]]&lt;br /&gt;
As McCormick noted, McCormick Envelopes are based on the key assumption that convex and concave envelopes can be constructed for the given function&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;. The concave envelope, and respectively the convex envelope, is the concave over-estimator and convex under-estimator for the given function providing the tightest fit to the given function.  The envelope surrounds the given function, like an envelope encloses a letter, and limits the feasible solution space the most in comparison to all other concave over-estimators and convex under-estimators. Multiple concave over-estimators and multiple convex under-estimators may exist but there is only one concave envelope and one convex envelope for a given function and domain.  Figure 1 depicts the relationship between the given function f(x), multiple concave over-estimators, multiple convex under-estimators, a convex envelope, and a concave envelope.   &lt;br /&gt;
&lt;br /&gt;
Each bilinear term is replaced with a new variable and four sets of constraints are added&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;. The non-linear programming is converted to a relaxed convex linear programming (LP) which can be more easily solved. &lt;br /&gt;
&lt;br /&gt;
The LP solution gives a lower (L) bound and any feasible solution to the problem gives an upper (U) bound.&lt;br /&gt;
&lt;br /&gt;
As noted by Scott et al, McCormick envelopes are effective since they are recursive, can be applied to a variety of applications, and are typically stronger than those resulting from convexification or linearization procedures&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
The following is a derivation of the McCormick Envelopes for a given bilinear function&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;Let \ w = xy&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^{L}\leq x\leq x^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;y^{L}\leq y\leq y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;x^{L}, x^{U}, y^{L}, y^{U} &amp;lt;/math&amp;gt;are   upper  and   lower  bound  values  for  &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;y&amp;lt;/math&amp;gt;, respectively.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left (x-x^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left (y-y^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
a and b are both positive resulting in a positive product&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a * b\geq 0&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a * b=\left ( x-x^{L} \right )\left ( y-y^{L} \right )=xy-x^{L}y-xy^{L}+x^{L}y^{L}\geq 0 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
substituting w=xy and reformulating the inequality produces&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{L}y+xy^{L}-x^{L}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Following the same sequence of steps, the remaining inequalities are produced:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x^{U}-x \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b = \left ( y^{U} -y\right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{U}y+xy^{U}-x^{U}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x^{U}-x\right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left ( y-y^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq x^{U}y+xy^{L}-x^{U}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x-x^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left ( y^{U}-y \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq xy^{U}+x^{L}y-x^{L}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The under-estimators of the function are represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{L}y+xy^{L}-x^{L}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{U}y+xy^{U}-x^{U}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The over-estimators of the function are represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq x^{U}y+xy^{L}-x^{U}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq xy^{U}+x^{L}y-x^{L}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following shows the relaxation of a non-convex problem using McCormick Envelopes:&lt;br /&gt;
&lt;br /&gt;
The original non-convex problem: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\min Z= \textstyle \sum_{i=1} \sum_{j=1}  c_{i,j}x_i x_j +g_0(x)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \sum_{i=1}\sum_{j=1} c_{i,j}^l x_i x_j + g_l (x) \leq 0,\forall l \in L&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^ L \leq x \leq x^U&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Replacing &amp;lt;math&amp;gt;u_{i,j} = x_i x_j&amp;lt;/math&amp;gt;, we obtain a relaxed, convex problem using McCormick Envelopes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\min Z= \textstyle \sum_{i=1} \sum_{j=1}  c_{i,j} u_{i,j} +g_0(x)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \sum_{i=1}\sum_{j=1} c_{i,j}^l u_{i,j}+ g_l (x) \leq 0,\forall l \in L&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^L x_j + x_i x_j^L - {x_i}^L {x_j}^L, \forall  i,j \ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^U x_j + x_i x_j^U - {x_i}^U {x_j}^U, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^L x_j + x_i x_j^U - {x_i}^L {x_j}^U, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^U x_j + x_i x_j^L - {x_i}^U {x_j}^L, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^L \leq x \leq x^U,   \ \ u^L \leq u \leq u^U&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Similar steps are taken to derive the McCormick Envelopes for given functions with different formats e.g., e&amp;lt;sup&amp;gt;xy&amp;lt;/sup&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Good lower and upper bounds focus and minimize the feasible solution space; they reduce the number of iterations to find the optimal solution.  &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Piecewise McCormick Relaxation&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
As discussed by Hazaji, global optimization solvers focus initially on optimizing the lower and upper bounds, and when necessary, focus on domain partitioning&amp;lt;sup&amp;gt;4&amp;lt;/sup&amp;gt;.  By dividing the domain of a given variable into partitions or smaller regions, the solver is able to tailor and further tighten the convex relaxations of each partition. This strategy is known as the Piecewise McCormick relaxation&amp;lt;sup&amp;gt;5&amp;lt;/sup&amp;gt;.   &lt;br /&gt;
&lt;br /&gt;
== Example: Numerical ==&lt;br /&gt;
For the given problem, &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;min \  Z = xy + 6x + y&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \ xy \leq 18&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;0 \leq x \leq 10&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;0 \leq y \leq 2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;Let\   w = xy &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^L = 0  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^U = 10&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;y^L = 0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;y^U = 2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Substituting these values into the original problem and the McCormick Envelopes, the problem is reformulated:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;min \ Z = w + 6x + y&lt;br /&gt;
&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \ w \leq 18&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{L}y+xy^{L}-x^{L}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 0*y + x * 0 - 0*0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{U}y+xy^{U}-x^{U}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 10*y + x*2 - 10*2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 10y + 2x - 20&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq x^{U}y+xy^{L}-x^{U}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq 10*y + x*0 - 10*0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq 10y &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq xy^{U}+x^{L}y-x^{L}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq x*2 + 0*y -0*2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq 2x&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using GAMS to solve the reformulated problem, the solution is z= -76.2, x=10, y=1.8.&lt;br /&gt;
&lt;br /&gt;
== Applications ==&lt;br /&gt;
Bilinear functions occur in numerous engineering and natural science applications where McCormick Envelopes can be utilized.  &lt;br /&gt;
&lt;br /&gt;
For example, an application is the modeling of dynamic biological processes based on experimental data&amp;lt;sup&amp;gt;8&amp;lt;/sup&amp;gt;.  The challenge for this model is establishing model parameter values that align or calibrate the model response with observed data.  These model parameter values can be estimated using optimization techniques, including McCormick Envelopes, to minimize the difference between observed and simulated data.  &lt;br /&gt;
&lt;br /&gt;
Another application is the optimization of financial objectives and risk management for energy conversion for a large scale operation such as a college campus or a municipality&amp;lt;sup&amp;gt;6&amp;lt;/sup&amp;gt;.  This operation involves flexibility of energy sources and several facets of uncertainty involved with pricing. This model uses McCormick Envelopes to optimize the bilinear nonconvex components.  &lt;br /&gt;
&lt;br /&gt;
A third application is the optimized efficiency and reliability of the operation of the electricity grid.  Optimal power flow (OPF) and unit commitment (UC) are two optimization problems that support the electricity market operations&amp;lt;sup&amp;gt;8&amp;lt;/sup&amp;gt;. McCormick Envelopes are used to strengthen the second-order cone (SOC) relaxation of the alternate current optimal power flow (ACOPF)&amp;lt;sup&amp;gt;9&amp;lt;/sup&amp;gt;.&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
Non-convex NLPs are challenging to solve and may require a significant amount of time, computing resources, and effort to determine if the solution is global or the problem has no feasible solution.  McCormick Envelopes provide a relaxation technique for bilinear non-convex nonlinear programming problems.  McCormick Envelopes provide a straightforward technique of replacing each bilinear term with a new variable and adding four constraints. Due to the recursive nature of this technique, it may be applied to a wide variety of engineering and scientific applications involving bilinear terms.   &lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
# G. P. McCormick, &amp;quot;Computability of Global Solutions To Factorable Nonconvex Solutions: Part I: Convex Underestimating Problems,&amp;quot; &#039;&#039;Mathematical Programming,&#039;&#039; vol. 10, pp. 147-175, 1976. &lt;br /&gt;
# A. Miro, C. Pozo, G. Guillen-Gosalbez, J. Egea and L. Jimenez, &amp;quot;Deterministic global optimization algorithm based on outer approximation for the parameter estimation of nonlinear dynamic biological systems,&amp;quot; &#039;&#039;BMC Bioinformatics,&#039;&#039; vol. 13, 2012.&lt;br /&gt;
# J. K. Scott, M. D. Stuber and P. I. Barton, &amp;quot;Generalized McCormick Relaxations,&amp;quot; &#039;&#039;Journal of Global Optimization,&#039;&#039; vol. 51, pp. 569-606, 2011.&lt;br /&gt;
# H. Hijazi, &amp;quot;[https://www.google.com/url?sa=t&amp;amp;rct=j&amp;amp;q=&amp;amp;esrc=s&amp;amp;source=web&amp;amp;cd=&amp;amp;ved=2ahUKEwjSr7eu8K70AhVYmHIEHUJzCVsQFnoECAIQAQ&amp;amp;url=http%3A%2F%2Fwww.optimization-online.org%2FDB_FILE%2F2015%2F03%2F4841.pdf&amp;amp;usg=AOvVaw1xf9B1f-EPw0mG1LOqRfm9 Perspective Envelopes for Bilinear Functions&amp;quot;]&lt;br /&gt;
# P. Castro, &amp;quot;Tightening piecewise McCormick relaxations for bilinear problems,&amp;quot; &#039;&#039;Computers &amp;amp; Chemical Engineering&#039;&#039;, vol. 72, pp. 300-311, 2015.  &lt;br /&gt;
#M. Bergamini, P. Aguirre, and I. Grossman, &amp;quot;Logic-based outer approximation for globally optimal synthesis of process networks,&amp;quot; &#039;&#039;Computers and Chemical Engineering,&#039;&#039; vol. 29, pp. &#039;&#039;1&#039;&#039;914–1933, 2005.&lt;br /&gt;
#M. Chandraker and D. Kriegman, &amp;quot;Globally Optimal Bilinear Programming for Computer Vision Applications,&amp;quot; presented at the IEEE Computer Society Conference on &#039;&#039;Computer Vision and Pattern Recognition,&#039;&#039; 2008&#039;&#039;.&#039;&#039; &lt;br /&gt;
#J. Kantor and P. Mousaw, &amp;quot;A class of bilinear models for the optimization of energy conversion networks,&amp;quot; &#039;&#039;Chemical Engineering Science,&#039;&#039; vol. 67&#039;&#039;,&#039;&#039; pp. 131-138, 2012.&lt;br /&gt;
#Jeremy Lin; Fernando H. Magnago, &amp;quot;Optimal Power Flow,&amp;quot; in Electricity Markets: Theories and Applications , IEEE, 2017, pp.147-171, doi: 10.1002/9781119179382.ch6.&lt;br /&gt;
#B. Michael, A. Castillo, J. Watson and C. Laird, &amp;quot;Strengthened SOCP Relaxations for ACOPF with McCormick Envelopes and Bounds Tightening,&amp;quot; &#039;&#039;Computer Aided Chemical Engineering,&#039;&#039; vol. 44&#039;&#039;,&#039;&#039; pp. 1555-1560, 2018.&lt;/div&gt;</summary>
		<author><name>Smu29</name></author>
	</entry>
	<entry>
		<id>https://optimization.cbe.cornell.edu/index.php?title=McCormick_envelopes&amp;diff=5123</id>
		<title>McCormick envelopes</title>
		<link rel="alternate" type="text/html" href="https://optimization.cbe.cornell.edu/index.php?title=McCormick_envelopes&amp;diff=5123"/>
		<updated>2021-12-11T13:36:44Z</updated>

		<summary type="html">&lt;p&gt;Smu29: corrected reference&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Author: Susan Urban (SYSEN 5800 Fall 2021) &lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
The McCormick Envelope, originally developed by Dr. Garth McCormick, is a type of convex relaxation used for the optimization of bilinear &amp;lt;math&amp;gt;(e.g., x*y, e^xy + y, sin(x+y) - x^2)&lt;br /&gt;
&amp;lt;/math&amp;gt; non-linear programming (NLP) problems&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;. Optimization of these non-convex functions f(x) is challenging since they may have multiple locally optimal solutions or no solution. It can take a significant amount of time, computing resources, and effort to determine if the solution is global or the problem has no feasible solution. Different techniques are used to address this challenge depending on the characteristics of the problem.  &lt;br /&gt;
== Theory, Methodology and Algorithmic Discussions ==&lt;br /&gt;
[[File:Image of updated estimators and envelopes.png|thumb|Figure 1: Relationships between the given function, concave over-estimators, convex under-estimators, a concave envelope, and a convex envelope. ]]&lt;br /&gt;
As McCormick noted, McCormick Envelopes are based on the key assumption that convex and concave envelopes can be constructed for the given function&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;. The concave envelope, and respectively the convex envelope, is the concave over-estimator and convex under-estimator for the given function providing the tightest fit to the given function.  The envelope surrounds the given function, like an envelope encloses a letter, and limits the feasible solution space the most in comparison to all other concave over-estimators and convex under-estimators. Multiple concave over-estimators and multiple convex under-estimators may exist but there is only one concave envelope and one convex envelope for a given function and domain.  Figure 1 depicts the relationship between the given function f(x), multiple concave over-estimators, multiple convex under-estimators, a convex envelope, and a concave envelope.   &lt;br /&gt;
&lt;br /&gt;
Each bilinear term is replaced with a new variable and four sets of constraints are added&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;. The non-linear programming is converted to a relaxed convex linear programming (LP) which can be more easily solved. &lt;br /&gt;
&lt;br /&gt;
The LP solution gives a lower (L) bound and any feasible solution to the problem gives an upper (U) bound.&lt;br /&gt;
&lt;br /&gt;
As noted by Scott et al, McCormick envelopes are effective since they are recursive, can be applied to a variety of applications, and are typically stronger than those resulting from convexification or linearization procedures&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
The following is a derivation of the McCormick Envelopes for a given bilinear function1:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;Let \ w = xy&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^{L}\leq x\leq x^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;y^{L}\leq y\leq y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;x^{L}, x^{U}, y^{L}, y^{U} &amp;lt;/math&amp;gt;are   upper  and   lower  bound  values  for  &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;y&amp;lt;/math&amp;gt;, respectively.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left (x-x^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left (y-y^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
a and b are both positive resulting in a positive product&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a * b\geq 0&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a * b=\left ( x-x^{L} \right )\left ( y-y^{L} \right )=xy-x^{L}y-xy^{L}+x^{L}y^{L}\geq 0 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
substituting w=xy and reformulating the inequality produces&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{L}y+xy^{L}-x^{L}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Following the same sequence of steps, the remaining inequalities are produced:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x^{U}-x \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b = \left ( y^{U} -y\right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{U}y+xy^{U}-x^{U}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x^{U}-x\right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left ( y-y^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq x^{U}y+xy^{L}-x^{U}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x-x^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left ( y^{U}-y \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq xy^{U}+x^{L}y-x^{L}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The under-estimators of the function are represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{L}y+xy^{L}-x^{L}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{U}y+xy^{U}-x^{U}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The over-estimators of the function are represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq x^{U}y+xy^{L}-x^{U}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq xy^{U}+x^{L}y-x^{L}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following shows the relaxation of a non-convex problem using McCormick Envelopes:&lt;br /&gt;
&lt;br /&gt;
The original non-convex problem: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\min Z= \textstyle \sum_{i=1} \sum_{j=1}  c_{i,j}x_i x_j +g_0(x)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \sum_{i=1}\sum_{j=1} c_{i,j}^l x_i x_j + g_l (x) \leq 0,\forall l \in L&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^ L \leq x \leq x^U&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Replacing &amp;lt;math&amp;gt;u_{i,j} = x_i x_j&amp;lt;/math&amp;gt;, we obtain a relaxed, convex problem using McCormick Envelopes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\min Z= \textstyle \sum_{i=1} \sum_{j=1}  c_{i,j} u_{i,j} +g_0(x)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \sum_{i=1}\sum_{j=1} c_{i,j}^l u_{i,j}+ g_l (x) \leq 0,\forall l \in L&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^L x_j + x_i x_j^L - {x_i}^L {x_j}^L, \forall  i,j \ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^U x_j + x_i x_j^U - {x_i}^U {x_j}^U, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^L x_j + x_i x_j^U - {x_i}^L {x_j}^U, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^U x_j + x_i x_j^L - {x_i}^U {x_j}^L, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^L \leq x \leq x^U,   \ \ u^L \leq u \leq u^U&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Similar steps are taken to derive the McCormick Envelopes for given functions with different formats e.g., e&amp;lt;sup&amp;gt;xy&amp;lt;/sup&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Good lower and upper bounds focus and minimize the feasible solution space; they reduce the number of iterations to find the optimal solution.  &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Piecewise McCormick Relaxation&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
As discussed by Hazaji, global optimization solvers focus initially on optimizing the lower and upper bounds, and when necessary, focus on domain partitioning&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;.  By dividing the domain of a given variable into partitions or smaller regions, the solver is able to tailor and further tighten the convex relaxations of each partition. This strategy is known as the Piecewise McCormick relaxation&amp;lt;sup&amp;gt;4&amp;lt;/sup&amp;gt;.   &lt;br /&gt;
&lt;br /&gt;
== Example: Numerical ==&lt;br /&gt;
For the given problem, &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;min \  Z = xy + 6x + y&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \ xy \leq 18&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;0 \leq x \leq 10&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;0 \leq y \leq 2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;Let\   w = xy &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^L = 0  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^U = 10&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;y^L = 0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;y^U = 2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Substituting these values into the original problem and the McCormick Envelopes, the problem is reformulated:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;min \ Z = w + 6x + y&lt;br /&gt;
&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \ w \leq 18&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{L}y+xy^{L}-x^{L}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 0*y + x * 0 - 0*0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{U}y+xy^{U}-x^{U}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 10*y + x*2 - 10*2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 10y + 2x - 20&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq x^{U}y+xy^{L}-x^{U}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq 10*y + x*0 - 10*0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq 10y &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq xy^{U}+x^{L}y-x^{L}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq x*2 + 0*y -0*2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq 2x&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using GAMS to solve the reformulated problem, the solution is z= -76.2, x=10, y=1.8.&lt;br /&gt;
&lt;br /&gt;
== Applications ==&lt;br /&gt;
Bilinear functions occur in numerous engineering and natural science applications where McCormick Envelopes can be utilized.  &lt;br /&gt;
&lt;br /&gt;
For example, an application is the modeling of dynamic biological processes based on experimental data&amp;lt;sup&amp;gt;8&amp;lt;/sup&amp;gt;.  The challenge for this model is establishing model parameter values that align or calibrate the model response with observed data.  These model parameter values can be estimated using optimization techniques, including McCormick Envelopes, to minimize the difference between observed and simulated data.  &lt;br /&gt;
&lt;br /&gt;
Another application is the optimization of financial objectives and risk management for energy conversion for a large scale operation such as a college campus or a municipality&amp;lt;sup&amp;gt;6&amp;lt;/sup&amp;gt;.  This operation involves flexibility of energy sources and several facets of uncertainty involved with pricing. This model uses McCormick Envelopes to optimize the bilinear nonconvex components.  &lt;br /&gt;
&lt;br /&gt;
A third application is the optimized efficiency and reliability of the operation of the electricity grid.  Optimal power flow (OPF) and unit commitment (UC) are two optimization problems that support the electricity market operations&amp;lt;sup&amp;gt;8&amp;lt;/sup&amp;gt;. McCormick Envelopes are used to strengthen the second-order cone (SOC) relaxation of the alternate current optimal power flow (ACOPF)&amp;lt;sup&amp;gt;9&amp;lt;/sup&amp;gt;.&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
Non-convex NLPs are challenging to solve and may require a significant amount of time, computing resources, and effort to determine if the solution is global or the problem has no feasible solution.  McCormick Envelopes provide a relaxation technique for bilinear non-convex nonlinear programming problems.  McCormick Envelopes provide a straightforward technique of replacing each bilinear term with a new variable and adding four constraints. Due to the recursive nature of this technique, it may be applied to a wide variety of engineering and scientific applications involving bilinear terms.   &lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
# G. P. McCormick, &amp;quot;Computability of Global Solutions To Factorable Nonconvex Solutions: Part I: Convex Underestimating Problems,&amp;quot; &#039;&#039;Mathematical Programming,&#039;&#039; vol. 10, pp. 147-175, 1976. &lt;br /&gt;
# J. K. Scott, M. D. Stuber and P. I. Barton, &amp;quot;Generalized McCormick Relaxations,&amp;quot; &#039;&#039;Journal of Global Optimization,&#039;&#039; vol. 51, pp. 569-606, 2011.&lt;br /&gt;
# H. Hijazi, &amp;quot;[https://www.google.com/url?sa=t&amp;amp;rct=j&amp;amp;q=&amp;amp;esrc=s&amp;amp;source=web&amp;amp;cd=&amp;amp;ved=2ahUKEwjSr7eu8K70AhVYmHIEHUJzCVsQFnoECAIQAQ&amp;amp;url=http%3A%2F%2Fwww.optimization-online.org%2FDB_FILE%2F2015%2F03%2F4841.pdf&amp;amp;usg=AOvVaw1xf9B1f-EPw0mG1LOqRfm9 Perspective Envelopes for Bilinear Functions&amp;quot;]&lt;br /&gt;
#M. Bergamini, P. Aguirre, and I. Grossman, &amp;quot;Logic-based outer approximation for globally optimal synthesis of process networks,&amp;quot; &#039;&#039;Computers and Chemical Engineering,&#039;&#039; vol. 29, pp. &#039;&#039;1&#039;&#039;914–1933, 2005.&lt;br /&gt;
#M. Chandraker and D. Kriegman, &amp;quot;Globally Optimal Bilinear Programming for Computer Vision Applications,&amp;quot; presented at the IEEE Computer Society Conference on &#039;&#039;Computer Vision and Pattern Recognition,&#039;&#039; 2008&#039;&#039;.&#039;&#039; &lt;br /&gt;
#J. Kantor and P. Mousaw, &amp;quot;A class of bilinear models for the optimization of energy conversion networks,&amp;quot; &#039;&#039;Chemical Engineering Science,&#039;&#039; vol. 67&#039;&#039;,&#039;&#039; pp. 131-138, 2012.&lt;br /&gt;
#A. Miro, C. Pozo, G. Guillen-Gosalbez, J. Egea and L. Jimenez, &amp;quot;Deterministic global optimization algorithm based on outer approximation for the parameter estimation of nonlinear dynamic biological systems,&amp;quot; &#039;&#039;BMC Bioinformatics,&#039;&#039; vol. 13, 2012.&lt;br /&gt;
#Jeremy Lin; Fernando H. Magnago, &amp;quot;Optimal Power Flow,&amp;quot; in Electricity Markets: Theories and Applications , IEEE, 2017, pp.147-171, doi: 10.1002/9781119179382.ch6.&lt;br /&gt;
#B. Michael, A. Castillo, J. Watson and C. Laird, &amp;quot;Strengthened SOCP Relaxations for ACOPF with McCormick Envelopes and Bounds Tightening,&amp;quot; &#039;&#039;Computer Aided Chemical Engineering,&#039;&#039; vol. 44&#039;&#039;,&#039;&#039; pp. 1555-1560, 2018.&lt;/div&gt;</summary>
		<author><name>Smu29</name></author>
	</entry>
	<entry>
		<id>https://optimization.cbe.cornell.edu/index.php?title=McCormick_envelopes&amp;diff=5026</id>
		<title>McCormick envelopes</title>
		<link rel="alternate" type="text/html" href="https://optimization.cbe.cornell.edu/index.php?title=McCormick_envelopes&amp;diff=5026"/>
		<updated>2021-12-09T12:58:26Z</updated>

		<summary type="html">&lt;p&gt;Smu29: added applications&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Author: Susan Urban (SYSEN 5800 Fall 2021) &lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
The McCormick Envelope, originally developed by Dr. Garth McCormick&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;, is a type of convex relaxation used for the optimization of bilinear &amp;lt;math&amp;gt;(e.g., x*y, e^xy + y, sin(x+y) - x^2)&lt;br /&gt;
&amp;lt;/math&amp;gt; non-linear programming (NLP) problems. Optimization of these non-convex functions f(x) is challenging since they may have multiple locally optimal solutions or no solution. It can take a significant amount of time, computing resources, and effort to determine if the solution is global or the problem has no feasible solution. Different techniques are used to address this challenge depending on the characteristics of the problem.  &lt;br /&gt;
== Theory, Methodology and Algorithmic Discussions ==&lt;br /&gt;
[[File:Image of updated estimators and envelopes.png|thumb|Figure 1: Relationships between the given function, concave over-estimators, convex under-estimators, a concave envelope, and a convex envelope. ]]&lt;br /&gt;
As McCormick&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt; noted, McCormick Envelopes are based on the key assumption that convex and concave envelopes can be constructed for the given function. The concave envelope, and respectively the convex envelope, is the concave over-estimator and convex under-estimator for the given function providing the tightest fit to the given function.  The envelope surrounds the given function, like an envelope encloses a letter, and limits the feasible solution space the most in comparison to all other concave over-estimators and convex under-estimators. Multiple concave over-estimators and multiple convex under-estimators may exist but there is only one concave envelope and one convex envelope for a given function and domain.  Figure 1 depicts the relationship between the given function f(x), multiple concave over-estimators, multiple convex under-estimators, a convex envelope, and a concave envelope.   &lt;br /&gt;
&lt;br /&gt;
Each bilinear term is replaced with a new variable and four sets of constraints are added. The non-linear programming is converted to a relaxed convex linear programming (LP) which can be more easily solved. &lt;br /&gt;
&lt;br /&gt;
The LP solution gives a lower (L) bound and any feasible solution to the problem gives an upper (U) bound.&lt;br /&gt;
&lt;br /&gt;
As noted by Scott et al&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;, McCormick envelopes are effective since they are recursive, can be applied to a variety of applications, and are typically stronger than those resulting from convexification or linearization procedures. &lt;br /&gt;
&lt;br /&gt;
The following is a derivation of the McCormick Envelopes for a given bilinear function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;Let \ w = xy&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^{L}\leq x\leq x^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;y^{L}\leq y\leq y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;x^{L}, x^{U}, y^{L}, y^{U} &amp;lt;/math&amp;gt;are   upper  and   lower  bound  values  for  &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;y&amp;lt;/math&amp;gt;, respectively.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left (x-x^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left (y-y^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
a and b are both positive resulting in a positive product&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a * b\geq 0&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a * b=\left ( x-x^{L} \right )\left ( y-y^{L} \right )=xy-x^{L}y-xy^{L}+x^{L}y^{L}\geq 0 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
substituting w=xy and reformulating the inequality produces&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{L}y+xy^{L}-x^{L}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Following the same sequence of steps, the remaining inequalities are produced:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x^{U}-x \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b = \left ( y^{U} -y\right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{U}y+xy^{U}-x^{U}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x^{U}-x\right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left ( y-y^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq x^{U}y+xy^{L}-x^{U}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x-x^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left ( y^{U}-y \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq xy^{U}+x^{L}y-x^{L}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The under-estimators of the function are represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{L}y+xy^{L}-x^{L}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{U}y+xy^{U}-x^{U}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The over-estimators of the function are represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq x^{U}y+xy^{L}-x^{U}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq xy^{U}+x^{L}y-x^{L}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following shows the relaxation of a non-convex problem using McCormick Envelopes:&lt;br /&gt;
&lt;br /&gt;
The original non-convex problem: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\min Z= \textstyle \sum_{i=1} \sum_{j=1}  c_{i,j}x_i x_j +g_0(x)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \sum_{i=1}\sum_{j=1} c_{i,j}^l x_i x_j + g_l (x) \leq 0,\forall l \in L&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^ L \leq x \leq x^U&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Replacing &amp;lt;math&amp;gt;u_{i,j} = x_i x_j&amp;lt;/math&amp;gt;, we obtain a relaxed, convex problem using McCormick Envelopes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\min Z= \textstyle \sum_{i=1} \sum_{j=1}  c_{i,j} u_{i,j} +g_0(x)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \sum_{i=1}\sum_{j=1} c_{i,j}^l u_{i,j}+ g_l (x) \leq 0,\forall l \in L&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^L x_j + x_i x_j^L - {x_i}^L {x_j}^L, \forall  i,j \ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^U x_j + x_i x_j^U - {x_i}^U {x_j}^U, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^L x_j + x_i x_j^U - {x_i}^L {x_j}^U, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^U x_j + x_i x_j^L - {x_i}^U {x_j}^L, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^L \leq x \leq x^U,   \ \ u^L \leq u \leq u^U&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Similar steps are taken to derive the McCormick Envelopes for given functions with different formats e.g., e&amp;lt;sup&amp;gt;xy&amp;lt;/sup&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Good lower and upper bounds focus and minimize the feasible solution space; they reduce the number of iterations to find the optimal solution.  &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Piecewise McCormick Relaxation&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
As discussed by Hazaji&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;, global optimization solvers focus initially on optimizing the lower and upper bounds, and when necessary, focus on domain partitioning.  By dividing the domain of a given variable into partitions or smaller regions, the solver is able to tailor and further tighten the convex relaxations of each partition. This strategy is known as the Piecewise McCormick relaxation&amp;lt;sup&amp;gt;4&amp;lt;/sup&amp;gt;.   &lt;br /&gt;
&lt;br /&gt;
== Example: Numerical ==&lt;br /&gt;
For the given problem, &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;min \  Z = xy + 6x + y&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \ xy \leq 18&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;0 \leq x \leq 10&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;0 \leq y \leq 2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;Let\   w = xy &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^L = 0  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^U = 10&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;y^L = 0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;y^U = 2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Substituting these values into the original problem and the McCormick Envelopes, the problem is reformulated:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;min \ Z = w + 6x + y&lt;br /&gt;
&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \ w \leq 18&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{L}y+xy^{L}-x^{L}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 0*y + x * 0 - 0*0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{U}y+xy^{U}-x^{U}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 10*y + x*2 - 10*2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 10y + 2x - 20&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq x^{U}y+xy^{L}-x^{U}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq 10*y + x*0 - 10*0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq 10y &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq xy^{U}+x^{L}y-x^{L}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq x*2 + 0*y -0*2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq 2x&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using GAMS to solve the reformulated problem, the solution is z= -76.2, x=10, y=1.8.&lt;br /&gt;
&lt;br /&gt;
== Applications ==&lt;br /&gt;
Bilinear functions occur in numerous engineering and natural science applications where McCormick Envelopes can be utilized.  &lt;br /&gt;
&lt;br /&gt;
For example, an application is the modeling of dynamic biological processes based on experimental data&amp;lt;sup&amp;gt;8&amp;lt;/sup&amp;gt;.  The challenge for this model is establishing model parameter values that align or calibrate the model response with observed data.  These model parameter values can be estimated using optimization techniques, including McCormick Envelopes, to minimize the difference between observed and simulated data.  &lt;br /&gt;
&lt;br /&gt;
Another application is the optimization of financial objectives and risk management for energy conversion for a large scale operation such as a college campus or a municipality&amp;lt;sup&amp;gt;6&amp;lt;/sup&amp;gt;.  This operation involves flexibility of energy sources and several facets of uncertainty involved with pricing. This model uses McCormick Envelopes to optimize the bilinear nonconvex components.  &lt;br /&gt;
&lt;br /&gt;
A third application is the optimized efficiency and reliability of the operation of the electricity grid.  Optimal power flow (OPF) and unit commitment (UC) are two optimization problems that support the electricity market operations&amp;lt;sup&amp;gt;8&amp;lt;/sup&amp;gt;. McCormick Envelopes are used to strengthen the second-order cone (SOC) relaxation of the alternate current optimal power flow (ACOPF)&amp;lt;sup&amp;gt;9&amp;lt;/sup&amp;gt;.&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
Non-convex NLPs are challenging to solve and may require a significant amount of time, computing resources, and effort to determine if the solution is global or the problem has no feasible solution.  McCormick Envelopes provide a relaxation technique for bilinear non-convex nonlinear programming problems.  McCormick Envelopes provide a straightforward technique of replacing each bilinear term with a new variable and adding four constraints. Due to the recursive nature of this technique, it may be applied to a wide variety of engineering and scientific applications involving bilinear terms.   &lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
# G. P. McCormick, &amp;quot;Computability of Global Solutions To Factorable Nonconvex Solutions: Part I: Convex Underestimating Problems,&amp;quot; &#039;&#039;Mathematical Programming,&#039;&#039; vol. 10, pp. 147-175, 1976. &lt;br /&gt;
# J. K. Scott, M. D. Stuber and P. I. Barton, &amp;quot;Generalized McCormick Relaxations,&amp;quot; &#039;&#039;Journal of Global Optimization,&#039;&#039; vol. 51, pp. 569-606, 2011.&lt;br /&gt;
# H. Hijazi, &amp;quot;[https://www.google.com/url?sa=t&amp;amp;rct=j&amp;amp;q=&amp;amp;esrc=s&amp;amp;source=web&amp;amp;cd=&amp;amp;ved=2ahUKEwjSr7eu8K70AhVYmHIEHUJzCVsQFnoECAIQAQ&amp;amp;url=http%3A%2F%2Fwww.optimization-online.org%2FDB_FILE%2F2015%2F03%2F4841.pdf&amp;amp;usg=AOvVaw1xf9B1f-EPw0mG1LOqRfm9 Perspective Envelopes for Bilinear Functions&amp;quot;]&lt;br /&gt;
#M. Bergamini, P. Aguirre, and I. Grossman, &amp;quot;Logic-based outer approximation for globally optimal synthesis of process networks,&amp;quot; &#039;&#039;Computers and Chemical Engineering,&#039;&#039; vol. 29, pp. &#039;&#039;1&#039;&#039;914–1933, 2005.&lt;br /&gt;
#M. Chandraker and D. Kriegman, &amp;quot;Globally Optimal Bilinear Programming for Computer Vision Applications,&amp;quot; presented at the IEEE Computer Society Conference on &#039;&#039;Computer Vision and Pattern Recognition,&#039;&#039; 2008&#039;&#039;.&#039;&#039; &lt;br /&gt;
#J. Kantor and P. Mousaw, &amp;quot;A class of bilinear models for the optimization of energy conversion networks,&amp;quot; &#039;&#039;Chemical Engineering Science,&#039;&#039; vol. 67&#039;&#039;,&#039;&#039; pp. 131-138, 2012.&lt;br /&gt;
#A. Miro, C. Pozo, G. Guillen-Gosalbez, J. Egea and L. Jimenez, &amp;quot;Deterministic global optimization algorithm based on outer approximation for the parameter estimation of nonlinear dynamic biological systems,&amp;quot; &#039;&#039;BMC Bioinformatics,&#039;&#039; vol. 13, 2012.&lt;br /&gt;
#Jeremy Lin; Fernando H. Magnago, &amp;quot;Optimal Power Flow,&amp;quot; in Electricity Markets: Theories and Applications , IEEE, 2017, pp.147-171, doi: 10.1002/9781119179382.ch6.&lt;br /&gt;
#B. Michael, A. Castillo, J. Watson and C. Laird, &amp;quot;Strengthened SOCP Relaxations for ACOPF with McCormick Envelopes and Bounds Tightening,&amp;quot; &#039;&#039;Computer Aided Chemical Engineering,&#039;&#039; vol. 44&#039;&#039;,&#039;&#039; pp. 1555-1560, 2018.&lt;/div&gt;</summary>
		<author><name>Smu29</name></author>
	</entry>
	<entry>
		<id>https://optimization.cbe.cornell.edu/index.php?title=McCormick_envelopes&amp;diff=5016</id>
		<title>McCormick envelopes</title>
		<link rel="alternate" type="text/html" href="https://optimization.cbe.cornell.edu/index.php?title=McCormick_envelopes&amp;diff=5016"/>
		<updated>2021-12-09T11:39:23Z</updated>

		<summary type="html">&lt;p&gt;Smu29: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Author: Susan Urban (SYSEN 5800 Fall 2021) &lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
The McCormick Envelope, originally developed by Dr. Garth McCormick&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;, is a type of convex relaxation used for the optimization of bilinear &amp;lt;math&amp;gt;(e.g., x*y, e^xy + y, sin(x+y) - x^2)&lt;br /&gt;
&amp;lt;/math&amp;gt; non-linear programming (NLP) problems. Optimization of these non-convex functions f(x) is challenging since they may have multiple locally optimal solutions or no solution. It can take a significant amount of time, computing resources, and effort to determine if the solution is global or the problem has no feasible solution. Different techniques are used to address this challenge depending on the characteristics of the problem.  &lt;br /&gt;
== Theory, Methodology and Algorithmic Discussions ==&lt;br /&gt;
[[File:Image of updated estimators and envelopes.png|thumb|Figure 1: Relationships between the given function, concave over-estimators, convex under-estimators, a concave envelope, and a convex envelope. ]]&lt;br /&gt;
As McCormick&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt; noted, McCormick Envelopes are based on the key assumption that convex and concave envelopes can be constructed for the given function. The concave envelope, and respectively the convex envelope, is the concave over-estimator and convex under-estimator for the given function providing the tightest fit to the given function.  The envelope surrounds the given function, like an envelope encloses a letter, and limits the feasible solution space the most in comparison to all other concave over-estimators and convex under-estimators. Multiple concave over-estimators and multiple convex under-estimators may exist but there is only one concave envelope and one convex envelope for a given function and domain.  Figure 1 depicts the relationship between the given function f(x), multiple concave over-estimators, multiple convex under-estimators, a convex envelope, and a concave envelope.   &lt;br /&gt;
&lt;br /&gt;
Each bilinear term is replaced with a new variable and four sets of constraints are added. The non-linear programming is converted to a relaxed convex linear programming (LP) which can be more easily solved. &lt;br /&gt;
&lt;br /&gt;
The LP solution gives a lower (L) bound and any feasible solution to the problem gives an upper (U) bound.&lt;br /&gt;
&lt;br /&gt;
As noted by Scott et al&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;, McCormick envelopes are effective since they are recursive, can be applied to a variety of applications, and are typically stronger than those resulting from convexification or linearization procedures. &lt;br /&gt;
&lt;br /&gt;
The following is a derivation of the McCormick Envelopes for a given bilinear function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;Let \ w = xy&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^{L}\leq x\leq x^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;y^{L}\leq y\leq y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;x^{L}, x^{U}, y^{L}, y^{U} &amp;lt;/math&amp;gt;are   upper  and   lower  bound  values  for  &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;y&amp;lt;/math&amp;gt;, respectively.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left (x-x^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left (y-y^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
a and b are both positive resulting in a positive product&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a * b\geq 0&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a * b=\left ( x-x^{L} \right )\left ( y-y^{L} \right )=xy-x^{L}y-xy^{L}+x^{L}y^{L}\geq 0 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
substituting w=xy and reformulating the inequality produces&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{L}y+xy^{L}-x^{L}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Following the same sequence of steps, the remaining inequalities are produced:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x^{U}-x \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b = \left ( y^{U} -y\right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{U}y+xy^{U}-x^{U}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x^{U}-x\right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left ( y-y^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq x^{U}y+xy^{L}-x^{U}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x-x^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left ( y^{U}-y \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq xy^{U}+x^{L}y-x^{L}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The under-estimators of the function are represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{L}y+xy^{L}-x^{L}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{U}y+xy^{U}-x^{U}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The over-estimators of the function are represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq x^{U}y+xy^{L}-x^{U}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq xy^{U}+x^{L}y-x^{L}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following shows the relaxation of a non-convex problem using McCormick Envelopes:&lt;br /&gt;
&lt;br /&gt;
The original non-convex problem: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\min Z= \textstyle \sum_{i=1} \sum_{j=1}  c_{i,j}x_i x_j +g_0(x)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \sum_{i=1}\sum_{j=1} c_{i,j}^l x_i x_j + g_l (x) \leq 0,\forall l \in L&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^ L \leq x \leq x^U&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Replacing &amp;lt;math&amp;gt;u_{i,j} = x_i x_j&amp;lt;/math&amp;gt;, we obtain a relaxed, convex problem using McCormick Envelopes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\min Z= \textstyle \sum_{i=1} \sum_{j=1}  c_{i,j} u_{i,j} +g_0(x)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \sum_{i=1}\sum_{j=1} c_{i,j}^l u_{i,j}+ g_l (x) \leq 0,\forall l \in L&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^L x_j + x_i x_j^L - {x_i}^L {x_j}^L, \forall  i,j \ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^U x_j + x_i x_j^U - {x_i}^U {x_j}^U, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^L x_j + x_i x_j^U - {x_i}^L {x_j}^U, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^U x_j + x_i x_j^L - {x_i}^U {x_j}^L, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^L \leq x \leq x^U,   \ \ u^L \leq u \leq u^U&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Similar steps are taken to derive the McCormick Envelopes for given functions with different formats e.g., e&amp;lt;sup&amp;gt;xy&amp;lt;/sup&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Good lower and upper bounds focus and minimize the feasible solution space; they reduce the number of iterations to find the optimal solution.  &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Piecewise McCormick Relaxation&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
As discussed by Hazaji&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;, global optimization solvers focus initially on optimizing the lower and upper bounds, and when necessary, focus on domain partitioning.  By dividing the domain of a given variable into partitions or smaller regions, the solver is able to tailor and further tighten the convex relaxations of each partition. This strategy is known as the Piecewise McCormick relaxation&amp;lt;sup&amp;gt;4&amp;lt;/sup&amp;gt;.   &lt;br /&gt;
&lt;br /&gt;
== Example: Numerical ==&lt;br /&gt;
For the given problem, &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;min \  Z = xy + 6x + y&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \ xy \leq 18&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;0 \leq x \leq 10&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;0 \leq y \leq 2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;Let\   w = xy &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^L = 0  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^U = 10&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;y^L = 0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;y^U = 2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Substituting these values into the original problem and the McCormick Envelopes, the problem is reformulated:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;min \ Z = w + 6x + y&lt;br /&gt;
&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \ w \leq 18&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{L}y+xy^{L}-x^{L}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 0*y + x * 0 - 0*0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{U}y+xy^{U}-x^{U}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 10*y + x*2 - 10*2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 10y + 2x - 20&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq x^{U}y+xy^{L}-x^{U}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq 10*y + x*0 - 10*0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq 10y &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq xy^{U}+x^{L}y-x^{L}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq x*2 + 0*y -0*2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq 2x&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using GAMS to solve the reformulated problem, the solution is z= -76.2, x=10, y=1.8.&lt;br /&gt;
&lt;br /&gt;
== Applications ==&lt;br /&gt;
Bilinear functions occur in numerous engineering and natural science applications where McCormick Envelopes can be utilized, including the following : &lt;br /&gt;
&lt;br /&gt;
Computer vision &amp;lt;sup&amp;gt;5&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Energy conversion networks &amp;lt;sup&amp;gt;6&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Cellular networks&amp;lt;sup&amp;gt;7&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Dynamic biological systems&amp;lt;sup&amp;gt;8&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternate current optimal power flow (ACOPF)&amp;lt;sup&amp;gt;9&amp;lt;/sup&amp;gt;&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
Non-convex NLPs are challenging to solve and may require a significant amount of time, computing resources, and effort to determine if the solution is global or the problem has no feasible solution.  McCormick Envelopes provide a relaxation technique for bilinear non-convex nonlinear programming problems.  McCormick Envelopes provide a straightforward technique of replacing each bilinear term with a new variable and adding four constraints. Due to the recursive nature of this technique, it may be applied to a wide variety of engineering and scientific applications involving bilinear terms.   &lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
# G. P. McCormick, &amp;quot;Computability of Global Solutions To Factorable Nonconvex Solutions: Part I: Convex Underestimating Problems,&amp;quot; &#039;&#039;Mathematical Programming,&#039;&#039; vol. 10, pp. 147-175, 1976. &lt;br /&gt;
# J. K. Scott, M. D. Stuber and P. I. Barton, &amp;quot;Generalized McCormick Relaxations,&amp;quot; &#039;&#039;Journal of Global Optimization,&#039;&#039; vol. 51, pp. 569-606, 2011.&lt;br /&gt;
# H. Hijazi, &amp;quot;[https://www.google.com/url?sa=t&amp;amp;rct=j&amp;amp;q=&amp;amp;esrc=s&amp;amp;source=web&amp;amp;cd=&amp;amp;ved=2ahUKEwjSr7eu8K70AhVYmHIEHUJzCVsQFnoECAIQAQ&amp;amp;url=http%3A%2F%2Fwww.optimization-online.org%2FDB_FILE%2F2015%2F03%2F4841.pdf&amp;amp;usg=AOvVaw1xf9B1f-EPw0mG1LOqRfm9 Perspective Envelopes for Bilinear Functions&amp;quot;]&lt;br /&gt;
#M. Bergamini, P. Aguirre, and I. Grossman, &amp;quot;Logic-based outer approximation for globally optimal synthesis of process networks,&amp;quot; &#039;&#039;Computers and Chemical Engineering,&#039;&#039; vol. 29, pp. &#039;&#039;1&#039;&#039;914–1933, 2005.&lt;br /&gt;
#M. Chandraker and D. Kriegman, &amp;quot;Globally Optimal Bilinear Programming for Computer Vision Applications,&amp;quot; presented at the IEEE Computer Society Conference on &#039;&#039;Computer Vision and Pattern Recognition,&#039;&#039; 2008&#039;&#039;.&#039;&#039; &lt;br /&gt;
#J. Kantor and P. Mousaw, &amp;quot;A class of bilinear models for the optimization of energy conversion networks,&amp;quot; &#039;&#039;Chemical Engineering Science,&#039;&#039; vol. 67&#039;&#039;,&#039;&#039; pp. 131-138, 2012.&lt;br /&gt;
#F. Ahmed, M. Naeem, W. Ejaz, M. Iqbal and A. Anpalagan, &amp;quot;Renewable Energy Assisted Sustainable and Environment Friendly Energy Cooperation in Cellular Networks,&amp;quot; &#039;&#039;Wireless Personal Communications&#039;&#039;, vol. 108&#039;&#039;&#039;,&#039;&#039;&#039; pp. 2585–2607, 2019.&lt;br /&gt;
#A. Miro, C. Pozo, G. Guillen-Gosalbez, J. Egea and L. Jimenez, &amp;quot;Deterministic global optimization algorithm based on outer approximation for the parameter estimation of nonlinear dynamic biological systems,&amp;quot; &#039;&#039;BMC Bioinformatics,&#039;&#039; vol. 13, 2012.&lt;br /&gt;
#B. Michael, A. Castillo, J. Watson and C. Laird, &amp;quot;Strengthened SOCP Relaxations for ACOPF with McCormick Envelopes and Bounds Tightening,&amp;quot; &#039;&#039;Computer Aided Chemical Engineering,&#039;&#039; vol. 44&#039;&#039;,&#039;&#039; pp. 1555-1560, 2018.&lt;/div&gt;</summary>
		<author><name>Smu29</name></author>
	</entry>
	<entry>
		<id>https://optimization.cbe.cornell.edu/index.php?title=McCormick_envelopes&amp;diff=5014</id>
		<title>McCormick envelopes</title>
		<link rel="alternate" type="text/html" href="https://optimization.cbe.cornell.edu/index.php?title=McCormick_envelopes&amp;diff=5014"/>
		<updated>2021-12-09T11:22:09Z</updated>

		<summary type="html">&lt;p&gt;Smu29: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Author: Susan Urban (SYSEN 5800 Fall 2021) &lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
The McCormick Envelope, originally developed by Dr. Garth McCormick&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;, is a type of convex relaxation used for the optimization of bilinear (e.g., x*y, e&amp;lt;sup&amp;gt;xy&amp;lt;/sup&amp;gt; + y, sin (x+y) - x&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;) &amp;lt;math&amp;gt;(e.g., x*y, e^xy + y, sin(x+y) - x^2)&lt;br /&gt;
&amp;lt;/math&amp;gt; non-linear programming (NLP) problems.  &lt;br /&gt;
&lt;br /&gt;
Optimization of a non-convex function f(x) is challenging since it may have multiple locally optimal solutions or no solution and it can take a significant amount of time, computing resources, and effort to determine if the solution is global or the problem has no feasible solution. Different techniques are used to address this challenge depending on the characteristics of the problem.  &lt;br /&gt;
== Theory, Methodology and Algorithmic Discussions ==&lt;br /&gt;
[[File:Image of updated estimators and envelopes.png|thumb|Figure 1: Relationships between the given function, concave over-estimators, convex under-estimators, a concave envelope, and a convex envelope. ]]&lt;br /&gt;
As McCormick&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt; noted, McCormick Envelopes are based on the key assumption that convex and concave envelopes can be constructed for the given function.   &lt;br /&gt;
&lt;br /&gt;
One technique used for a given non-convex function is the identification of a concave envelope and a convex envelope.  The concave envelope, and respectively the convex envelope, is the concave over-estimator and convex under-estimator for the given function providing the tightest fit to the given function.  The envelope surrounds the given function, like an envelope encloses a letter, and limits the feasible solution space the most in comparison to all other concave over-estimators and convex under-estimators. Multiple concave over-estimators and multiple convex under-estimators may exist but there is only one concave envelope and one convex envelope for a given function and domain.  Figure 1 depicts the relationship between the given function f(x), multiple concave over-estimators, multiple convex under-estimators, a convex envelope, and a concave envelope.  &lt;br /&gt;
&lt;br /&gt;
Each bilinear term is replaced with a new variable and four sets of constraints are added. The non-linear programming is converted to a relaxed convex linear programming (LP) which can be more easily solved. &lt;br /&gt;
&lt;br /&gt;
The LP solution gives a lower (L) bound and any feasible solution to the problem gives an upper (U) bound.&lt;br /&gt;
&lt;br /&gt;
As noted by Scott et al&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;, McCormick envelopes are effective since they are recursive, can be applied to a variety of applications, and are typically stronger than those resulting from convexification or linearization procedures. &lt;br /&gt;
&lt;br /&gt;
The following is a derivation of the McCormick Envelopes for a given bilinear function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;Let \ w = xy&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^{L}\leq x\leq x^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;y^{L}\leq y\leq y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;x^{L}, x^{U}, y^{L}, y^{U} &amp;lt;/math&amp;gt;are   upper  and   lower  bound  values  for  &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;y&amp;lt;/math&amp;gt;, respectively.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left (x-x^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left (y-y^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
a and b are both positive resulting in a positive product&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a * b\geq 0&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a * b=\left ( x-x^{L} \right )\left ( y-y^{L} \right )=xy-x^{L}y-xy^{L}+x^{L}y^{L}\geq 0 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
substituting w=xy and reformulating the inequality produces&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{L}y+xy^{L}-x^{L}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Following the same sequence of steps, the remaining inequalities are produced:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x^{U}-x \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b = \left ( y^{U} -y\right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{U}y+xy^{U}-x^{U}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x^{U}-x\right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left ( y-y^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq x^{U}y+xy^{L}-x^{U}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x-x^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left ( y^{U}-y \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq xy^{U}+x^{L}y-x^{L}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The under-estimators of the function are represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{L}y+xy^{L}-x^{L}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{U}y+xy^{U}-x^{U}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The over-estimators of the function are represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq x^{U}y+xy^{L}-x^{U}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq xy^{U}+x^{L}y-x^{L}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following shows the relaxation of a non-convex problem using McCormick Envelopes:&lt;br /&gt;
&lt;br /&gt;
The original non-convex problem: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\min Z= \textstyle \sum_{i=1} \sum_{j=1}  c_{i,j}x_i x_j +g_0(x)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \sum_{i=1}\sum_{j=1} c_{i,j}^l x_i x_j + g_l (x) \leq 0,\forall l \in L&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^ L \leq x \leq x^U&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Replacing &amp;lt;math&amp;gt;u_{i,j} = x_i x_j&amp;lt;/math&amp;gt;, we obtain a relaxed, convex problem using McCormick Envelopes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\min Z= \textstyle \sum_{i=1} \sum_{j=1}  c_{i,j} u_{i,j} +g_0(x)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \sum_{i=1}\sum_{j=1} c_{i,j}^l u_{i,j}+ g_l (x) \leq 0,\forall l \in L&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^L x_j + x_i x_j^L - {x_i}^L {x_j}^L, \forall  i,j \ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^U x_j + x_i x_j^U - {x_i}^U {x_j}^U, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^L x_j + x_i x_j^U - {x_i}^L {x_j}^U, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^U x_j + x_i x_j^L - {x_i}^U {x_j}^L, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^L \leq x \leq x^U,   \ \ u^L \leq u \leq u^U&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Similar steps are taken to derive the McCormick Envelopes for given functions with different formats e.g., e&amp;lt;sup&amp;gt;xy&amp;lt;/sup&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Good lower and upper bounds focus and minimize the feasible solution space; they reduce the number of iterations to find the optimal solution.  &lt;br /&gt;
&lt;br /&gt;
Piecewise McCormick Relaxation&lt;br /&gt;
&lt;br /&gt;
As discussed by Hazaji&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;, global optimization solvers focus initially on optimizing the lower and upper bounds, and when necessary, focus on domain partitioning.  By dividing the domain of a given variable into partitions or smaller regions, the solver is able to tailor and further tighten the convex relaxations of each partition. This strategy is known as the Piecewise McCormick relaxation&amp;lt;sup&amp;gt;4&amp;lt;/sup&amp;gt;.   &lt;br /&gt;
&lt;br /&gt;
== Example: Numerical ==&lt;br /&gt;
For the given problem, &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;min \  Z = xy + 6x + y&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \ xy \leq 18&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;0 \leq x \leq 10&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;0 \leq y \leq 2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;Let\   w = xy &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^L = 0  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^U = 10&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;y^L = 0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;y^U = 2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Substituting these values into the original problem and the McCormick Envelopes, the problem is reformulated:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;min \ Z = w + 6x + y&lt;br /&gt;
&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \ w \leq 18&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{L}y+xy^{L}-x^{L}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 0*y + x * 0 - 0*0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{U}y+xy^{U}-x^{U}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 10*y + x*2 - 10*2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 10y + 2x - 20&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq x^{U}y+xy^{L}-x^{U}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq 10*y + x*0 - 10*0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq 10*y + x*0 - 10*0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq xy^{U}+x^{L}y-x^{L}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq x*2 + 0*y -0*2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq 2x&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using GAMS to solve the reformulated problem, the solution is z= -76.2, x=10, y=1.8.&lt;br /&gt;
&lt;br /&gt;
== Applications ==&lt;br /&gt;
Bilinear functions occur in numerous engineering and natural science applications where McCormick Envelopes can be utilized, including the following : &lt;br /&gt;
&lt;br /&gt;
Computer vision &amp;lt;sup&amp;gt;5&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Energy conversion networks &amp;lt;sup&amp;gt;6&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Cellular networks&amp;lt;sup&amp;gt;7&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Dynamic biological systems&amp;lt;sup&amp;gt;8&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternate current optimal power flow (ACOPF)&amp;lt;sup&amp;gt;9&amp;lt;/sup&amp;gt;&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
Non-convex NLPs are challenging to solve and may require a significant amount of time, computing resources, and effort to determine if the solution is global or the problem has no feasible solution.  McCormick Envelopes provide a relaxation technique for bilinear non-convex nonlinear programming problems.  McCormick Envelopes provide a straightforward technique of replacing each bilinear term with a new variable and adding four constraints. Due to the recursive nature of this technique, it may be applied to a wide variety of engineering and scientific applications involving bilinear terms.   &lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
# G. P. McCormick, &amp;quot;Computability of Global Solutions To Factorable Nonconvex Solutions: Part I: Convex Underestimating Problems,&amp;quot; &#039;&#039;Mathematical Programming,&#039;&#039; vol. 10, pp. 147-175, 1976. &lt;br /&gt;
# J. K. Scott, M. D. Stuber and P. I. Barton, &amp;quot;Generalized McCormick Relaxations,&amp;quot; &#039;&#039;Journal of Global Optimization,&#039;&#039; vol. 51, pp. 569-606, 2011.&lt;br /&gt;
# H. Hijazi, &amp;quot;[https://www.google.com/url?sa=t&amp;amp;rct=j&amp;amp;q=&amp;amp;esrc=s&amp;amp;source=web&amp;amp;cd=&amp;amp;ved=2ahUKEwjSr7eu8K70AhVYmHIEHUJzCVsQFnoECAIQAQ&amp;amp;url=http%3A%2F%2Fwww.optimization-online.org%2FDB_FILE%2F2015%2F03%2F4841.pdf&amp;amp;usg=AOvVaw1xf9B1f-EPw0mG1LOqRfm9 Perspective Envelopes for Bilinear Functions&amp;quot;]&lt;br /&gt;
#M. Bergamini, P. Aguirre, and I. Grossman, &amp;quot;Logic-based outer approximation for globally optimal synthesis of process networks,&amp;quot; &#039;&#039;Computers and Chemical Engineering,&#039;&#039; vol. 29, pp. &#039;&#039;1&#039;&#039;914–1933, 2005.&lt;br /&gt;
#M. Chandraker and D. Kriegman, &amp;quot;Globally Optimal Bilinear Programming for Computer Vision Applications,&amp;quot; presented at the IEEE Computer Society Conference on &#039;&#039;Computer Vision and Pattern Recognition,&#039;&#039; 2008&#039;&#039;.&#039;&#039; &lt;br /&gt;
#J. Kantor and P. Mousaw, &amp;quot;A class of bilinear models for the optimization of energy conversion networks,&amp;quot; &#039;&#039;Chemical Engineering Science,&#039;&#039; vol. 67&#039;&#039;,&#039;&#039; pp. 131-138, 2012.&lt;br /&gt;
#F. Ahmed, M. Naeem, W. Ejaz, M. Iqbal and A. Anpalagan, &amp;quot;Renewable Energy Assisted Sustainable and Environment Friendly Energy Cooperation in Cellular Networks,&amp;quot; &#039;&#039;Wireless Personal Communications&#039;&#039;, vol. 108&#039;&#039;&#039;,&#039;&#039;&#039; pp. 2585–2607, 2019.&lt;br /&gt;
#A. Miro, C. Pozo, G. Guillen-Gosalbez, J. Egea and L. Jimenez, &amp;quot;Deterministic global optimization algorithm based on outer approximation for the parameter estimation of nonlinear dynamic biological systems,&amp;quot; &#039;&#039;BMC Bioinformatics,&#039;&#039; vol. 13, 2012.&lt;br /&gt;
#B. Michael, A. Castillo, J. Watson and C. Laird, &amp;quot;Strengthened SOCP Relaxations for ACOPF with McCormick Envelopes and Bounds Tightening,&amp;quot; &#039;&#039;Computer Aided Chemical Engineering,&#039;&#039; vol. 44&#039;&#039;,&#039;&#039; pp. 1555-1560, 2018.&lt;/div&gt;</summary>
		<author><name>Smu29</name></author>
	</entry>
	<entry>
		<id>https://optimization.cbe.cornell.edu/index.php?title=McCormick_envelopes&amp;diff=4967</id>
		<title>McCormick envelopes</title>
		<link rel="alternate" type="text/html" href="https://optimization.cbe.cornell.edu/index.php?title=McCormick_envelopes&amp;diff=4967"/>
		<updated>2021-12-08T20:41:24Z</updated>

		<summary type="html">&lt;p&gt;Smu29: added math formula&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Author: Susan Urban (SYSEN 5800 Fall 2021) &lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
[[File:Image of updated estimators and envelopes.png|thumb|Figure 1: Relationships between the given function, concave over-estimators, convex under-estimators, a concave envelope and a convex envelope.  ]]&lt;br /&gt;
Optimization of a non-convex function f(x) is challenging since it may have multiple locally optimal solutions or no solution and it can take a significant amount of time, computing resources, and effort to determine if the solution is global or the problem has no feasible solution. Different techniques are used to address this challenge depending on the characteristics of the problem. One technique used for a given non-convex function is the identification of a concave envelope and a convex envelope.  The concave envelope, and respectively the convex envelope, is the concave over-estimator and convex under-estimator for the given function providing the tightest fit to the given function.  The envelope surrounds the given function, like an envelope encloses a letter, and limits the feasible solution space the most in comparison to all other concave over-estimators and convex under-estimators. Multiple concave over-estimators and multiple convex under-estimators may exist but there is only one concave envelope and one convex envelope for a given function and domain.  Figure 1 depicts the relationship between the given function f(x), multiple concave over-estimators, multiple convex under-estimators, a convex envelope, and a concave envelope. &lt;br /&gt;
== McCormick Envelopes: Theory, Methodology and Algorithmic Discussions ==&lt;br /&gt;
The McCormick Envelope, originally developed by Dr. Garth McCormick&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;, is a type of convex relaxation used for the optimization of bilinear (e.g., x*y, e&amp;lt;sup&amp;gt;xy&amp;lt;/sup&amp;gt; + y, sin (x+y) - x&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;) &amp;lt;math&amp;gt;(e.g., x*y, e^xy + y, sin(x+y) - x^2)&lt;br /&gt;
&amp;lt;/math&amp;gt; non-linear programming (NLP) problems.  As McCormick&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt; noted, McCormick Envelopes are based on the key assumption that convex and concave envelopes can be constructed for the given function.  &lt;br /&gt;
&lt;br /&gt;
Each bilinear term is replaced with a new variable and four sets of constraints are added. The non-linear programming is converted to a relaxed convex linear programming (LP) which can be more easily solved. &lt;br /&gt;
&lt;br /&gt;
The LP solution gives a lower (L) bound and any feasible solution to the problem gives an upper (U) bound.&lt;br /&gt;
&lt;br /&gt;
As noted by Scott et al&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;, McCormick envelopes are effective since they are recursive, can be applied to a variety of applications, and are typically stronger than those resulting from convexification or linearization procedures. &lt;br /&gt;
&lt;br /&gt;
The following is a derivation of the McCormick Envelopes for a given bilinear function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;Let \ w = xy&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^{L}\leq x\leq x^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;y^{L}\leq y\leq y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;x^{L}, x^{U}, y^{L}, y^{U} &amp;lt;/math&amp;gt;are   upper  and   lower  bound  values  for  &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;y&amp;lt;/math&amp;gt;, respectively.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left (x-x^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left (y-y^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
a and b are both positive resulting in a positive product&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a * b\geq 0&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a * b=\left ( x-x^{L} \right )\left ( y-y^{L} \right )=xy-x^{L}y-xy^{L}+x^{L}y^{L}\geq 0 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
substituting w=xy and reformulating the inequality produces&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{L}y+xy^{L}-x^{L}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Following the same sequence of steps, the remaining inequalities are produced:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x^{U}-x \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b = \left ( y^{U} -y\right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{U}y+xy^{U}-x^{U}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x^{U}-x\right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left ( y-y^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq x^{U}y+xy^{L}-x^{U}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x-x^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left ( y^{U}-y \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq xy^{U}+x^{L}y-x^{L}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The under-estimators of the function are represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{L}y+xy^{L}-x^{L}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{U}y+xy^{U}-x^{U}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The over-estimators of the function are represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq x^{U}y+xy^{L}-x^{U}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq xy^{U}+x^{L}y-x^{L}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following shows the relaxation of a non-convex problem using McCormick Envelopes:&lt;br /&gt;
&lt;br /&gt;
The original non-convex problem: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\min Z= \textstyle \sum_{i=1} \sum_{j=1}  c_{i,j}x_i x_j +g_0(x)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \sum_{i=1}\sum_{j=1} c_{i,j}^l x_i x_j + g_l (x) \leq 0,\forall l \in L&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^ L \leq x \leq x^U&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Replacing &amp;lt;math&amp;gt;u_{i,j} = x_i x_j&amp;lt;/math&amp;gt;, we obtain a relaxed, convex problem using McCormick Envelopes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\min Z= \textstyle \sum_{i=1} \sum_{j=1}  c_{i,j} u_{i,j} +g_0(x)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \sum_{i=1}\sum_{j=1} c_{i,j}^l u_{i,j}+ g_l (x) \leq 0,\forall l \in L&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^L x_j + x_i x_j^L - {x_i}^L {x_j}^L, \forall  i,j \ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^U x_j + x_i x_j^U - {x_i}^U {x_j}^U, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^L x_j + x_i x_j^U - {x_i}^L {x_j}^U, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^U x_j + x_i x_j^L - {x_i}^U {x_j}^L, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^L \leq x \leq x^U,   \ \ u^L \leq u \leq u^U&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Similar steps are taken to derive the McCormick Envelopes for given functions with different formats e.g., e&amp;lt;sup&amp;gt;xy&amp;lt;/sup&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Good lower and upper bounds focus and minimize the feasible solution space; they reduce the number of iterations to find the optimal solution.  &lt;br /&gt;
&lt;br /&gt;
Piecewise McCormick Relaxation&lt;br /&gt;
&lt;br /&gt;
As discussed by Hazaji&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;, global optimization solvers focus initially on optimizing the lower and upper bounds, and when necessary, focus on domain partitioning.  By dividing the domain of a given variable into partitions or smaller regions, the solver is able to tailor and further tighten the convex relaxations of each partition. This strategy is known as the Piecewise McCormick relaxation&amp;lt;sup&amp;gt;4&amp;lt;/sup&amp;gt;.   &lt;br /&gt;
&lt;br /&gt;
== Example: Numerical ==&lt;br /&gt;
For the given problem, &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;min \  Z = xy + 6x + y&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \ xy \leq 18&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;0 \leq x \leq 10&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;0 \leq y \leq 2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;Let\   w = xy &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^L = 0  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^U = 10&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;y^L = 0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;y^U = 2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Substituting these values into the original problem and the McCormick Envelopes, the problem is reformulated:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;min \ Z = w + 6x + y&lt;br /&gt;
&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \ w \leq 18&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{L}y+xy^{L}-x^{L}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 0*y + x * 0 - 0*0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{U}y+xy^{U}-x^{U}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 10*y + x*2 - 10*2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 10y + 2x - 20&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq x^{U}y+xy^{L}-x^{U}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq 10*y + x*0 - 10*0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq 10*y + x*0 - 10*0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq xy^{U}+x^{L}y-x^{L}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq x*2 + 0*y -0*2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq 2x&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using GAMS to solve the reformulated problem, the solution is z= -76.2, x=10, y=1.8.&lt;br /&gt;
&lt;br /&gt;
== Applications ==&lt;br /&gt;
Bilinear functions occur in numerous engineering and natural science applications where McCormick Envelopes can be utilized, including the following : &lt;br /&gt;
&lt;br /&gt;
Computer vision &amp;lt;sup&amp;gt;5&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Energy conversion networks &amp;lt;sup&amp;gt;6&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Cellular networks&amp;lt;sup&amp;gt;7&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Dynamic biological systems&amp;lt;sup&amp;gt;8&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternate current optimal power flow (ACOPF)&amp;lt;sup&amp;gt;9&amp;lt;/sup&amp;gt;&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
Non-convex NLPs are challenging to solve and may require a significant amount of time, computing resources, and effort to determine if the solution is global or the problem has no feasible solution.  McCormick Envelopes provide a relaxation technique for bilinear non-convex nonlinear programming problems.  McCormick Envelopes provide a straightforward technique of replacing each bilinear term with a new variable and adding four constraints. Due to the recursive nature of this technique, it may be applied to a wide variety of engineering and scientific applications involving bilinear terms.   &lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
# G. P. McCormick, &amp;quot;Computability of Global Solutions To Factorable Nonconvex Solutions: Part I: Convex Underestimating Problems,&amp;quot; &#039;&#039;Mathematical Programming,&#039;&#039; vol. 10, pp. 147-175, 1976. &lt;br /&gt;
# J. K. Scott, M. D. Stuber and P. I. Barton, &amp;quot;Generalized McCormick Relaxations,&amp;quot; &#039;&#039;Journal of Global Optimization,&#039;&#039; vol. 51, pp. 569-606, 2011.&lt;br /&gt;
# H. Hijazi, &amp;quot;[https://www.google.com/url?sa=t&amp;amp;rct=j&amp;amp;q=&amp;amp;esrc=s&amp;amp;source=web&amp;amp;cd=&amp;amp;ved=2ahUKEwjSr7eu8K70AhVYmHIEHUJzCVsQFnoECAIQAQ&amp;amp;url=http%3A%2F%2Fwww.optimization-online.org%2FDB_FILE%2F2015%2F03%2F4841.pdf&amp;amp;usg=AOvVaw1xf9B1f-EPw0mG1LOqRfm9 Perspective Envelopes for Bilinear Functions&amp;quot;]&lt;br /&gt;
#M. Bergamini, P. Aguirre, and I. Grossman, &amp;quot;Logic-based outer approximation for globally optimal synthesis of process networks,&amp;quot; &#039;&#039;Computers and Chemical Engineering,&#039;&#039; vol. 29, pp. &#039;&#039;1&#039;&#039;914–1933, 2005.&lt;br /&gt;
#M. Chandraker and D. Kriegman, &amp;quot;Globally Optimal Bilinear Programming for Computer Vision Applications,&amp;quot; presented at the IEEE Computer Society Conference on &#039;&#039;Computer Vision and Pattern Recognition,&#039;&#039; 2008&#039;&#039;.&#039;&#039; &lt;br /&gt;
#J. Kantor and P. Mousaw, &amp;quot;A class of bilinear models for the optimization of energy conversion networks,&amp;quot; &#039;&#039;Chemical Engineering Science,&#039;&#039; vol. 67&#039;&#039;,&#039;&#039; pp. 131-138, 2012.&lt;br /&gt;
#F. Ahmed, M. Naeem, W. Ejaz, M. Iqbal and A. Anpalagan, &amp;quot;Renewable Energy Assisted Sustainable and Environment Friendly Energy Cooperation in Cellular Networks,&amp;quot; &#039;&#039;Wireless Personal Communications&#039;&#039;, vol. 108&#039;&#039;&#039;,&#039;&#039;&#039; pp. 2585–2607, 2019.&lt;br /&gt;
#A. Miro, C. Pozo, G. Guillen-Gosalbez, J. Egea and L. Jimenez, &amp;quot;Deterministic global optimization algorithm based on outer approximation for the parameter estimation of nonlinear dynamic biological systems,&amp;quot; &#039;&#039;BMC Bioinformatics,&#039;&#039; vol. 13, 2012.&lt;br /&gt;
#B. Michael, A. Castillo, J. Watson and C. Laird, &amp;quot;Strengthened SOCP Relaxations for ACOPF with McCormick Envelopes and Bounds Tightening,&amp;quot; &#039;&#039;Computer Aided Chemical Engineering,&#039;&#039; vol. 44&#039;&#039;,&#039;&#039; pp. 1555-1560, 2018.&lt;/div&gt;</summary>
		<author><name>Smu29</name></author>
	</entry>
	<entry>
		<id>https://optimization.cbe.cornell.edu/index.php?title=McCormick_envelopes&amp;diff=4966</id>
		<title>McCormick envelopes</title>
		<link rel="alternate" type="text/html" href="https://optimization.cbe.cornell.edu/index.php?title=McCormick_envelopes&amp;diff=4966"/>
		<updated>2021-12-08T20:37:26Z</updated>

		<summary type="html">&lt;p&gt;Smu29: added math formula&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Author: Susan Urban (SYSEN 5800 Fall 2021) &lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
[[File:Image of updated estimators and envelopes.png|thumb|Figure 1: Relationships between the given function, concave over-estimators, convex under-estimators, a concave envelope and a convex envelope.  ]]&lt;br /&gt;
Optimization of a non-convex function f(x) is challenging since it may have multiple locally optimal solutions or no solution and it can take a significant amount of time, computing resources, and effort to determine if the solution is global or the problem has no feasible solution. Different techniques are used to address this challenge depending on the characteristics of the problem. One technique used for a given non-convex function is the identification of a concave envelope and a convex envelope.  The concave envelope, and respectively the convex envelope, is the concave over-estimator and convex under-estimator for the given function providing the tightest fit to the given function.  The envelope surrounds the given function, like an envelope encloses a letter, and limits the feasible solution space the most in comparison to all other concave over-estimators and convex under-estimators. Multiple concave over-estimators and multiple convex under-estimators may exist but there is only one concave envelope and one convex envelope for a given function and domain.  Figure 1 depicts the relationship between the given function f(x), multiple concave over-estimators, multiple convex under-estimators, a convex envelope, and a concave envelope. &lt;br /&gt;
== McCormick Envelopes: Theory, Methodology and Algorithmic Discussions ==&lt;br /&gt;
The McCormick Envelope, originally developed by Dr. Garth McCormick&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;, is a type of convex relaxation used for the optimization of bilinear (e.g., x*y, e&amp;lt;sup&amp;gt;xy&amp;lt;/sup&amp;gt; + y, sin (x+y) - x&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;) &amp;lt;math&amp;gt;(e.g., x*y, e^xy + y, sin(x+y) - x^2)&lt;br /&gt;
&amp;lt;/math&amp;gt; non-linear programming (NLP) problems.  As McCormick&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt; noted, McCormick Envelopes are based on the key assumption that convex and concave envelopes can be constructed for the given function.  &lt;br /&gt;
&lt;br /&gt;
Each bilinear term is replaced with a new variable and four sets of constraints are added. The non-linear programming is converted to a relaxed convex linear programming (LP) which can be more easily solved. &lt;br /&gt;
&lt;br /&gt;
The LP solution gives a lower (L) bound and any feasible solution to the problem gives an upper (U) bound.&lt;br /&gt;
&lt;br /&gt;
As noted by Scott et al&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;, McCormick envelopes are effective since they are recursive, can be applied to a variety of applications, and are typically stronger than those resulting from convexification or linearization procedures. &lt;br /&gt;
&lt;br /&gt;
The following is a derivation of the McCormick Envelopes for a given bilinear function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;Let \ w = xy&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^{L}\leq x\leq x^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;y^{L}\leq y\leq y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;x^{L}, x^{U}, y^{L}, y^{U} &amp;lt;/math&amp;gt;are   upper  and   lower  bound  values  for  &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;y&amp;lt;/math&amp;gt;, respectively.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left (x-x^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left (y-y^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
a and b are both positive resulting in a positive product&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a * b\geq 0&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a * b=\left ( x-x^{L} \right )\left ( y-y^{L} \right )=xy-x^{L}y-xy^{L}+x^{L}y^{L}\geq 0 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
substituting w=xy and reformulating the inequality produces&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{L}y+xy^{L}-x^{L}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Following the same sequence of steps, the remaining inequalities are produced:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x^{U}-x \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b = \left ( y^{U} -y\right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{U}y+xy^{U}-x^{U}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x^{U}-x\right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left ( y-y^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq x^{U}y+xy^{L}-x^{U}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x-x^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left ( y^{U}-y \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq xy^{U}+x^{L}y-x^{L}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The under-estimators of the function are represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{L}y+xy^{L}-x^{L}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{U}y+xy^{U}-x^{U}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The over-estimators of the function are represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq x^{U}y+xy^{L}-x^{U}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq xy^{U}+x^{L}y-x^{L}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following shows the relaxation of a non-convex problem using McCormick Envelopes:&lt;br /&gt;
&lt;br /&gt;
The original non-convex problem: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\min Z= \textstyle \sum_{i=1} \sum_{j=1}  c_{i,j}x_i x_j +g_0(x)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \sum_{i=1}\sum_{j=1} c_{i,j}^l x_i x_j + g_l (x) \leq 0,\forall l \in L&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^ L \leq x \leq x^U&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Replacing &amp;lt;math&amp;gt;u_{i,j} = x_i x_j&amp;lt;/math&amp;gt;, we obtain a relaxed, convex problem using McCormick Envelopes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\min Z= \textstyle \sum_{i=1} \sum_{j=1}  c_{i,j} u_{i,j} +g_0(x)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \sum_{i=1}\sum_{j=1} c_{i,j}^l u_{i,j}+ g_l (x) \leq 0,\forall l \in L&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^L x_j + x_i x_j^L - {x_i}^L {x_j}^L, \forall  i,j \ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^U x_j + x_i x_j^U - {x_i}^U {x_j}^U, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^L x_j + x_i x_j^U - {x_i}^L {x_j}^U, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^U x_j + x_i x_j^L - {x_i}^U {x_j}^L, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^L \leq x \leq x^U,   \ \ u^L \leq u \leq u^U&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Similar steps are taken to derive the McCormick Envelopes for given functions with different formats e.g., e&amp;lt;sup&amp;gt;xy&amp;lt;/sup&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Good lower and upper bounds focus and minimize the feasible solution space; they reduce the number of iterations to find the optimal solution.  &lt;br /&gt;
&lt;br /&gt;
Piecewise McCormick Relaxation&lt;br /&gt;
&lt;br /&gt;
As discussed by Hazaji&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;, global optimization solvers focus initially on optimizing the lower and upper bounds, and when necessary, focus on domain partitioning.  By dividing the domain of a given variable into partitions or smaller regions, the solver is able to tailor and further tighten the convex relaxations of each partition. This strategy is known as the Piecewise McCormick relaxation&amp;lt;sup&amp;gt;4&amp;lt;/sup&amp;gt;.   &lt;br /&gt;
&lt;br /&gt;
== Example: Numerical ==&lt;br /&gt;
For the given problem, &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;min \  Z = xy + 6x + y&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \ xy \leq 18&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;0 \leq x \leq 10&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;0 \leq y \leq 2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;Let\   w = xy &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^L = 0  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^U = 10&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;y^L = 0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;y^U = 2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Substituting these values into the original problem and the McCormick Envelopes, the problem is reformulated:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;min \ Z = w + 6x + y&lt;br /&gt;
&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \ w \leq 18&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{L}y+xy^{L}-x^{L}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 0*y + x * 0 - 0*0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{U}y+xy^{U}-x^{U}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 10*y + x*2 - 10*2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 10y + 2x - 20&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq x^{U}y+xy^{L}-x^{U}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq 10*y + x*0 - 10*0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq 10*y + x*0 - 10*0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq xy^{U}+x^{L}y-x^{L}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq x*2 + 0*y -0*2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq 2x&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using GAMS, the solution is z= -76.2, x=10, y=1.8.&lt;br /&gt;
&lt;br /&gt;
== Applications ==&lt;br /&gt;
Bilinear functions occur in numerous engineering and natural science applications where McCormick Envelopes can be utilized, including the following : &lt;br /&gt;
&lt;br /&gt;
Computer vision &amp;lt;sup&amp;gt;5&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Energy conversion networks &amp;lt;sup&amp;gt;6&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Cellular networks&amp;lt;sup&amp;gt;7&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Dynamic biological systems&amp;lt;sup&amp;gt;8&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternate current optimal power flow (ACOPF)&amp;lt;sup&amp;gt;9&amp;lt;/sup&amp;gt;&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
Non-convex NLPs are challenging to solve and may require a significant amount of time, computing resources, and effort to determine if the solution is global or the problem has no feasible solution.  McCormick Envelopes provide a relaxation technique for bilinear non-convex nonlinear programming problems.  McCormick Envelopes provide a straightforward technique of replacing each bilinear term with a new variable and adding four constraints. Due to the recursive nature of this technique, it may be applied to a wide variety of engineering and scientific applications involving bilinear terms.   &lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
# G. P. McCormick, &amp;quot;Computability of Global Solutions To Factorable Nonconvex Solutions: Part I: Convex Underestimating Problems,&amp;quot; &#039;&#039;Mathematical Programming,&#039;&#039; vol. 10, pp. 147-175, 1976. &lt;br /&gt;
# J. K. Scott, M. D. Stuber and P. I. Barton, &amp;quot;Generalized McCormick Relaxations,&amp;quot; &#039;&#039;Journal of Global Optimization,&#039;&#039; vol. 51, pp. 569-606, 2011.&lt;br /&gt;
# H. Hijazi, &amp;quot;[https://www.google.com/url?sa=t&amp;amp;rct=j&amp;amp;q=&amp;amp;esrc=s&amp;amp;source=web&amp;amp;cd=&amp;amp;ved=2ahUKEwjSr7eu8K70AhVYmHIEHUJzCVsQFnoECAIQAQ&amp;amp;url=http%3A%2F%2Fwww.optimization-online.org%2FDB_FILE%2F2015%2F03%2F4841.pdf&amp;amp;usg=AOvVaw1xf9B1f-EPw0mG1LOqRfm9 Perspective Envelopes for Bilinear Functions&amp;quot;]&lt;br /&gt;
#M. Bergamini, P. Aguirre, and I. Grossman, &amp;quot;Logic-based outer approximation for globally optimal synthesis of process networks,&amp;quot; &#039;&#039;Computers and Chemical Engineering, vol. 29, pp.&#039;&#039; 1914–1933, 2005.&lt;br /&gt;
#M. Chandraker and D. Kriegman, &amp;quot;Globally Optimal Bilinear Programming for Computer Vision Applications,&amp;quot; presented at the IEEE Computer Society Conference on &#039;&#039;Computer Vision and Pattern Recognition,&#039;&#039; 2008&#039;&#039;.&#039;&#039; &lt;br /&gt;
#J. Kantor and P. Mousaw, &amp;quot;A class of bilinear models for the optimization of energy conversion networks,&amp;quot; &#039;&#039;Chemical Engineering Science, vol. 67,&#039;&#039; pp. 131-138, 2012.&lt;br /&gt;
#F. Ahmed, M. Naeem, W. Ejaz, M. Iqbal and A. Anpalagan, &amp;quot;Renewable Energy Assisted Sustainable and Environment Friendly Energy Cooperation in Cellular Networks,&amp;quot; &#039;&#039;Wireless Personal Communications&#039;&#039;, vol. 108&#039;&#039;&#039;,&#039;&#039;&#039; pp. 2585–2607, 2019.&lt;br /&gt;
#A. Miro, C. Pozo, G. Guillen-Gosalbez, J. Egea and L. Jimenez, &amp;quot;Deterministic global optimization algorithm based on outer approximation for the parameter estimation of nonlinear dynamic biological systems,&amp;quot; &#039;&#039;BMC Bioinformatics, vol. 13,&#039;&#039; 2012.&lt;br /&gt;
#B. Michael, A. Castillo, J. Watson and C. Laird, &amp;quot;Strengthened SOCP Relaxations for ACOPF with McCormick Envelopes and Bounds Tightening,&amp;quot; &#039;&#039;Computer Aided Chemical Engineering,&#039;&#039; vol. 44&#039;&#039;,&#039;&#039; pp. 1555-1560, 2018.&lt;/div&gt;</summary>
		<author><name>Smu29</name></author>
	</entry>
	<entry>
		<id>https://optimization.cbe.cornell.edu/index.php?title=McCormick_envelopes&amp;diff=4965</id>
		<title>McCormick envelopes</title>
		<link rel="alternate" type="text/html" href="https://optimization.cbe.cornell.edu/index.php?title=McCormick_envelopes&amp;diff=4965"/>
		<updated>2021-12-08T20:28:01Z</updated>

		<summary type="html">&lt;p&gt;Smu29: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Author: Susan Urban (SYSEN 5800 Fall 2021) &lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
[[File:Image of updated estimators and envelopes.png|thumb|Figure 1: Relationships between the given function, concave over-estimators, convex under-estimators, a concave envelope and a convex envelope.  ]]&lt;br /&gt;
Optimization of a non-convex function f(x) is challenging since it may have multiple locally optimal solutions or no solution and it can take a significant amount of time, computing resources, and effort to determine if the solution is global or the problem has no feasible solution. Different techniques are used to address this challenge depending on the characteristics of the problem. One technique used for a given non-convex function is the identification of a concave envelope and a convex envelope.  The concave envelope, and respectively the convex envelope, is the concave over-estimator and convex under-estimator for the given function providing the tightest fit to the given function.  The envelope surrounds the given function, like an envelope encloses a letter, and limits the feasible solution space the most in comparison to all other concave over-estimators and convex under-estimators. Multiple concave over-estimators and multiple convex under-estimators may exist but there is only one concave envelope and one convex envelope for a given function and domain.  Figure 1 depicts the relationship between the given function f(x), multiple concave over-estimators, multiple convex under-estimators, a convex envelope, and a concave envelope. &lt;br /&gt;
== McCormick Envelopes: Theory, Methodology and Algorithmic Discussions ==&lt;br /&gt;
The McCormick Envelope, originally developed by Dr. Garth McCormick&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;, is a type of convex relaxation used for the optimization of bilinear (e.g., x*y, e&amp;lt;sup&amp;gt;xy&amp;lt;/sup&amp;gt; + y, sin (x+y) - x&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;) non-linear programming (NLP) problems.  As McCormick&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt; noted, McCormick Envelopes are based on the key assumption that convex and concave envelopes can be constructed for the given function.  &lt;br /&gt;
&lt;br /&gt;
Each bilinear term is replaced with a new variable and four sets of constraints are added. The non-linear programming is converted to a relaxed convex linear programming (LP) which can be more easily solved. &lt;br /&gt;
&lt;br /&gt;
The LP solution gives a lower (L) bound and any feasible solution to the problem gives an upper (U) bound.&lt;br /&gt;
&lt;br /&gt;
As noted by Scott et al&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;, McCormick envelopes are effective since they are recursive, can be applied to a variety of applications, and are typically stronger than those resulting from convexification or linearization procedures. &lt;br /&gt;
&lt;br /&gt;
The following is a derivation of the McCormick Envelopes for a given bilinear function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;Let \ w = xy&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^{L}\leq x\leq x^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;y^{L}\leq y\leq y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;x^{L}, x^{U}, y^{L}, y^{U} &amp;lt;/math&amp;gt;are   upper  and   lower  bound  values  for  &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;y&amp;lt;/math&amp;gt;, respectively.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left (x-x^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left (y-y^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
a and b are both positive resulting in a positive product&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a * b\geq 0&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a * b=\left ( x-x^{L} \right )\left ( y-y^{L} \right )=xy-x^{L}y-xy^{L}+x^{L}y^{L}\geq 0 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
substituting w=xy and reformulating the inequality produces&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{L}y+xy^{L}-x^{L}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Following the same sequence of steps, the remaining inequalities are produced:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x^{U}-x \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b = \left ( y^{U} -y\right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{U}y+xy^{U}-x^{U}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x^{U}-x\right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left ( y-y^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq x^{U}y+xy^{L}-x^{U}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x-x^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left ( y^{U}-y \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq xy^{U}+x^{L}y-x^{L}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The under-estimators of the function are represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{L}y+xy^{L}-x^{L}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{U}y+xy^{U}-x^{U}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The over-estimators of the function are represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq x^{U}y+xy^{L}-x^{U}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq xy^{U}+x^{L}y-x^{L}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following shows the relaxation of a non-convex problem using McCormick Envelopes:&lt;br /&gt;
&lt;br /&gt;
The original non-convex problem: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\min Z= \textstyle \sum_{i=1} \sum_{j=1}  c_{i,j}x_i x_j +g_0(x)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \sum_{i=1}\sum_{j=1} c_{i,j}^l x_i x_j + g_l (x) \leq 0,\forall l \in L&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^ L \leq x \leq x^U&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Replacing &amp;lt;math&amp;gt;u_{i,j} = x_i x_j&amp;lt;/math&amp;gt;, we obtain a relaxed, convex problem using McCormick Envelopes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\min Z= \textstyle \sum_{i=1} \sum_{j=1}  c_{i,j} u_{i,j} +g_0(x)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \sum_{i=1}\sum_{j=1} c_{i,j}^l u_{i,j}+ g_l (x) \leq 0,\forall l \in L&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^L x_j + x_i x_j^L - {x_i}^L {x_j}^L, \forall  i,j \ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^U x_j + x_i x_j^U - {x_i}^U {x_j}^U, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^L x_j + x_i x_j^U - {x_i}^L {x_j}^U, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^U x_j + x_i x_j^L - {x_i}^U {x_j}^L, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^L \leq x \leq x^U,   \ \ u^L \leq u \leq u^U&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Similar steps are taken to derive the McCormick Envelopes for given functions with different formats e.g., e&amp;lt;sup&amp;gt;xy&amp;lt;/sup&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Good lower and upper bounds focus and minimize the feasible solution space; they reduce the number of iterations to find the optimal solution.  &lt;br /&gt;
&lt;br /&gt;
Piecewise McCormick Relaxation&lt;br /&gt;
&lt;br /&gt;
As discussed by Hazaji&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;, global optimization solvers focus initially on optimizing the lower and upper bounds, and when necessary, focus on domain partitioning.  By dividing the domain of a given variable into partitions or smaller regions, the solver is able to tailor and further tighten the convex relaxations of each partition. This strategy is known as the Piecewise McCormick relaxation&amp;lt;sup&amp;gt;4&amp;lt;/sup&amp;gt;.   &lt;br /&gt;
&lt;br /&gt;
== Example: Numerical ==&lt;br /&gt;
For the given problem, &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;min \  Z = xy + 6x + y&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \ xy \leq 18&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;0 \leq x \leq 10&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;0 \leq y \leq 2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;Let\   w = xy &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^L = 0  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^U = 10&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;y^L = 0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;y^U = 2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Substituting these values into the original problem and the McCormick Envelopes, the problem is reformulated:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;min \ Z = w + 6x + y&lt;br /&gt;
&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \ w \leq 18&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{L}y+xy^{L}-x^{L}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 0*y + x * 0 - 0*0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{U}y+xy^{U}-x^{U}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 10*y + x*2 - 10*2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 10y + 2x - 20&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq x^{U}y+xy^{L}-x^{U}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq 10*y + x*0 - 10*0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq 10*y + x*0 - 10*0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq xy^{U}+x^{L}y-x^{L}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq x*2 + 0*y -0*2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq 2x&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using GAMS, the solution is z= -76.2, x=10, y=1.8.&lt;br /&gt;
&lt;br /&gt;
== Applications ==&lt;br /&gt;
Bilinear functions occur in numerous engineering and natural science applications where McCormick Envelopes can be utilized, including the following : &lt;br /&gt;
&lt;br /&gt;
Computer vision &amp;lt;sup&amp;gt;5&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Energy conversion networks &amp;lt;sup&amp;gt;6&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Cellular networks&amp;lt;sup&amp;gt;7&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Dynamic biological systems&amp;lt;sup&amp;gt;8&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternate current optimal power flow (ACOPF)&amp;lt;sup&amp;gt;9&amp;lt;/sup&amp;gt;&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
Non-convex NLPs are challenging to solve and may require a significant amount of time, computing resources, and effort to determine if the solution is global or the problem has no feasible solution.  McCormick Envelopes provide a relaxation technique for bilinear non-convex nonlinear programming problems.  McCormick Envelopes provide a straightforward technique of replacing each bilinear term with a new variable and adding four constraints. Due to the recursive nature of this technique, it may be applied to a wide variety of engineering and scientific applications involving bilinear terms.   &lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
# G. P. McCormick, &amp;quot;Computability of Global Solutions To Factorable Nonconvex Solutions: Part I: Convex Underestimating Problems,&amp;quot; &#039;&#039;Mathematical Programming,&#039;&#039; vol. 10, pp. 147-175, 1976. &lt;br /&gt;
# J. K. Scott, M. D. Stuber and P. I. Barton, &amp;quot;Generalized McCormick Relaxations,&amp;quot; &#039;&#039;Journal of Global Optimization,&#039;&#039; vol. 51, pp. 569-606, 2011.&lt;br /&gt;
# H. Hijazi, &amp;quot;[https://www.google.com/url?sa=t&amp;amp;rct=j&amp;amp;q=&amp;amp;esrc=s&amp;amp;source=web&amp;amp;cd=&amp;amp;ved=2ahUKEwjSr7eu8K70AhVYmHIEHUJzCVsQFnoECAIQAQ&amp;amp;url=http%3A%2F%2Fwww.optimization-online.org%2FDB_FILE%2F2015%2F03%2F4841.pdf&amp;amp;usg=AOvVaw1xf9B1f-EPw0mG1LOqRfm9 Perspective Envelopes for Bilinear Functions&amp;quot;]&lt;br /&gt;
#M. Bergamini, P. Aguirre, and I. Grossman, &amp;quot;Logic-based outer approximation for globally optimal synthesis of process networks,&amp;quot; &#039;&#039;Computers and Chemical Engineering, vol. 29, pp.&#039;&#039; 1914–1933, 2005.&lt;br /&gt;
#M. Chandraker and D. Kriegman, &amp;quot;Globally Optimal Bilinear Programming for Computer Vision Applications,&amp;quot; presented at the IEEE Computer Society Conference on &#039;&#039;Computer Vision and Pattern Recognition,&#039;&#039; 2008&#039;&#039;.&#039;&#039; &lt;br /&gt;
#J. Kantor and P. Mousaw, &amp;quot;A class of bilinear models for the optimization of energy conversion networks,&amp;quot; &#039;&#039;Chemical Engineering Science, vol. 67,&#039;&#039; pp. 131-138, 2012.&lt;br /&gt;
#F. Ahmed, M. Naeem, W. Ejaz, M. Iqbal and A. Anpalagan, &amp;quot;Renewable Energy Assisted Sustainable and Environment Friendly Energy Cooperation in Cellular Networks,&amp;quot; &#039;&#039;Wireless Personal Communications&#039;&#039;, vol. 108&#039;&#039;&#039;,&#039;&#039;&#039; pp. 2585–2607, 2019.&lt;br /&gt;
#A. Miro, C. Pozo, G. Guillen-Gosalbez, J. Egea and L. Jimenez, &amp;quot;Deterministic global optimization algorithm based on outer approximation for the parameter estimation of nonlinear dynamic biological systems,&amp;quot; &#039;&#039;BMC Bioinformatics, vol. 13,&#039;&#039; 2012.&lt;br /&gt;
#B. Michael, A. Castillo, J. Watson and C. Laird, &amp;quot;Strengthened SOCP Relaxations for ACOPF with McCormick Envelopes and Bounds Tightening,&amp;quot; &#039;&#039;Computer Aided Chemical Engineering,&#039;&#039; vol. 44&#039;&#039;,&#039;&#039; pp. 1555-1560, 2018.&lt;/div&gt;</summary>
		<author><name>Smu29</name></author>
	</entry>
	<entry>
		<id>https://optimization.cbe.cornell.edu/index.php?title=McCormick_envelopes&amp;diff=4964</id>
		<title>McCormick envelopes</title>
		<link rel="alternate" type="text/html" href="https://optimization.cbe.cornell.edu/index.php?title=McCormick_envelopes&amp;diff=4964"/>
		<updated>2021-12-08T20:19:08Z</updated>

		<summary type="html">&lt;p&gt;Smu29: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Author: Susan Urban (SYSEN 5800 Fall 2021) &lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
[[File:Image of updated estimators and envelopes.png|thumb|Figure 1: Relationships between the given function, concave over-estimators, convex under-estimators, a concave envelope and a convex envelope.  ]]&lt;br /&gt;
Optimization of a non-convex function f(x) is challenging since it may have multiple locally optimal solutions or no solution and it can take a significant amount of time, computing resources, and effort to determine if the solution is global or the problem has no feasible solution. Different techniques are used to address this challenge depending on the characteristics of the problem. One technique used for a given non-convex function is the identification of a concave envelope and a convex envelope.  The concave envelope, and respectively the convex envelope, is the concave over-estimator and convex under-estimator for the given function providing the tightest fit to the given function.  The envelope surrounds the given function, like an envelope encloses a letter, and limits the feasible solution space the most in comparison to all other concave over-estimators and convex under-estimators. Multiple concave over-estimators and multiple convex under-estimators may exist but there is only one concave envelope and one convex envelope for a given function and domain.  Figure 1 depicts the relationship between the given function f(x), multiple concave over-estimators, multiple convex under-estimators, a convex envelope, and a concave envelope. &lt;br /&gt;
== McCormick Envelopes: Theory, Methodology and Algorithmic Discussions ==&lt;br /&gt;
The McCormick Envelope, originally developed by Dr. Garth McCormick&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;, is a type of convex relaxation used for the optimization of bilinear (e.g., x*y, e&amp;lt;sup&amp;gt;xy&amp;lt;/sup&amp;gt; + y, sin (x+y) - x&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;) non-linear programming (NLP) problems.  As McCormick&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt; noted, McCormick Envelopes are based on the key assumption that convex and concave envelopes can be constructed for the given function.  &lt;br /&gt;
&lt;br /&gt;
Each bilinear term is replaced with a new variable and four sets of constraints are added. The non-linear programming is converted to a relaxed convex linear programming (LP) which can be more easily solved. &lt;br /&gt;
&lt;br /&gt;
The LP solution gives a lower (L) bound and any feasible solution to the problem gives an upper (U) bound.&lt;br /&gt;
&lt;br /&gt;
As noted by Scott et al&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;, McCormick envelopes are effective since they are recursive, can be applied to a variety of applications, and are typically stronger than those resulting from convexification or linearization procedures. &lt;br /&gt;
&lt;br /&gt;
The following is a derivation of the McCormick Envelopes for a given bilinear function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;Let \ w = xy&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^{L}\leq x\leq x^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;y^{L}\leq y\leq y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;x^{L}, x^{U}, y^{L}, y^{U} &amp;lt;/math&amp;gt;are   upper  and   lower  bound  values  for  &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;y&amp;lt;/math&amp;gt;, respectively.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left (x-x^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left (y-y^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
a and b are both positive resulting in a positive product&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a * b\geq 0&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a * b=\left ( x-x^{L} \right )\left ( y-y^{L} \right )=xy-x^{L}y-xy^{L}+x^{L}y^{L}\geq 0 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
substituting w=xy and reformulating the inequality produces&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{L}y+xy^{L}-x^{L}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Following the same sequence of steps, the remaining inequalities are produced:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x^{U}-x \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b = \left ( y^{U} -y\right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{U}y+xy^{U}-x^{U}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x^{U}-x\right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left ( y-y^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq x^{U}y+xy^{L}-x^{U}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x-x^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left ( y^{U}-y \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq xy^{U}+x^{L}y-x^{L}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The under-estimators of the function are represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{L}y+xy^{L}-x^{L}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{U}y+xy^{U}-x^{U}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The over-estimators of the function are represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq x^{U}y+xy^{L}-x^{U}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq xy^{U}+x^{L}y-x^{L}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following shows the relaxation of a non-convex problem using McCormick Envelopes:&lt;br /&gt;
&lt;br /&gt;
The original non-convex problem: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\min Z= \textstyle \sum_{i=1} \sum_{j=1}  c_{i,j}x_i x_j +g_0(x)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \sum_{i=1}\sum_{j=1} c_{i,j}^l x_i x_j + g_l (x) \leq 0,\forall l \in L&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^ L \leq x \leq x^U&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Replacing &amp;lt;math&amp;gt;u_{i,j} = x_i x_j&amp;lt;/math&amp;gt;, we obtain a relaxed, convex problem using McCormick Envelopes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\min Z= \textstyle \sum_{i=1} \sum_{j=1}  c_{i,j} u_{i,j} +g_0(x)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \sum_{i=1}\sum_{j=1} c_{i,j}^l u_{i,j}+ g_l (x) \leq 0,\forall l \in L&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^L x_j + x_i x_j^L - {x_i}^L {x_j}^L, \forall  i,j \ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^U x_j + x_i x_j^U - {x_i}^U {x_j}^U, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^L x_j + x_i x_j^U - {x_i}^L {x_j}^U, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^U x_j + x_i x_j^L - {x_i}^U {x_j}^L, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^L \leq x \leq x^U,   \ \ u^L \leq u \leq u^U&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Similar steps are taken to derive the McCormick Envelopes for given functions with different formats e.g., e&amp;lt;sup&amp;gt;xy&amp;lt;/sup&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Good lower and upper bounds focus and minimize the feasible solution space; they reduce the number of iterations to find the optimal solution.  &lt;br /&gt;
&lt;br /&gt;
Piecewise McCormick Relaxation&lt;br /&gt;
&lt;br /&gt;
As discussed by Hazaji&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;, global optimization solvers focus initially on optimizing the lower and upper bounds, and when necessary, focus on domain partitioning.  By dividing the domain of a given variable into partitions or smaller regions, the solver is able to tailor and further tighten the convex relaxations of each partition. This strategy is known as the Piecewise McCormick relaxation&amp;lt;sup&amp;gt;4&amp;lt;/sup&amp;gt;.   &lt;br /&gt;
&lt;br /&gt;
== Example: Numerical ==&lt;br /&gt;
For the given problem, &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;min \  Z = xy + 6x + y&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \ xy \leq 18&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;0 \leq x \leq 10&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;0 \leq y \leq 2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;Let\   w = xy &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^L = 0  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^U = 10&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;y^L = 0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;y^U = 2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Substituting these values into the original problem and the McCormick Envelopes, the problem is reformulated:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;min \ Z = w + 6x + y&lt;br /&gt;
&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \ w \leq 18&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{L}y+xy^{L}-x^{L}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 0*y + x * 0 - 0*0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{U}y+xy^{U}-x^{U}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 10*y + x*2 - 10*2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 10y + 2x - 20&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq x^{U}y+xy^{L}-x^{U}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq 10*y + x*0 - 10*0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq 10*y + x*0 - 10*0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq xy^{U}+x^{L}y-x^{L}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq x*2 + 0*y -0*2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq 2x&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using GAMS, the solution is z= -76.2, x=10, y=1.8.&lt;br /&gt;
&lt;br /&gt;
== Applications ==&lt;br /&gt;
Bilinear functions occur in numerous engineering and natural science applications where McCormick Envelopes can be utilized, including the following : &lt;br /&gt;
&lt;br /&gt;
Computer vision &amp;lt;sup&amp;gt;5&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Energy conversion networks &amp;lt;sup&amp;gt;6&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Cellular networks&amp;lt;sup&amp;gt;7&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Dynamic biological systems&amp;lt;sup&amp;gt;8&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternate current optimal power flow (ACOPF)&amp;lt;sup&amp;gt;9&amp;lt;/sup&amp;gt;&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
Non-convex NLPs are challenging to solve and may require a significant amount of time, computing resources, and effort to determine if the solution is global or the problem has no feasible solution.  McCormick Envelopes provide a relaxation technique for bilinear non-convex nonlinear programming problems.  McCormick Envelopes provide a straightforward technique of replacing each bilinear term with a new variable and adding four constraints. Due to the recursive nature of this technique, it may be applied to a wide variety of engineering and scientific applications involving bilinear terms.   &lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
# G. P. McCormick, &amp;quot;Computability of Global Solutions To Factorable Nonconvex Solutions: Part I: Convex Underestimating Problems,&amp;quot; &#039;&#039;Mathematical Programming,&#039;&#039; vol. 10, pp. 147-175, 1976. &lt;br /&gt;
# J. K. Scott, M. D. Stuber and P. I. Barton, &amp;quot;Generalized McCormick Relaxations,&amp;quot; &#039;&#039;Journal of Global Optimization,&#039;&#039; vol. 51, pp. 569-606, 2011.&lt;br /&gt;
# H. Hijazi, &amp;quot;[https://www.google.com/url?sa=t&amp;amp;rct=j&amp;amp;q=&amp;amp;esrc=s&amp;amp;source=web&amp;amp;cd=&amp;amp;ved=2ahUKEwjSr7eu8K70AhVYmHIEHUJzCVsQFnoECAIQAQ&amp;amp;url=http%3A%2F%2Fwww.optimization-online.org%2FDB_FILE%2F2015%2F03%2F4841.pdf&amp;amp;usg=AOvVaw1xf9B1f-EPw0mG1LOqRfm9 Perspective Envelopes for Bilinear Functions&amp;quot;]&lt;br /&gt;
#M. Bergamini, P. Aguirre, and I. Grossman, &amp;quot;Logic-based outer approximation for globally optimal synthesis of process networks,&amp;quot; &#039;&#039;Computers and Chemical Engineering, vol. 29, pp.&#039;&#039; 1914–1933, 2005.&lt;br /&gt;
#M. Chandraker and D. Kriegman, &amp;quot;Globally Optimal Bilinear Programming for Computer Vision Applications,&amp;quot; presented at the IEEE Computer Society Conference on &#039;&#039;Computer Vision and Pattern Recognition,&#039;&#039; 2008&#039;&#039;.&#039;&#039; &lt;br /&gt;
#J. Kantor and P. Mousaw, &amp;quot;A class of bilinear models for the optimization of energy conversion networks,&amp;quot; &#039;&#039;Chemical Engineering Science, vol. 67,&#039;&#039; pp. 131-138, 2012.&lt;br /&gt;
#F. Ahmed, M. Naeem, W. Ejaz, M. Iqbal and A. Anpalagan, &amp;quot;Renewable Energy Assisted Sustainable and Environment Friendly Energy Cooperation in Cellular Networks,&amp;quot; &#039;&#039;Wireless Personal Commununications&#039;&#039;, vol. 108&#039;&#039;&#039;,&#039;&#039;&#039; pp. 2585–2607, 2019.&lt;br /&gt;
#Miro et al.: Deterministic global optimization algorithm based on outer approximation for the parameter estimation of nonlinear dynamic biological systems. &#039;&#039;BMC Bioinformatics&#039;&#039; (2012) 13:90. &lt;br /&gt;
#Michael B., Castillo, A., Watson, J., &amp;amp; Laird, C. (2018) Strengthened SOCP Relaxations for ACOPF with McCormick Envelopes and Bounds Tightening, &#039;&#039;Computer Aided Chemical Engineering, 44,&#039;&#039; 1555-1560,&lt;/div&gt;</summary>
		<author><name>Smu29</name></author>
	</entry>
	<entry>
		<id>https://optimization.cbe.cornell.edu/index.php?title=McCormick_envelopes&amp;diff=4963</id>
		<title>McCormick envelopes</title>
		<link rel="alternate" type="text/html" href="https://optimization.cbe.cornell.edu/index.php?title=McCormick_envelopes&amp;diff=4963"/>
		<updated>2021-12-08T20:12:35Z</updated>

		<summary type="html">&lt;p&gt;Smu29: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Author: Susan Urban (SYSEN 5800 Fall 2021) &lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
[[File:Image of updated estimators and envelopes.png|thumb|Figure 1: Relationships between the given function, concave over-estimators, convex under-estimators, a concave envelope and a convex envelope.  ]]&lt;br /&gt;
Optimization of a non-convex function f(x) is challenging since it may have multiple locally optimal solutions or no solution and it can take a significant amount of time, computing resources, and effort to determine if the solution is global or the problem has no feasible solution. Different techniques are used to address this challenge depending on the characteristics of the problem. One technique used for a given non-convex function is the identification of a concave envelope and a convex envelope.  The concave envelope, and respectively the convex envelope, is the concave over-estimator and convex under-estimator for the given function providing the tightest fit to the given function.  The envelope surrounds the given function, like an envelope encloses a letter, and limits the feasible solution space the most in comparison to all other concave over-estimators and convex under-estimators. Multiple concave over-estimators and multiple convex under-estimators may exist but there is only one concave envelope and one convex envelope for a given function and domain.  Figure 1 depicts the relationship between the given function f(x), multiple concave over-estimators, multiple convex under-estimators, a convex envelope, and a concave envelope. &lt;br /&gt;
== McCormick Envelopes: Theory, Methodology and Algorithmic Discussions ==&lt;br /&gt;
The McCormick Envelope, originally developed by Dr. Garth McCormick&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;, is a type of convex relaxation used for the optimization of bilinear (e.g., x*y, e&amp;lt;sup&amp;gt;xy&amp;lt;/sup&amp;gt; + y, sin (x+y) - x&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;) non-linear programming (NLP) problems.  As McCormick&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt; noted, McCormick Envelopes are based on the key assumption that convex and concave envelopes can be constructed for the given function.  &lt;br /&gt;
&lt;br /&gt;
Each bilinear term is replaced with a new variable and four sets of constraints are added. The non-linear programming is converted to a relaxed convex linear programming (LP) which can be more easily solved. &lt;br /&gt;
&lt;br /&gt;
The LP solution gives a lower (L) bound and any feasible solution to the problem gives an upper (U) bound.&lt;br /&gt;
&lt;br /&gt;
As noted by Scott et al&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;, McCormick envelopes are effective since they are recursive, can be applied to a variety of applications, and are typically stronger than those resulting from convexification or linearization procedures. &lt;br /&gt;
&lt;br /&gt;
The following is a derivation of the McCormick Envelopes for a given bilinear function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;Let \ w = xy&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^{L}\leq x\leq x^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;y^{L}\leq y\leq y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;x^{L}, x^{U}, y^{L}, y^{U} &amp;lt;/math&amp;gt;are   upper  and   lower  bound  values  for  &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;y&amp;lt;/math&amp;gt;, respectively.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left (x-x^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left (y-y^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
a and b are both positive resulting in a positive product&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a * b\geq 0&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a * b=\left ( x-x^{L} \right )\left ( y-y^{L} \right )=xy-x^{L}y-xy^{L}+x^{L}y^{L}\geq 0 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
substituting w=xy and reformulating the inequality produces&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{L}y+xy^{L}-x^{L}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Following the same sequence of steps, the remaining inequalities are produced:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x^{U}-x \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b = \left ( y^{U} -y\right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{U}y+xy^{U}-x^{U}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x^{U}-x\right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left ( y-y^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq x^{U}y+xy^{L}-x^{U}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x-x^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left ( y^{U}-y \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq xy^{U}+x^{L}y-x^{L}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The under-estimators of the function are represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{L}y+xy^{L}-x^{L}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{U}y+xy^{U}-x^{U}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The over-estimators of the function are represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq x^{U}y+xy^{L}-x^{U}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq xy^{U}+x^{L}y-x^{L}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following shows the relaxation of a non-convex problem using McCormick Envelopes:&lt;br /&gt;
&lt;br /&gt;
The original non-convex problem: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\min Z= \textstyle \sum_{i=1} \sum_{j=1}  c_{i,j}x_i x_j +g_0(x)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \sum_{i=1}\sum_{j=1} c_{i,j}^l x_i x_j + g_l (x) \leq 0,\forall l \in L&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^ L \leq x \leq x^U&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Replacing &amp;lt;math&amp;gt;u_{i,j} = x_i x_j&amp;lt;/math&amp;gt;, we obtain a relaxed, convex problem using McCormick Envelopes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\min Z= \textstyle \sum_{i=1} \sum_{j=1}  c_{i,j} u_{i,j} +g_0(x)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \sum_{i=1}\sum_{j=1} c_{i,j}^l u_{i,j}+ g_l (x) \leq 0,\forall l \in L&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^L x_j + x_i x_j^L - {x_i}^L {x_j}^L, \forall  i,j \ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^U x_j + x_i x_j^U - {x_i}^U {x_j}^U, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^L x_j + x_i x_j^U - {x_i}^L {x_j}^U, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^U x_j + x_i x_j^L - {x_i}^U {x_j}^L, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^L \leq x \leq x^U,   \ \ u^L \leq u \leq u^U&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Similar steps are taken to derive the McCormick Envelopes for given functions with different formats e.g., e&amp;lt;sup&amp;gt;xy&amp;lt;/sup&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Good lower and upper bounds focus and minimize the feasible solution space; they reduce the number of iterations to find the optimal solution.  &lt;br /&gt;
&lt;br /&gt;
Piecewise McCormick Relaxation&lt;br /&gt;
&lt;br /&gt;
As discussed by Hazaji&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;, global optimization solvers focus initially on optimizing the lower and upper bounds, and when necessary, focus on domain partitioning.  By dividing the domain of a given variable into partitions or smaller regions, the solver is able to tailor and further tighten the convex relaxations of each partition. This strategy is known as the Piecewise McCormick relaxation&amp;lt;sup&amp;gt;4&amp;lt;/sup&amp;gt;.   &lt;br /&gt;
&lt;br /&gt;
== Example: Numerical ==&lt;br /&gt;
For the given problem, &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;min \  Z = xy + 6x + y&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \ xy \leq 18&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;0 \leq x \leq 10&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;0 \leq y \leq 2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;Let\   w = xy &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^L = 0  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^U = 10&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;y^L = 0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;y^U = 2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Substituting these values into the original problem and the McCormick Envelopes, the problem is reformulated:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;min \ Z = w + 6x + y&lt;br /&gt;
&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \ w \leq 18&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{L}y+xy^{L}-x^{L}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 0*y + x * 0 - 0*0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{U}y+xy^{U}-x^{U}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 10*y + x*2 - 10*2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 10y + 2x - 20&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq x^{U}y+xy^{L}-x^{U}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq 10*y + x*0 - 10*0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq 10*y + x*0 - 10*0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq xy^{U}+x^{L}y-x^{L}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq x*2 + 0*y -0*2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq 2x&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Using GAMS, the solution is z= -76.2, x=10, y=1.8.&lt;br /&gt;
&lt;br /&gt;
== Applications ==&lt;br /&gt;
Bilinear functions occur in numerous engineering and natural science applications where McCormick Envelopes can be utilized, including the following : &lt;br /&gt;
&lt;br /&gt;
Computer vision &amp;lt;sup&amp;gt;5&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Energy conversion networks &amp;lt;sup&amp;gt;6&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Cellular networks&amp;lt;sup&amp;gt;7&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Dynamic biological systems&amp;lt;sup&amp;gt;8&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternate current optimal power flow (ACOPF)&amp;lt;sup&amp;gt;9&amp;lt;/sup&amp;gt;&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
Non-convex NLPs are challenging to solve and may require a significant amount of time, computing resources, and effort to determine if the solution is global or the problem has no feasible solution.  McCormick Envelopes provide a relaxation technique for bilinear non-convex nonlinear programming problems.  McCormick Envelopes provide a straightforward technique of replacing each bilinear term with a new variable and adding four constraints. Due to the recursive nature of this technique, it may be applied to a wide variety of engineering and scientific applications involving bilinear terms.   &lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
# G. P. McCormick, &amp;quot;Computability of Global Solutions To Factorable Nonconvex Solutions: Part I: Convex Underestimating Problems,&amp;quot; &#039;&#039;Mathematical Programming,&#039;&#039; vol. 10, pp. 147-175, 1976. &lt;br /&gt;
# J. K. Scott, M. D. Stuber and P. I. Barton, &amp;quot;Generalized McCormick Relaxations,&amp;quot; &#039;&#039;Journal of Global Optimization,&#039;&#039; vol. 51, pp. 569-606, 2011.&lt;br /&gt;
# H. Hijazi, &amp;quot;[https://www.google.com/url?sa=t&amp;amp;rct=j&amp;amp;q=&amp;amp;esrc=s&amp;amp;source=web&amp;amp;cd=&amp;amp;ved=2ahUKEwjSr7eu8K70AhVYmHIEHUJzCVsQFnoECAIQAQ&amp;amp;url=http%3A%2F%2Fwww.optimization-online.org%2FDB_FILE%2F2015%2F03%2F4841.pdf&amp;amp;usg=AOvVaw1xf9B1f-EPw0mG1LOqRfm9 Perspective Envelopes for Bilinear Functions&amp;quot;]&lt;br /&gt;
#M. Bergamini, P. Aguirre, and I. Grossman, &amp;quot;Logic-based outer approximation for globally optimal synthesis of process networks,&amp;quot; &#039;&#039;Computers and Chemical Engineering, vol. 29, pp.&#039;&#039; 1914–1933, 2005.&lt;br /&gt;
#M. Chandraker and D. Kriegman, &amp;quot;Globally Optimal Bilinear Programming for Computer Vision Applications,&amp;quot; presented at the IEEE Computer Society Conference on &#039;&#039;Computer Vision and Pattern Recognition,&#039;&#039; 2008&#039;&#039;.&#039;&#039; &lt;br /&gt;
#J. Kantor and P. Mousaw, &amp;quot;A class of bilinear models for the optimization of energy conversion networks,&amp;quot; &#039;&#039;Chemical Engineering Science, vol. 67,&#039;&#039; pp. 131-138, 2012.&lt;br /&gt;
#F. Ahmed, M. Naeem, and W. Ejaz, &#039;&#039;et al&#039;&#039;, &amp;quot;Renewable Energy Assisted Sustainable and Environment Friendly Energy Cooperation in Cellular Networks,&amp;quot; &#039;&#039;Wireless Pers Commun&#039;&#039; &#039;&#039;&#039;108,&#039;&#039;&#039; 2585–2607 (2019). &lt;br /&gt;
#Miro et al.: Deterministic global optimization algorithm based on outer approximation for the parameter estimation of nonlinear dynamic biological systems. &#039;&#039;BMC Bioinformatics&#039;&#039; (2012) 13:90. &lt;br /&gt;
#Michael B., Castillo, A., Watson, J., &amp;amp; Laird, C. (2018) Strengthened SOCP Relaxations for ACOPF with McCormick Envelopes and Bounds Tightening, &#039;&#039;Computer Aided Chemical Engineering, 44,&#039;&#039; 1555-1560,&lt;/div&gt;</summary>
		<author><name>Smu29</name></author>
	</entry>
	<entry>
		<id>https://optimization.cbe.cornell.edu/index.php?title=McCormick_envelopes&amp;diff=4962</id>
		<title>McCormick envelopes</title>
		<link rel="alternate" type="text/html" href="https://optimization.cbe.cornell.edu/index.php?title=McCormick_envelopes&amp;diff=4962"/>
		<updated>2021-12-08T19:57:12Z</updated>

		<summary type="html">&lt;p&gt;Smu29: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Author: Susan Urban (SYSEN 5800 Fall 2021) &lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
[[File:Image of updated estimators and envelopes.png|thumb|Figure 1: Relationships between the given function, concave over-estimators, convex under-estimators, a concave envelope and a convex envelope.  ]]&lt;br /&gt;
Optimization of a non-convex function f(x) is challenging since it may have multiple locally optimal solutions or no solution and it can take a significant amount of time, computing resources, and effort to determine if the solution is global or the problem has no feasible solution. Different techniques are used to address this challenge depending on the characteristics of the problem. One technique used for a given non-convex function is the identification of a concave envelope and a convex envelope.  The concave envelope, and respectively the convex envelope, is the concave over-estimator and convex under-estimator for the given function providing the tightest fit to the given function.  The envelope surrounds the given function, like an envelope encloses a letter, and limits the feasible solution space the most in comparison to all other concave over-estimators and convex under-estimators. Multiple concave over-estimators and multiple convex under-estimators may exist but there is only one concave envelope and one convex envelope for a given function and domain.  Figure 1 depicts the relationship between the given function f(x), multiple concave over-estimators, multiple convex under-estimators, a convex envelope, and a concave envelope. &lt;br /&gt;
== McCormick Envelopes: Theory, Methodology and Algorithmic Discussions ==&lt;br /&gt;
The McCormick Envelope, originally developed by Dr. Garth McCormick&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;, is a type of convex relaxation used for the optimization of bilinear (e.g., x*y, e&amp;lt;sup&amp;gt;xy&amp;lt;/sup&amp;gt; + y, sin (x+y) - x&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;) non-linear programming (NLP) problems.  As McCormick&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt; noted, McCormick Envelopes are based on the key assumption that convex and concave envelopes can be constructed for the given function.  &lt;br /&gt;
&lt;br /&gt;
Each bilinear term is replaced with a new variable and four sets of constraints are added. The non-linear programming is converted to a relaxed convex linear programming (LP) which can be more easily solved. &lt;br /&gt;
&lt;br /&gt;
The LP solution gives a lower (L) bound and any feasible solution to the problem gives an upper (U) bound.&lt;br /&gt;
&lt;br /&gt;
As noted by Scott et al&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;, McCormick envelopes are effective since they are recursive, can be applied to a variety of applications, and are typically stronger than those resulting from convexification or linearization procedures. &lt;br /&gt;
&lt;br /&gt;
The following is a derivation of the McCormick Envelopes for a given bilinear function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;Let \ w = xy&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^{L}\leq x\leq x^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;y^{L}\leq y\leq y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;x^{L}, x^{U}, y^{L}, y^{U} &amp;lt;/math&amp;gt;are   upper  and   lower  bound  values  for  &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;y&amp;lt;/math&amp;gt;, respectively.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left (x-x^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left (y-y^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
a and b are both positive resulting in a positive product&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a * b\geq 0&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a * b=\left ( x-x^{L} \right )\left ( y-y^{L} \right )=xy-x^{L}y-xy^{L}+x^{L}y^{L}\geq 0 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
substituting w=xy and reformulating the inequality produces&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{L}y+xy^{L}-x^{L}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Following the same sequence of steps, the remaining inequalities are produced:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x^{U}-x \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b = \left ( y^{U} -y\right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{U}y+xy^{U}-x^{U}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x^{U}-x\right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left ( y-y^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq x^{U}y+xy^{L}-x^{U}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x-x^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left ( y^{U}-y \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq xy^{U}+x^{L}y-x^{L}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The under-estimators of the function are represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{L}y+xy^{L}-x^{L}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{U}y+xy^{U}-x^{U}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The over-estimators of the function are represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq x^{U}y+xy^{L}-x^{U}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq xy^{U}+x^{L}y-x^{L}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following shows the relaxation of a non-convex problem using McCormick Envelopes:&lt;br /&gt;
&lt;br /&gt;
The original non-convex problem: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\min Z= \textstyle \sum_{i=1} \sum_{j=1}  c_{i,j}x_i x_j +g_0(x)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \sum_{i=1}\sum_{j=1} c_{i,j}^l x_i x_j + g_l (x) \leq 0,\forall l \in L&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^ L \leq x \leq x^U&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Replacing &amp;lt;math&amp;gt;u_{i,j} = x_i x_j&amp;lt;/math&amp;gt;, we obtain a relaxed, convex problem using McCormick Envelopes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\min Z= \textstyle \sum_{i=1} \sum_{j=1}  c_{i,j} u_{i,j} +g_0(x)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \sum_{i=1}\sum_{j=1} c_{i,j}^l u_{i,j}+ g_l (x) \leq 0,\forall l \in L&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^L x_j + x_i x_j^L - {x_i}^L {x_j}^L, \forall  i,j \ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^U x_j + x_i x_j^U - {x_i}^U {x_j}^U, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^L x_j + x_i x_j^U - {x_i}^L {x_j}^U, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^U x_j + x_i x_j^L - {x_i}^U {x_j}^L, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^L \leq x \leq x^U,   \ \ u^L \leq u \leq u^U&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Similar steps are taken to derive the McCormick Envelopes for given functions with different formats e.g., e&amp;lt;sup&amp;gt;xy&amp;lt;/sup&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Good lower and upper bounds focus and minimize the feasible solution space; they reduce the number of iterations to find the optimal solution.  &lt;br /&gt;
&lt;br /&gt;
Piecewise McCormick Relaxation&lt;br /&gt;
&lt;br /&gt;
As discussed by Hazaji&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;, global optimization solvers focus initially on optimizing the lower and upper bounds, and when necessary, focus on domain partitioning.  By dividing the domain of a given variable into partitions or smaller regions, the solver is able to tailor and further tighten the convex relaxations of each partition. This strategy is known as the Piecewise McCormick relaxation&amp;lt;sup&amp;gt;4&amp;lt;/sup&amp;gt;.   &lt;br /&gt;
&lt;br /&gt;
== Example: Numerical ==&lt;br /&gt;
For the given problem, &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;min \  Z = xy + 6x + y&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \ xy \leq 18&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;0 \leq x \leq 10&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;0 \leq y \leq 2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;Let\   w = xy &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^L = 0  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^U = 10&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;y^L = 0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;y^U = 2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Substituting these values into the original problem and the McCormick Envelopes, the problem is reformulated:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;min \ Z = w + 6x + y&lt;br /&gt;
&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \ w \leq 18&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{L}y+xy^{L}-x^{L}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 0*y + x * 0 - 0*0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{U}y+xy^{U}-x^{U}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 10*y + x*2 - 10*2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 10y + 2x - 20&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq x^{U}y+xy^{L}-x^{U}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq 10*y + x*0 - 10*0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq 10*y + x*0 - 10*0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq xy^{U}+x^{L}y-x^{L}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq x*2 + 0*y -0*2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq 2x&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Using GAMS, the solution is z= -76.2, x=10, y=1.8.&lt;br /&gt;
&lt;br /&gt;
== Applications ==&lt;br /&gt;
Bilinear functions occur in numerous engineering and natural science applications where McCormick Envelopes can be utilized, including the following : &lt;br /&gt;
&lt;br /&gt;
Computer vision &amp;lt;sup&amp;gt;5&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Energy conversion networks &amp;lt;sup&amp;gt;6&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Cellular networks&amp;lt;sup&amp;gt;7&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Dynamic biological systems&amp;lt;sup&amp;gt;8&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternate current optimal power flow (ACOPF)&amp;lt;sup&amp;gt;9&amp;lt;/sup&amp;gt;&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
Non-convex NLPs are challenging to solve and may require a significant amount of time, computing resources, and effort to determine if the solution is global or the problem has no feasible solution.  McCormick Envelopes provide a relaxation technique for bilinear non-convex nonlinear programming problems.  McCormick Envelopes provide a straightforward technique of replacing each bilinear term with a new variable and adding four constraints. Due to the recursive nature of this technique, it may be applied to a wide variety of engineering and scientific applications involving bilinear terms.   &lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
# G. P. McCormick, &amp;quot;Computability of Global Solutions To Factorable Nonconvex Solutions: Part I: Convex Underestimating Problems,&amp;quot; &#039;&#039;Mathematical Programming,&#039;&#039; vol. 10, pp. 147-175, 1976. &lt;br /&gt;
# J. K. Scott, M. D. Stuber and P. I. Barton, &amp;quot;Generalized McCormick Relaxations,&amp;quot; &#039;&#039;Journal of Global Optimization,&#039;&#039; vol. 51, Issue 4, pp. 569-606, 2011.&lt;br /&gt;
# H. Hijazi, &amp;quot;[https://www.google.com/url?sa=t&amp;amp;rct=j&amp;amp;q=&amp;amp;esrc=s&amp;amp;source=web&amp;amp;cd=&amp;amp;ved=2ahUKEwjSr7eu8K70AhVYmHIEHUJzCVsQFnoECAIQAQ&amp;amp;url=http%3A%2F%2Fwww.optimization-online.org%2FDB_FILE%2F2015%2F03%2F4841.pdf&amp;amp;usg=AOvVaw1xf9B1f-EPw0mG1LOqRfm9 Perspective Envelopes for Bilinear Functions&amp;quot;]&lt;br /&gt;
#Bergamini, M., Aguirre, P. &amp;amp; Grossman, I. (2005). Logic-based outer approximation for globally optimal synthesis of process networks. &#039;&#039;Computers and Chemical Engineering 29 (2005)&#039;&#039; 1914–1933.&lt;br /&gt;
#Chandraker, M. &amp;amp; Kriegman, D. (n.d.): Globally Optimal Bilinear Programming for Computer Vision Applications. University of San Diego, CA. Retrieved from: http://vision.ucsd.edu&lt;br /&gt;
#Kantor, J., &amp;amp; Mousaw, P. (2012). A class of bilinear models for the optimization of energy conversion networks. &#039;&#039;Chemical Engineering Science, 67,&#039;&#039; 131-138. doi: 10.1016/j.ces.2011.08.033&lt;br /&gt;
#Ahmed, F., Naeem, M., Ejaz, W. &#039;&#039;et al.&#039;&#039; Renewable Energy Assisted Sustainable and Environment Friendly Energy Cooperation in Cellular Networks. &#039;&#039;Wireless Pers Commun&#039;&#039; &#039;&#039;&#039;108,&#039;&#039;&#039; 2585–2607 (2019). &amp;lt;nowiki&amp;gt;https://doi.org/10.1007/s11277-019-06539-z&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
#Miro et al.: Deterministic global optimization algorithm based on outer approximation for the parameter estimation of nonlinear dynamic biological systems. &#039;&#039;BMC Bioinformatics&#039;&#039; (2012) 13:90. doi: 10.1186/1471-2105-13-90 ·&lt;br /&gt;
#Michael B., Castillo, A., Watson, J., &amp;amp; Laird, C. (2018) Strengthened SOCP Relaxations for ACOPF with McCormick Envelopes and Bounds Tightening, &#039;&#039;Computer Aided Chemical Engineering, 44,&#039;&#039; 1555-1560, doi: /10.1016/B978-0-444-64241-7.50254-8.&lt;/div&gt;</summary>
		<author><name>Smu29</name></author>
	</entry>
	<entry>
		<id>https://optimization.cbe.cornell.edu/index.php?title=McCormick_envelopes&amp;diff=4961</id>
		<title>McCormick envelopes</title>
		<link rel="alternate" type="text/html" href="https://optimization.cbe.cornell.edu/index.php?title=McCormick_envelopes&amp;diff=4961"/>
		<updated>2021-12-08T19:34:15Z</updated>

		<summary type="html">&lt;p&gt;Smu29: /* Example: Numerical */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Author: Susan Urban (SYSEN 5800 Fall 2021) &lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
[[File:Image of updated estimators and envelopes.png|thumb|Figure 1: Relationships between the given function, concave over-estimators, convex under-estimators, a concave envelope and a convex envelope.  ]]&lt;br /&gt;
Optimization of a non-convex function f(x) is challenging since it may have multiple locally optimal solutions or no solution and it can take a significant amount of time, computing resources, and effort to determine if the solution is global or the problem has no feasible solution. Different techniques are used to address this challenge depending on the characteristics of the problem. One technique used for a given non-convex function is the identification of a concave envelope and a convex envelope.  The concave envelope, and respectively the convex envelope, is the concave over-estimator and convex under-estimator for the given function providing the tightest fit to the given function.  The envelope surrounds the given function, like an envelope encloses a letter, and limits the feasible solution space the most in comparison to all other concave over-estimators and convex under-estimators. Multiple concave over-estimators and multiple convex under-estimators may exist but there is only one concave envelope and one convex envelope for a given function and domain.  Figure 1 depicts the relationship between the given function f(x), multiple concave over-estimators, multiple convex under-estimators, a convex envelope, and a concave envelope. &lt;br /&gt;
== McCormick Envelopes: Theory, Methodology and Algorithmic Discussions ==&lt;br /&gt;
The McCormick Envelope, originally developed by Dr. Garth McCormick&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;, is a type of convex relaxation used for the optimization of bilinear (e.g., x*y, e&amp;lt;sup&amp;gt;xy&amp;lt;/sup&amp;gt; + y, sin (x+y) - x&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;) non-linear programming (NLP) problems.  As McCormick&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt; noted, McCormick Envelopes are based on the key assumption that convex and concave envelopes can be constructed for the given function.  &lt;br /&gt;
&lt;br /&gt;
Each bilinear term is replaced with a new variable and four sets of constraints are added. The non-linear programming is converted to a relaxed convex linear programming (LP) which can be more easily solved. &lt;br /&gt;
&lt;br /&gt;
The LP solution gives a lower (L) bound and any feasible solution to the problem gives an upper (U) bound.&lt;br /&gt;
&lt;br /&gt;
As noted by Scott et al&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;, McCormick envelopes are effective since they are recursive, can be applied to a variety of applications, and are typically stronger than those resulting from convexification or linearization procedures. &lt;br /&gt;
&lt;br /&gt;
The following is a derivation of the McCormick Envelopes for a given bilinear function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;Let \ w = xy&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^{L}\leq x\leq x^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;y^{L}\leq y\leq y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;x^{L}, x^{U}, y^{L}, y^{U} &amp;lt;/math&amp;gt;are   upper  and   lower  bound  values  for  &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;y&amp;lt;/math&amp;gt;, respectively.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left (x-x^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left (y-y^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
a and b are both positive resulting in a positive product&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a * b\geq 0&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a * b=\left ( x-x^{L} \right )\left ( y-y^{L} \right )=xy-x^{L}y-xy^{L}+x^{L}y^{L}\geq 0 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
substituting w=xy and reformulating the inequality produces&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{L}y+xy^{L}-x^{L}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Following the same sequence of steps, the remaining inequalities are produced:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x^{U}-x \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b = \left ( y^{U} -y\right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{U}y+xy^{U}-x^{U}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x^{U}-x\right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left ( y-y^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq x^{U}y+xy^{L}-x^{U}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x-x^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left ( y^{U}-y \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq xy^{U}+x^{L}y-x^{L}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The under-estimators of the function are represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{L}y+xy^{L}-x^{L}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{U}y+xy^{U}-x^{U}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The over-estimators of the function are represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq x^{U}y+xy^{L}-x^{U}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq xy^{U}+x^{L}y-x^{L}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following shows the relaxation of a non-convex problem using McCormick Envelopes:&lt;br /&gt;
&lt;br /&gt;
The original non-convex problem: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\min Z= \textstyle \sum_{i=1} \sum_{j=1}  c_{i,j}x_i x_j +g_0(x)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \sum_{i=1}\sum_{j=1} c_{i,j}^l x_i x_j + g_l (x) \leq 0,\forall l \in L&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^ L \leq x \leq x^U&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Replacing &amp;lt;math&amp;gt;u_{i,j} = x_i x_j&amp;lt;/math&amp;gt;, we obtain a relaxed, convex problem using McCormick Envelopes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\min Z= \textstyle \sum_{i=1} \sum_{j=1}  c_{i,j} u_{i,j} +g_0(x)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \sum_{i=1}\sum_{j=1} c_{i,j}^l u_{i,j}+ g_l (x) \leq 0,\forall l \in L&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^L x_j + x_i x_j^L - {x_i}^L {x_j}^L, \forall  i,j \ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^U x_j + x_i x_j^U - {x_i}^U {x_j}^U, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^L x_j + x_i x_j^U - {x_i}^L {x_j}^U, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^U x_j + x_i x_j^L - {x_i}^U {x_j}^L, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^L \leq x \leq x^U,   \ \ u^L \leq u \leq u^U&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Similar steps are taken to derive the McCormick Envelopes for given functions with different formats e.g., e&amp;lt;sup&amp;gt;xy&amp;lt;/sup&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Good lower and upper bounds focus and minimize the feasible solution space; they reduce the number of iterations to find the optimal solution.  &lt;br /&gt;
&lt;br /&gt;
Piecewise McCormick Relaxation&lt;br /&gt;
&lt;br /&gt;
As discussed by Hazaji&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;, global optimization solvers focus initially on optimizing the lower and upper bounds, and when necessary, focus on domain partitioning.  By dividing the domain of a given variable into partitions or smaller regions, the solver is able to tailor and further tighten the convex relaxations of each partition. This strategy is known as the Piecewise McCormick relaxation&amp;lt;sup&amp;gt;4&amp;lt;/sup&amp;gt;.   &lt;br /&gt;
&lt;br /&gt;
== Example: Numerical ==&lt;br /&gt;
For the given problem, &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;min \  Z = xy + 6x + y&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \ xy \leq 18&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;0 \leq x \leq 10&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;0 \leq y \leq 2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;Let\   w = xy &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^L = 0  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^U = 10&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;y^L = 0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;y^U = 2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Substituting these values into the original problem and the McCormick Envelopes, the problem is reformulated:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;min \ Z = w + 6x + y&lt;br /&gt;
&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \ w \leq 18&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{L}y+xy^{L}-x^{L}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 0*y + x * 0 - 0*0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{U}y+xy^{U}-x^{U}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 10*y + x*2 - 10*2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 10y + 2x - 20&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq x^{U}y+xy^{L}-x^{U}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq 10*y + x*0 - 10*0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq 10*y + x*0 - 10*0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq xy^{U}+x^{L}y-x^{L}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq x*2 + 0*y -0*2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq 2x&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Using GAMS, the solution is z= -76.2, x=10, y=1.8.&lt;br /&gt;
&lt;br /&gt;
== Applications ==&lt;br /&gt;
Bilinear functions occur in numerous engineering and natural science applications where McCormick Envelopes can be utilized, including the following : &lt;br /&gt;
&lt;br /&gt;
Computer vision &amp;lt;sup&amp;gt;5&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Energy conversion networks &amp;lt;sup&amp;gt;6&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Cellular networks&amp;lt;sup&amp;gt;7&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Dynamic biological systems&amp;lt;sup&amp;gt;8&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternate current optimal power flow (ACOPF)&amp;lt;sup&amp;gt;9&amp;lt;/sup&amp;gt;&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
Non-convex NLPs are challenging to solve and may require a significant amount of time, computing resources, and effort to determine if the solution is global or the problem has no feasible solution.  McCormick Envelopes provide a relaxation technique for bilinear non-convex nonlinear programming problems.  McCormick Envelopes provide a straightforward technique of replacing each bilinear term with a new variable and adding four constraints. Due to the recursive nature of this technique, it may be applied to a wide variety of engineering and scientific applications involving bilinear terms.   &lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
# McCormick, Garth P.  (1976). Computability of Global Solutions To Factorable Nonconvex Solutions: Part I: Convex Underestimating Problems. &#039;&#039;Mathematical Programming, 10&#039;&#039;, 147-175. doi: 10.1007/BF01580665&lt;br /&gt;
# Scott, J. K. Stuber, M. D. &amp;amp; Barton, P. I. (2011). Generalized McCormick Relaxations. &#039;&#039;Journal of Global Optimization, Vol. 51, Issue 4&#039;&#039;, 569-606 doi: 10.1007/s10898-011-9664-7&lt;br /&gt;
# Hijazi, H., Perspective Envelopes for Bilinear Functions, unpublished manuscript, retrieved from: [https://www.google.com/url?sa=t&amp;amp;rct=j&amp;amp;q=&amp;amp;esrc=s&amp;amp;source=web&amp;amp;cd=&amp;amp;ved=2ahUKEwjSr7eu8K70AhVYmHIEHUJzCVsQFnoECAIQAQ&amp;amp;url=http%3A%2F%2Fwww.optimization-online.org%2FDB_FILE%2F2015%2F03%2F4841.pdf&amp;amp;usg=AOvVaw1xf9B1f-EPw0mG1LOqRfm9 Perspective Envelopes for Bilinear Functions]&lt;br /&gt;
#Bergamini, M., Aguirre, P. &amp;amp; Grossman, I. (2005). Logic-based outer approximation for globally optimal synthesis of process networks. &#039;&#039;Computers and Chemical Engineering 29 (2005)&#039;&#039; 1914–1933.&lt;br /&gt;
#Chandraker, M. &amp;amp; Kriegman, D. (n.d.): Globally Optimal Bilinear Programming for Computer Vision Applications. University of San Diego, CA. Retrieved from: http://vision.ucsd.edu&lt;br /&gt;
#Kantor, J., &amp;amp; Mousaw, P. (2012). A class of bilinear models for the optimization of energy conversion networks. &#039;&#039;Chemical Engineering Science, 67,&#039;&#039; 131-138. doi: 10.1016/j.ces.2011.08.033&lt;br /&gt;
#Ahmed, F., Naeem, M., Ejaz, W. &#039;&#039;et al.&#039;&#039; Renewable Energy Assisted Sustainable and Environment Friendly Energy Cooperation in Cellular Networks. &#039;&#039;Wireless Pers Commun&#039;&#039; &#039;&#039;&#039;108,&#039;&#039;&#039; 2585–2607 (2019). &amp;lt;nowiki&amp;gt;https://doi.org/10.1007/s11277-019-06539-z&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
#Miro et al.: Deterministic global optimization algorithm based on outer approximation for the parameter estimation of nonlinear dynamic biological systems. &#039;&#039;BMC Bioinformatics&#039;&#039; (2012) 13:90. doi: 10.1186/1471-2105-13-90 ·&lt;br /&gt;
#Michael B., Castillo, A., Watson, J., &amp;amp; Laird, C. (2018) Strengthened SOCP Relaxations for ACOPF with McCormick Envelopes and Bounds Tightening, &#039;&#039;Computer Aided Chemical Engineering, 44,&#039;&#039; 1555-1560, doi: /10.1016/B978-0-444-64241-7.50254-8.&lt;/div&gt;</summary>
		<author><name>Smu29</name></author>
	</entry>
	<entry>
		<id>https://optimization.cbe.cornell.edu/index.php?title=McCormick_envelopes&amp;diff=4960</id>
		<title>McCormick envelopes</title>
		<link rel="alternate" type="text/html" href="https://optimization.cbe.cornell.edu/index.php?title=McCormick_envelopes&amp;diff=4960"/>
		<updated>2021-12-08T19:11:22Z</updated>

		<summary type="html">&lt;p&gt;Smu29: /* Example: Numerical */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Author: Susan Urban (SYSEN 5800 Fall 2021) &lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
[[File:Image of updated estimators and envelopes.png|thumb|Figure 1: Relationships between the given function, concave over-estimators, convex under-estimators, a concave envelope and a convex envelope.  ]]&lt;br /&gt;
Optimization of a non-convex function f(x) is challenging since it may have multiple locally optimal solutions or no solution and it can take a significant amount of time, computing resources, and effort to determine if the solution is global or the problem has no feasible solution. Different techniques are used to address this challenge depending on the characteristics of the problem. One technique used for a given non-convex function is the identification of a concave envelope and a convex envelope.  The concave envelope, and respectively the convex envelope, is the concave over-estimator and convex under-estimator for the given function providing the tightest fit to the given function.  The envelope surrounds the given function, like an envelope encloses a letter, and limits the feasible solution space the most in comparison to all other concave over-estimators and convex under-estimators. Multiple concave over-estimators and multiple convex under-estimators may exist but there is only one concave envelope and one convex envelope for a given function and domain.  Figure 1 depicts the relationship between the given function f(x), multiple concave over-estimators, multiple convex under-estimators, a convex envelope, and a concave envelope. &lt;br /&gt;
== McCormick Envelopes: Theory, Methodology and Algorithmic Discussions ==&lt;br /&gt;
The McCormick Envelope, originally developed by Dr. Garth McCormick&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;, is a type of convex relaxation used for the optimization of bilinear (e.g., x*y, e&amp;lt;sup&amp;gt;xy&amp;lt;/sup&amp;gt; + y, sin (x+y) - x&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;) non-linear programming (NLP) problems.  As McCormick&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt; noted, McCormick Envelopes are based on the key assumption that convex and concave envelopes can be constructed for the given function.  &lt;br /&gt;
&lt;br /&gt;
Each bilinear term is replaced with a new variable and four sets of constraints are added. The non-linear programming is converted to a relaxed convex linear programming (LP) which can be more easily solved. &lt;br /&gt;
&lt;br /&gt;
The LP solution gives a lower (L) bound and any feasible solution to the problem gives an upper (U) bound.&lt;br /&gt;
&lt;br /&gt;
As noted by Scott et al&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;, McCormick envelopes are effective since they are recursive, can be applied to a variety of applications, and are typically stronger than those resulting from convexification or linearization procedures. &lt;br /&gt;
&lt;br /&gt;
The following is a derivation of the McCormick Envelopes for a given bilinear function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;Let \ w = xy&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^{L}\leq x\leq x^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;y^{L}\leq y\leq y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;x^{L}, x^{U}, y^{L}, y^{U} &amp;lt;/math&amp;gt;are   upper  and   lower  bound  values  for  &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;y&amp;lt;/math&amp;gt;, respectively.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left (x-x^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left (y-y^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
a and b are both positive resulting in a positive product&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a * b\geq 0&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a * b=\left ( x-x^{L} \right )\left ( y-y^{L} \right )=xy-x^{L}y-xy^{L}+x^{L}y^{L}\geq 0 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
substituting w=xy and reformulating the inequality produces&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{L}y+xy^{L}-x^{L}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Following the same sequence of steps, the remaining inequalities are produced:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x^{U}-x \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b = \left ( y^{U} -y\right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{U}y+xy^{U}-x^{U}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x^{U}-x\right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left ( y-y^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq x^{U}y+xy^{L}-x^{U}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x-x^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left ( y^{U}-y \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq xy^{U}+x^{L}y-x^{L}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The under-estimators of the function are represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{L}y+xy^{L}-x^{L}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{U}y+xy^{U}-x^{U}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The over-estimators of the function are represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq x^{U}y+xy^{L}-x^{U}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq xy^{U}+x^{L}y-x^{L}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following shows the relaxation of a non-convex problem using McCormick Envelopes:&lt;br /&gt;
&lt;br /&gt;
The original non-convex problem: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\min Z= \textstyle \sum_{i=1} \sum_{j=1}  c_{i,j}x_i x_j +g_0(x)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \sum_{i=1}\sum_{j=1} c_{i,j}^l x_i x_j + g_l (x) \leq 0,\forall l \in L&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^ L \leq x \leq x^U&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Replacing &amp;lt;math&amp;gt;u_{i,j} = x_i x_j&amp;lt;/math&amp;gt;, we obtain a relaxed, convex problem using McCormick Envelopes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\min Z= \textstyle \sum_{i=1} \sum_{j=1}  c_{i,j} u_{i,j} +g_0(x)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \sum_{i=1}\sum_{j=1} c_{i,j}^l u_{i,j}+ g_l (x) \leq 0,\forall l \in L&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^L x_j + x_i x_j^L - {x_i}^L {x_j}^L, \forall  i,j \ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^U x_j + x_i x_j^U - {x_i}^U {x_j}^U, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^L x_j + x_i x_j^U - {x_i}^L {x_j}^U, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^U x_j + x_i x_j^L - {x_i}^U {x_j}^L, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^L \leq x \leq x^U,   \ \ u^L \leq u \leq u^U&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Similar steps are taken to derive the McCormick Envelopes for given functions with different formats e.g., e&amp;lt;sup&amp;gt;xy&amp;lt;/sup&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Good lower and upper bounds focus and minimize the feasible solution space; they reduce the number of iterations to find the optimal solution.  &lt;br /&gt;
&lt;br /&gt;
Piecewise McCormick Relaxation&lt;br /&gt;
&lt;br /&gt;
As discussed by Hazaji&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;, global optimization solvers focus initially on optimizing the lower and upper bounds, and when necessary, focus on domain partitioning.  By dividing the domain of a given variable into partitions or smaller regions, the solver is able to tailor and further tighten the convex relaxations of each partition. This strategy is known as the Piecewise McCormick relaxation&amp;lt;sup&amp;gt;4&amp;lt;/sup&amp;gt;.   &lt;br /&gt;
&lt;br /&gt;
== Example: Numerical ==&lt;br /&gt;
For the given problem, &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;min \  Z = xy + 6x + y&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \ xy \leq 18&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;0 \leq x \leq 10&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;0 \leq y \leq 2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;Let\   w = xy &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^L = 0  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^U = 10&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;y^L = 0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;y^U = 2&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Substituting these values into the original problem:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;min \ Z = -w + 6x + y&lt;br /&gt;
&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \ w \leq 18&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq x^L y + xy^L&lt;br /&gt;
w \geq 0*   &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 10y + 2x - 20&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq 10y&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq 2x&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The solution is z= -76.2, x=10, y=1.8.&lt;br /&gt;
&lt;br /&gt;
== Applications ==&lt;br /&gt;
Bilinear functions occur in numerous engineering and natural science applications where McCormick Envelopes can be utilized, including the following : &lt;br /&gt;
&lt;br /&gt;
Computer vision &amp;lt;sup&amp;gt;5&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Energy conversion networks &amp;lt;sup&amp;gt;6&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Cellular networks&amp;lt;sup&amp;gt;7&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Dynamic biological systems&amp;lt;sup&amp;gt;8&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternate current optimal power flow (ACOPF)&amp;lt;sup&amp;gt;9&amp;lt;/sup&amp;gt;&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
Non-convex NLPs are challenging to solve and may require a significant amount of time, computing resources, and effort to determine if the solution is global or the problem has no feasible solution.  McCormick Envelopes provide a relaxation technique for bilinear non-convex nonlinear programming problems.  McCormick Envelopes provide a straightforward technique of replacing each bilinear term with a new variable and adding four constraints. Due to the recursive nature of this technique, it may be applied to a wide variety of engineering and scientific applications involving bilinear terms.   &lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
# McCormick, Garth P.  (1976). Computability of Global Solutions To Factorable Nonconvex Solutions: Part I: Convex Underestimating Problems. &#039;&#039;Mathematical Programming, 10&#039;&#039;, 147-175. doi: 10.1007/BF01580665&lt;br /&gt;
# Scott, J. K. Stuber, M. D. &amp;amp; Barton, P. I. (2011). Generalized McCormick Relaxations. &#039;&#039;Journal of Global Optimization, Vol. 51, Issue 4&#039;&#039;, 569-606 doi: 10.1007/s10898-011-9664-7&lt;br /&gt;
# Hijazi, H., Perspective Envelopes for Bilinear Functions, unpublished manuscript, retrieved from: [https://www.google.com/url?sa=t&amp;amp;rct=j&amp;amp;q=&amp;amp;esrc=s&amp;amp;source=web&amp;amp;cd=&amp;amp;ved=2ahUKEwjSr7eu8K70AhVYmHIEHUJzCVsQFnoECAIQAQ&amp;amp;url=http%3A%2F%2Fwww.optimization-online.org%2FDB_FILE%2F2015%2F03%2F4841.pdf&amp;amp;usg=AOvVaw1xf9B1f-EPw0mG1LOqRfm9 Perspective Envelopes for Bilinear Functions]&lt;br /&gt;
#Bergamini, M., Aguirre, P. &amp;amp; Grossman, I. (2005). Logic-based outer approximation for globally optimal synthesis of process networks. &#039;&#039;Computers and Chemical Engineering 29 (2005)&#039;&#039; 1914–1933.&lt;br /&gt;
#Chandraker, M. &amp;amp; Kriegman, D. (n.d.): Globally Optimal Bilinear Programming for Computer Vision Applications. University of San Diego, CA. Retrieved from: http://vision.ucsd.edu&lt;br /&gt;
#Kantor, J., &amp;amp; Mousaw, P. (2012). A class of bilinear models for the optimization of energy conversion networks. &#039;&#039;Chemical Engineering Science, 67,&#039;&#039; 131-138. doi: 10.1016/j.ces.2011.08.033&lt;br /&gt;
#Ahmed, F., Naeem, M., Ejaz, W. &#039;&#039;et al.&#039;&#039; Renewable Energy Assisted Sustainable and Environment Friendly Energy Cooperation in Cellular Networks. &#039;&#039;Wireless Pers Commun&#039;&#039; &#039;&#039;&#039;108,&#039;&#039;&#039; 2585–2607 (2019). &amp;lt;nowiki&amp;gt;https://doi.org/10.1007/s11277-019-06539-z&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
#Miro et al.: Deterministic global optimization algorithm based on outer approximation for the parameter estimation of nonlinear dynamic biological systems. &#039;&#039;BMC Bioinformatics&#039;&#039; (2012) 13:90. doi: 10.1186/1471-2105-13-90 ·&lt;br /&gt;
#Michael B., Castillo, A., Watson, J., &amp;amp; Laird, C. (2018) Strengthened SOCP Relaxations for ACOPF with McCormick Envelopes and Bounds Tightening, &#039;&#039;Computer Aided Chemical Engineering, 44,&#039;&#039; 1555-1560, doi: /10.1016/B978-0-444-64241-7.50254-8.&lt;/div&gt;</summary>
		<author><name>Smu29</name></author>
	</entry>
	<entry>
		<id>https://optimization.cbe.cornell.edu/index.php?title=McCormick_envelopes&amp;diff=4959</id>
		<title>McCormick envelopes</title>
		<link rel="alternate" type="text/html" href="https://optimization.cbe.cornell.edu/index.php?title=McCormick_envelopes&amp;diff=4959"/>
		<updated>2021-12-08T13:40:28Z</updated>

		<summary type="html">&lt;p&gt;Smu29: /* Example: Numerical */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Author: Susan Urban (SYSEN 5800 Fall 2021) &lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
[[File:Image of updated estimators and envelopes.png|thumb|Figure 1: Relationships between the given function, concave over-estimators, convex under-estimators, a concave envelope and a convex envelope.  ]]&lt;br /&gt;
Optimization of a non-convex function f(x) is challenging since it may have multiple locally optimal solutions or no solution and it can take a significant amount of time, computing resources, and effort to determine if the solution is global or the problem has no feasible solution. Different techniques are used to address this challenge depending on the characteristics of the problem. One technique used for a given non-convex function is the identification of a concave envelope and a convex envelope.  The concave envelope, and respectively the convex envelope, is the concave over-estimator and convex under-estimator for the given function providing the tightest fit to the given function.  The envelope surrounds the given function, like an envelope encloses a letter, and limits the feasible solution space the most in comparison to all other concave over-estimators and convex under-estimators. Multiple concave over-estimators and multiple convex under-estimators may exist but there is only one concave envelope and one convex envelope for a given function and domain.  Figure 1 depicts the relationship between the given function f(x), multiple concave over-estimators, multiple convex under-estimators, a convex envelope, and a concave envelope. &lt;br /&gt;
== McCormick Envelopes: Theory, Methodology and Algorithmic Discussions ==&lt;br /&gt;
The McCormick Envelope, originally developed by Dr. Garth McCormick&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;, is a type of convex relaxation used for the optimization of bilinear (e.g., x*y, e&amp;lt;sup&amp;gt;xy&amp;lt;/sup&amp;gt; + y, sin (x+y) - x&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;) non-linear programming (NLP) problems.  As McCormick&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt; noted, McCormick Envelopes are based on the key assumption that convex and concave envelopes can be constructed for the given function.  &lt;br /&gt;
&lt;br /&gt;
Each bilinear term is replaced with a new variable and four sets of constraints are added. The non-linear programming is converted to a relaxed convex linear programming (LP) which can be more easily solved. &lt;br /&gt;
&lt;br /&gt;
The LP solution gives a lower (L) bound and any feasible solution to the problem gives an upper (U) bound.&lt;br /&gt;
&lt;br /&gt;
As noted by Scott et al&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;, McCormick envelopes are effective since they are recursive, can be applied to a variety of applications, and are typically stronger than those resulting from convexification or linearization procedures. &lt;br /&gt;
&lt;br /&gt;
The following is a derivation of the McCormick Envelopes for a given bilinear function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;Let \ w = xy&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^{L}\leq x\leq x^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;y^{L}\leq y\leq y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;x^{L}, x^{U}, y^{L}, y^{U} &amp;lt;/math&amp;gt;are   upper  and   lower  bound  values  for  &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;y&amp;lt;/math&amp;gt;, respectively.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left (x-x^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left (y-y^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
a and b are both positive resulting in a positive product&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a * b\geq 0&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a * b=\left ( x-x^{L} \right )\left ( y-y^{L} \right )=xy-x^{L}y-xy^{L}+x^{L}y^{L}\geq 0 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
substituting w=xy and reformulating the inequality produces&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{L}y+xy^{L}-x^{L}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Following the same sequence of steps, the remaining inequalities are produced:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x^{U}-x \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b = \left ( y^{U} -y\right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{U}y+xy^{U}-x^{U}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x^{U}-x\right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left ( y-y^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq x^{U}y+xy^{L}-x^{U}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x-x^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left ( y^{U}-y \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq xy^{U}+x^{L}y-x^{L}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The under-estimators of the function are represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{L}y+xy^{L}-x^{L}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{U}y+xy^{U}-x^{U}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The over-estimators of the function are represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq x^{U}y+xy^{L}-x^{U}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq xy^{U}+x^{L}y-x^{L}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following shows the relaxation of a non-convex problem using McCormick Envelopes:&lt;br /&gt;
&lt;br /&gt;
The original non-convex problem: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\min Z= \textstyle \sum_{i=1} \sum_{j=1}  c_{i,j}x_i x_j +g_0(x)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \sum_{i=1}\sum_{j=1} c_{i,j}^l x_i x_j + g_l (x) \leq 0,\forall l \in L&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^ L \leq x \leq x^U&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Replacing &amp;lt;math&amp;gt;u_{i,j} = x_i x_j&amp;lt;/math&amp;gt;, we obtain a relaxed, convex problem using McCormick Envelopes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\min Z= \textstyle \sum_{i=1} \sum_{j=1}  c_{i,j} u_{i,j} +g_0(x)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \sum_{i=1}\sum_{j=1} c_{i,j}^l u_{i,j}+ g_l (x) \leq 0,\forall l \in L&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^L x_j + x_i x_j^L - {x_i}^L {x_j}^L, \forall  i,j \ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^U x_j + x_i x_j^U - {x_i}^U {x_j}^U, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^L x_j + x_i x_j^U - {x_i}^L {x_j}^U, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^U x_j + x_i x_j^L - {x_i}^U {x_j}^L, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^L \leq x \leq x^U,   \ \ u^L \leq u \leq u^U&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Similar steps are taken to derive the McCormick Envelopes for given functions with different formats e.g., e&amp;lt;sup&amp;gt;xy&amp;lt;/sup&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Good lower and upper bounds focus and minimize the feasible solution space; they reduce the number of iterations to find the optimal solution.  &lt;br /&gt;
&lt;br /&gt;
Piecewise McCormick Relaxation&lt;br /&gt;
&lt;br /&gt;
As discussed by Hazaji&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;, global optimization solvers focus initially on optimizing the lower and upper bounds, and when necessary, focus on domain partitioning.  By dividing the domain of a given variable into partitions or smaller regions, the solver is able to tailor and further tighten the convex relaxations of each partition. This strategy is known as the Piecewise McCormick relaxation&amp;lt;sup&amp;gt;4&amp;lt;/sup&amp;gt;.   &lt;br /&gt;
&lt;br /&gt;
== Example: Numerical ==&lt;br /&gt;
For the given problem, &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;min \  Z = xy + 6x + y&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \ xy \leq 18&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;0 \leq x \leq 10&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;0 \leq y \leq 2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;Let\   w = xy &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^L = 0  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;min \ Z = -w + 6x + y&lt;br /&gt;
&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \ w \leq 18&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq x^L y + xy^L&lt;br /&gt;
w \geq 0*   &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 10y + 2x - 20&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq 10y&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq 2x&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The solution is z= -76.2, x=10, y=1.8.&lt;br /&gt;
&lt;br /&gt;
== Applications ==&lt;br /&gt;
Bilinear functions occur in numerous engineering and natural science applications where McCormick Envelopes can be utilized, including the following : &lt;br /&gt;
&lt;br /&gt;
Computer vision &amp;lt;sup&amp;gt;5&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Energy conversion networks &amp;lt;sup&amp;gt;6&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Cellular networks&amp;lt;sup&amp;gt;7&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Dynamic biological systems&amp;lt;sup&amp;gt;8&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternate current optimal power flow (ACOPF)&amp;lt;sup&amp;gt;9&amp;lt;/sup&amp;gt;&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
Non-convex NLPs are challenging to solve and may require a significant amount of time, computing resources, and effort to determine if the solution is global or the problem has no feasible solution.  McCormick Envelopes provide a relaxation technique for bilinear non-convex nonlinear programming problems.  McCormick Envelopes provide a straightforward technique of replacing each bilinear term with a new variable and adding four constraints. Due to the recursive nature of this technique, it may be applied to a wide variety of engineering and scientific applications involving bilinear terms.   &lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
# McCormick, Garth P.  (1976). Computability of Global Solutions To Factorable Nonconvex Solutions: Part I: Convex Underestimating Problems. &#039;&#039;Mathematical Programming, 10&#039;&#039;, 147-175. doi: 10.1007/BF01580665&lt;br /&gt;
# Scott, J. K. Stuber, M. D. &amp;amp; Barton, P. I. (2011). Generalized McCormick Relaxations. &#039;&#039;Journal of Global Optimization, Vol. 51, Issue 4&#039;&#039;, 569-606 doi: 10.1007/s10898-011-9664-7&lt;br /&gt;
# Hijazi, H., Perspective Envelopes for Bilinear Functions, unpublished manuscript, retrieved from: [https://www.google.com/url?sa=t&amp;amp;rct=j&amp;amp;q=&amp;amp;esrc=s&amp;amp;source=web&amp;amp;cd=&amp;amp;ved=2ahUKEwjSr7eu8K70AhVYmHIEHUJzCVsQFnoECAIQAQ&amp;amp;url=http%3A%2F%2Fwww.optimization-online.org%2FDB_FILE%2F2015%2F03%2F4841.pdf&amp;amp;usg=AOvVaw1xf9B1f-EPw0mG1LOqRfm9 Perspective Envelopes for Bilinear Functions]&lt;br /&gt;
#Bergamini, M., Aguirre, P. &amp;amp; Grossman, I. (2005). Logic-based outer approximation for globally optimal synthesis of process networks. &#039;&#039;Computers and Chemical Engineering 29 (2005)&#039;&#039; 1914–1933.&lt;br /&gt;
#Chandraker, M. &amp;amp; Kriegman, D. (n.d.): Globally Optimal Bilinear Programming for Computer Vision Applications. University of San Diego, CA. Retrieved from: http://vision.ucsd.edu&lt;br /&gt;
#Kantor, J., &amp;amp; Mousaw, P. (2012). A class of bilinear models for the optimization of energy conversion networks. &#039;&#039;Chemical Engineering Science, 67,&#039;&#039; 131-138. doi: 10.1016/j.ces.2011.08.033&lt;br /&gt;
#Ahmed, F., Naeem, M., Ejaz, W. &#039;&#039;et al.&#039;&#039; Renewable Energy Assisted Sustainable and Environment Friendly Energy Cooperation in Cellular Networks. &#039;&#039;Wireless Pers Commun&#039;&#039; &#039;&#039;&#039;108,&#039;&#039;&#039; 2585–2607 (2019). &amp;lt;nowiki&amp;gt;https://doi.org/10.1007/s11277-019-06539-z&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
#Miro et al.: Deterministic global optimization algorithm based on outer approximation for the parameter estimation of nonlinear dynamic biological systems. &#039;&#039;BMC Bioinformatics&#039;&#039; (2012) 13:90. doi: 10.1186/1471-2105-13-90 ·&lt;br /&gt;
#Michael B., Castillo, A., Watson, J., &amp;amp; Laird, C. (2018) Strengthened SOCP Relaxations for ACOPF with McCormick Envelopes and Bounds Tightening, &#039;&#039;Computer Aided Chemical Engineering, 44,&#039;&#039; 1555-1560, doi: /10.1016/B978-0-444-64241-7.50254-8.&lt;/div&gt;</summary>
		<author><name>Smu29</name></author>
	</entry>
	<entry>
		<id>https://optimization.cbe.cornell.edu/index.php?title=McCormick_envelopes&amp;diff=4944</id>
		<title>McCormick envelopes</title>
		<link rel="alternate" type="text/html" href="https://optimization.cbe.cornell.edu/index.php?title=McCormick_envelopes&amp;diff=4944"/>
		<updated>2021-12-08T00:51:33Z</updated>

		<summary type="html">&lt;p&gt;Smu29: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Author: Susan Urban (SYSEN 5800 Fall 2021) &lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
[[File:Image of updated estimators and envelopes.png|thumb|Figure 1: Relationships between the given function, concave over-estimators, convex under-estimators, a concave envelope and a convex envelope.  ]]&lt;br /&gt;
Optimization of a non-convex function f(x) is challenging since it may have multiple locally optimal solutions or no solution and it can take a significant amount of time, computing resources, and effort to determine if the solution is global or the problem has no feasible solution. Different techniques are used to address this challenge depending on the characteristics of the problem. One technique used for a given non-convex function is the identification of a concave envelope and a convex envelope.  The concave envelope, and respectively the convex envelope, is the concave over-estimator and convex under-estimator for the given function providing the tightest fit to the given function.  The envelope surrounds the given function, like an envelope encloses a letter, and limits the feasible solution space the most in comparison to all other concave over-estimators and convex under-estimators. Multiple concave over-estimators and multiple convex under-estimators may exist but there is only one concave envelope and one convex envelope for a given function and domain.  Figure 1 depicts the relationship between the given function f(x), multiple concave over-estimators, multiple convex under-estimators, a convex envelope, and a concave envelope. &lt;br /&gt;
== McCormick Envelopes: Theory, Methodology and Algorithmic Discussions ==&lt;br /&gt;
The McCormick Envelope, originally developed by Dr. Garth McCormick&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;, is a type of convex relaxation used for the optimization of bilinear (e.g., x*y, e&amp;lt;sup&amp;gt;xy&amp;lt;/sup&amp;gt; + y, sin (x+y) - x&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;) non-linear programming (NLP) problems.  As McCormick&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt; noted, McCormick Envelopes are based on the key assumption that convex and concave envelopes can be constructed for the given function.  &lt;br /&gt;
&lt;br /&gt;
Each bilinear term is replaced with a new variable and four sets of constraints are added. The non-linear programming is converted to a relaxed convex linear programming (LP) which can be more easily solved. &lt;br /&gt;
&lt;br /&gt;
The LP solution gives a lower (L) bound and any feasible solution to the problem gives an upper (U) bound.&lt;br /&gt;
&lt;br /&gt;
As noted by Scott et al&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;, McCormick envelopes are effective since they are recursive, can be applied to a variety of applications, and are typically stronger than those resulting from convexification or linearization procedures. &lt;br /&gt;
&lt;br /&gt;
The following is a derivation of the McCormick Envelopes for a given bilinear function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;Let \ w = xy&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^{L}\leq x\leq x^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;y^{L}\leq y\leq y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;x^{L}, x^{U}, y^{L}, y^{U} &amp;lt;/math&amp;gt;are   upper  and   lower  bound  values  for  &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;y&amp;lt;/math&amp;gt;, respectively.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left (x-x^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left (y-y^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
a and b are both positive resulting in a positive product&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a * b\geq 0&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a * b=\left ( x-x^{L} \right )\left ( y-y^{L} \right )=xy-x^{L}y-xy^{L}+x^{L}y^{L}\geq 0 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
substituting w=xy and reformulating the inequality produces&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{L}y+xy^{L}-x^{L}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Following the same sequence of steps, the remaining inequalities are produced:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x^{U}-x \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b = \left ( y^{U} -y\right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{U}y+xy^{U}-x^{U}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x^{U}-x\right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left ( y-y^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq x^{U}y+xy^{L}-x^{U}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x-x^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left ( y^{U}-y \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq xy^{U}+x^{L}y-x^{L}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The under-estimators of the function are represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{L}y+xy^{L}-x^{L}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{U}y+xy^{U}-x^{U}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The over-estimators of the function are represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq x^{U}y+xy^{L}-x^{U}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq xy^{U}+x^{L}y-x^{L}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following shows the relaxation of a non-convex problem using McCormick Envelopes:&lt;br /&gt;
&lt;br /&gt;
The original non-convex problem: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\min Z= \textstyle \sum_{i=1} \sum_{j=1}  c_{i,j}x_i x_j +g_0(x)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \sum_{i=1}\sum_{j=1} c_{i,j}^l x_i x_j + g_l (x) \leq 0,\forall l \in L&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^ L \leq x \leq x^U&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Replacing &amp;lt;math&amp;gt;u_{i,j} = x_i x_j&amp;lt;/math&amp;gt;, we obtain a relaxed, convex problem using McCormick Envelopes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\min Z= \textstyle \sum_{i=1} \sum_{j=1}  c_{i,j} u_{i,j} +g_0(x)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \sum_{i=1}\sum_{j=1} c_{i,j}^l u_{i,j}+ g_l (x) \leq 0,\forall l \in L&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^L x_j + x_i x_j^L - {x_i}^L {x_j}^L, \forall  i,j \ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^U x_j + x_i x_j^U - {x_i}^U {x_j}^U, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^L x_j + x_i x_j^U - {x_i}^L {x_j}^U, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^U x_j + x_i x_j^L - {x_i}^U {x_j}^L, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^L \leq x \leq x^U,   \ \ u^L \leq u \leq u^U&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Similar steps are taken to derive the McCormick Envelopes for given functions with different formats e.g., e&amp;lt;sup&amp;gt;xy&amp;lt;/sup&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Good lower and upper bounds focus and minimize the feasible solution space; they reduce the number of iterations to find the optimal solution.  &lt;br /&gt;
&lt;br /&gt;
Piecewise McCormick Relaxation&lt;br /&gt;
&lt;br /&gt;
As discussed by Hazaji&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;, global optimization solvers focus initially on optimizing the lower and upper bounds, and when necessary, focus on domain partitioning.  By dividing the domain of a given variable into partitions or smaller regions, the solver is able to tailor and further tighten the convex relaxations of each partition. This strategy is known as the Piecewise McCormick relaxation&amp;lt;sup&amp;gt;4&amp;lt;/sup&amp;gt;.   &lt;br /&gt;
&lt;br /&gt;
== Example: Numerical ==&lt;br /&gt;
For the given problem, &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;min \  Z = xy + 6x + y&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \ xy \leq 18&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;0 \leq x \leq 10&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;0 \leq y \leq 2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;Let\   w = xy &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;min \ Z = -w + 6x + y&lt;br /&gt;
&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \ w \leq 18&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq x^L y + xy^L&lt;br /&gt;
w \geq 0*   &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 10y + 2x - 20&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq 10y&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq 2x&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The solution is z= -76.2, x=10, y=1.8.&lt;br /&gt;
&lt;br /&gt;
== Applications ==&lt;br /&gt;
Bilinear functions occur in numerous engineering and natural science applications where McCormick Envelopes can be utilized, including the following : &lt;br /&gt;
&lt;br /&gt;
Computer vision &amp;lt;sup&amp;gt;5&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Energy conversion networks &amp;lt;sup&amp;gt;6&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Cellular networks&amp;lt;sup&amp;gt;7&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Dynamic biological systems&amp;lt;sup&amp;gt;8&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternate current optimal power flow (ACOPF)&amp;lt;sup&amp;gt;9&amp;lt;/sup&amp;gt;&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
Non-convex NLPs are challenging to solve and may require a significant amount of time, computing resources, and effort to determine if the solution is global or the problem has no feasible solution.  McCormick Envelopes provide a relaxation technique for bilinear non-convex nonlinear programming problems.  McCormick Envelopes provide a straightforward technique of replacing each bilinear term with a new variable and adding four constraints. Due to the recursive nature of this technique, it may be applied to a wide variety of engineering and scientific applications involving bilinear terms.   &lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
# McCormick, Garth P.  (1976). Computability of Global Solutions To Factorable Nonconvex Solutions: Part I: Convex Underestimating Problems. &#039;&#039;Mathematical Programming, 10&#039;&#039;, 147-175. doi: 10.1007/BF01580665&lt;br /&gt;
# Scott, J. K. Stuber, M. D. &amp;amp; Barton, P. I. (2011). Generalized McCormick Relaxations. &#039;&#039;Journal of Global Optimization, Vol. 51, Issue 4&#039;&#039;, 569-606 doi: 10.1007/s10898-011-9664-7&lt;br /&gt;
# Hijazi, H., Perspective Envelopes for Bilinear Functions, unpublished manuscript, retrieved from: [https://www.google.com/url?sa=t&amp;amp;rct=j&amp;amp;q=&amp;amp;esrc=s&amp;amp;source=web&amp;amp;cd=&amp;amp;ved=2ahUKEwjSr7eu8K70AhVYmHIEHUJzCVsQFnoECAIQAQ&amp;amp;url=http%3A%2F%2Fwww.optimization-online.org%2FDB_FILE%2F2015%2F03%2F4841.pdf&amp;amp;usg=AOvVaw1xf9B1f-EPw0mG1LOqRfm9 Perspective Envelopes for Bilinear Functions]&lt;br /&gt;
#Bergamini, M., Aguirre, P. &amp;amp; Grossman, I. (2005). Logic-based outer approximation for globally optimal synthesis of process networks. &#039;&#039;Computers and Chemical Engineering 29 (2005)&#039;&#039; 1914–1933.&lt;br /&gt;
#Chandraker, M. &amp;amp; Kriegman, D. (n.d.): Globally Optimal Bilinear Programming for Computer Vision Applications. University of San Diego, CA. Retrieved from: http://vision.ucsd.edu&lt;br /&gt;
#Kantor, J., &amp;amp; Mousaw, P. (2012). A class of bilinear models for the optimization of energy conversion networks. &#039;&#039;Chemical Engineering Science, 67,&#039;&#039; 131-138. doi: 10.1016/j.ces.2011.08.033&lt;br /&gt;
#Ahmed, F., Naeem, M., Ejaz, W. &#039;&#039;et al.&#039;&#039; Renewable Energy Assisted Sustainable and Environment Friendly Energy Cooperation in Cellular Networks. &#039;&#039;Wireless Pers Commun&#039;&#039; &#039;&#039;&#039;108,&#039;&#039;&#039; 2585–2607 (2019). &amp;lt;nowiki&amp;gt;https://doi.org/10.1007/s11277-019-06539-z&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
#Miro et al.: Deterministic global optimization algorithm based on outer approximation for the parameter estimation of nonlinear dynamic biological systems. &#039;&#039;BMC Bioinformatics&#039;&#039; (2012) 13:90. doi: 10.1186/1471-2105-13-90 ·&lt;br /&gt;
#Michael B., Castillo, A., Watson, J., &amp;amp; Laird, C. (2018) Strengthened SOCP Relaxations for ACOPF with McCormick Envelopes and Bounds Tightening, &#039;&#039;Computer Aided Chemical Engineering, 44,&#039;&#039; 1555-1560, doi: /10.1016/B978-0-444-64241-7.50254-8.&lt;/div&gt;</summary>
		<author><name>Smu29</name></author>
	</entry>
	<entry>
		<id>https://optimization.cbe.cornell.edu/index.php?title=McCormick_envelopes&amp;diff=4890</id>
		<title>McCormick envelopes</title>
		<link rel="alternate" type="text/html" href="https://optimization.cbe.cornell.edu/index.php?title=McCormick_envelopes&amp;diff=4890"/>
		<updated>2021-12-06T19:11:50Z</updated>

		<summary type="html">&lt;p&gt;Smu29: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Author: Susan Urban (SYSEN 5800 Fall 2021) &lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
[[File:Image of updated estimators and envelopes.png|thumb|Figure 1: Relationships between the given function, concave over-estimators, convex under-estimators, a concave envelope and a convex envelope.  ]]&lt;br /&gt;
Optimization of a non-convex function f(x) is challenging since it may have multiple locally optimal solutions or no solution and it can take a significant amount of time, computing resources, and effort to determine if the solution is global or the problem has no feasible solution. Different techniques are used to address this challenge depending on the characteristics of the problem. One technique used for a given non-convex function is the identification of a concave envelope and a convex envelope.  The concave envelope, and respectively the convex envelope, is the concave over-estimator and convex under-estimator for the given function providing the tightest fit to the given function.  The envelope surrounds the given function, like an envelope encloses a letter, and limits the feasible solution space the most in comparison to all other concave over-estimators and convex under-estimators. Multiple concave over-estimators and multiple convex under-estimators may exist but there is only one concave envelope and one convex envelope for a given function and domain.  Figure 1 depicts the relationship between the given function f(x), multiple concave over-estimators, multiple convex under-estimators, a convex envelope, and a concave envelope. &lt;br /&gt;
== McCormick Envelopes: Theory, Methodology and Algorithmic Discussions ==&lt;br /&gt;
The McCormick Envelope, originally developed by Dr. Garth McCormick&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;, is a type of convex relaxation used for the optimization of bilinear (e.g., x*y, e&amp;lt;sup&amp;gt;xy&amp;lt;/sup&amp;gt; + y, sin (x+y) - x&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;) non-linear programming (NLP) problems.  As McCormick&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt; noted, McCormick Envelopes are based on the key assumption that convex and concave envelopes can be constructed for the given function.  &lt;br /&gt;
&lt;br /&gt;
Each bilinear term is replaced with a new variable and four sets of constraints are added. The non-linear programming is converted to a relaxed convex linear programming (LP) which can be more easily solved. &lt;br /&gt;
&lt;br /&gt;
The LP solution gives a lower (L) bound and any feasible solution to the problem gives an upper (U) bound.&lt;br /&gt;
&lt;br /&gt;
As noted by Scott et al&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;, McCormick envelopes are effective since they are recursive, can be applied to a variety of applications, and are typically stronger than those resulting from convexification or linearization procedures. &lt;br /&gt;
&lt;br /&gt;
The following is a derivation of the McCormick Envelopes for a given bilinear function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;Let \ w = xy&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^{L}\leq x\leq x^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;y^{L}\leq y\leq y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;x^{L}, x^{U}, y^{L}, y^{U} &amp;lt;/math&amp;gt;are   upper  and   lower  bound  values  for  &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;y&amp;lt;/math&amp;gt;, respectively.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left (x-x^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left (y-y^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
a and b are both positive resulting in a positive product&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a * b\geq 0&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a * b=\left ( x-x^{L} \right )\left ( y-y^{L} \right )=xy-x^{L}y-xy^{L}+x^{L}y^{L}\geq 0 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
substituting w=xy and reformulating the inequality produces&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{L}y+xy^{L}-x^{L}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Following the same sequence of steps, the remaining inequalities are produced:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x^{U}-x \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b = \left ( y^{U} -y\right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{U}y+xy^{U}-x^{U}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x^{U}-x\right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left ( y-y^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq x^{U}y+xy^{L}-x^{U}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x-x^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left ( y^{U}-y \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq xy^{U}+x^{L}y-x^{L}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The under-estimators of the function are represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{L}y+xy^{L}-x^{L}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{U}y+xy^{U}-x^{U}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The over-estimators of the function are represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq x^{U}y+xy^{L}-x^{U}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq xy^{U}+x^{L}y-x^{L}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following shows the relaxation of a non-convex problem using McCormick Envelopes:&lt;br /&gt;
&lt;br /&gt;
The original non-convex problem: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\min Z= \textstyle \sum_{i=1} \sum_{j=1}  c_{i,j}x_i x_j +g_0(x)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \sum_{i=1}\sum_{j=1} c_{i,j}^l x_i x_j + g_l (x) \leq 0,\forall l \in L&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^ L \leq x \leq x^U&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Replacing &amp;lt;math&amp;gt;u_{i,j} = x_i x_j&amp;lt;/math&amp;gt;, we obtain a relaxed, convex problem using McCormick Envelopes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\min Z= \textstyle \sum_{i=1} \sum_{j=1}  c_{i,j} u_{i,j} +g_0(x)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \sum_{i=1}\sum_{j=1} c_{i,j}^l u_{i,j}+ g_l (x) \leq 0,\forall l \in L&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^L x_j + x_i x_j^L - {x_i}^L {x_j}^L, \forall  i,j \ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^U x_j + x_i x_j^U - {x_i}^U {x_j}^U, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^L x_j + x_i x_j^U - {x_i}^L {x_j}^U, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^U x_j + x_i x_j^L - {x_i}^U {x_j}^L, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^L \leq x \leq x^U,   \ \ u^L \leq u \leq u^U&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Similar steps are taken to derive the McCormick Envelopes for given functions with different formats e.g., e&amp;lt;sup&amp;gt;xy&amp;lt;/sup&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Good lower and upper bounds focus and minimize the feasible solution space; they reduce the number of iterations to find the optimal solution.  &lt;br /&gt;
&lt;br /&gt;
Piecewise McCormick Relaxation&lt;br /&gt;
&lt;br /&gt;
As discussed by Hazaji&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;, global optimization solvers focus initially on optimizing the lower and upper bounds, and when necessary, focus on domain partitioning.  By dividing the domain of a given variable into partitions or smaller regions, the solver is able to tailor and further tighten the convex relaxations of each partition. This strategy is known as the Piecewise McCormick relaxation&amp;lt;sup&amp;gt;4&amp;lt;/sup&amp;gt;.   &lt;br /&gt;
&lt;br /&gt;
== Example: Numerical ==&lt;br /&gt;
&amp;lt;math&amp;gt;min \  Z = xy + 6x + y&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \ xy \leq 18&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;0 \leq x \leq 10&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;0 \leq y \leq 2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;Let\   w = xy &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;min \ Z = -w + 6x + y&lt;br /&gt;
&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \ w \leq 18&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 10y + 2x - 20&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq 10y&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq 2x&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using GAMS, the solution is z= -76.2, x=10, y=1.8.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;GAMS code sample:&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
variable z;&lt;br /&gt;
&lt;br /&gt;
positive variable x, y, w;&lt;br /&gt;
&lt;br /&gt;
equations  obj, c1, c2, c3, c4, c5 ;&lt;br /&gt;
&lt;br /&gt;
obj..    z =e= -w -6*x + y;&lt;br /&gt;
&lt;br /&gt;
c1..     w =l= 18 ;&lt;br /&gt;
&lt;br /&gt;
c2..     w =g= 0;&lt;br /&gt;
&lt;br /&gt;
c3..     w =g= 10*y +2*x -20;&lt;br /&gt;
&lt;br /&gt;
c4..     w =l= 10*y;&lt;br /&gt;
&lt;br /&gt;
c5..     w =l= 2*x;&lt;br /&gt;
&lt;br /&gt;
x.up = 10;&lt;br /&gt;
&lt;br /&gt;
x.lo =0;    &lt;br /&gt;
&lt;br /&gt;
y.up = 2;       &lt;br /&gt;
&lt;br /&gt;
y.lo = 0;&lt;br /&gt;
&lt;br /&gt;
model course5800 /all/;&lt;br /&gt;
&lt;br /&gt;
option mip = baron;&lt;br /&gt;
&lt;br /&gt;
option optcr = 0;&lt;br /&gt;
&lt;br /&gt;
solve course5800 minimizing z using mip ;&lt;br /&gt;
&lt;br /&gt;
== Applications ==&lt;br /&gt;
Bilinear functions occur in numerous engineering and natural science applications where McCormick Envelopes can be utilized, including the following : &lt;br /&gt;
&lt;br /&gt;
Computer vision &amp;lt;sup&amp;gt;5&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Energy conversion networks &amp;lt;sup&amp;gt;6&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Cellular networks&amp;lt;sup&amp;gt;7&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Dynamic biological systems&amp;lt;sup&amp;gt;8&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternate current optimal power flow (ACOPF)&amp;lt;sup&amp;gt;9&amp;lt;/sup&amp;gt;&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
Non-convex NLPs are challenging to solve and may require a significant amount of time, computing resources, and effort to determine if the solution is global or the problem has no feasible solution.  McCormick Envelopes provide a relaxation technique for bilinear non-convex nonlinear programming problems.  McCormick Envelopes provide a straightforward technique of replacing each bilinear term with a new variable and adding four constraints. Due to the recursive nature of this technique, it may be applied to a wide variety of engineering and scientific applications involving bilinear terms.   &lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
# McCormick, Garth P.  (1976). Computability of Global Solutions To Factorable Nonconvex Solutions: Part I: Convex Underestimating Problems. &#039;&#039;Mathematical Programming, 10&#039;&#039;, 147-175. doi: 10.1007/BF01580665&lt;br /&gt;
# Scott, J. K. Stuber, M. D. &amp;amp; Barton, P. I. (2011). Generalized McCormick Relaxations. &#039;&#039;Journal of Global Optimization, Vol. 51, Issue 4&#039;&#039;, 569-606 doi: 10.1007/s10898-011-9664-7&lt;br /&gt;
# Hijazi, H., Perspective Envelopes for Bilinear Functions, unpublished manuscript, retrieved from: [https://www.google.com/url?sa=t&amp;amp;rct=j&amp;amp;q=&amp;amp;esrc=s&amp;amp;source=web&amp;amp;cd=&amp;amp;ved=2ahUKEwjSr7eu8K70AhVYmHIEHUJzCVsQFnoECAIQAQ&amp;amp;url=http%3A%2F%2Fwww.optimization-online.org%2FDB_FILE%2F2015%2F03%2F4841.pdf&amp;amp;usg=AOvVaw1xf9B1f-EPw0mG1LOqRfm9 Perspective Envelopes for Bilinear Functions]&lt;br /&gt;
#Bergamini, M., Aguirre, P. &amp;amp; Grossman, I. (2005). Logic-based outer approximation for globally optimal synthesis of process networks. &#039;&#039;Computers and Chemical Engineering 29 (2005)&#039;&#039; 1914–1933.&lt;br /&gt;
#Chandraker, M. &amp;amp; Kriegman, D. (n.d.): Globally Optimal Bilinear Programming for Computer Vision Applications. University of San Diego, CA. Retrieved from: http://vision.ucsd.edu&lt;br /&gt;
#Kantor, J., &amp;amp; Mousaw, P. (2012). A class of bilinear models for the optimization of energy conversion networks. &#039;&#039;Chemical Engineering Science, 67,&#039;&#039; 131-138. doi: 10.1016/j.ces.2011.08.033&lt;br /&gt;
#Ahmed, F., Naeem, M., Ejaz, W. &#039;&#039;et al.&#039;&#039; Renewable Energy Assisted Sustainable and Environment Friendly Energy Cooperation in Cellular Networks. &#039;&#039;Wireless Pers Commun&#039;&#039; &#039;&#039;&#039;108,&#039;&#039;&#039; 2585–2607 (2019). &amp;lt;nowiki&amp;gt;https://doi.org/10.1007/s11277-019-06539-z&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
#Miro et al.: Deterministic global optimization algorithm based on outer approximation for the parameter estimation of nonlinear dynamic biological systems. &#039;&#039;BMC Bioinformatics&#039;&#039; (2012) 13:90. doi: 10.1186/1471-2105-13-90 ·&lt;br /&gt;
#Michael B., Castillo, A., Watson, J., &amp;amp; Laird, C. (2018) Strengthened SOCP Relaxations for ACOPF with McCormick Envelopes and Bounds Tightening, &#039;&#039;Computer Aided Chemical Engineering, 44,&#039;&#039; 1555-1560, doi: /10.1016/B978-0-444-64241-7.50254-8.&lt;/div&gt;</summary>
		<author><name>Smu29</name></author>
	</entry>
	<entry>
		<id>https://optimization.cbe.cornell.edu/index.php?title=McCormick_envelopes&amp;diff=4887</id>
		<title>McCormick envelopes</title>
		<link rel="alternate" type="text/html" href="https://optimization.cbe.cornell.edu/index.php?title=McCormick_envelopes&amp;diff=4887"/>
		<updated>2021-12-06T18:42:48Z</updated>

		<summary type="html">&lt;p&gt;Smu29: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Author: Susan Urban (SYSEN 5800 Fall 2021) &lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
Optimization of a non-convex function f(x) is challenging since it may have multiple locally optimal solutions or no solution and it can take a significant amount of time, computing resources, and effort to determine if the solution is global or the problem has no feasible solution. Different techniques are used to address this challenge depending on the characteristics of the problem. &lt;br /&gt;
[[File:Image of updated estimators and envelopes.png|thumb|Figure 1: Relationships between the given function, concave over-estimators, convex under-estimators, a convex envelope, and a concave envelope. ]]&lt;br /&gt;
One technique used for a given non-convex function is the identification of a concave envelope and a convex envelope.  The concave envelope, and respectively the convex envelope, is the concave over-estimator and convex under-estimator for the given function providing the tightest fit to the given function.  The envelope surrounds the given function, like an envelope encloses a letter, and limits the feasible solution space the most in comparison to all other concave over-estimators and convex under-estimators. Multiple concave over-estimators and multiple convex under-estimators may exist but there is only one concave envelope and one convex envelope for a given function and domain.  Figure 1 depicts the relationship between the given function f(x), multiple concave over-estimators, multiple convex under-estimators, a convex envelope, and a concave envelope.      &lt;br /&gt;
&lt;br /&gt;
== McCormick Envelopes: Theory, Methodology and Algorithmic Discussions ==&lt;br /&gt;
The McCormick Envelope, originally developed by Dr. Garth McCormick&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;, is a type of convex relaxation used for the optimization of bilinear (e.g., x*y, e&amp;lt;sup&amp;gt;xy&amp;lt;/sup&amp;gt; + y, sin (x+y) - x&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;) non-linear programming (NLP) problems.  As McCormick&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt; noted, McCormick Envelopes are based on the key assumption that convex and concave envelopes can be constructed for the given function.  &lt;br /&gt;
&lt;br /&gt;
Each bilinear term is replaced with a new variable and four sets of constraints are added. The non-linear programming is converted to a relaxed convex linear programming (LP) which can be more easily solved. &lt;br /&gt;
&lt;br /&gt;
The LP solution gives a lower (L) bound and any feasible solution to the problem gives an upper (U) bound.&lt;br /&gt;
&lt;br /&gt;
As noted by Scott et al&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;, McCormick envelopes are effective since they are recursive, can be applied to a variety of applications, and are typically stronger than those resulting from convexification or linearization procedures. &lt;br /&gt;
&lt;br /&gt;
The following is a derivation of the McCormick Envelopes for a given bilinear function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;Let \ w = xy&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^{L}\leq x\leq x^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;y^{L}\leq y\leq y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;x^{L}, x^{U}, y^{L}, y^{U} &amp;lt;/math&amp;gt;are   upper  and   lower  bound  values  for  &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;y&amp;lt;/math&amp;gt;, respectively.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left (x-x^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left (y-y^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
a and b are both positive resulting in a positive product&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a * b\geq 0&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a * b=\left ( x-x^{L} \right )\left ( y-y^{L} \right )=xy-x^{L}y-xy^{L}+x^{L}y^{L}\geq 0 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
substituting w=xy and reformulating the inequality produces&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{L}y+xy^{L}-x^{L}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Following the same sequence of steps, the remaining inequalities are produced:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x^{U}-x \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b = \left ( y^{U} -y\right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{U}y+xy^{U}-x^{U}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x^{U}-x\right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left ( y-y^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq x^{U}y+xy^{L}-x^{U}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x-x^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left ( y^{U}-y \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq xy^{U}+x^{L}y-x^{L}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The under-estimators of the function are represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{L}y+xy^{L}-x^{L}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{U}y+xy^{U}-x^{U}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The over-estimators of the function are represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq x^{U}y+xy^{L}-x^{U}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq xy^{U}+x^{L}y-x^{L}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following shows the relaxation of a non-convex problem using McCormick Envelopes:&lt;br /&gt;
&lt;br /&gt;
The original non-convex problem: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\min Z= \textstyle \sum_{i=1} \sum_{j=1}  c_{i,j}x_i x_j +g_0(x)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \sum_{i=1}\sum_{j=1} c_{i,j}^l x_i x_j + g_l (x) \leq 0,\forall l \in L&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^ L \leq x \leq x^U&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Replacing &amp;lt;math&amp;gt;u_{i,j} = x_i x_j&amp;lt;/math&amp;gt;, we obtain a relaxed, convex problem using McCormick Envelopes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\min Z= \textstyle \sum_{i=1} \sum_{j=1}  c_{i,j} u_{i,j} +g_0(x)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \sum_{i=1}\sum_{j=1} c_{i,j}^l u_{i,j}+ g_l (x) \leq 0,\forall l \in L&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^L x_j + x_i x_j^L - {x_i}^L {x_j}^L, \forall  i,j \ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^U x_j + x_i x_j^U - {x_i}^U {x_j}^U, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^L x_j + x_i x_j^U - {x_i}^L {x_j}^U, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^U x_j + x_i x_j^L - {x_i}^U {x_j}^L, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^L \leq x \leq x^U,   \ \ u^L \leq u \leq u^U&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Similar steps are taken to derive the McCormick Envelopes for given functions with different formats e.g., e&amp;lt;sup&amp;gt;xy&amp;lt;/sup&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Good lower and upper bounds focus and minimize the feasible solution space; they reduce the number of iterations to find the optimal solution.  &lt;br /&gt;
&lt;br /&gt;
=== Piecewise McCormick Relaxation ===&lt;br /&gt;
As discussed by Hazaji&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;, global optimization solvers focus initially on optimizing the lower and upper bounds, and when necessary, focus on domain partitioning.  By dividing the domain of a given variable into partitions or smaller regions, the solver is able to tailor and further tighten the convex relaxations of each partition. This strategy is known as the Piecewise McCormick relaxation&amp;lt;sup&amp;gt;4&amp;lt;/sup&amp;gt;.   &lt;br /&gt;
&lt;br /&gt;
== Example: Numerical ==&lt;br /&gt;
&amp;lt;math&amp;gt;min \  Z = xy + 6x + y&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \ xy \leq 18&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;0 \leq x \leq 10&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;0 \leq y \leq 2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;Let\   w = xy &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;min \ Z = -w + 6x + y&lt;br /&gt;
&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \ w \leq 18&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 10y + 2x - 20&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq 10y&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq 2x&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using GAMS, the solution is z= -76.2, x=10, y=1.8.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;GAMS code sample:&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
variable z;&lt;br /&gt;
&lt;br /&gt;
positive variable x, y, w;&lt;br /&gt;
&lt;br /&gt;
equations  obj, c1, c2, c3, c4, c5 ;&lt;br /&gt;
&lt;br /&gt;
obj..    z =e= -w -6*x + y;&lt;br /&gt;
&lt;br /&gt;
c1..     w =l= 18 ;&lt;br /&gt;
&lt;br /&gt;
c2..     w =g= 0;&lt;br /&gt;
&lt;br /&gt;
c3..     w =g= 10*y +2*x -20;&lt;br /&gt;
&lt;br /&gt;
c4..     w =l= 10*y;&lt;br /&gt;
&lt;br /&gt;
c5..     w =l= 2*x;&lt;br /&gt;
&lt;br /&gt;
x.up = 10;&lt;br /&gt;
&lt;br /&gt;
x.lo =0;    &lt;br /&gt;
&lt;br /&gt;
y.up = 2;       &lt;br /&gt;
&lt;br /&gt;
y.lo = 0;&lt;br /&gt;
&lt;br /&gt;
model course5800 /all/;&lt;br /&gt;
&lt;br /&gt;
option mip = baron;&lt;br /&gt;
&lt;br /&gt;
option optcr = 0;&lt;br /&gt;
&lt;br /&gt;
solve course5800 minimizing z using mip ;&lt;br /&gt;
&lt;br /&gt;
== Applications ==&lt;br /&gt;
Bilinear functions occur in numerous engineering and natural science applications where McCormick Envelopes can be utilized, including the following : &lt;br /&gt;
&lt;br /&gt;
Computer vision &amp;lt;sup&amp;gt;5&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Energy conversion networks &amp;lt;sup&amp;gt;6&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Cellular networks&amp;lt;sup&amp;gt;7&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Dynamic biological systems&amp;lt;sup&amp;gt;8&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternate current optimal power flow (ACOPF)&amp;lt;sup&amp;gt;9&amp;lt;/sup&amp;gt;&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
Non-convex NLPs are challenging to solve and may require a significant amount of time, computing resources, and effort to determine if the solution is global or the problem has no feasible solution.  McCormick Envelopes provide a relaxation technique for bilinear non-convex nonlinear programming problems.  McCormick Envelopes provide a straightforward technique of replacing each bilinear term with a new variable and adding four constraints. Due to the recursive nature of this technique, it may be applied to a wide variety of engineering and scientific applications involving bilinear terms.   &lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
# McCormick, Garth P.  (1976). Computability of Global Solutions To Factorable Nonconvex Solutions: Part I: Convex Underestimating Problems. &#039;&#039;Mathematical Programming, 10&#039;&#039;, 147-175. doi: 10.1007/BF01580665&lt;br /&gt;
# Scott, J. K. Stuber, M. D. &amp;amp; Barton, P. I. (2011). Generalized McCormick Relaxations. &#039;&#039;Journal of Global Optimization, Vol. 51, Issue 4&#039;&#039;, 569-606 doi: 10.1007/s10898-011-9664-7&lt;br /&gt;
# Hijazi, H., Perspective Envelopes for Bilinear Functions, unpublished manuscript, retrieved from: [https://www.google.com/url?sa=t&amp;amp;rct=j&amp;amp;q=&amp;amp;esrc=s&amp;amp;source=web&amp;amp;cd=&amp;amp;ved=2ahUKEwjSr7eu8K70AhVYmHIEHUJzCVsQFnoECAIQAQ&amp;amp;url=http%3A%2F%2Fwww.optimization-online.org%2FDB_FILE%2F2015%2F03%2F4841.pdf&amp;amp;usg=AOvVaw1xf9B1f-EPw0mG1LOqRfm9 Perspective Envelopes for Bilinear Functions]&lt;br /&gt;
#Bergamini, M., Aguirre, P. &amp;amp; Grossman, I. (2005). Logic-based outer approximation for globally optimal synthesis of process networks. &#039;&#039;Computers and Chemical Engineering 29 (2005)&#039;&#039; 1914–1933.&lt;br /&gt;
#Chandraker, M. &amp;amp; Kriegman, D. (n.d.): Globally Optimal Bilinear Programming for Computer Vision Applications. University of San Diego, CA. Retrieved from: http://vision.ucsd.edu&lt;br /&gt;
#Kantor, J., &amp;amp; Mousaw, P. (2012). A class of bilinear models for the optimization of energy conversion networks. &#039;&#039;Chemical Engineering Science, 67,&#039;&#039; 131-138. doi: 10.1016/j.ces.2011.08.033&lt;br /&gt;
#Ahmed, F., Naeem, M., Ejaz, W. &#039;&#039;et al.&#039;&#039; Renewable Energy Assisted Sustainable and Environment Friendly Energy Cooperation in Cellular Networks. &#039;&#039;Wireless Pers Commun&#039;&#039; &#039;&#039;&#039;108,&#039;&#039;&#039; 2585–2607 (2019). &amp;lt;nowiki&amp;gt;https://doi.org/10.1007/s11277-019-06539-z&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
#Miro et al.: Deterministic global optimization algorithm based on outer approximation for the parameter estimation of nonlinear dynamic biological systems. &#039;&#039;BMC Bioinformatics&#039;&#039; (2012) 13:90. doi: 10.1186/1471-2105-13-90 ·&lt;br /&gt;
#Michael B., Castillo, A., Watson, J., &amp;amp; Laird, C. (2018) Strengthened SOCP Relaxations for ACOPF with McCormick Envelopes and Bounds Tightening, &#039;&#039;Computer Aided Chemical Engineering, 44,&#039;&#039; 1555-1560, doi: /10.1016/B978-0-444-64241-7.50254-8.&lt;/div&gt;</summary>
		<author><name>Smu29</name></author>
	</entry>
	<entry>
		<id>https://optimization.cbe.cornell.edu/index.php?title=McCormick_envelopes&amp;diff=4003</id>
		<title>McCormick envelopes</title>
		<link rel="alternate" type="text/html" href="https://optimization.cbe.cornell.edu/index.php?title=McCormick_envelopes&amp;diff=4003"/>
		<updated>2021-11-28T14:02:36Z</updated>

		<summary type="html">&lt;p&gt;Smu29: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Author: Susan Urban (smu29) (SYSEN 5800 Fall 2021) &lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Introduction&#039;&#039;&#039; ==&lt;br /&gt;
Optimization of a non-convex function f(x) is challenging since it may have multiple locally optimal solutions or no solution and it can take a significant amount of time, computing resources, and effort to determine if the solution is global or the problem has no feasible solution. Different techniques are used to address this challenge depending on the characteristics of the problem. &lt;br /&gt;
[[File:Image of updated estimators and envelopes.png|thumb|Figure 1: Relationships between the given function, concave over-estimators, convex under-estimators, a convex envelope, and a concave envelope. ]]&lt;br /&gt;
One technique used for a given non-convex function is the identification of a concave envelope and a convex envelope.  The concave envelope, and respectively the convex envelope, is the concave over-estimator and convex under-estimator for the given function providing the tightest fit to the given function.  The envelope surrounds the given function, like an envelope encloses a letter, and limits the feasible solution space the most in comparison to all other concave over-estimators and convex under-estimators. Multiple concave over-estimators and multiple convex under-estimators may exist but there is only one concave envelope and one convex envelope for a given function and domain.  Figure 1 depicts the relationship between the given function f(x), multiple concave over-estimators, multiple convex under-estimators, a convex envelope, and a concave envelope.      &lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;McCormick Envelopes: Theory, Methodology and Algorithmic Discussions&#039;&#039;&#039; ==&lt;br /&gt;
The McCormick Envelope, originally developed by Dr. Garth McCormick&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;, is a type of convex relaxation used for the optimization of bilinear (e.g., x*y, e&amp;lt;sup&amp;gt;xy&amp;lt;/sup&amp;gt; + y, sin (x+y) - x&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;) non-linear programming (NLP) problems.  As McCormick&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt; noted, McCormick Envelopes are based on the key assumption that convex and concave envelopes can be constructed for the given function.  &lt;br /&gt;
&lt;br /&gt;
Each bilinear term is replaced with a new variable and four sets of constraints are added. The non-linear programming is converted to a relaxed convex linear programming (LP) which can be more easily solved. &lt;br /&gt;
&lt;br /&gt;
The LP solution gives a lower (L) bound and any feasible solution to the problem gives an upper (U) bound.&lt;br /&gt;
&lt;br /&gt;
As noted by Scott et al&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;, McCormick envelopes are effective since they are recursive, can be applied to a variety of applications, and are typically stronger than those resulting from convexification or linearization procedures. &lt;br /&gt;
&lt;br /&gt;
The following is a derivation of the McCormick Envelopes for a given bilinear function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;Let \ w = xy&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^{L}\leq x\leq x^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;y^{L}\leq y\leq y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;x^{L}, x^{U}, y^{L}, y^{U} &amp;lt;/math&amp;gt;are   upper  and   lower  bound  values  for  &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;y&amp;lt;/math&amp;gt;, respectively.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left (x-x^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left (y-y^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
a and b are both positive resulting in a positive product&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a * b\geq 0&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a * b=\left ( x-x^{L} \right )\left ( y-y^{L} \right )=xy-x^{L}y-xy^{L}+x^{L}y^{L}\geq 0 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
substituting w=xy and reformulating the inequality produces&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{L}y+xy^{L}-x^{L}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Following the same sequence of steps, the remaining inequalities are produced:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x^{U}-x \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b = \left ( y^{U} -y\right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{U}y+xy^{U}-x^{U}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x^{U}-x\right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left ( y-y^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq x^{U}y+xy^{L}-x^{U}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x-x^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left ( y^{U}-y \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq xy^{U}+x^{L}y-x^{L}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The under-estimators of the function are represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{L}y+xy^{L}-x^{L}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{U}y+xy^{U}-x^{U}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The over-estimators of the function are represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq x^{U}y+xy^{L}-x^{U}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq xy^{U}+x^{L}y-x^{L}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following shows the relaxation of a non-convex problem using McCormick Envelopes:&lt;br /&gt;
&lt;br /&gt;
The original non-convex problem: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\min Z= \textstyle \sum_{i=1} \sum_{j=1}  c_{i,j}x_i x_j +g_0(x)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \sum_{i=1}\sum_{j=1} c_{i,j}^l x_i x_j + g_l (x) \leq 0,\forall l \in L&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^ L \leq x \leq x^U&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Replacing &amp;lt;math&amp;gt;u_{i,j} = x_i x_j&amp;lt;/math&amp;gt;, we obtain a relaxed, convex problem using McCormick Envelopes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\min Z= \textstyle \sum_{i=1} \sum_{j=1}  c_{i,j} u_{i,j} +g_0(x)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \sum_{i=1}\sum_{j=1} c_{i,j}^l u_{i,j}+ g_l (x) \leq 0,\forall l \in L&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^L x_j + x_i x_j^L - {x_i}^L {x_j}^L, \forall  i,j \ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^U x_j + x_i x_j^U - {x_i}^U {x_j}^U, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^L x_j + x_i x_j^U - {x_i}^L {x_j}^U, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^U x_j + x_i x_j^L - {x_i}^U {x_j}^L, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^L \leq x \leq x^U,   \ \ u^L \leq u \leq u^U&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Similar steps are taken to derive the McCormick Envelopes for given functions with different formats e.g., e&amp;lt;sup&amp;gt;xy&amp;lt;/sup&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Good lower and upper bounds focus and minimize the feasible solution space; they reduce the number of iterations to find the optimal solution.  &lt;br /&gt;
&lt;br /&gt;
=== Piecewise McCormick Relaxation ===&lt;br /&gt;
As discussed by Hazaji&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;, global optimization solvers focus initially on optimizing the lower and upper bounds, and when necessary, focus on domain partitioning.  By dividing the domain of a given variable into partitions or smaller regions, the solver is able to tailor and further tighten the convex relaxations of each partition. This strategy is known as the Piecewise McCormick relaxation&amp;lt;sup&amp;gt;4&amp;lt;/sup&amp;gt;.   &lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Example: Numerical&#039;&#039;&#039; ==&lt;br /&gt;
&amp;lt;math&amp;gt;min \  Z = xy + 6x + y&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \ xy \leq 18&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;0 \leq x \leq 10&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;0 \leq y \leq 2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;Let\   w = xy &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;min \ Z = -w + 6x + y&lt;br /&gt;
&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \ w \leq 18&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 10y + 2x - 20&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq 10y&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq 2x&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using GAMS, the solution is z= -76.2, x=10, y=1.8.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;GAMS code sample:&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
variable z;&lt;br /&gt;
&lt;br /&gt;
positive variable x, y, w;&lt;br /&gt;
&lt;br /&gt;
equations  obj, c1, c2, c3, c4, c5 ;&lt;br /&gt;
&lt;br /&gt;
obj..    z =e= -w -6*x + y;&lt;br /&gt;
&lt;br /&gt;
c1..     w =l= 18 ;&lt;br /&gt;
&lt;br /&gt;
c2..     w =g= 0;&lt;br /&gt;
&lt;br /&gt;
c3..     w =g= 10*y +2*x -20;&lt;br /&gt;
&lt;br /&gt;
c4..     w =l= 10*y;&lt;br /&gt;
&lt;br /&gt;
c5..     w =l= 2*x;&lt;br /&gt;
&lt;br /&gt;
x.up = 10;&lt;br /&gt;
&lt;br /&gt;
x.lo =0;    &lt;br /&gt;
&lt;br /&gt;
y.up = 2;       &lt;br /&gt;
&lt;br /&gt;
y.lo = 0;&lt;br /&gt;
&lt;br /&gt;
model course5800 /all/;&lt;br /&gt;
&lt;br /&gt;
option mip = baron;&lt;br /&gt;
&lt;br /&gt;
option optcr = 0;&lt;br /&gt;
&lt;br /&gt;
solve course5800 minimizing z using mip ;&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Applications&#039;&#039;&#039; ==&lt;br /&gt;
Bilinear functions occur in numerous engineering and natural science applications where McCormick Envelopes can be utilized, including the following : &lt;br /&gt;
&lt;br /&gt;
Computer vision &amp;lt;sup&amp;gt;5&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Energy conversion networks &amp;lt;sup&amp;gt;6&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Cellular networks&amp;lt;sup&amp;gt;7&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Dynamic biological systems&amp;lt;sup&amp;gt;8&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternate current optimal power flow (ACOPF)&amp;lt;sup&amp;gt;9&amp;lt;/sup&amp;gt;&lt;br /&gt;
== &#039;&#039;&#039;Conclusion&#039;&#039;&#039; ==&lt;br /&gt;
Non-convex NLPs are challenging to solve and may require a significant amount of time, computing resources, and effort to determine if the solution is global or the problem has no feasible solution.  McCormick Envelopes provide a relaxation technique for bilinear non-convex nonlinear programming problems.  McCormick Envelopes provide a straightforward technique of replacing each bilinear term with a new variable and adding four constraints. Due to the recursive nature of this technique, it may be applied to a wide variety of engineering and scientific applications involving bilinear terms.   &lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;References&#039;&#039;&#039; ==&lt;br /&gt;
# McCormick, Garth P.  (1976). Computability of Global Solutions To Factorable Nonconvex Solutions: Part I: Convex Underestimating Problems. &#039;&#039;Mathematical Programming, 10&#039;&#039;, 147-175. doi: 10.1007/BF01580665&lt;br /&gt;
# Scott, J. K. Stuber, M. D. &amp;amp; Barton, P. I. (2011). Generalized McCormick Relaxations. &#039;&#039;Journal of Global Optimization, Vol. 51, Issue 4&#039;&#039;, 569-606 doi: 10.1007/s10898-011-9664-7&lt;br /&gt;
# Hijazi, H., Perspective Envelopes for Bilinear Functions, unpublished manuscript, retrieved from: [https://www.google.com/url?sa=t&amp;amp;rct=j&amp;amp;q=&amp;amp;esrc=s&amp;amp;source=web&amp;amp;cd=&amp;amp;ved=2ahUKEwjSr7eu8K70AhVYmHIEHUJzCVsQFnoECAIQAQ&amp;amp;url=http%3A%2F%2Fwww.optimization-online.org%2FDB_FILE%2F2015%2F03%2F4841.pdf&amp;amp;usg=AOvVaw1xf9B1f-EPw0mG1LOqRfm9 Perspective Envelopes for Bilinear Functions]&lt;br /&gt;
#Bergamini, M., Aguirre, P. &amp;amp; Grossman, I. (2005). Logic-based outer approximation for globally optimal synthesis of process networks. &#039;&#039;Computers and Chemical Engineering 29 (2005)&#039;&#039; 1914–1933.&lt;br /&gt;
#Chandraker, M. &amp;amp; Kriegman, D. (n.d.): Globally Optimal Bilinear Programming for Computer Vision Applications. University of San Diego, CA. Retrieved from: http://vision.ucsd.edu&lt;br /&gt;
#Kantor, J., &amp;amp; Mousaw, P. (2012). A class of bilinear models for the optimization of energy conversion networks. &#039;&#039;Chemical Engineering Science, 67,&#039;&#039; 131-138. doi: 10.1016/j.ces.2011.08.033&lt;br /&gt;
#Ahmed, F., Naeem, M., Ejaz, W. &#039;&#039;et al.&#039;&#039; Renewable Energy Assisted Sustainable and Environment Friendly Energy Cooperation in Cellular Networks. &#039;&#039;Wireless Pers Commun&#039;&#039; &#039;&#039;&#039;108,&#039;&#039;&#039; 2585–2607 (2019). &amp;lt;nowiki&amp;gt;https://doi.org/10.1007/s11277-019-06539-z&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
#Miro et al.: Deterministic global optimization algorithm based on outer approximation for the parameter estimation of nonlinear dynamic biological systems. &#039;&#039;BMC Bioinformatics&#039;&#039; (2012) 13:90. doi: 10.1186/1471-2105-13-90 ·&lt;br /&gt;
#Michael B., Castillo, A., Watson, J., &amp;amp; Laird, C. (2018) Strengthened SOCP Relaxations for ACOPF with McCormick Envelopes and Bounds Tightening, &#039;&#039;Computer Aided Chemical Engineering, 44,&#039;&#039; 1555-1560, doi: /10.1016/B978-0-444-64241-7.50254-8.&lt;/div&gt;</summary>
		<author><name>Smu29</name></author>
	</entry>
	<entry>
		<id>https://optimization.cbe.cornell.edu/index.php?title=McCormick_envelopes&amp;diff=4001</id>
		<title>McCormick envelopes</title>
		<link rel="alternate" type="text/html" href="https://optimization.cbe.cornell.edu/index.php?title=McCormick_envelopes&amp;diff=4001"/>
		<updated>2021-11-28T13:46:57Z</updated>

		<summary type="html">&lt;p&gt;Smu29: /* McCormick Envelopes: Theory, Methodology and Algorithmic Discussions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Author: Susan Urban (smu29) (SYSEN 5800 Fall 2021) &lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Introduction&#039;&#039;&#039; ==&lt;br /&gt;
Optimization of a non-convex function f(x) is challenging since it may have multiple locally optimal solutions or no solution and it can take a significant amount of time, computing resources, and effort to determine if the solution is global or the problem has no feasible solution. Different techniques are used to address this challenge depending on the characteristics of the problem. &lt;br /&gt;
[[File:Image of updated estimators and envelopes.png|thumb|Figure 1: Relationships between the given function, concave over-estimators, convex under-estimators, a convex envelope, and a concave envelope. ]]&lt;br /&gt;
One technique used for a given non-convex function is the identification of a concave envelope and a convex envelope.  The concave envelope, and respectively the convex envelope, is the concave over-estimator and convex under-estimator for the given function providing the tightest fit to the given function.  The envelope surrounds the given function, like an envelope encloses a letter, and limits the feasible solution space the most in comparison to all other concave over-estimators and convex under-estimators. Multiple concave over-estimators and multiple convex under-estimators may exist but there is only one concave envelope and one convex envelope for a given function and domain.  Figure 1 depicts the relationship between the given function f(x), multiple concave over-estimators, multiple convex under-estimators, a convex envelope, and a concave envelope.      &lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;McCormick Envelopes: Theory, Methodology and Algorithmic Discussions&#039;&#039;&#039; ==&lt;br /&gt;
The McCormick Envelope, originally developed by Dr. Garth McCormick&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;, is a type of convex relaxation used for the optimization of bilinear (e.g., x*y, e&amp;lt;sup&amp;gt;xy&amp;lt;/sup&amp;gt; + y, sin (x+y) - x&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;) non-linear programming (NLP) problems.  As McCormick&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt; noted, McCormick Envelopes are based on the key assumption that a convex and a concave envelopes can be constructed for the given function.  &lt;br /&gt;
&lt;br /&gt;
Each bilinear term is replaced with a new variable and four sets of constraints are added. The non-linear programming is converted to a relaxed convex linear programming (LP) which can be more easily solved. &lt;br /&gt;
&lt;br /&gt;
The LP solution gives a lower (L) bound and any feasible solution to the problem gives an upper (U) bound.&lt;br /&gt;
&lt;br /&gt;
As noted by Scott et al&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;, McCormick envelopes are effective since they are recursive, can be applied to a variety of applications, and are typically stronger than those resulting from convexification or linearization procedures. &lt;br /&gt;
&lt;br /&gt;
The following is a derivation of the McCormick Envelopes for a given bilinear function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;Let \ w = xy&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^{L}\leq x\leq x^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;y^{L}\leq y\leq y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;x^{L}, x^{U}, y^{L}, y^{U} &amp;lt;/math&amp;gt;are   upper  and   lower  bound  values  for  &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;y&amp;lt;/math&amp;gt;, respectively.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left (x-x^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left (y-y^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
a and b are both positive resulting in a positive product&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a * b\geq 0&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a * b=\left ( x-x^{L} \right )\left ( y-y^{L} \right )=xy-x^{L}y-xy^{L}+x^{L}y^{L}\geq 0 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
substituting w=xy and reformulating the inequality produces&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{L}y+xy^{L}-x^{L}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Following the same sequence of steps, the remaining inequalities are produced:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x^{U}-x \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b = \left ( y^{U} -y\right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{U}y+xy^{U}-x^{U}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x^{U}-x\right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left ( y-y^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq x^{U}y+xy^{L}-x^{U}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x-x^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left ( y^{U}-y \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq xy^{U}+x^{L}y-x^{L}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The under-estimators of the function are represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{L}y+xy^{L}-x^{L}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{U}y+xy^{U}-x^{U}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The over-estimators of the function are represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq x^{U}y+xy^{L}-x^{U}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq xy^{U}+x^{L}y-x^{L}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following shows the relaxation of a non-convex problem using McCormick Envelopes:&lt;br /&gt;
&lt;br /&gt;
The original non-convex problem: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\min Z= \textstyle \sum_{i=1} \sum_{j=1}  c_{i,j}x_i x_j +g_0(x)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \sum_{i=1}\sum_{j=1} c_{i,j}^l x_i x_j + g_l (x) \leq 0,\forall l \in L&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^ L \leq x \leq x^U&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Replacing &amp;lt;math&amp;gt;u_{i,j} = x_i x_j&amp;lt;/math&amp;gt;, we obtain a relaxed, convex problem using McCormick Envelopes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\min Z= \textstyle \sum_{i=1} \sum_{j=1}  c_{i,j} u_{i,j} +g_0(x)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \sum_{i=1}\sum_{j=1} c_{i,j}^l u_{i,j}+ g_l (x) \leq 0,\forall l \in L&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^L x_j + x_i x_j^L - {x_i}^L {x_j}^L, \forall  i,j \ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^U x_j + x_i x_j^U - {x_i}^U {x_j}^U, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^L x_j + x_i x_j^U - {x_i}^L {x_j}^U, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^U x_j + x_i x_j^L - {x_i}^U {x_j}^L, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^L \leq x \leq x^U,   \ \ u^L \leq u \leq u^U&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Good lower and upper bounds focus and minimize the feasible solution space; they reduce the number of iterations to find the optimal solution.  &lt;br /&gt;
&lt;br /&gt;
=== Piecewise McCormick Relaxation ===&lt;br /&gt;
As discussed by Hazaji&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;, global optimization solvers focus initially on optimizing the lower and upper bounds, and when necessary, focus on domain partitioning.  By dividing the domain of a given variable into partitions or smaller regions, the solver is able to tailor and further tighten the convex relaxations of each partition. This strategy is known as the Piecewise McCormick relaxation&amp;lt;sup&amp;gt;4&amp;lt;/sup&amp;gt;.   &lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Example: Numerical&#039;&#039;&#039; ==&lt;br /&gt;
&amp;lt;math&amp;gt;min \  Z = xy + 6x + y&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \ xy \leq 18&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;0 \leq x \leq 10&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;0 \leq y \leq 2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;Let\   w = xy &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;min \ Z = -w + 6x + y&lt;br /&gt;
&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \ w \leq 18&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 10y + 2x - 20&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq 10y&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq 2x&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using GAMS, the solution is z= -76.2, x=10, y=1.8.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;GAMS code sample:&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
variable z;&lt;br /&gt;
&lt;br /&gt;
positive variable x, y, w;&lt;br /&gt;
&lt;br /&gt;
equations  obj, c1, c2, c3, c4, c5 ;&lt;br /&gt;
&lt;br /&gt;
obj..    z =e= -w -6*x + y;&lt;br /&gt;
&lt;br /&gt;
c1..     w =l= 18 ;&lt;br /&gt;
&lt;br /&gt;
c2..     w =g= 0;&lt;br /&gt;
&lt;br /&gt;
c3..     w =g= 10*y +2*x -20;&lt;br /&gt;
&lt;br /&gt;
c4..     w =l= 10*y;&lt;br /&gt;
&lt;br /&gt;
c5..     w =l= 2*x;&lt;br /&gt;
&lt;br /&gt;
x.up = 10;&lt;br /&gt;
&lt;br /&gt;
x.lo =0;    &lt;br /&gt;
&lt;br /&gt;
y.up = 2;       &lt;br /&gt;
&lt;br /&gt;
y.lo = 0;&lt;br /&gt;
&lt;br /&gt;
model course5800 /all/;&lt;br /&gt;
&lt;br /&gt;
option mip = baron;&lt;br /&gt;
&lt;br /&gt;
option optcr = 0;&lt;br /&gt;
&lt;br /&gt;
solve course5800 minimizing z using mip ;&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Applications&#039;&#039;&#039; ==&lt;br /&gt;
Bilinear functions occur in numerous engineering and natural science applications where McCormick Envelopes can be utilized, including the following : &lt;br /&gt;
&lt;br /&gt;
Computer vision &amp;lt;sup&amp;gt;5&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Energy conversion networks &amp;lt;sup&amp;gt;6&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Cellular networks&amp;lt;sup&amp;gt;7&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Dynamic biological systems&amp;lt;sup&amp;gt;8&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternate current optimal power flow (ACOPF)&amp;lt;sup&amp;gt;9&amp;lt;/sup&amp;gt;&lt;br /&gt;
== &#039;&#039;&#039;Conclusion&#039;&#039;&#039; ==&lt;br /&gt;
Non-convex NLPs are challenging to solve and may require a significant amount of time, computing resources, and effort to determine if the solution is global or the problem has no feasible solution.  McCormick Envelopes provide a relaxation technique for bilinear non-convex nonlinear programming problems.  McCormick Envelopes provide a straightforward technique of replacing each bilinear term with a new variable and adding four constraints. Due to the recursive nature of this technique, it may be applied to a wide variety of engineering and scientific applications involving bilinear terms.   &lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;References&#039;&#039;&#039; ==&lt;br /&gt;
# McCormick, Garth P.  (1976). Computability of Global Solutions To Factorable Nonconvex Solutions: Part I: Convex Underestimating Problems. &#039;&#039;Mathematical Programming, 10&#039;&#039;, 147-175. doi: 10.1007/BF01580665&lt;br /&gt;
# Scott, J. K. Stuber, M. D. &amp;amp; Barton, P. I. (2011). Generalized McCormick Relaxations. &#039;&#039;Journal of Global Optimization, Vol. 51, Issue 4&#039;&#039;, 569-606 doi: 10.1007/s10898-011-9664-7&lt;br /&gt;
# Hijazi, H., Perspective Envelopes for Bilinear Functions, unpublished manuscript, retrieved from: [https://www.google.com/url?sa=t&amp;amp;rct=j&amp;amp;q=&amp;amp;esrc=s&amp;amp;source=web&amp;amp;cd=&amp;amp;ved=2ahUKEwjSr7eu8K70AhVYmHIEHUJzCVsQFnoECAIQAQ&amp;amp;url=http%3A%2F%2Fwww.optimization-online.org%2FDB_FILE%2F2015%2F03%2F4841.pdf&amp;amp;usg=AOvVaw1xf9B1f-EPw0mG1LOqRfm9 Perspective Envelopes for Bilinear Functions]&lt;br /&gt;
#Bergamini, M., Aguirre, P. &amp;amp; Grossman, I. (2005). Logic-based outer approximation for globally optimal synthesis of process networks. &#039;&#039;Computers and Chemical Engineering 29 (2005)&#039;&#039; 1914–1933.&lt;br /&gt;
#Chandraker, M. &amp;amp; Kriegman, D. (n.d.): Globally Optimal Bilinear Programming for Computer Vision Applications. University of San Diego, CA. Retrieved from: http://vision.ucsd.edu&lt;br /&gt;
#Kantor, J., &amp;amp; Mousaw, P. (2012). A class of bilinear models for the optimization of energy conversion networks. &#039;&#039;Chemical Engineering Science, 67,&#039;&#039; 131-138. doi: 10.1016/j.ces.2011.08.033&lt;br /&gt;
#Ahmed, F., Naeem, M., Ejaz, W. &#039;&#039;et al.&#039;&#039; Renewable Energy Assisted Sustainable and Environment Friendly Energy Cooperation in Cellular Networks. &#039;&#039;Wireless Pers Commun&#039;&#039; &#039;&#039;&#039;108,&#039;&#039;&#039; 2585–2607 (2019). &amp;lt;nowiki&amp;gt;https://doi.org/10.1007/s11277-019-06539-z&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
#Miro et al.: Deterministic global optimization algorithm based on outer approximation for the parameter estimation of nonlinear dynamic biological systems. &#039;&#039;BMC Bioinformatics&#039;&#039; (2012) 13:90. doi: 10.1186/1471-2105-13-90 ·&lt;br /&gt;
#Michael B., Castillo, A., Watson, J., &amp;amp; Laird, C. (2018) Strengthened SOCP Relaxations for ACOPF with McCormick Envelopes and Bounds Tightening, &#039;&#039;Computer Aided Chemical Engineering, 44,&#039;&#039; 1555-1560, doi: /10.1016/B978-0-444-64241-7.50254-8.&lt;/div&gt;</summary>
		<author><name>Smu29</name></author>
	</entry>
	<entry>
		<id>https://optimization.cbe.cornell.edu/index.php?title=McCormick_envelopes&amp;diff=3999</id>
		<title>McCormick envelopes</title>
		<link rel="alternate" type="text/html" href="https://optimization.cbe.cornell.edu/index.php?title=McCormick_envelopes&amp;diff=3999"/>
		<updated>2021-11-28T13:40:01Z</updated>

		<summary type="html">&lt;p&gt;Smu29: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Author: Susan Urban (smu29) (SYSEN 5800 Fall 2021) &lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Introduction&#039;&#039;&#039; ==&lt;br /&gt;
Optimization of a non-convex function f(x) is challenging since it may have multiple locally optimal solutions or no solution and it can take a significant amount of time, computing resources, and effort to determine if the solution is global or the problem has no feasible solution. Different techniques are used to address this challenge depending on the characteristics of the problem. &lt;br /&gt;
[[File:Image of updated estimators and envelopes.png|thumb|Figure 1: Relationships between the given function, concave over-estimators, convex under-estimators, a convex envelope, and a concave envelope. ]]&lt;br /&gt;
One technique used for a given non-convex function is the identification of a concave envelope and a convex envelope.  The concave envelope, and respectively the convex envelope, is the concave over-estimator and convex under-estimator for the given function providing the tighest fit to the given function.  The envelope surrounds the given function, like an envelope encloses a letter, and limits the feasible solution space the most in comparison to all other concave over-estimators and convex under-estimators. Multiple concave over-estimators and multiple convex under-estimators may exist but there is only one concave envelope and one convex envelope for a given function and domain.  Figure 1 depicts the relationship between the given function f(x), multiple concave over-estimators, multiple convex under-estimators, a convex envelope, and a concave envelope.      &lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;McCormick Envelopes: Theory, Methodology and Algorithmic Discussions&#039;&#039;&#039; ==&lt;br /&gt;
The McCormick Envelope, originally developed by Dr. Garth McCormick&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;, is a type of convex relaxation used for the optimization of bilinear (e.g., x*y, e&amp;lt;sup&amp;gt;xy&amp;lt;/sup&amp;gt; + y, sin (x+y)) non-linear programming (NLP) problems.  As McCormick&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt; noted, McCormick Envelopes are based on the key assumption that a convex and a concave envelopes can be constructed for the given function.  &lt;br /&gt;
&lt;br /&gt;
Each bilinear term is replaced with a new variable and four sets of constraints are added. The non-linear programming is converted to a relaxed convex linear programming (LP) which can be more easily solved. &lt;br /&gt;
&lt;br /&gt;
The LP solution gives a lower (L) bound and any feasible solution to the problem gives an upper (U) bound.&lt;br /&gt;
&lt;br /&gt;
As noted by Scott et al&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;, McCormick envelopes are effective since they are recursive, can be applied to a variety of applications, and are typically stronger than those resulting from convexification or linearization procedures. &lt;br /&gt;
&lt;br /&gt;
The following is a derivation of the McCormick Envelopes for a given bilinear function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;Let \ w = xy&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^{L}\leq x\leq x^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;y^{L}\leq y\leq y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;x^{L}, x^{U}, y^{L}, y^{U} &amp;lt;/math&amp;gt;are   upper  and   lower  bound  values  for  &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;y&amp;lt;/math&amp;gt;, respectively.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left (x-x^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left (y-y^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
a and b are both positive resulting in a positive product&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a * b\geq 0&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a * b=\left ( x-x^{L} \right )\left ( y-y^{L} \right )=xy-x^{L}y-xy^{L}+x^{L}y^{L}\geq 0 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
substituting w=xy and reformulating the inequality produces&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{L}y+xy^{L}-x^{L}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Following the same sequence of steps, the remaining inequalities are produced:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x^{U}-x \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b = \left ( y^{U} -y\right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{U}y+xy^{U}-x^{U}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x^{U}-x\right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left ( y-y^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq x^{U}y+xy^{L}-x^{U}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x-x^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left ( y^{U}-y \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq xy^{U}+x^{L}y-x^{L}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The under-estimators of the function are represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{L}y+xy^{L}-x^{L}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{U}y+xy^{U}-x^{U}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The over-estimators of the function are represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq x^{U}y+xy^{L}-x^{U}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq xy^{U}+x^{L}y-x^{L}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following shows the relaxation of a non-convex problem using McCormick Envelopes:&lt;br /&gt;
&lt;br /&gt;
The original non-convex problem: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\min Z= \textstyle \sum_{i=1} \sum_{j=1}  c_{i,j}x_i x_j +g_0(x)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \sum_{i=1}\sum_{j=1} c_{i,j}^l x_i x_j + g_l (x) \leq 0,\forall l \in L&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^ L \leq x \leq x^U&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Replacing &amp;lt;math&amp;gt;u_{i,j} = x_i x_j&amp;lt;/math&amp;gt;, we obtain a relaxed, convex problem using McCormick Envelopes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\min Z= \textstyle \sum_{i=1} \sum_{j=1}  c_{i,j} u_{i,j} +g_0(x)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \sum_{i=1}\sum_{j=1} c_{i,j}^l u_{i,j}+ g_l (x) \leq 0,\forall l \in L&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^L x_j + x_i x_j^L - {x_i}^L {x_j}^L, \forall  i,j \ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^U x_j + x_i x_j^U - {x_i}^U {x_j}^U, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^L x_j + x_i x_j^U - {x_i}^L {x_j}^U, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^U x_j + x_i x_j^L - {x_i}^U {x_j}^L, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^L \leq x \leq x^U,   \ \ u^L \leq u \leq u^U&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Good lower and upper bounds focus and minimize the feasible solution space; they reduce the number of iterations to find the optimal solution.  &lt;br /&gt;
&lt;br /&gt;
=== Piecewise McCormick Relaxation ===&lt;br /&gt;
As discussed by Hazaji&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;, global optimization solvers focus initially on optimizing the lower and upper bounds, and when necessary, focus on domain partitioning.  By dividing the domain of a given variable into partitions or smaller regions, the solver is able to tailor and further tighten the convex relaxations of each partition. This strategy is known as the Piecewise McCormick relaxation&amp;lt;sup&amp;gt;4&amp;lt;/sup&amp;gt;.   &lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Example: Numerical&#039;&#039;&#039; ==&lt;br /&gt;
&amp;lt;math&amp;gt;min \  Z = xy + 6x + y&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \ xy \leq 18&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;0 \leq x \leq 10&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;0 \leq y \leq 2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;Let\   w = xy &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;min \ Z = -w + 6x + y&lt;br /&gt;
&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \ w \leq 18&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 10y + 2x - 20&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq 10y&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq 2x&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using GAMS, the solution is z= -76.2, x=10, y=1.8.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;GAMS code sample:&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
variable z;&lt;br /&gt;
&lt;br /&gt;
positive variable x, y, w;&lt;br /&gt;
&lt;br /&gt;
equations  obj, c1, c2, c3, c4, c5 ;&lt;br /&gt;
&lt;br /&gt;
obj..    z =e= -w -6*x + y;&lt;br /&gt;
&lt;br /&gt;
c1..     w =l= 18 ;&lt;br /&gt;
&lt;br /&gt;
c2..     w =g= 0;&lt;br /&gt;
&lt;br /&gt;
c3..     w =g= 10*y +2*x -20;&lt;br /&gt;
&lt;br /&gt;
c4..     w =l= 10*y;&lt;br /&gt;
&lt;br /&gt;
c5..     w =l= 2*x;&lt;br /&gt;
&lt;br /&gt;
x.up = 10;&lt;br /&gt;
&lt;br /&gt;
x.lo =0;    &lt;br /&gt;
&lt;br /&gt;
y.up = 2;       &lt;br /&gt;
&lt;br /&gt;
y.lo = 0;&lt;br /&gt;
&lt;br /&gt;
model course5800 /all/;&lt;br /&gt;
&lt;br /&gt;
option mip = baron;&lt;br /&gt;
&lt;br /&gt;
option optcr = 0;&lt;br /&gt;
&lt;br /&gt;
solve course5800 minimizing z using mip ;&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Applications&#039;&#039;&#039; ==&lt;br /&gt;
Bilinear functions occur in numerous engineering and natural science applications where McCormick Envelopes can be utilized, including the following : &lt;br /&gt;
&lt;br /&gt;
Computer vision &amp;lt;sup&amp;gt;5&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Energy conversion networks &amp;lt;sup&amp;gt;6&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Cellular networks&amp;lt;sup&amp;gt;7&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Dynamic biological systems&amp;lt;sup&amp;gt;8&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternate current optimal power flow (ACOPF)&amp;lt;sup&amp;gt;9&amp;lt;/sup&amp;gt;&lt;br /&gt;
== &#039;&#039;&#039;Conclusion&#039;&#039;&#039; ==&lt;br /&gt;
Non-convex NLPs are challenging to solve and may require a significant amount of time, computing resources, and effort to determine if the solution is global or the problem has no feasible solution.  McCormick Envelopes provide a relaxation technique for bilinear non-convex nonlinear programming problems.  McCormick Envelopes provide a straightforward technique of replacing each bilinear term with a new variable and adding four constraints. Due to the recursive nature of this technique, it may be applied to a wide variety of engineering and scientific applications involving bilinear terms.   &lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;References&#039;&#039;&#039; ==&lt;br /&gt;
# McCormick, Garth P.  (1976). Computability of Global Solutions To Factorable Nonconvex Solutions: Part I: Convex Underestimating Problems. &#039;&#039;Mathematical Programming, 10&#039;&#039;, 147-175. doi: 10.1007/BF01580665&lt;br /&gt;
# Scott, J. K. Stuber, M. D. &amp;amp; Barton, P. I. (2011). Generalized McCormick Relaxations. &#039;&#039;Journal of Global Optimization, Vol. 51, Issue 4&#039;&#039;, 569-606 doi: 10.1007/s10898-011-9664-7&lt;br /&gt;
# Hijazi, H., Perspective Envelopes for Bilinear Functions, unpublished manuscript, retrieved from: [https://www.google.com/url?sa=t&amp;amp;rct=j&amp;amp;q=&amp;amp;esrc=s&amp;amp;source=web&amp;amp;cd=&amp;amp;ved=2ahUKEwjSr7eu8K70AhVYmHIEHUJzCVsQFnoECAIQAQ&amp;amp;url=http%3A%2F%2Fwww.optimization-online.org%2FDB_FILE%2F2015%2F03%2F4841.pdf&amp;amp;usg=AOvVaw1xf9B1f-EPw0mG1LOqRfm9 Perspective Envelopes for Bilinear Functions]&lt;br /&gt;
#Bergamini, M., Aguirre, P. &amp;amp; Grossman, I. (2005). Logic-based outer approximation for globally optimal synthesis of process networks. &#039;&#039;Computers and Chemical Engineering 29 (2005)&#039;&#039; 1914–1933.&lt;br /&gt;
#Chandraker, M. &amp;amp; Kriegman, D. (n.d.): Globally Optimal Bilinear Programming for Computer Vision Applications. University of San Diego, CA. Retrieved from: http://vision.ucsd.edu&lt;br /&gt;
#Kantor, J., &amp;amp; Mousaw, P. (2012). A class of bilinear models for the optimization of energy conversion networks. &#039;&#039;Chemical Engineering Science, 67,&#039;&#039; 131-138. doi: 10.1016/j.ces.2011.08.033&lt;br /&gt;
#Ahmed, F., Naeem, M., Ejaz, W. &#039;&#039;et al.&#039;&#039; Renewable Energy Assisted Sustainable and Environment Friendly Energy Cooperation in Cellular Networks. &#039;&#039;Wireless Pers Commun&#039;&#039; &#039;&#039;&#039;108,&#039;&#039;&#039; 2585–2607 (2019). &amp;lt;nowiki&amp;gt;https://doi.org/10.1007/s11277-019-06539-z&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
#Miro et al.: Deterministic global optimization algorithm based on outer approximation for the parameter estimation of nonlinear dynamic biological systems. &#039;&#039;BMC Bioinformatics&#039;&#039; (2012) 13:90. doi: 10.1186/1471-2105-13-90 ·&lt;br /&gt;
#Michael B., Castillo, A., Watson, J., &amp;amp; Laird, C. (2018) Strengthened SOCP Relaxations for ACOPF with McCormick Envelopes and Bounds Tightening, &#039;&#039;Computer Aided Chemical Engineering, 44,&#039;&#039; 1555-1560, doi: /10.1016/B978-0-444-64241-7.50254-8.&lt;/div&gt;</summary>
		<author><name>Smu29</name></author>
	</entry>
	<entry>
		<id>https://optimization.cbe.cornell.edu/index.php?title=McCormick_envelopes&amp;diff=3993</id>
		<title>McCormick envelopes</title>
		<link rel="alternate" type="text/html" href="https://optimization.cbe.cornell.edu/index.php?title=McCormick_envelopes&amp;diff=3993"/>
		<updated>2021-11-28T12:46:23Z</updated>

		<summary type="html">&lt;p&gt;Smu29: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Author: Susan Urban (smu29) (SYSEN 5800 Fall 2021) &lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Introduction&#039;&#039;&#039; ==&lt;br /&gt;
Optimization of a non-convex function f(x) is challenging since it may have multiple locally optimal solutions or no solution and it can take a significant amount of time, computing resources, and effort to determine if the solution is global or the problem has no feasible solution. Different techniques are used to address this challenge depending on the characteristics of the problem. &lt;br /&gt;
[[File:Image of updated estimators and envelopes.png|thumb|Figure 1: Relationships between the given function, concave over-estimators, convex under-estimators, a convex envelope, and a concave envelope. ]]&lt;br /&gt;
One technique used for a given non-convex function is the identification of a concave envelope and a convex envelope.  The concave envelope, and respectively the convex envelope, is the concave over-estimator and convex under-estimator for the given function providing the tighest fit to the given function.  The envelope surrounds the given function, like an envelope encloses a letter, and limits the feasible solution space the most in comparison to all other concave over-estimators and convex under-estimators. Multiple concave over-estimators and multiple convex under-estimators may exist but there is only one concave envelope and one convex envelope for a given function and domain.  Figure 1 depicts the relationship between the given function f(x), multiple concave over-estimators, multiple convex under-estimators, a convex envelope, and a concave envelope.      &lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;McCormick Envelopes: Theory, Methodology and Algorithmic Discussions&#039;&#039;&#039; ==&lt;br /&gt;
The McCormick Envelope, originally developed by Dr. Garth McCormick&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;, is a type of convex relaxation used for the optimization of bilinear (e.g., x*y, x*y + y) non-linear programming (NLP) problems. &lt;br /&gt;
&lt;br /&gt;
Each bilinear term is replaced with a new variable and four sets of constraints are added. The non-linear programming is converted to a relaxed convex linear programming (LP) which can be more easily solved. &lt;br /&gt;
&lt;br /&gt;
The LP solution gives a lower (L) bound and any feasible solution to the problem gives an upper (U) bound.&lt;br /&gt;
&lt;br /&gt;
As noted by Scott et al&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;, McCormick envelopes are effective since they are recursive, can be applied to a variety of applications, and are typically stronger than those resulting from convexification or linearization procedures. &lt;br /&gt;
&lt;br /&gt;
The following is a derivation of the McCormick Envelopes for a given bilinear function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;Let \ w = xy&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^{L}\leq x\leq x^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;y^{L}\leq y\leq y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;x^{L}, x^{U}, y^{L}, y^{U} &amp;lt;/math&amp;gt;are   upper  and   lower  bound  values  for  &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;y&amp;lt;/math&amp;gt;, respectively.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left (x-x^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left (y-y^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
a and b are both positive resulting in a positive product&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a * b\geq 0&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a * b=\left ( x-x^{L} \right )\left ( y-y^{L} \right )=xy-x^{L}y-xy^{L}+x^{L}y^{L}\geq 0 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
substituting w=xy and reformulating the inequality produces&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{L}y+xy^{L}-x^{L}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Following the same sequence of steps, the remaining inequalities are produced:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x^{U}-x \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b = \left ( y^{U} -y\right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{U}y+xy^{U}-x^{U}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x^{U}-x\right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left ( y-y^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq x^{U}y+xy^{L}-x^{U}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x-x^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left ( y^{U}-y \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq xy^{U}+x^{L}y-x^{L}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The under-estimators of the function are represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{L}y+xy^{L}-x^{L}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{U}y+xy^{U}-x^{U}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The over-estimators of the function are represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq x^{U}y+xy^{L}-x^{U}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq xy^{U}+x^{L}y-x^{L}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following shows the relaxation of a non-convex problem using McCormick Envelopes:&lt;br /&gt;
&lt;br /&gt;
The original non-convex problem: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\min Z= \textstyle \sum_{i=1} \sum_{j=1}  c_{i,j}x_i x_j +g_0(x)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \sum_{i=1}\sum_{j=1} c_{i,j}^l x_i x_j + g_l (x) \leq 0,\forall l \in L&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^ L \leq x \leq x^U&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Replacing &amp;lt;math&amp;gt;u_{i,j} = x_i x_j&amp;lt;/math&amp;gt;, we obtain a relaxed, convex problem using McCormick Envelopes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\min Z= \textstyle \sum_{i=1} \sum_{j=1}  c_{i,j} u_{i,j} +g_0(x)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \sum_{i=1}\sum_{j=1} c_{i,j}^l u_{i,j}+ g_l (x) \leq 0,\forall l \in L&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^L x_j + x_i x_j^L - {x_i}^L {x_j}^L, \forall  i,j \ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^U x_j + x_i x_j^U - {x_i}^U {x_j}^U, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^L x_j + x_i x_j^U - {x_i}^L {x_j}^U, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^U x_j + x_i x_j^L - {x_i}^U {x_j}^L, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^L \leq x \leq x^U,   \ \ u^L \leq u \leq u^U&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Good lower and upper bounds focus and minimize the feasible solution space; they reduce the number of iterations to find the optimal solution.  &lt;br /&gt;
&lt;br /&gt;
=== Piecewise McCormick Relaxation ===&lt;br /&gt;
As discussed by Hazaji&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;, global optimization solvers focus initially on optimizing the lower and upper bounds, and when necessary, focus on domain partitioning.  By dividing the domain of a given variable into partitions or smaller regions, the solver is able to tailor and further tighten the convex relaxations of each partition. This strategy is known as the Piecewise McCormick relaxation&amp;lt;sup&amp;gt;4&amp;lt;/sup&amp;gt;.   &lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Example: Numerical&#039;&#039;&#039; ==&lt;br /&gt;
&amp;lt;math&amp;gt;min \  Z = xy + 6x + y&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \ xy \leq 18&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;0 \leq x \leq 10&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;0 \leq y \leq 2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;Let\   w = xy &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;min \ Z = -w + 6x + y&lt;br /&gt;
&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \ w \leq 18&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 10y + 2x - 20&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq 10y&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq 2x&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using GAMS, the solution is z= -76.2, x=10, y=1.8.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;GAMS code sample:&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
variable z;&lt;br /&gt;
&lt;br /&gt;
positive variable x, y, w;&lt;br /&gt;
&lt;br /&gt;
equations  obj, c1, c2, c3, c4, c5 ;&lt;br /&gt;
&lt;br /&gt;
obj..    z =e= -w -6*x + y;&lt;br /&gt;
&lt;br /&gt;
c1..     w =l= 18 ;&lt;br /&gt;
&lt;br /&gt;
c2..     w =g= 0;&lt;br /&gt;
&lt;br /&gt;
c3..     w =g= 10*y +2*x -20;&lt;br /&gt;
&lt;br /&gt;
c4..     w =l= 10*y;&lt;br /&gt;
&lt;br /&gt;
c5..     w =l= 2*x;&lt;br /&gt;
&lt;br /&gt;
x.up = 10;&lt;br /&gt;
&lt;br /&gt;
x.lo =0;    &lt;br /&gt;
&lt;br /&gt;
y.up = 2;       &lt;br /&gt;
&lt;br /&gt;
y.lo = 0;&lt;br /&gt;
&lt;br /&gt;
model course5800 /all/;&lt;br /&gt;
&lt;br /&gt;
option mip = baron;&lt;br /&gt;
&lt;br /&gt;
option optcr = 0;&lt;br /&gt;
&lt;br /&gt;
solve course5800 minimizing z using mip ;&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Applications&#039;&#039;&#039; ==&lt;br /&gt;
Bilinear functions occur in numerous engineering and natural science applications where McCormick Envelopes can be utilized, including the following : &lt;br /&gt;
&lt;br /&gt;
Computer vision &amp;lt;sup&amp;gt;5&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Energy conversion networks &amp;lt;sup&amp;gt;6&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Cellular networks&amp;lt;sup&amp;gt;7&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Dynamic biological systems&amp;lt;sup&amp;gt;8&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternate current optimal power flow (ACOPF)&amp;lt;sup&amp;gt;9&amp;lt;/sup&amp;gt;&lt;br /&gt;
== &#039;&#039;&#039;Conclusion&#039;&#039;&#039; ==&lt;br /&gt;
Non-convex NLPs are challenging to solve and may require a significant amount of time, computing resources, and effort to determine if the solution is global or the problem has no feasible solution.  McCormick Envelopes provide a relaxation technique for bilinear non-convex nonlinear programming problems.  McCormick Envelopes provide a straightforward technique of replacing each bilinear term with a new variable and adding four constraints. Due to the recursive nature of this technique, it may be applied to a wide variety of engineering and scientific applications involving bilinear terms.   &lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;References&#039;&#039;&#039; ==&lt;br /&gt;
# McCormick, Garth P.  (1976). Computability of Global Solutions To Factorable Nonconvex Solutions: Part I: Convex Underestimating Problems. &#039;&#039;Mathematical Programming, 10&#039;&#039;, 147-175. doi: 10.1007/BF01580665&lt;br /&gt;
# Scott, J. K. Stuber, M. D. &amp;amp; Barton, P. I. (2011). Generalized McCormick Relaxations. &#039;&#039;Journal of Global Optimization, Vol. 51, Issue 4&#039;&#039;, 569-606 doi: 10.1007/s10898-011-9664-7&lt;br /&gt;
# Hijazi, H., Perspective Envelopes for Bilinear Functions, unpublished manuscript, retrieved from: [https://www.google.com/url?sa=t&amp;amp;rct=j&amp;amp;q=&amp;amp;esrc=s&amp;amp;source=web&amp;amp;cd=&amp;amp;ved=2ahUKEwjSr7eu8K70AhVYmHIEHUJzCVsQFnoECAIQAQ&amp;amp;url=http%3A%2F%2Fwww.optimization-online.org%2FDB_FILE%2F2015%2F03%2F4841.pdf&amp;amp;usg=AOvVaw1xf9B1f-EPw0mG1LOqRfm9 Perspective Envelopes for Bilinear Functions]&lt;br /&gt;
#Bergamini, M., Aguirre, P. &amp;amp; Grossman, I. (2005). Logic-based outer approximation for globally optimal synthesis of process networks. &#039;&#039;Computers and Chemical Engineering 29 (2005)&#039;&#039; 1914–1933.&lt;br /&gt;
#Chandraker, M. &amp;amp; Kriegman, D. (n.d.): Globally Optimal Bilinear Programming for Computer Vision Applications. University of San Diego, CA. Retrieved from: http://vision.ucsd.edu&lt;br /&gt;
#Kantor, J., &amp;amp; Mousaw, P. (2012). A class of bilinear models for the optimization of energy conversion networks. &#039;&#039;Chemical Engineering Science, 67,&#039;&#039; 131-138. doi: 10.1016/j.ces.2011.08.033&lt;br /&gt;
#Ahmed, F., Naeem, M., Ejaz, W. &#039;&#039;et al.&#039;&#039; Renewable Energy Assisted Sustainable and Environment Friendly Energy Cooperation in Cellular Networks. &#039;&#039;Wireless Pers Commun&#039;&#039; &#039;&#039;&#039;108,&#039;&#039;&#039; 2585–2607 (2019). &amp;lt;nowiki&amp;gt;https://doi.org/10.1007/s11277-019-06539-z&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
#Miro et al.: Deterministic global optimization algorithm based on outer approximation for the parameter estimation of nonlinear dynamic biological systems. &#039;&#039;BMC Bioinformatics&#039;&#039; (2012) 13:90. doi: 10.1186/1471-2105-13-90 ·&lt;br /&gt;
#Michael B., Castillo, A., Watson, J., &amp;amp; Laird, C. (2018) Strengthened SOCP Relaxations for ACOPF with McCormick Envelopes and Bounds Tightening, &#039;&#039;Computer Aided Chemical Engineering, 44,&#039;&#039; 1555-1560, doi: /10.1016/B978-0-444-64241-7.50254-8.&lt;/div&gt;</summary>
		<author><name>Smu29</name></author>
	</entry>
	<entry>
		<id>https://optimization.cbe.cornell.edu/index.php?title=McCormick_envelopes&amp;diff=3987</id>
		<title>McCormick envelopes</title>
		<link rel="alternate" type="text/html" href="https://optimization.cbe.cornell.edu/index.php?title=McCormick_envelopes&amp;diff=3987"/>
		<updated>2021-11-28T11:42:03Z</updated>

		<summary type="html">&lt;p&gt;Smu29: added a sub-heading&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Author: Susan Urban (smu29) (SYSEN 5800 Fall 2021) &lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Introduction&#039;&#039;&#039; ==&lt;br /&gt;
Optimization of a non-convex function f(x) is challenging since it may have multiple locally optimal solutions or no solution and it can take a significant amount of time, computing resources, and effort to determine if the solution is global or the problem has no feasible solution. Different techniques are used to address this challenge depending on the characteristics of the problem. &lt;br /&gt;
[[File:Image of updated estimators and envelopes.png|thumb|Figure 1: Relationships between the given function, concave over-estimators, convex under-estimators, a convex envelope, and a concave envelope. ]]&lt;br /&gt;
One technique used for a given non-convex function is the identification of a concave envelope and a convex envelope.  The concave envelope, and respectively the convex envelope, is the concave over-estimator and convex under-estimator for the given function providing the tighest fit to the given function.  The envelope surrounds the given function, like an envelope encloses a letter, and limits the feasible solution space the most in comparison to all other concave over-estimators and convex under-estimators. Multiple concave over-estimators and multiple convex under-estimators may exist but there is only one concave envelope and one convex envelope for a given function and domain.  Figure 1 depicts the relationship between the given function f(x), multiple concave over-estimators, multiple convex under-estimators, a convex envelope, and a concave envelope.      &lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;McCormick Envelopes: Theory, Methodology and Algorithmic Discussions&#039;&#039;&#039; ==&lt;br /&gt;
The McCormick Envelope, originally developed by Dr. Garth McCormick&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;, is a type of convex relaxation used for the optimization of bilinear (e.g., x*y, x*y + y) non-linear programming (NLP) problems. &lt;br /&gt;
&lt;br /&gt;
Each bilinear term is replaced with a new variable and four sets of constraints are added. The non-linear programming is converted to a relaxed convex linear programming (LP) which can be more easily solved. &lt;br /&gt;
&lt;br /&gt;
The LP solution gives a lower (L) bound and any feasible solution to the problem gives an upper (U) bound.&lt;br /&gt;
&lt;br /&gt;
As noted by Scott et al&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;, McCormick envelopes are effective since they are recursive, can be applied to a variety of applications, and are typically stronger than those resulting from convexification or linearization procedures. &lt;br /&gt;
&lt;br /&gt;
The following is a derivation of the McCormick Envelopes for a given bilinear function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;Let \ w = xy&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^{L}\leq x\leq x^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;y^{L}\leq y\leq y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;x^{L}, x^{U}, y^{L}, y^{U} &amp;lt;/math&amp;gt;are   upper  and   lower  bound  values  for  &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;y&amp;lt;/math&amp;gt;, respectively.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left (x-x^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left (y-y^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
a and b are both positive resulting in a positive product&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a * b\geq 0&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a * b=\left ( x-x^{L} \right )\left ( y-y^{L} \right )=xy-x^{L}y-xy^{L}+x^{L}y^{L}\geq 0 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
substituting w=xy and reformulating the inequality produces&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{L}y+xy^{L}-x^{L}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Following the same sequence of steps, the remaining inequalities are produced:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x^{U}-x \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b = \left ( y^{U} -y\right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{U}y+xy^{U}-x^{U}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x^{U}-x\right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left ( y-y^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq x^{U}y+xy^{L}-x^{U}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x-x^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left ( y^{U}-y \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq xy^{U}+x^{L}y-x^{L}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The under-estimators of the function are represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{L}y+xy^{L}-x^{L}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{U}y+xy^{U}-x^{U}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The over-estimators of the function are represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq x^{U}y+xy^{L}-x^{U}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq xy^{U}+x^{L}y-x^{L}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following shows the relaxation of a non-convex problem using McCormick Envelopes:&lt;br /&gt;
&lt;br /&gt;
The original non-convex problem: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\min Z= \textstyle \sum_{i=1} \sum_{j=1}  c_{i,j}x_i x_j +g_0(x)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \sum_{i=1}\sum_{j=1} c_{i,j}^l x_i x_j + g_l (x) \leq 0,\forall l \in L&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^ L \leq x \leq x^U&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Replacing &amp;lt;math&amp;gt;u_{i,j} = x_i x_j&amp;lt;/math&amp;gt;, we obtain a relaxed, convex problem using McCormick Envelopes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\min Z= \textstyle \sum_{i=1} \sum_{j=1}  c_{i,j} u_{i,j} +g_0(x)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \sum_{i=1}\sum_{j=1} c_{i,j}^l u_{i,j}+ g_l (x) \leq 0,\forall l \in L&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^L x_j + x_i x_j^L - {x_i}^L {x_j}^L, \forall  i,j \ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^U x_j + x_i x_j^U - {x_i}^U {x_j}^U, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^L x_j + x_i x_j^U - {x_i}^L {x_j}^U, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^U x_j + x_i x_j^L - {x_i}^U {x_j}^L, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^L \leq x \leq x^U,   \ \ u^L \leq u \leq u^U&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Good lower and upper bounds focus and minimize the feasible solution space; they reduce the number of iterations to find the optimal solution.  &lt;br /&gt;
&lt;br /&gt;
=== Piecewise McCormick Relaxation ===&lt;br /&gt;
As discussed by Hazaji&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;, global optimization solvers focus initially on optimizing the lower and upper bounds, and when necessary, focus on domain partitioning.  By dividing the domain of a given variable into partitions or smaller regions, the solver is able to tailor and further tighten the convex relaxations of each partition. This strategy is known as the Piecewise McCormick relaxation&amp;lt;sup&amp;gt;4&amp;lt;/sup&amp;gt;.   &lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Example: Numerical&#039;&#039;&#039; ==&lt;br /&gt;
&amp;lt;math&amp;gt;min \  Z = xy + 6x + y&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \ xy \leq 18&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;0 \leq x \leq 10&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;0 \leq y \leq 2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;Let\   w = xy &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;min \ Z = -w + 6x + y&lt;br /&gt;
&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \ w \leq 18&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 10y + 2x - 20&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq 10y&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq 2x&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using GAMS, the solution is z= -76.2, x=10, y=1.8.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;GAMS code sample:&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
variable z;&lt;br /&gt;
&lt;br /&gt;
positive variable x, y, w;&lt;br /&gt;
&lt;br /&gt;
equations  obj, c1, c2, c3, c4, c5 ;&lt;br /&gt;
&lt;br /&gt;
obj..    z =e= -w -6*x + y;&lt;br /&gt;
&lt;br /&gt;
c1..     w =l= 18 ;&lt;br /&gt;
&lt;br /&gt;
c2..     w =g= 0;&lt;br /&gt;
&lt;br /&gt;
c3..     w =g= 10*y +2*x -20;&lt;br /&gt;
&lt;br /&gt;
c4..     w =l= 10*y;&lt;br /&gt;
&lt;br /&gt;
c5..     w =l= 2*x;&lt;br /&gt;
&lt;br /&gt;
x.up = 10;&lt;br /&gt;
&lt;br /&gt;
x.lo =0;    &lt;br /&gt;
&lt;br /&gt;
y.up = 2;       &lt;br /&gt;
&lt;br /&gt;
y.lo = 0;&lt;br /&gt;
&lt;br /&gt;
model course5800 /all/;&lt;br /&gt;
&lt;br /&gt;
option mip = baron;&lt;br /&gt;
&lt;br /&gt;
option optcr = 0;&lt;br /&gt;
&lt;br /&gt;
solve course5800 minimizing z using mip ;&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Applications&#039;&#039;&#039; ==&lt;br /&gt;
Bilinear functions occur in numerous engineering and natural science applications where McCormick Envelopes can be utilized, including the following : &lt;br /&gt;
&lt;br /&gt;
Computer vision &amp;lt;sup&amp;gt;5&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Energy conversion networks &amp;lt;sup&amp;gt;6&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Cellular networks&amp;lt;sup&amp;gt;7&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Dynamic biological systems&amp;lt;sup&amp;gt;8&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternate current optimal power flow (ACOPF)&amp;lt;sup&amp;gt;9&amp;lt;/sup&amp;gt;&lt;br /&gt;
== &#039;&#039;&#039;Conclusion&#039;&#039;&#039; ==&lt;br /&gt;
Non-convex NLPs are challenging to solve and may require a significant amount of time, computing resources, and effort to determine if the solution is global or the problem has no feasible solution.  McCormick Envelopes provide a relaxation technique for bilinear non-convex nonlinear programming problems.  McCormick Envelopes provide a straightforward technique of replacing each bilinear term with a new variable and adding four constraints. Due to the recursive nature of this technique, it may be applied to a wide variety of engineering and scientific applications involving bilinear terms.   &lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;References&#039;&#039;&#039; ==&lt;br /&gt;
# McCormick, Garth P.  Computability of Global Solutions To Factorable Nonconvex Solutions: Part I: Convex Underestimating Problems&lt;br /&gt;
# Scott, J. K. Stuber, M. D. &amp;amp; Barton, P. I. (2011). Generalized McCormick Relaxations. &#039;&#039;Journal of Global Optimization, Vol. 51, Issue 4&#039;&#039;, 569-606 doi: 10.1007/s10898-011-9664-7&lt;br /&gt;
# Hijazi, H., Perspective Envelopes for Bilinear Functions, unpublished manuscript, retrieved from: [https://www.google.com/url?sa=t&amp;amp;rct=j&amp;amp;q=&amp;amp;esrc=s&amp;amp;source=web&amp;amp;cd=&amp;amp;ved=2ahUKEwjSr7eu8K70AhVYmHIEHUJzCVsQFnoECAIQAQ&amp;amp;url=http%3A%2F%2Fwww.optimization-online.org%2FDB_FILE%2F2015%2F03%2F4841.pdf&amp;amp;usg=AOvVaw1xf9B1f-EPw0mG1LOqRfm9 Perspective Envelopes for Bilinear Functions]&lt;br /&gt;
#Bergamini, M., Aguirre, P. &amp;amp; Grossman, I. (2005). Logic-based outer approximation for globally optimal synthesis of process networks. &#039;&#039;Computers and Chemical Engineering 29 (2005)&#039;&#039; 1914–1933.&lt;br /&gt;
#Chandraker, M. &amp;amp; Kriegman, D. (n.d.): Globally Optimal Bilinear Programming for Computer Vision Applications. University of San Diego, CA. Retrieved from: http://vision.ucsd.edu&lt;br /&gt;
#Kantor, J., &amp;amp; Mousaw, P. (2012). A class of bilinear models for the optimization of energy conversion networks. &#039;&#039;Chemical Engineering Science, 67,&#039;&#039; 131-138. doi: 10.1016/j.ces.2011.08.033&lt;br /&gt;
#Ahmed, F., Naeem, M., Ejaz, W. &#039;&#039;et al.&#039;&#039; Renewable Energy Assisted Sustainable and Environment Friendly Energy Cooperation in Cellular Networks. &#039;&#039;Wireless Pers Commun&#039;&#039; &#039;&#039;&#039;108,&#039;&#039;&#039; 2585–2607 (2019). &amp;lt;nowiki&amp;gt;https://doi.org/10.1007/s11277-019-06539-z&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
#Miro et al.: Deterministic global optimization algorithm based on outer approximation for the parameter estimation of nonlinear dynamic biological systems. &#039;&#039;BMC Bioinformatics&#039;&#039; (2012) 13:90. doi: 10.1186/1471-2105-13-90 ·&lt;br /&gt;
#Michael B., Castillo, A., Watson, J., &amp;amp; Laird, C. (2018) Strengthened SOCP Relaxations for ACOPF with McCormick Envelopes and Bounds Tightening, &#039;&#039;Computer Aided Chemical Engineering, 44,&#039;&#039; 1555-1560, doi: /10.1016/B978-0-444-64241-7.50254-8.&lt;/div&gt;</summary>
		<author><name>Smu29</name></author>
	</entry>
	<entry>
		<id>https://optimization.cbe.cornell.edu/index.php?title=McCormick_envelopes&amp;diff=3975</id>
		<title>McCormick envelopes</title>
		<link rel="alternate" type="text/html" href="https://optimization.cbe.cornell.edu/index.php?title=McCormick_envelopes&amp;diff=3975"/>
		<updated>2021-11-28T10:06:26Z</updated>

		<summary type="html">&lt;p&gt;Smu29: added a reference&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Author: Susan Urban (smu29) (SYSEN 5800 Fall 2021) &lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Introduction&#039;&#039;&#039; ==&lt;br /&gt;
Optimization of a non-convex function f(x) is challenging since it may have multiple locally optimal solutions or no solution and it can take a significant amount of time, computing resources, and effort to determine if the solution is global or the problem has no feasible solution. Different techniques are used to address this challenge depending on the characteristics of the problem. &lt;br /&gt;
[[File:Image of updated estimators and envelopes.png|thumb|Figure 1: Relationships between the given function, concave over-estimators, convex under-estimators, a convex envelope, and a concave envelope. ]]&lt;br /&gt;
One technique used for a given non-convex function is the identification of a concave envelope and a convex envelope.  The concave envelope, and respectively the convex envelope, is the concave over-estimator and convex under-estimator for the given function providing the tighest fit to the given function.  The envelope surrounds the given function, like an envelope encloses a letter, and limits the feasible solution space the most in comparison to all other concave over-estimators and convex under-estimators. Multiple concave over-estimators and multiple convex under-estimators may exist but there is only one concave envelope and one convex envelope for a given function and domain.  Figure 1 depicts the relationship between the given function f(x), multiple concave over-estimators, multiple convex under-estimators, a convex envelope, and a concave envelope.      &lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;McCormick Envelopes: Theory, Methodology and Algorithmic Discussions&#039;&#039;&#039; ==&lt;br /&gt;
The McCormick Envelope, originally developed by Dr. Garth McCormick&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;, is a type of convex relaxation used for the optimization of bilinear (e.g., x*y, x*y + y) non-linear programming (NLP) problems. &lt;br /&gt;
&lt;br /&gt;
Each bilinear term is replaced with a new variable and four sets of constraints are added. The non-linear programming is converted to a relaxed convex linear programming (LP) which can be more easily solved. &lt;br /&gt;
&lt;br /&gt;
The LP solution gives a lower (L) bound and any feasible solution to the problem gives an upper (U) bound.&lt;br /&gt;
&lt;br /&gt;
As noted by Scott et al&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;, McCormick envelopes are effective since they are recursive, can be applied to a variety of applications, and are typically stronger than those resulting from convexification or linearization procedures. &lt;br /&gt;
&lt;br /&gt;
The following is a derivation of the McCormick Envelopes for a given bilinear function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;Let \ w = xy&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^{L}\leq x\leq x^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;y^{L}\leq y\leq y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;x^{L}, x^{U}, y^{L}, y^{U} &amp;lt;/math&amp;gt;are   upper  and   lower  bound  values  for  &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;y&amp;lt;/math&amp;gt;, respectively.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left (x-x^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left (y-y^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
a and b are both positive resulting in a positive product&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a * b\geq 0&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a * b=\left ( x-x^{L} \right )\left ( y-y^{L} \right )=xy-x^{L}y-xy^{L}+x^{L}y^{L}\geq 0 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
substituting w=xy and reformulating the inequality produces&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{L}y+xy^{L}-x^{L}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Following the same sequence of steps, the remaining inequalities are produced:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x^{U}-x \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b = \left ( y^{U} -y\right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{U}y+xy^{U}-x^{U}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x^{U}-x\right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left ( y-y^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq x^{U}y+xy^{L}-x^{U}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x-x^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left ( y^{U}-y \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq xy^{U}+x^{L}y-x^{L}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The under-estimators of the function are represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{L}y+xy^{L}-x^{L}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{U}y+xy^{U}-x^{U}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The over-estimators of the function are represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq x^{U}y+xy^{L}-x^{U}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq xy^{U}+x^{L}y-x^{L}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following shows the relaxation of a non-convex problem using McCormick Envelopes:&lt;br /&gt;
&lt;br /&gt;
The original non-convex problem: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\min Z= \textstyle \sum_{i=1} \sum_{j=1}  c_{i,j}x_i x_j +g_0(x)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \sum_{i=1}\sum_{j=1} c_{i,j}^l x_i x_j + g_l (x) \leq 0,\forall l \in L&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^ L \leq x \leq x^U&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Replacing &amp;lt;math&amp;gt;u_{i,j} = x_i x_j&amp;lt;/math&amp;gt;, we obtain a relaxed, convex problem using McCormick Envelopes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\min Z= \textstyle \sum_{i=1} \sum_{j=1}  c_{i,j} u_{i,j} +g_0(x)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \sum_{i=1}\sum_{j=1} c_{i,j}^l u_{i,j}+ g_l (x) \leq 0,\forall l \in L&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^L x_j + x_i x_j^L - {x_i}^L {x_j}^L, \forall  i,j \ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^U x_j + x_i x_j^U - {x_i}^U {x_j}^U, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^L x_j + x_i x_j^U - {x_i}^L {x_j}^U, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^U x_j + x_i x_j^L - {x_i}^U {x_j}^L, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^L \leq x \leq x^U,   \ \ u^L \leq u \leq u^U&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Good lower and upper bounds focus and minimize the feasible solution space; they reduce the number of iterations to find the optimal solution.  &lt;br /&gt;
&lt;br /&gt;
As discussed by Hazaji&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;, global optimization solvers focus initially on optimizing the lower and upper bounds, and when necessary, focus on domain partitioning.  By dividing the domain of a given variable into partitions or smaller regions, the solver is able to tailor and further tighten the convex relaxations of each partition. This strategy is known as the McCormick Piecewise relaxation&amp;lt;sup&amp;gt;4&amp;lt;/sup&amp;gt;.   &lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Example: Numerical&#039;&#039;&#039; ==&lt;br /&gt;
&amp;lt;math&amp;gt;min \  Z = xy + 6x + y&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \ xy \leq 18&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;0 \leq x \leq 10&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;0 \leq y \leq 2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;Let\   w = xy &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;min \ Z = -w + 6x + y&lt;br /&gt;
&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \ w \leq 18&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 10y + 2x - 20&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq 10y&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq 2x&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using GAMS, the solution is z= -76.2, x=10, y=1.8.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;GAMS code sample:&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
variable z;&lt;br /&gt;
&lt;br /&gt;
positive variable x, y, w;&lt;br /&gt;
&lt;br /&gt;
equations  obj, c1, c2, c3, c4, c5 ;&lt;br /&gt;
&lt;br /&gt;
obj..    z =e= -w -6*x + y;&lt;br /&gt;
&lt;br /&gt;
c1..     w =l= 18 ;&lt;br /&gt;
&lt;br /&gt;
c2..     w =g= 0;&lt;br /&gt;
&lt;br /&gt;
c3..     w =g= 10*y +2*x -20;&lt;br /&gt;
&lt;br /&gt;
c4..     w =l= 10*y;&lt;br /&gt;
&lt;br /&gt;
c5..     w =l= 2*x;&lt;br /&gt;
&lt;br /&gt;
x.up = 10;&lt;br /&gt;
&lt;br /&gt;
x.lo =0;    &lt;br /&gt;
&lt;br /&gt;
y.up = 2;       &lt;br /&gt;
&lt;br /&gt;
y.lo = 0;&lt;br /&gt;
&lt;br /&gt;
model course5800 /all/;&lt;br /&gt;
&lt;br /&gt;
option mip = baron;&lt;br /&gt;
&lt;br /&gt;
option optcr = 0;&lt;br /&gt;
&lt;br /&gt;
solve course5800 minimizing z using mip ;&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Applications&#039;&#039;&#039; ==&lt;br /&gt;
Bilinear functions occur in numerous engineering and natural science applications where McCormick Envelopes can be utilized, including the following : &lt;br /&gt;
&lt;br /&gt;
Computer vision &amp;lt;sup&amp;gt;5&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Energy conversion networks &amp;lt;sup&amp;gt;6&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Cellular networks&amp;lt;sup&amp;gt;7&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Dynamic biological systems&amp;lt;sup&amp;gt;8&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternate current optimal power flow (ACOPF)&amp;lt;sup&amp;gt;9&amp;lt;/sup&amp;gt;&lt;br /&gt;
== &#039;&#039;&#039;Conclusion&#039;&#039;&#039; ==&lt;br /&gt;
Non-convex NLPs are challenging to solve and may require a significant amount of time, computing resources, and effort to determine if the solution is global or the problem has no feasible solution.  McCormick Envelopes provide a relaxation technique for bilinear non-convex nonlinear programming problems.  McCormick Envelopes provide a straightforward technique of replacing each bilinear term with a new variable and adding four constraints. Due to the recursive nature of this technique, it may be applied to a wide variety of engineering and scientific applications involving bilinear terms.   &lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;References&#039;&#039;&#039; ==&lt;br /&gt;
# McCormick, Garth P.  Computability of Global Solutions To Factorable Nonconvex Solutions: Part I: Convex Underestimating Problems&lt;br /&gt;
# Scott, J. K. Stuber, M. D. &amp;amp; Barton, P. I. (2011). Generalized McCormick Relaxations. &#039;&#039;Journal of Global Optimization, Vol. 51, Issue 4&#039;&#039;, 569-606 doi: 10.1007/s10898-011-9664-7&lt;br /&gt;
# Hijazi, H., Perspective Envelopes for Bilinear Functions, unpublished manuscript, retrieved from: [https://www.google.com/url?sa=t&amp;amp;rct=j&amp;amp;q=&amp;amp;esrc=s&amp;amp;source=web&amp;amp;cd=&amp;amp;ved=2ahUKEwjSr7eu8K70AhVYmHIEHUJzCVsQFnoECAIQAQ&amp;amp;url=http%3A%2F%2Fwww.optimization-online.org%2FDB_FILE%2F2015%2F03%2F4841.pdf&amp;amp;usg=AOvVaw1xf9B1f-EPw0mG1LOqRfm9 Perspective Envelopes for Bilinear Functions]&lt;br /&gt;
#Bergamini, M., Aguirre, P. &amp;amp; Grossman, I. (2005). Logic-based outer approximation for globally optimal synthesis of process networks. &#039;&#039;Computers and Chemical Engineering 29 (2005)&#039;&#039; 1914–1933.&lt;br /&gt;
#Chandraker, M. &amp;amp; Kriegman, D. (n.d.): Globally Optimal Bilinear Programming for Computer Vision Applications. University of San Diego, CA. Retrieved from: http://vision.ucsd.edu&lt;br /&gt;
#Kantor, J., &amp;amp; Mousaw, P. (2012). A class of bilinear models for the optimization of energy conversion networks. &#039;&#039;Chemical Engineering Science, 67,&#039;&#039; 131-138. doi: 10.1016/j.ces.2011.08.033&lt;br /&gt;
#Ahmed, F., Naeem, M., Ejaz, W. &#039;&#039;et al.&#039;&#039; Renewable Energy Assisted Sustainable and Environment Friendly Energy Cooperation in Cellular Networks. &#039;&#039;Wireless Pers Commun&#039;&#039; &#039;&#039;&#039;108,&#039;&#039;&#039; 2585–2607 (2019). &amp;lt;nowiki&amp;gt;https://doi.org/10.1007/s11277-019-06539-z&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
#Miro et al.: Deterministic global optimization algorithm based on outer approximation for the parameter estimation of nonlinear dynamic biological systems. &#039;&#039;BMC Bioinformatics&#039;&#039; (2012) 13:90. doi: 10.1186/1471-2105-13-90 ·&lt;br /&gt;
#Michael B., Castillo, A., Watson, J., &amp;amp; Laird, C. (2018) Strengthened SOCP Relaxations for ACOPF with McCormick Envelopes and Bounds Tightening, &#039;&#039;Computer Aided Chemical Engineering, 44,&#039;&#039; 1555-1560, doi: /10.1016/B978-0-444-64241-7.50254-8.&lt;/div&gt;</summary>
		<author><name>Smu29</name></author>
	</entry>
	<entry>
		<id>https://optimization.cbe.cornell.edu/index.php?title=McCormick_envelopes&amp;diff=3970</id>
		<title>McCormick envelopes</title>
		<link rel="alternate" type="text/html" href="https://optimization.cbe.cornell.edu/index.php?title=McCormick_envelopes&amp;diff=3970"/>
		<updated>2021-11-28T09:49:55Z</updated>

		<summary type="html">&lt;p&gt;Smu29: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Author: Susan Urban (smu29) (SYSEN 5800 Fall 2021) &lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Introduction&#039;&#039;&#039; ==&lt;br /&gt;
Optimization of a non-convex function f(x) is challenging since it may have multiple locally optimal solutions or no solution and it can take a significant amount of time, computing resources, and effort to determine if the solution is global or the problem has no feasible solution. Different techniques are used to address this challenge depending on the characteristics of the problem. &lt;br /&gt;
[[File:Image of updated estimators and envelopes.png|thumb|Figure 1: Relationships between the given function, concave over-estimators, convex under-estimators, a convex envelope, and a concave envelope. ]]&lt;br /&gt;
One technique used for a given non-convex function is the identification of a concave envelope and a convex envelope.  The concave envelope, and respectively the convex envelope, is the concave over-estimator and convex under-estimator for the given function providing the tighest fit to the given function.  The envelope surrounds the given function, like an envelope encloses a letter, and limits the feasible solution space the most in comparison to all other concave over-estimators and convex under-estimators. Multiple concave over-estimators and multiple convex under-estimators may exist but there is only one concave envelope and one convex envelope for a given function and domain.  Figure 1 depicts the relationship between the given function f(x), multiple concave over-estimators, multiple convex under-estimators, a convex envelope, and a concave envelope.      &lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;McCormick Envelopes: Theory, Methodology and Algorithmic Discussions&#039;&#039;&#039; ==&lt;br /&gt;
The McCormick Envelope, originally developed by Dr. Garth McCormick&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;, is a type of convex relaxation used for the optimization of bilinear (e.g., x*y, x*y + y) non-linear programming (NLP) problems. &lt;br /&gt;
&lt;br /&gt;
Each bilinear term is replaced with a new variable and four sets of constraints are added. The non-linear programming is converted to a relaxed convex linear programming (LP) which can be more easily solved. &lt;br /&gt;
&lt;br /&gt;
The LP solution gives a lower (L) bound and any feasible solution to the problem gives an upper (U) bound.&lt;br /&gt;
&lt;br /&gt;
As noted by Scott et al&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;, McCormick envelopes are effective since they are recursive, can be applied to a variety of applications, and are typically stronger than those resulting from convexification or linearization procedures. &lt;br /&gt;
&lt;br /&gt;
The following is a derivation of the McCormick Envelopes for a given bilinear function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;Let \ w = xy&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^{L}\leq x\leq x^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;y^{L}\leq y\leq y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;x^{L}, x^{U}, y^{L}, y^{U} &amp;lt;/math&amp;gt;are   upper  and   lower  bound  values  for  &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;y&amp;lt;/math&amp;gt;, respectively.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left (x-x^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left (y-y^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
a and b are both positive resulting in a positive product&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a * b\geq 0&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a * b=\left ( x-x^{L} \right )\left ( y-y^{L} \right )=xy-x^{L}y-xy^{L}+x^{L}y^{L}\geq 0 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
substituting w=xy and reformulating the inequality produces&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{L}y+xy^{L}-x^{L}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Following the same sequence of steps, the remaining inequalities are produced:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x^{U}-x \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b = \left ( y^{U} -y\right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{U}y+xy^{U}-x^{U}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x^{U}-x\right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left ( y-y^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq x^{U}y+xy^{L}-x^{U}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x-x^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left ( y^{U}-y \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq xy^{U}+x^{L}y-x^{L}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The under-estimators of the function are represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{L}y+xy^{L}-x^{L}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{U}y+xy^{U}-x^{U}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The over-estimators of the function are represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq x^{U}y+xy^{L}-x^{U}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq xy^{U}+x^{L}y-x^{L}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following shows the relaxation of a non-convex problem using McCormick Envelopes:&lt;br /&gt;
&lt;br /&gt;
The original non-convex problem: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\min Z= \textstyle \sum_{i=1} \sum_{j=1}  c_{i,j}x_i x_j +g_0(x)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \sum_{i=1}\sum_{j=1} c_{i,j}^l x_i x_j + g_l (x) \leq 0,\forall l \in L&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^ L \leq x \leq x^U&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Replacing &amp;lt;math&amp;gt;u_{i,j} = x_i x_j&amp;lt;/math&amp;gt;, we obtain a relaxed, convex problem using McCormick Envelopes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\min Z= \textstyle \sum_{i=1} \sum_{j=1}  c_{i,j} u_{i,j} +g_0(x)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \sum_{i=1}\sum_{j=1} c_{i,j}^l u_{i,j}+ g_l (x) \leq 0,\forall l \in L&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^L x_j + x_i x_j^L - {x_i}^L {x_j}^L, \forall  i,j \ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^U x_j + x_i x_j^U - {x_i}^U {x_j}^U, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^L x_j + x_i x_j^U - {x_i}^L {x_j}^U, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^U x_j + x_i x_j^L - {x_i}^U {x_j}^L, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^L \leq x \leq x^U,   \ \ u^L \leq u \leq u^U&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Good lower and upper bounds focus and minimize the feasible solution space; they reduce the number of iterations to find the optimal solution.  &lt;br /&gt;
&lt;br /&gt;
As discussed by Hazaji&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;, global optimization solvers focus initially on optimizing the lower and upper bounds, and when necessary, focus on domain partitioning.  By dividing the domain of a given variable into partitions or smaller regions, the solver is able to tailor and further tighten the convex relaxations of each partition. This strategy is known as the McCormick Piecewise relaxation&amp;lt;sup&amp;gt;4&amp;lt;/sup&amp;gt;.   &lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Example: Numerical&#039;&#039;&#039; ==&lt;br /&gt;
&amp;lt;math&amp;gt;min \  Z = xy + 6x + y&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \ xy \leq 18&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;0 \leq x \leq 10&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;0 \leq y \leq 2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;Let\   w = xy &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;min \ Z = -w + 6x + y&lt;br /&gt;
&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \ w \leq 18&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 10y + 2x - 20&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq 10y&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq 2x&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using GAMS, the solution is z= -76.2, x=10, y=1.8.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;GAMS code sample:&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
variable z;&lt;br /&gt;
&lt;br /&gt;
positive variable x, y, w;&lt;br /&gt;
&lt;br /&gt;
equations  obj, c1, c2, c3, c4, c5 ;&lt;br /&gt;
&lt;br /&gt;
obj..    z =e= -w -6*x + y;&lt;br /&gt;
&lt;br /&gt;
c1..     w =l= 18 ;&lt;br /&gt;
&lt;br /&gt;
c2..     w =g= 0;&lt;br /&gt;
&lt;br /&gt;
c3..     w =g= 10*y +2*x -20;&lt;br /&gt;
&lt;br /&gt;
c4..     w =l= 10*y;&lt;br /&gt;
&lt;br /&gt;
c5..     w =l= 2*x;&lt;br /&gt;
&lt;br /&gt;
x.up = 10;&lt;br /&gt;
&lt;br /&gt;
x.lo =0;    &lt;br /&gt;
&lt;br /&gt;
y.up = 2;       &lt;br /&gt;
&lt;br /&gt;
y.lo = 0;&lt;br /&gt;
&lt;br /&gt;
model course5800 /all/;&lt;br /&gt;
&lt;br /&gt;
option mip = baron;&lt;br /&gt;
&lt;br /&gt;
option optcr = 0;&lt;br /&gt;
&lt;br /&gt;
solve course5800 minimizing z using mip ;&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Applications&#039;&#039;&#039; ==&lt;br /&gt;
Bilinear functions occur in numerous engineering and natural science applications where McCormick Envelopes can be utilized, including the following : &lt;br /&gt;
&lt;br /&gt;
Computer vision &amp;lt;sup&amp;gt;5&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Energy conversion networks &amp;lt;sup&amp;gt;6&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Cellular networks&amp;lt;sup&amp;gt;7&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Dynamic biological systems&amp;lt;sup&amp;gt;8&amp;lt;/sup&amp;gt;&lt;br /&gt;
== &#039;&#039;&#039;Conclusion&#039;&#039;&#039; ==&lt;br /&gt;
Non-convex NLPs are challenging to solve and may require a significant amount of time, computing resources, and effort to determine if the solution is global or the problem has no feasible solution.  McCormick Envelopes provide a relaxation technique for bilinear non-convex nonlinear programming problems.  McCormick Envelopes provide a straightforward technique of replacing each bilinear term with a new variable and adding four constraints. Due to the recursive nature of this technique, it may be applied to a wide variety of engineering and scientific applications involving bilinear terms.   &lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;References&#039;&#039;&#039; ==&lt;br /&gt;
# McCormick, Garth P.  Computability of Global Solutions To Factorable Nonconvex Solutions: Part I: Convex Underestimating Problems&lt;br /&gt;
# Scott, J. K. Stuber, M. D. &amp;amp; Barton, P. I. (2011). Generalized McCormick Relaxations. &#039;&#039;Journal of Global Optimization, Vol. 51, Issue 4&#039;&#039;, 569-606 doi: 10.1007/s10898-011-9664-7&lt;br /&gt;
# Hijazi, H., Perspective Envelopes for Bilinear Functions, unpublished manuscript, retrieved from: [https://www.google.com/url?sa=t&amp;amp;rct=j&amp;amp;q=&amp;amp;esrc=s&amp;amp;source=web&amp;amp;cd=&amp;amp;ved=2ahUKEwjSr7eu8K70AhVYmHIEHUJzCVsQFnoECAIQAQ&amp;amp;url=http%3A%2F%2Fwww.optimization-online.org%2FDB_FILE%2F2015%2F03%2F4841.pdf&amp;amp;usg=AOvVaw1xf9B1f-EPw0mG1LOqRfm9 Perspective Envelopes for Bilinear Functions]&lt;br /&gt;
#Bergamini, M., Aguirre, P. &amp;amp; Grossman, I. (2005). Logic-based outer approximation for globally optimal synthesis of process networks. &#039;&#039;Computers and Chemical Engineering 29 (2005)&#039;&#039; 1914–1933.&lt;br /&gt;
#Chandraker, M. &amp;amp; Kriegman, D. (n.d.): Globally Optimal Bilinear Programming for Computer Vision Applications. University of San Diego, CA. Retrieved from: http://vision.ucsd.edu&lt;br /&gt;
#Kantor, J., &amp;amp; Mousaw, P. (2012). A class of bilinear models for the optimization of energy conversion networks. &#039;&#039;Chemical Engineering Science, 67,&#039;&#039; 131-138. doi: 10.1016/j.ces.2011.08.033&lt;br /&gt;
#Ahmed, F., Naeem, M., Ejaz, W. &#039;&#039;et al.&#039;&#039; Renewable Energy Assisted Sustainable and Environment Friendly Energy Cooperation in Cellular Networks. &#039;&#039;Wireless Pers Commun&#039;&#039; &#039;&#039;&#039;108,&#039;&#039;&#039; 2585–2607 (2019). &amp;lt;nowiki&amp;gt;https://doi.org/10.1007/s11277-019-06539-z&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
#Miro et al.: Deterministic global optimization algorithm based on outer approximation for the parameter estimation of nonlinear dynamic biological systems. &#039;&#039;BMC Bioinformatics&#039;&#039; (2012) 13:90. doi: 10.1186/1471-2105-13-90 ·&lt;/div&gt;</summary>
		<author><name>Smu29</name></author>
	</entry>
	<entry>
		<id>https://optimization.cbe.cornell.edu/index.php?title=McCormick_envelopes&amp;diff=3969</id>
		<title>McCormick envelopes</title>
		<link rel="alternate" type="text/html" href="https://optimization.cbe.cornell.edu/index.php?title=McCormick_envelopes&amp;diff=3969"/>
		<updated>2021-11-28T09:48:26Z</updated>

		<summary type="html">&lt;p&gt;Smu29: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Author: Susan Urban (smu29) (SYSEN 5800 Fall 2021) &lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Introduction&#039;&#039;&#039; ==&lt;br /&gt;
Optimization of a non-convex function f(x) is challenging since it may have multiple locally optimal solutions or no solution and it can take a significant amount of time, computing resources, and effort to determine if the solution is global or the problem has no feasible solution. Different techniques are used to address this challenge depending on the characteristics of the problem. &lt;br /&gt;
[[File:Image of updated estimators and envelopes.png|thumb|Figure 1: Relationships between the given function, concave over-estimators, convex under-estimators, a convex envelope, and a concave envelope. ]]&lt;br /&gt;
One technique used for a given non-convex function is the identification of a concave envelope and a convex envelope.  The concave envelope, and respectively the convex envelope, is the concave over-estimator and convex under-estimator for the given function providing the tighest fit to the given function.  The envelope surrounds the given function, like an envelope encloses a letter, and limits the feasible solution space the most in comparison to all other concave over-estimators and convex under-estimators. Multiple concave over-estimators and multiple convex under-estimators may exist but there is only one concave envelope and one convex envelope for a given function and domain.  Figure 1 depicts the relationship between the given function f(x), multiple concave over-estimators, multiple convex under-estimators, a convex envelope, and a concave envelope.      &lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;McCormick Envelopes: Theory, Methodology and Algorithmic Discussions&#039;&#039;&#039; ==&lt;br /&gt;
The McCormick Envelope, originally developed by Dr. Garth McCormick&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;, is a type of convex relaxation used for the optimization of bilinear (e.g., x*y, x+y) non-linear programming (NLP) problems. &lt;br /&gt;
&lt;br /&gt;
Each bilinear term is replaced with a new variable and four sets of constraints are added. The non-linear programming is converted to a relaxed convex linear programming (LP) which can be more easily solved. &lt;br /&gt;
&lt;br /&gt;
The LP solution gives a lower (L) bound and any feasible solution to the problem gives an upper (U) bound.&lt;br /&gt;
&lt;br /&gt;
As noted by Scott et al&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;, McCormick envelopes are effective since they are recursive, can be applied to a variety of applications, and are typically stronger than those resulting from convexification or linearization procedures. &lt;br /&gt;
&lt;br /&gt;
The following is a derivation of the McCormick Envelopes for a given bilinear function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;Let \ w = xy&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^{L}\leq x\leq x^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;y^{L}\leq y\leq y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;x^{L}, x^{U}, y^{L}, y^{U} &amp;lt;/math&amp;gt;are   upper  and   lower  bound  values  for  &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;y&amp;lt;/math&amp;gt;, respectively.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left (x-x^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left (y-y^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
a and b are both positive resulting in a positive product&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a * b\geq 0&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a * b=\left ( x-x^{L} \right )\left ( y-y^{L} \right )=xy-x^{L}y-xy^{L}+x^{L}y^{L}\geq 0 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
substituting w=xy and reformulating the inequality produces&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{L}y+xy^{L}-x^{L}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Following the same sequence of steps, the remaining inequalities are produced:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x^{U}-x \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b = \left ( y^{U} -y\right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{U}y+xy^{U}-x^{U}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x^{U}-x\right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left ( y-y^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq x^{U}y+xy^{L}-x^{U}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x-x^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left ( y^{U}-y \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq xy^{U}+x^{L}y-x^{L}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The under-estimators of the function are represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{L}y+xy^{L}-x^{L}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{U}y+xy^{U}-x^{U}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The over-estimators of the function are represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq x^{U}y+xy^{L}-x^{U}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq xy^{U}+x^{L}y-x^{L}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following shows the relaxation of a non-convex problem using McCormick Envelopes:&lt;br /&gt;
&lt;br /&gt;
The original non-convex problem: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\min Z= \textstyle \sum_{i=1} \sum_{j=1}  c_{i,j}x_i x_j +g_0(x)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \sum_{i=1}\sum_{j=1} c_{i,j}^l x_i x_j + g_l (x) \leq 0,\forall l \in L&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^ L \leq x \leq x^U&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Replacing &amp;lt;math&amp;gt;u_{i,j} = x_i x_j&amp;lt;/math&amp;gt;, we obtain a relaxed, convex problem using McCormick Envelopes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\min Z= \textstyle \sum_{i=1} \sum_{j=1}  c_{i,j} u_{i,j} +g_0(x)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \sum_{i=1}\sum_{j=1} c_{i,j}^l u_{i,j}+ g_l (x) \leq 0,\forall l \in L&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^L x_j + x_i x_j^L - {x_i}^L {x_j}^L, \forall  i,j \ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^U x_j + x_i x_j^U - {x_i}^U {x_j}^U, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^L x_j + x_i x_j^U - {x_i}^L {x_j}^U, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^U x_j + x_i x_j^L - {x_i}^U {x_j}^L, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^L \leq x \leq x^U,   \ \ u^L \leq u \leq u^U&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Good lower and upper bounds focus and minimize the feasible solution space; they reduce the number of iterations to find the optimal solution.  &lt;br /&gt;
&lt;br /&gt;
As discussed by Hazaji&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;, global optimization solvers focus initially on optimizing the lower and upper bounds, and when necessary, focus on domain partitioning.  By dividing the domain of a given variable into partitions or smaller regions, the solver is able to tailor and further tighten the convex relaxations of each partition. This strategy is known as the McCormick Piecewise relaxation&amp;lt;sup&amp;gt;4&amp;lt;/sup&amp;gt;.   &lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Example: Numerical&#039;&#039;&#039; ==&lt;br /&gt;
&amp;lt;math&amp;gt;min \  Z = xy + 6x + y&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \ xy \leq 18&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;0 \leq x \leq 10&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;0 \leq y \leq 2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;Let\   w = xy &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;min \ Z = -w + 6x + y&lt;br /&gt;
&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \ w \leq 18&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 10y + 2x - 20&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq 10y&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq 2x&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using GAMS, the solution is z= -76.2, x=10, y=1.8.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;GAMS code sample:&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
variable z;&lt;br /&gt;
&lt;br /&gt;
positive variable x, y, w;&lt;br /&gt;
&lt;br /&gt;
equations  obj, c1, c2, c3, c4, c5 ;&lt;br /&gt;
&lt;br /&gt;
obj..    z =e= -w -6*x + y;&lt;br /&gt;
&lt;br /&gt;
c1..     w =l= 18 ;&lt;br /&gt;
&lt;br /&gt;
c2..     w =g= 0;&lt;br /&gt;
&lt;br /&gt;
c3..     w =g= 10*y +2*x -20;&lt;br /&gt;
&lt;br /&gt;
c4..     w =l= 10*y;&lt;br /&gt;
&lt;br /&gt;
c5..     w =l= 2*x;&lt;br /&gt;
&lt;br /&gt;
x.up = 10;&lt;br /&gt;
&lt;br /&gt;
x.lo =0;    &lt;br /&gt;
&lt;br /&gt;
y.up = 2;       &lt;br /&gt;
&lt;br /&gt;
y.lo = 0;&lt;br /&gt;
&lt;br /&gt;
model course5800 /all/;&lt;br /&gt;
&lt;br /&gt;
option mip = baron;&lt;br /&gt;
&lt;br /&gt;
option optcr = 0;&lt;br /&gt;
&lt;br /&gt;
solve course5800 minimizing z using mip ;&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Applications&#039;&#039;&#039; ==&lt;br /&gt;
Bilinear functions occur in numerous engineering and natural science applications where McCormick Envelopes can be utilized, including the following : &lt;br /&gt;
&lt;br /&gt;
Computer vision &amp;lt;sup&amp;gt;5&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Energy conversion networks &amp;lt;sup&amp;gt;6&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Cellular networks&amp;lt;sup&amp;gt;7&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Dynamic biological systems&amp;lt;sup&amp;gt;8&amp;lt;/sup&amp;gt;&lt;br /&gt;
== &#039;&#039;&#039;Conclusion&#039;&#039;&#039; ==&lt;br /&gt;
Non-convex NLPs are challenging to solve and may require a significant amount of time, computing resources, and effort to determine if the solution is global or the problem has no feasible solution.  McCormick Envelopes provide a relaxation technique for bilinear non-convex nonlinear programming problems.  McCormick Envelopes provide a straightforward technique of replacing each bilinear term with a new variable and adding four constraints. Due to the recursive nature of this technique, it may be applied to a wide variety of engineering and scientific applications involving bilinear terms.   &lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;References&#039;&#039;&#039; ==&lt;br /&gt;
# McCormick, Garth P.  Computability of Global Solutions To Factorable Nonconvex Solutions: Part I: Convex Underestimating Problems&lt;br /&gt;
# Scott, J. K. Stuber, M. D. &amp;amp; Barton, P. I. (2011). Generalized McCormick Relaxations. &#039;&#039;Journal of Global Optimization, Vol. 51, Issue 4&#039;&#039;, 569-606 doi: 10.1007/s10898-011-9664-7&lt;br /&gt;
# Hijazi, H., Perspective Envelopes for Bilinear Functions, unpublished manuscript, retrieved from: [https://www.google.com/url?sa=t&amp;amp;rct=j&amp;amp;q=&amp;amp;esrc=s&amp;amp;source=web&amp;amp;cd=&amp;amp;ved=2ahUKEwjSr7eu8K70AhVYmHIEHUJzCVsQFnoECAIQAQ&amp;amp;url=http%3A%2F%2Fwww.optimization-online.org%2FDB_FILE%2F2015%2F03%2F4841.pdf&amp;amp;usg=AOvVaw1xf9B1f-EPw0mG1LOqRfm9 Perspective Envelopes for Bilinear Functions]&lt;br /&gt;
#Bergamini, M., Aguirre, P. &amp;amp; Grossman, I. (2005). Logic-based outer approximation for globally optimal synthesis of process networks. &#039;&#039;Computers and Chemical Engineering 29 (2005)&#039;&#039; 1914–1933.&lt;br /&gt;
#Chandraker, M. &amp;amp; Kriegman, D. (n.d.): Globally Optimal Bilinear Programming for Computer Vision Applications. University of San Diego, CA. Retrieved from: http://vision.ucsd.edu&lt;br /&gt;
#Kantor, J., &amp;amp; Mousaw, P. (2012). A class of bilinear models for the optimization of energy conversion networks. &#039;&#039;Chemical Engineering Science, 67,&#039;&#039; 131-138. doi: 10.1016/j.ces.2011.08.033&lt;br /&gt;
#Ahmed, F., Naeem, M., Ejaz, W. &#039;&#039;et al.&#039;&#039; Renewable Energy Assisted Sustainable and Environment Friendly Energy Cooperation in Cellular Networks. &#039;&#039;Wireless Pers Commun&#039;&#039; &#039;&#039;&#039;108,&#039;&#039;&#039; 2585–2607 (2019). &amp;lt;nowiki&amp;gt;https://doi.org/10.1007/s11277-019-06539-z&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
#Miro et al.: Deterministic global optimization algorithm based on outer approximation for the parameter estimation of nonlinear dynamic biological systems. &#039;&#039;BMC Bioinformatics&#039;&#039; (2012) 13:90. doi: 10.1186/1471-2105-13-90 ·&lt;/div&gt;</summary>
		<author><name>Smu29</name></author>
	</entry>
	<entry>
		<id>https://optimization.cbe.cornell.edu/index.php?title=McCormick_envelopes&amp;diff=3967</id>
		<title>McCormick envelopes</title>
		<link rel="alternate" type="text/html" href="https://optimization.cbe.cornell.edu/index.php?title=McCormick_envelopes&amp;diff=3967"/>
		<updated>2021-11-28T09:41:31Z</updated>

		<summary type="html">&lt;p&gt;Smu29: minor edits&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Author: Susan Urban (smu29) (SYSEN 5800 Fall 2021) &lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Introduction&#039;&#039;&#039; ==&lt;br /&gt;
Optimization of a non-convex function f(x) is challenging since it may have multiple locally optimal solutions or no solution and it can take a significant amount of time, computing resources, and effort to determine if the solution is global or the problem has no feasible solution. Different techniques are used to address this challenge depending on the characteristics of the problem. &lt;br /&gt;
[[File:Image of updated estimators and envelopes.png|thumb|Figure 1: Relationships between the given function, concave over-estimators, convex under-estimators, a convex envelope, and a concave envelope. ]]&lt;br /&gt;
One technique used for a given non-convex function is the identification of a concave envelope and a convex envelope.  The concave envelope, and respectively the convex envelope, is the concave over-estimator and convex under-estimator for the given function providing the tighest fit to the given function.  The envelope surrounds the given function, like an envelope encloses a letter, and limits the feasible solution space the most in comparison to all other concave over-estimators and convex under-estimators. Multiple concave over-estimators and multiple convex under-estimators may exist but there is only one concave envelope and one convex envelope for a given function and domain.  Figure 1 depicts the relationship between the given function f(x), multiple concave over-estimators, multiple convex under-estimators, a convex envelope, and a concave envelope.      &lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;McCormick Envelopes: Theory, Methodology and Algorithmic Discussions&#039;&#039;&#039; ==&lt;br /&gt;
The McCormick Envelope, originally developed by Dr. Garth McCormick&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;, is a type of convex relaxation used for the optimization of bilinear (e.g., x*y, x+y) non-linear programming (NLP) problems. &lt;br /&gt;
&lt;br /&gt;
Each bilinear term is replaced with a new variable and four sets of constraints are added. The non-linear programming is converted to a relaxed convex linear programming (LP) which can be more easily solved. &lt;br /&gt;
&lt;br /&gt;
The LP solution gives a lower (L) bound and any feasible solution to the problem gives an upper (U) bound.&lt;br /&gt;
&lt;br /&gt;
As noted by Scott et al&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;, McCormick envelopes are effective since they are recursive, can be applied to a variety of applications, and are typically stronger than those resulting from convexification or linearization procedures. &lt;br /&gt;
&lt;br /&gt;
The following is a derivation of the McCormick Envelopes for a given bilinear function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;Let \ w = xy&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^{L}\leq x\leq x^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;y^{L}\leq y\leq y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;x^{L}, x^{U}, y^{L}, y^{U} &amp;lt;/math&amp;gt;are   upper  and   lower  bound  values  for  &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;y&amp;lt;/math&amp;gt;, respectively.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left (x-x^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left (y-y^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
a and b are both positive resulting in a positive product&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a * b\geq 0&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a * b=\left ( x-x^{L} \right )\left ( y-y^{L} \right )=xy-x^{L}y-xy^{L}+x^{L}y^{L}\geq 0 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
substituting w=xy and reformulating the inequality produces&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{L}y+xy^{L}-x^{L}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Following the same sequence of steps, the remaining inequalities are produced:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x^{U}-x \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b = \left ( y^{U} -y\right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{U}y+xy^{U}-x^{U}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x^{U}-x\right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left ( y-y^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq x^{U}y+xy^{L}-x^{U}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x-x^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left ( y^{U}-y \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq xy^{U}+x^{L}y-x^{L}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The under-estimators of the function are represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{L}y+xy^{L}-x^{L}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{U}y+xy^{U}-x^{U}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The over-estimators of the function are represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq x^{U}y+xy^{L}-x^{U}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq xy^{U}+x^{L}y-x^{L}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following shows the relaxation of a non-convex problem:&lt;br /&gt;
&lt;br /&gt;
Original non-convex problem: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\min Z= \textstyle \sum_{i=1} \sum_{j=1}  c_{i,j}x_i x_j +g_0(x)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \sum_{i=1}\sum_{j=1} c_{i,j}^l x_i x_j + g_l (x) \leq 0,\forall l \in L&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^ L \leq x \leq x^U&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Replacing &amp;lt;math&amp;gt;u_{i,j} = x_i x_j&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
we obtain a relaxed, convex problem: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\min Z= \textstyle \sum_{i=1} \sum_{j=1}  c_{i,j} u_{i,j} +g_0(x)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \sum_{i=1}\sum_{j=1} c_{i,j}^l u_{i,j}+ g_l (x) \leq 0,\forall l \in L&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^L x_j + x_i x_j^L - {x_i}^L {x_j}^L, \forall  i,j \ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^U x_j + x_i x_j^U - {x_i}^U {x_j}^U, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^L x_j + x_i x_j^U - {x_i}^L {x_j}^U, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^U x_j + x_i x_j^L - {x_i}^U {x_j}^L, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^L \leq x \leq x^U,   \ \ u^L \leq u \leq u^U&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Good lower and upper bounds focus and minimize the feasible solution space; they reduce the number of iterations to find the optimal solution.  &lt;br /&gt;
&lt;br /&gt;
As discussed by Hazaji&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;, global optimization solvers focus initially on optimizing the lower and upper bounds, and when necessary, focus on domain partitioning.  By dividing the domain of a given variable into partitions or smaller regions, the solver is able to tailor and further tighten the convex relaxations of each partition. This strategy is known as the McCormick Piecewise relaxation&amp;lt;sup&amp;gt;4&amp;lt;/sup&amp;gt;.   &lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Example: Numerical&#039;&#039;&#039; ==&lt;br /&gt;
&amp;lt;math&amp;gt;min \  Z = xy + 6x + y&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \ xy \leq 18&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;0 \leq x \leq 10&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;0 \leq y \leq 2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;Let\   w = xy &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;min \ Z = -w + 6x + y&lt;br /&gt;
&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \ w \leq 18&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 10y + 2x - 20&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq 10y&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq 2x&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using GAMS, the solution is z= -76.2, x=10, y=1.8.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;GAMS code sample:&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
variable z;&lt;br /&gt;
&lt;br /&gt;
positive variable x, y, w;&lt;br /&gt;
&lt;br /&gt;
equations  obj, c1, c2, c3, c4, c5 ;&lt;br /&gt;
&lt;br /&gt;
obj..    z =e= -w -6*x + y;&lt;br /&gt;
&lt;br /&gt;
c1..     w =l= 18 ;&lt;br /&gt;
&lt;br /&gt;
c2..     w =g= 0;&lt;br /&gt;
&lt;br /&gt;
c3..     w =g= 10*y +2*x -20;&lt;br /&gt;
&lt;br /&gt;
c4..     w =l= 10*y;&lt;br /&gt;
&lt;br /&gt;
c5..     w =l= 2*x;&lt;br /&gt;
&lt;br /&gt;
x.up = 10;&lt;br /&gt;
&lt;br /&gt;
x.lo =0;    &lt;br /&gt;
&lt;br /&gt;
y.up = 2;       &lt;br /&gt;
&lt;br /&gt;
y.lo = 0;&lt;br /&gt;
&lt;br /&gt;
model course5800 /all/;&lt;br /&gt;
&lt;br /&gt;
option mip = baron;&lt;br /&gt;
&lt;br /&gt;
option optcr = 0;&lt;br /&gt;
&lt;br /&gt;
solve course5800 minimizing z using mip ;&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Applications&#039;&#039;&#039; ==&lt;br /&gt;
Bilinear functions occur in numerous engineering and natural science applications where McCormick Envelopes can be utilized, including the following : &lt;br /&gt;
&lt;br /&gt;
Computer vision &amp;lt;sup&amp;gt;5&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Energy conversion networks &amp;lt;sup&amp;gt;6&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Cellular networks&amp;lt;sup&amp;gt;7&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Dynamic biological systems&amp;lt;sup&amp;gt;8&amp;lt;/sup&amp;gt;&lt;br /&gt;
== &#039;&#039;&#039;Conclusion&#039;&#039;&#039; ==&lt;br /&gt;
Non-convex NLPs are challenging to solve and may require a significant amount of time, computing resources, and effort to determine if the solution is global or the problem has no feasible solution.  McCormick Envelopes provide a relaxation technique for bilinear non-convex nonlinear programming problems.  McCormick Envelopes provide a straightforward technique of replacing each bilinear term with a new variable and adding four constraints. Due to the recursive nature of this technique, it may be applied to a wide variety of engineering and scientific applications involving bilinear terms.   &lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;References&#039;&#039;&#039; ==&lt;br /&gt;
# McCormick, Garth P.  Computability of Global Solutions To Factorable Nonconvex Solutions: Part I: Convex Underestimating Problems&lt;br /&gt;
# Scott, J. K. Stuber, M. D. &amp;amp; Barton, P. I. (2011). Generalized McCormick Relaxations. &#039;&#039;Journal of Global Optimization, Vol. 51, Issue 4&#039;&#039;, 569-606 doi: 10.1007/s10898-011-9664-7&lt;br /&gt;
# Hijazi, H., Perspective Envelopes for Bilinear Functions, unpublished manuscript, retrieved from: [https://www.google.com/url?sa=t&amp;amp;rct=j&amp;amp;q=&amp;amp;esrc=s&amp;amp;source=web&amp;amp;cd=&amp;amp;ved=2ahUKEwjSr7eu8K70AhVYmHIEHUJzCVsQFnoECAIQAQ&amp;amp;url=http%3A%2F%2Fwww.optimization-online.org%2FDB_FILE%2F2015%2F03%2F4841.pdf&amp;amp;usg=AOvVaw1xf9B1f-EPw0mG1LOqRfm9 Perspective Envelopes for Bilinear Functions]&lt;br /&gt;
#Bergamini, M., Aguirre, P. &amp;amp; Grossman, I. (2005). Logic-based outer approximation for globally optimal synthesis of process networks. &#039;&#039;Computers and Chemical Engineering 29 (2005)&#039;&#039; 1914–1933.&lt;br /&gt;
#Chandraker, M. &amp;amp; Kriegman, D. (n.d.): Globally Optimal Bilinear Programming for Computer Vision Applications. University of San Diego, CA. Retrieved from: http://vision.ucsd.edu&lt;br /&gt;
#Kantor, J., &amp;amp; Mousaw, P. (2012). A class of bilinear models for the optimization of energy conversion networks. &#039;&#039;Chemical Engineering Science, 67,&#039;&#039; 131-138. doi: 10.1016/j.ces.2011.08.033&lt;br /&gt;
#Ahmed, F., Naeem, M., Ejaz, W. &#039;&#039;et al.&#039;&#039; Renewable Energy Assisted Sustainable and Environment Friendly Energy Cooperation in Cellular Networks. &#039;&#039;Wireless Pers Commun&#039;&#039; &#039;&#039;&#039;108,&#039;&#039;&#039; 2585–2607 (2019). &amp;lt;nowiki&amp;gt;https://doi.org/10.1007/s11277-019-06539-z&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
#Miro et al.: Deterministic global optimization algorithm based on outer approximation for the parameter estimation of nonlinear dynamic biological systems. &#039;&#039;BMC Bioinformatics&#039;&#039; (2012) 13:90. doi: 10.1186/1471-2105-13-90 ·&lt;/div&gt;</summary>
		<author><name>Smu29</name></author>
	</entry>
	<entry>
		<id>https://optimization.cbe.cornell.edu/index.php?title=McCormick_envelopes&amp;diff=3963</id>
		<title>McCormick envelopes</title>
		<link rel="alternate" type="text/html" href="https://optimization.cbe.cornell.edu/index.php?title=McCormick_envelopes&amp;diff=3963"/>
		<updated>2021-11-28T09:37:01Z</updated>

		<summary type="html">&lt;p&gt;Smu29: gave details on the transformations&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Author: Susan Urban (smu29) (SYSEN 5800 Fall 2021) &lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Introduction&#039;&#039;&#039; ==&lt;br /&gt;
Optimization of a non-convex function f(x) is challenging since it may have multiple locally optimal solutions or no solution and it can take a significant amount of time, computing resources, and effort to determine if the solution is global or the problem has no feasible solution. Different techniques are used to address this challenge depending on the characteristics of the problem. &lt;br /&gt;
[[File:Image of updated estimators and envelopes.png|thumb|Figure 1: Relationships between the given function, concave over-estimators, convex under-estimators, a convex envelope, and a concave envelope. ]]&lt;br /&gt;
One technique used for a given non-convex function is the identification of a concave envelope and a convex envelope.  The concave envelope, and respectively the convex envelope, is the concave over-estimator and convex under-estimator for the given function providing the tighest fit to the given function.  The envelope surrounds the given function, like an envelope encloses a letter, and limits the feasible solution space the most in comparison to all other concave over-estimators and convex under-estimators. Multiple concave over-estimators and multiple convex under-estimators may exist but there is only one concave envelope and one convex envelope for a given function and domain.    &lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;McCormick Envelopes: Theory, Methodology and Algorithmic Discussions&#039;&#039;&#039; ==&lt;br /&gt;
The McCormick Envelope, originally developed by Dr. Garth McCormick&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;, is a type of convex relaxation used for the optimization of bilinear (e.g., x*y, x+y) non-linear programming (NLP) problems. &lt;br /&gt;
&lt;br /&gt;
Each bilinear term is replaced with a new variable and four sets of constraints are added. The non-linear programming is converted to a relaxed convex linear programming (LP) which can be more easily solved. &lt;br /&gt;
&lt;br /&gt;
The LP solution gives a lower (L) bound and any feasible solution to the problem gives an upper (U) bound.&lt;br /&gt;
&lt;br /&gt;
As noted by Scott et al&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;, McCormick envelopes are effective since they are recursive, can be applied to a variety of applications, and are typically stronger than those resulting from convexification or linearization procedures. &lt;br /&gt;
&lt;br /&gt;
The following is a derivation of the McCormick Envelopes for a given function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;Let \ w = xy&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^{L}\leq x\leq x^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;y^{L}\leq y\leq y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;x^{L}, x^{U}, y^{L}, y^{U} &amp;lt;/math&amp;gt;are   upper  and   lower  bound  values  for  &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;y&amp;lt;/math&amp;gt;, respectively.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left (x-x^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left (y-y^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
a and b are both positive resulting in a positive product&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a * b\geq 0&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a * b=\left ( x-x^{L} \right )\left ( y-y^{L} \right )=xy-x^{L}y-xy^{L}+x^{L}y^{L}\geq 0 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
substituting w=xy and reformulating the inequality produces&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{L}y+xy^{L}-x^{L}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Following the same sequence of steps, the remaining inequalities are produced:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x^{U}-x \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b = \left ( y^{U} -y\right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{U}y+xy^{U}-x^{U}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x^{U}-x\right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left ( y-y^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq x^{U}y+xy^{L}-x^{U}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x-x^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left ( y^{U}-y \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq xy^{U}+x^{L}y-x^{L}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The under-estimators of the function are represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{L}y+xy^{L}-x^{L}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{U}y+xy^{U}-x^{U}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The over-estimators of the function are represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq x^{U}y+xy^{L}-x^{U}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq xy^{U}+x^{L}y-x^{L}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following shows the relaxation of a non-convex problem:&lt;br /&gt;
&lt;br /&gt;
Original non-convex problem: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\min Z= \textstyle \sum_{i=1} \sum_{j=1}  c_{i,j}x_i x_j +g_0(x)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \sum_{i=1}\sum_{j=1} c_{i,j}^l x_i x_j + g_l (x) \leq 0,\forall l \in L&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^ L \leq x \leq x^U&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Replacing &amp;lt;math&amp;gt;u_{i,j} = x_i x_j&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
we obtain a relaxed, convex problem: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\min Z= \textstyle \sum_{i=1} \sum_{j=1}  c_{i,j} u_{i,j} +g_0(x)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \sum_{i=1}\sum_{j=1} c_{i,j}^l u_{i,j}+ g_l (x) \leq 0,\forall l \in L&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^L x_j + x_i x_j^L - {x_i}^L {x_j}^L, \forall  i,j \ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^U x_j + x_i x_j^U - {x_i}^U {x_j}^U, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^L x_j + x_i x_j^U - {x_i}^L {x_j}^U, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^U x_j + x_i x_j^L - {x_i}^U {x_j}^L, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^L \leq x \leq x^U,   \ \ u^L \leq u \leq u^U&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Good lower and upper bounds focus and minimize the feasible solution space; they reduce the number of iterations to find the optimal solution.  &lt;br /&gt;
&lt;br /&gt;
As discussed by Hazaji&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;, global optimization solvers focus initially on optimizing the lower and upper bounds, and when necessary, focus on domain partitioning.  By dividing the domain of a given variable into partitions or smaller regions, the solver is able to tailor and further tighten the convex relaxations of each partition. This strategy is known as the McCormick Piecewise relaxation&amp;lt;sup&amp;gt;4&amp;lt;/sup&amp;gt;.   &lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Example: Numerical&#039;&#039;&#039; ==&lt;br /&gt;
&amp;lt;math&amp;gt;min \  Z = xy + 6x + y&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \ xy \leq 18&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;0 \leq x \leq 10&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;0 \leq y \leq 2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;Let\   w = xy &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;min \ Z = -w + 6x + y&lt;br /&gt;
&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \ w \leq 18&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 10y + 2x - 20&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq 10y&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq 2x&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using GAMS, the solution is z= -76.2, x=10, y=1.8.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;GAMS code sample:&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
variable z;&lt;br /&gt;
&lt;br /&gt;
positive variable x, y, w;&lt;br /&gt;
&lt;br /&gt;
equations  obj, c1, c2, c3, c4, c5 ;&lt;br /&gt;
&lt;br /&gt;
obj..    z =e= -w -6*x + y;&lt;br /&gt;
&lt;br /&gt;
c1..     w =l= 18 ;&lt;br /&gt;
&lt;br /&gt;
c2..     w =g= 0;&lt;br /&gt;
&lt;br /&gt;
c3..     w =g= 10*y +2*x -20;&lt;br /&gt;
&lt;br /&gt;
c4..     w =l= 10*y;&lt;br /&gt;
&lt;br /&gt;
c5..     w =l= 2*x;&lt;br /&gt;
&lt;br /&gt;
x.up = 10;&lt;br /&gt;
&lt;br /&gt;
x.lo =0;    &lt;br /&gt;
&lt;br /&gt;
y.lo = 0;&lt;br /&gt;
&lt;br /&gt;
y.up = 2;       &lt;br /&gt;
&lt;br /&gt;
model course6800 /all/;&lt;br /&gt;
&lt;br /&gt;
option mip = baron;&lt;br /&gt;
&lt;br /&gt;
option optcr = 0;&lt;br /&gt;
&lt;br /&gt;
solve course6800 minimizing z using mip ;&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Applications&#039;&#039;&#039; ==&lt;br /&gt;
Bilinear functions occur in numerous engineering and natural science applications where McCormick Envelopes can be utilized, including the following : &lt;br /&gt;
&lt;br /&gt;
Computer vision &amp;lt;sup&amp;gt;5&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Energy conversion networks &amp;lt;sup&amp;gt;6&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Cellular networks&amp;lt;sup&amp;gt;7&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Dynamic biological systems&amp;lt;sup&amp;gt;8&amp;lt;/sup&amp;gt;&lt;br /&gt;
== &#039;&#039;&#039;Conclusion&#039;&#039;&#039; ==&lt;br /&gt;
Non-convex NLPs are challenging to solve and may require a significant amount of time, computing resources, and effort to determine if the solution is global or the problem has no feasible solution.  McCormick Envelopes provide a relaxation technique for bilinear non-convex nonlinear programming problems.  McCormick Envelopes provide a straightforward technique of replacing each bilinear term with a new variable and adding four constraints. Due to the recursive nature of this technique, it may be applied to a wide variety of engineering and scientific applications involving bilinear terms.   &lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;References&#039;&#039;&#039; ==&lt;br /&gt;
# McCormick, Garth P.  Computability of Global Solutions To Factorable Nonconvex Solutions: Part I: Convex Underestimating Problems&lt;br /&gt;
# Scott, J. K. Stuber, M. D. &amp;amp; Barton, P. I. (2011). Generalized McCormick Relaxations. &#039;&#039;Journal of Global Optimization, Vol. 51, Issue 4&#039;&#039;, 569-606 doi: 10.1007/s10898-011-9664-7&lt;br /&gt;
# Hijazi, H., Perspective Envelopes for Bilinear Functions, unpublished manuscript, retrieved from: [https://www.google.com/url?sa=t&amp;amp;rct=j&amp;amp;q=&amp;amp;esrc=s&amp;amp;source=web&amp;amp;cd=&amp;amp;ved=2ahUKEwjSr7eu8K70AhVYmHIEHUJzCVsQFnoECAIQAQ&amp;amp;url=http%3A%2F%2Fwww.optimization-online.org%2FDB_FILE%2F2015%2F03%2F4841.pdf&amp;amp;usg=AOvVaw1xf9B1f-EPw0mG1LOqRfm9 Perspective Envelopes for Bilinear Functions]&lt;br /&gt;
#Bergamini, M., Aguirre, P. &amp;amp; Grossman, I. (2005). Logic-based outer approximation for globally optimal synthesis of process networks. &#039;&#039;Computers and Chemical Engineering 29 (2005)&#039;&#039; 1914–1933.&lt;br /&gt;
#Chandraker, M. &amp;amp; Kriegman, D. (n.d.): Globally Optimal Bilinear Programming for Computer Vision Applications. University of San Diego, CA. Retrieved from: http://vision.ucsd.edu&lt;br /&gt;
#Kantor, J., &amp;amp; Mousaw, P. (2012). A class of bilinear models for the optimization of energy conversion networks. &#039;&#039;Chemical Engineering Science, 67,&#039;&#039; 131-138. doi: 10.1016/j.ces.2011.08.033&lt;br /&gt;
#Ahmed, F., Naeem, M., Ejaz, W. &#039;&#039;et al.&#039;&#039; Renewable Energy Assisted Sustainable and Environment Friendly Energy Cooperation in Cellular Networks. &#039;&#039;Wireless Pers Commun&#039;&#039; &#039;&#039;&#039;108,&#039;&#039;&#039; 2585–2607 (2019). &amp;lt;nowiki&amp;gt;https://doi.org/10.1007/s11277-019-06539-z&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
#Miro et al.: Deterministic global optimization algorithm based on outer approximation for the parameter estimation of nonlinear dynamic biological systems. &#039;&#039;BMC Bioinformatics&#039;&#039; (2012) 13:90. doi: 10.1186/1471-2105-13-90 ·&lt;/div&gt;</summary>
		<author><name>Smu29</name></author>
	</entry>
	<entry>
		<id>https://optimization.cbe.cornell.edu/index.php?title=McCormick_envelopes&amp;diff=3725</id>
		<title>McCormick envelopes</title>
		<link rel="alternate" type="text/html" href="https://optimization.cbe.cornell.edu/index.php?title=McCormick_envelopes&amp;diff=3725"/>
		<updated>2021-11-27T22:32:08Z</updated>

		<summary type="html">&lt;p&gt;Smu29: reference correction&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Author: Susan Urban (smu29) (SYSEN 5800 Fall 2021) &lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Introduction&#039;&#039;&#039; ==&lt;br /&gt;
Optimization of a non-convex function f(x) is challenging since it may have multiple locally optimal solutions or no solution and it can take a significant amount of time, computing resources, and effort to determine if the solution is global or the problem has no feasible solution. Different techniques are used to address this challenge depending on the characteristics of the problem. &lt;br /&gt;
[[File:Image of updated estimators and envelopes.png|thumb|Figure 1: Relationships between the given function, concave over-estimators, convex under-estimators, a convex envelope, and a concave envelope. ]]&lt;br /&gt;
One technique used for a given non-convex function is the identification of a concave envelope and a convex envelope.  The concave envelope, and respectively the convex envelope, is the concave over-estimator and convex under-estimator for the given function providing the tighest fit to the given function.  The envelope surrounds the given function, like an envelope encloses a letter, and limits the feasible solution space the most in comparison to all other concave over-estimators and convex under-estimators. Multiple concave over-estimators and multiple convex under-estimators may exist but there is only one concave envelope and one convex envelope for a given function and domain.    &lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;McCormick Envelopes: Theory, Methodology and Algorithmic Discussions&#039;&#039;&#039; ==&lt;br /&gt;
The McCormick Envelope, originally developed by Garth McCormick&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;, is a type of convex relaxation used for the optimization of bilinear (e.g., x*y, x+y) non-linear programming (NLP) problems. &lt;br /&gt;
&lt;br /&gt;
Each bilinear term is replaced with a new variable and four sets of constraints are added. The non-linear programming is converted to a relaxed convex linear programming (LP) which can be more easily solved. &lt;br /&gt;
&lt;br /&gt;
The LP solution gives a lower (L) bound and any feasible solution to the problem gives an upper (U) bound.&lt;br /&gt;
&lt;br /&gt;
As noted by Scott et al&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;, McCormick envelopes are effective since they are recursive, can be applied to a variety of applications, and are typically stronger than those resulting from convexification or linearization procedures. &lt;br /&gt;
&lt;br /&gt;
The following is a derivation of the McCormick Envelopes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;Let \ w = xy&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^{L}\leq x\leq x^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;y^{L}\leq y\leq y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;x^{L}, x^{U}, y^{L}, y^{U} &amp;lt;/math&amp;gt;are   upper  and   lower  bound  values  for  &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;y&amp;lt;/math&amp;gt;, respectively.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left (x-x^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left (y-y^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a * b\geq 0&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a * b=\left ( x-x^{L} \right )\left ( y-y^{L} \right )=xy-x^{L}y-xy^{L}+x^{L}y^{L}\geq 0 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{L}y+xy^{L}-x^{L}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x^{U}-x \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b = \left ( y^{U} -y\right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{U}y+xy^{U}-x^{U}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x^{U}-x\right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left ( y-y^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq x^{U}y+xy^{L}-x^{U}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x-x^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left ( y^{U}-y \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq xy^{U}+x^{L}y-x^{L}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The under-estimators of the function are represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{L}y+xy^{L}-x^{L}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{U}y+xy^{U}-x^{U}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The over-estimators of the function are represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq x^{U}y+xy^{L}-x^{U}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq xy^{U}+x^{L}y-x^{L}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following shows the relaxation of a non-convex problem:&lt;br /&gt;
&lt;br /&gt;
Original non-convex problem: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\min Z= \textstyle \sum_{i=1} \sum_{j=1}  c_{i,j}x_i x_j +g_0(x)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \sum_{i=1}\sum_{j=1} c_{i,j}^l x_i x_j + g_l (x) \leq 0,\forall l \in L&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^ L \leq x \leq x^U&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Replacing &amp;lt;math&amp;gt;u_{i,j} = x_i x_j&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
we obtain a relaxed, convex problem: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\min Z= \textstyle \sum_{i=1} \sum_{j=1}  c_{i,j} u_{i,j} +g_0(x)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \sum_{i=1}\sum_{j=1} c_{i,j}^l u_{i,j}+ g_l (x) \leq 0,\forall l \in L&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^L x_j + x_i x_j^L - {x_i}^L {x_j}^L, \forall  i,j \ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^U x_j + x_i x_j^U - {x_i}^U {x_j}^U, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^L x_j + x_i x_j^U - {x_i}^L {x_j}^U, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^U x_j + x_i x_j^L - {x_i}^U {x_j}^L, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^L \leq x \leq x^U,   \ \ u^L \leq u \leq u^U&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Good lower and upper bounds focus and minimize the feasible solution space; they reduce the number of iterations to find the optimal solution.  &lt;br /&gt;
&lt;br /&gt;
As discussed by Hazaji&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;, global optimization solvers focus initially on optimizing the lower and upper bounds, and when necessary, focus on domain partitioning.  By dividing the domain of a given variable into partitions or smaller regions, the solver is able to tailor and further tighten the convex relaxations of each partition. This strategy is known as the McCormick Piecewise relaxation&amp;lt;sup&amp;gt;4&amp;lt;/sup&amp;gt;.   &lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Example: Numerical&#039;&#039;&#039; ==&lt;br /&gt;
&amp;lt;math&amp;gt;min \  Z = xy + 6x + y&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \ xy \leq 18&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;0 \leq x \leq 10&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;0 \leq y \leq 2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;Let\   w = xy &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;min \ Z = -w + 6x + y&lt;br /&gt;
&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \ w \leq 18&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 10y + 2x - 20&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq 10y&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq 2x&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using GAMS, the solution is z= -76.2, x=10, y=1.8.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;GAMS code sample:&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
variable z;&lt;br /&gt;
&lt;br /&gt;
positive variable x, y, w;&lt;br /&gt;
&lt;br /&gt;
equations  obj, c1, c2, c3, c4, c5 ;&lt;br /&gt;
&lt;br /&gt;
obj..    z =e= -w -6*x + y;&lt;br /&gt;
&lt;br /&gt;
c1..     w =l= 18 ;&lt;br /&gt;
&lt;br /&gt;
c2..     w =g= 0;&lt;br /&gt;
&lt;br /&gt;
c3..     w =g= 10*y +2*x -20;&lt;br /&gt;
&lt;br /&gt;
c4..     w =l= 10*y;&lt;br /&gt;
&lt;br /&gt;
c5..     w =l= 2*x;&lt;br /&gt;
&lt;br /&gt;
x.up = 10;&lt;br /&gt;
&lt;br /&gt;
x.lo =0;    &lt;br /&gt;
&lt;br /&gt;
y.lo = 0;&lt;br /&gt;
&lt;br /&gt;
y.up = 2;       &lt;br /&gt;
&lt;br /&gt;
model course6800 /all/;&lt;br /&gt;
&lt;br /&gt;
option mip = baron;&lt;br /&gt;
&lt;br /&gt;
option optcr = 0;&lt;br /&gt;
&lt;br /&gt;
solve course6800 minimizing z using mip ;&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Applications&#039;&#039;&#039; ==&lt;br /&gt;
Bilinear functions occur in numerous engineering and natural science applications where McCormick Envelopes can be utilized, including the following : &lt;br /&gt;
&lt;br /&gt;
Computer vision &amp;lt;sup&amp;gt;5&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Energy conversion networks &amp;lt;sup&amp;gt;6&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Cellular networks&amp;lt;sup&amp;gt;7&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Dynamic biological systems&amp;lt;sup&amp;gt;8&amp;lt;/sup&amp;gt;&lt;br /&gt;
== &#039;&#039;&#039;Conclusion&#039;&#039;&#039; ==&lt;br /&gt;
Non-convex NLPs are challenging to solve and may require a significant amount of time, computing resources, and effort to determine if the solution is global or the problem has no feasible solution.  McCormick Envelopes provide a relaxation technique for bilinear non-convex nonlinear programming problems.  McCormick Envelopes provide a straightforward technique of replacing each bilinear term with a new variable and adding four constraints. Due to the recursive nature of this technique, it may be applied to a wide variety of engineering and scientific applications involving bilinear terms.   &lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;References&#039;&#039;&#039; ==&lt;br /&gt;
# McCormick, Garth P.  Computability of Global Solutions To Factorable Nonconvex Solutions: Part I: Convex Underestimating Problems&lt;br /&gt;
# Scott, J. K. Stuber, M. D. &amp;amp; Barton, P. I. (2011). Generalized McCormick Relaxations. &#039;&#039;Journal of Global Optimization, Vol. 51, Issue 4&#039;&#039;, 569-606 doi: 10.1007/s10898-011-9664-7&lt;br /&gt;
# Hijazi, H., Perspective Envelopes for Bilinear Functions, unpublished manuscript, retrieved from: [https://www.google.com/url?sa=t&amp;amp;rct=j&amp;amp;q=&amp;amp;esrc=s&amp;amp;source=web&amp;amp;cd=&amp;amp;ved=2ahUKEwjSr7eu8K70AhVYmHIEHUJzCVsQFnoECAIQAQ&amp;amp;url=http%3A%2F%2Fwww.optimization-online.org%2FDB_FILE%2F2015%2F03%2F4841.pdf&amp;amp;usg=AOvVaw1xf9B1f-EPw0mG1LOqRfm9 Perspective Envelopes for Bilinear Functions]&lt;br /&gt;
#Bergamini, M., Aguirre, P. &amp;amp; Grossman, I. (2005). Logic-based outer approximation for globally optimal synthesis of process networks. &#039;&#039;Computers and Chemical Engineering 29 (2005)&#039;&#039; 1914–1933.&lt;br /&gt;
#Chandraker, M. &amp;amp; Kriegman, D. (n.d.): Globally Optimal Bilinear Programming for Computer Vision Applications. University of San Diego, CA. Retrieved from: http://vision.ucsd.edu&lt;br /&gt;
#Kantor, J., &amp;amp; Mousaw, P. (2012). A class of bilinear models for the optimization of energy conversion networks. &#039;&#039;Chemical Engineering Science, 67,&#039;&#039; 131-138. doi: 10.1016/j.ces.2011.08.033&lt;br /&gt;
#Ahmed, F., Naeem, M., Ejaz, W. &#039;&#039;et al.&#039;&#039; Renewable Energy Assisted Sustainable and Environment Friendly Energy Cooperation in Cellular Networks. &#039;&#039;Wireless Pers Commun&#039;&#039; &#039;&#039;&#039;108,&#039;&#039;&#039; 2585–2607 (2019). &amp;lt;nowiki&amp;gt;https://doi.org/10.1007/s11277-019-06539-z&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
#Miro et al.: Deterministic global optimization algorithm based on outer approximation for the parameter estimation of nonlinear dynamic biological systems. &#039;&#039;BMC Bioinformatics&#039;&#039; (2012) 13:90. doi: 10.1186/1471-2105-13-90 ·&lt;/div&gt;</summary>
		<author><name>Smu29</name></author>
	</entry>
	<entry>
		<id>https://optimization.cbe.cornell.edu/index.php?title=McCormick_envelopes&amp;diff=3723</id>
		<title>McCormick envelopes</title>
		<link rel="alternate" type="text/html" href="https://optimization.cbe.cornell.edu/index.php?title=McCormick_envelopes&amp;diff=3723"/>
		<updated>2021-11-27T22:27:39Z</updated>

		<summary type="html">&lt;p&gt;Smu29: minor edits&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Author: Susan Urban (smu29) (SYSEN 5800 Fall 2021) &lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Introduction&#039;&#039;&#039; ==&lt;br /&gt;
Optimization of a non-convex function f(x) is challenging since it may have multiple locally optimal solutions or no solution and it can take a significant amount of time, computing resources, and effort to determine if the solution is global or the problem has no feasible solution. Different techniques are used to address this challenge depending on the characteristics of the problem. &lt;br /&gt;
[[File:Image of updated estimators and envelopes.png|thumb|Figure 1: Relationships between the given function, concave over-estimators, convex under-estimators, a convex envelope, and a concave envelope. ]]&lt;br /&gt;
One technique used for a given non-convex function is the identification of a concave envelope and a convex envelope.  The concave envelope, and respectively the convex envelope, is the concave over-estimator and convex under-estimator for the given function providing the tighest fit to the given function.  The envelope surrounds the given function, like an envelope encloses a letter, and limits the feasible solution space the most in comparison to all other concave over-estimators and convex under-estimators. Multiple concave over-estimators and multiple convex under-estimators may exist but there is only one concave envelope and one convex envelope for a given function and domain.    &lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;McCormick Envelopes: Theory, Methodology and Algorithmic Discussions&#039;&#039;&#039; ==&lt;br /&gt;
The McCormick Envelope, originally developed by Garth McCormick&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;, is a type of convex relaxation used for the optimization of bilinear (e.g., x*y, x+y) non-linear programming (NLP) problems. &lt;br /&gt;
&lt;br /&gt;
Each bilinear term is replaced with a new variable and four sets of constraints are added. The non-linear programming is converted to a relaxed convex linear programming (LP) which can be more easily solved. &lt;br /&gt;
&lt;br /&gt;
The LP solution gives a lower (L) bound and any feasible solution to the problem gives an upper (U) bound.&lt;br /&gt;
&lt;br /&gt;
As noted by Scott et al&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;, McCormick envelopes are effective since they are recursive, can be applied to a variety of applications, and are typically stronger than those resulting from convexification or linearization procedures. &lt;br /&gt;
&lt;br /&gt;
The following is a derivation of the McCormick Envelopes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;Let \ w = xy&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^{L}\leq x\leq x^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;y^{L}\leq y\leq y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;x^{L}, x^{U}, y^{L}, y^{U} &amp;lt;/math&amp;gt;are   upper  and   lower  bound  values  for  &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;y&amp;lt;/math&amp;gt;, respectively.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left (x-x^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left (y-y^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a * b\geq 0&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a * b=\left ( x-x^{L} \right )\left ( y-y^{L} \right )=xy-x^{L}y-xy^{L}+x^{L}y^{L}\geq 0 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{L}y+xy^{L}-x^{L}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x^{U}-x \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b = \left ( y^{U} -y\right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{U}y+xy^{U}-x^{U}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x^{U}-x\right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left ( y-y^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq x^{U}y+xy^{L}-x^{U}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x-x^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left ( y^{U}-y \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq xy^{U}+x^{L}y-x^{L}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The under-estimators of the function are represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{L}y+xy^{L}-x^{L}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{U}y+xy^{U}-x^{U}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The over-estimators of the function are represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq x^{U}y+xy^{L}-x^{U}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq xy^{U}+x^{L}y-x^{L}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following shows the relaxation of a non-convex problem:&lt;br /&gt;
&lt;br /&gt;
Original non-convex problem: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\min Z= \textstyle \sum_{i=1} \sum_{j=1}  c_{i,j}x_i x_j +g_0(x)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \sum_{i=1}\sum_{j=1} c_{i,j}^l x_i x_j + g_l (x) \leq 0,\forall l \in L&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^ L \leq x \leq x^U&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Replacing &amp;lt;math&amp;gt;u_{i,j} = x_i x_j&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
we obtain a relaxed, convex problem: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\min Z= \textstyle \sum_{i=1} \sum_{j=1}  c_{i,j} u_{i,j} +g_0(x)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \sum_{i=1}\sum_{j=1} c_{i,j}^l u_{i,j}+ g_l (x) \leq 0,\forall l \in L&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^L x_j + x_i x_j^L - {x_i}^L {x_j}^L, \forall  i,j \ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^U x_j + x_i x_j^U - {x_i}^U {x_j}^U, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^L x_j + x_i x_j^U - {x_i}^L {x_j}^U, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^U x_j + x_i x_j^L - {x_i}^U {x_j}^L, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^L \leq x \leq x^U,   \ \ u^L \leq u \leq u^U&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Good lower and upper bounds focus and minimize the feasible solution space; they reduce the number of iterations to find the optimal solution.  &lt;br /&gt;
&lt;br /&gt;
As discussed by Hazaji&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;, global optimization solvers focus initially on optimizing the lower and upper bounds, and when necessary, focus on domain partitioning.  By dividing the domain of a given variable into partitions or smaller regions, the solver is able to tailor and further tighten the convex relaxations of each partition. This strategy is known as the McCormick Piecewise relaxation&amp;lt;sup&amp;gt;4&amp;lt;/sup&amp;gt;.   &lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Example: Numerical&#039;&#039;&#039; ==&lt;br /&gt;
&amp;lt;math&amp;gt;min \  Z = xy + 6x + y&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \ xy \leq 18&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;0 \leq x \leq 10&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;0 \leq y \leq 2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;Let\   w = xy &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;min \ Z = -w + 6x + y&lt;br /&gt;
&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \ w \leq 18&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 10y + 2x - 20&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq 10y&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq 2x&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using GAMS, the solution is z= -76.2, x=10, y=1.8.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;GAMS code sample:&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
variable z;&lt;br /&gt;
&lt;br /&gt;
positive variable x, y, w;&lt;br /&gt;
&lt;br /&gt;
equations  obj, c1, c2, c3, c4, c5 ;&lt;br /&gt;
&lt;br /&gt;
obj..    z =e= -w -6*x + y;&lt;br /&gt;
&lt;br /&gt;
c1..     w =l= 18 ;&lt;br /&gt;
&lt;br /&gt;
c2..     w =g= 0;&lt;br /&gt;
&lt;br /&gt;
c3..     w =g= 10*y +2*x -20;&lt;br /&gt;
&lt;br /&gt;
c4..     w =l= 10*y;&lt;br /&gt;
&lt;br /&gt;
c5..     w =l= 2*x;&lt;br /&gt;
&lt;br /&gt;
x.up = 10;&lt;br /&gt;
&lt;br /&gt;
x.lo =0;    &lt;br /&gt;
&lt;br /&gt;
y.lo = 0;&lt;br /&gt;
&lt;br /&gt;
y.up = 2;       &lt;br /&gt;
&lt;br /&gt;
model course6800 /all/;&lt;br /&gt;
&lt;br /&gt;
option mip = baron;&lt;br /&gt;
&lt;br /&gt;
option optcr = 0;&lt;br /&gt;
&lt;br /&gt;
solve course6800 minimizing z using mip ;&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Applications&#039;&#039;&#039; ==&lt;br /&gt;
Bilinear functions occur in numerous engineering and natural science applications where McCormick Envelopes can be utilized, including the following : &lt;br /&gt;
&lt;br /&gt;
Computer vision &amp;lt;sup&amp;gt;5&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Super resolution imaging &amp;lt;sup&amp;gt;6&amp;lt;/sup&amp;gt;     &lt;br /&gt;
&lt;br /&gt;
Energy conversion networks &amp;lt;sup&amp;gt;7&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Cellular networks&amp;lt;sup&amp;gt;8&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Dynamic biological systems&amp;lt;sup&amp;gt;9&amp;lt;/sup&amp;gt;&lt;br /&gt;
== &#039;&#039;&#039;Conclusion&#039;&#039;&#039; ==&lt;br /&gt;
Non-convex NLPs are challenging to solve and may require a significant amount of time, computing resources, and effort to determine if the solution is global or the problem has no feasible solution.  McCormick Envelopes provide a relaxation technique for bilinear non-convex nonlinear programming problems.  McCormick Envelopes provide a straightforward technique of replacing each bilinear term with a new variable and adding four constraints. Due to the recursive nature of this technique, it may be applied to a wide variety of engineering and scientific applications involving bilinear terms.   &lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;References&#039;&#039;&#039; ==&lt;br /&gt;
# McCormick, Garth P.  Computability of Global Solutions To Factorable Nonconvex Solutions: Part I: Convex Underestimating Problems&lt;br /&gt;
# Scott, J. K. Stuber, M. D. &amp;amp; Barton, P. I. (2011). Generalized McCormick Relaxations. &#039;&#039;Journal of Global Optimization, Vol. 51, Issue 4&#039;&#039;, 569-606 doi: 10.1007/s10898-011-9664-7&lt;br /&gt;
# Hijazi, H., Perspective Envelopes for Bilinear Functions, unpublished manuscript, retrieved from: [https://www.google.com/url?sa=t&amp;amp;rct=j&amp;amp;q=&amp;amp;esrc=s&amp;amp;source=web&amp;amp;cd=&amp;amp;ved=2ahUKEwjSr7eu8K70AhVYmHIEHUJzCVsQFnoECAIQAQ&amp;amp;url=http%3A%2F%2Fwww.optimization-online.org%2FDB_FILE%2F2015%2F03%2F4841.pdf&amp;amp;usg=AOvVaw1xf9B1f-EPw0mG1LOqRfm9 Perspective Envelopes for Bilinear Functions]&lt;br /&gt;
#Bergamini, M., Aguirre, P. &amp;amp; Grossman, I. (2005). Logic-based outer approximation for globally optimal synthesis of process networks. &#039;&#039;Computers and Chemical Engineering 29 (2005)&#039;&#039; 1914–1933.&lt;br /&gt;
#Chandraker, M. &amp;amp; Kriegman, D. (n.d.): Globally Optimal Bilinear Programming for Computer Vision Applications. University of San Diego, CA. Retrieved from: http://vision.ucsd.edu&lt;br /&gt;
#Gronski, J. (2019). Non-Convex Optimization and Applications to Bilinear Programming and Super-Resolution Imaging. University of Colorado.  Retrieved from: &amp;lt;nowiki&amp;gt;https://www.google.com/url?sa=t&amp;amp;rct=j&amp;amp;q=&amp;amp;esrc=s&amp;amp;source=web&amp;amp;cd=&amp;amp;ved=2ahUKEwif3qO017H0AhWNknIEHebkAhMQFnoECA0QAQ&amp;amp;url=https%3A%2F%2Fscholar.colorado.edu%2Fdownloads%2Fwd375w61z&amp;amp;usg=AOvVaw09lnJJoZX3i_wwBGHin9LK&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
#Kantor, J., &amp;amp; Mousaw, P. (2012). A class of bilinear models for the optimization of energy conversion networks. &#039;&#039;Chemical Engineering Science, 67,&#039;&#039; 131-138. doi: 10.1016/j.ces.2011.08.033&lt;br /&gt;
#Ahmed, F., Naeem, M., Ejaz, W. &#039;&#039;et al.&#039;&#039; Renewable Energy Assisted Sustainable and Environment Friendly Energy Cooperation in Cellular Networks. &#039;&#039;Wireless Pers Commun&#039;&#039; &#039;&#039;&#039;108,&#039;&#039;&#039; 2585–2607 (2019). &amp;lt;nowiki&amp;gt;https://doi.org/10.1007/s11277-019-06539-z&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
#Miro et al.: Deterministic global optimization algorithm based on outer approximation for the parameter estimation of nonlinear dynamic biological systems. &#039;&#039;BMC Bioinformatics&#039;&#039; (2012) 13:90. doi: 10.1186/1471-2105-13-90 ·&lt;/div&gt;</summary>
		<author><name>Smu29</name></author>
	</entry>
	<entry>
		<id>https://optimization.cbe.cornell.edu/index.php?title=McCormick_envelopes&amp;diff=3722</id>
		<title>McCormick envelopes</title>
		<link rel="alternate" type="text/html" href="https://optimization.cbe.cornell.edu/index.php?title=McCormick_envelopes&amp;diff=3722"/>
		<updated>2021-11-27T22:23:34Z</updated>

		<summary type="html">&lt;p&gt;Smu29: corrected reference&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Author: Susan Urban (smu29) (SYSEN 5800 Fall 2021) &lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Introduction&#039;&#039;&#039; ==&lt;br /&gt;
Optimization of a non-convex function f(x) is challenging since it may have multiple locally optimal solutions or no solution and it can take a significant amount of time, computing resources, and effort to determine if the solution is global or the problem has no feasible solution. Different techniques are used to address this challenge depending on the characteristics of the problem. &lt;br /&gt;
[[File:Image of updated estimators and envelopes.png|thumb|Figure 1: Relationships between the given function, concave over-estimators, convex under-estimators, a convex envelope, and a concave envelope. ]]&lt;br /&gt;
One technique used for a given non-convex function is the identification of a concave envelope and a convex envelope.  The concave envelope, and respectively the convex envelope, is the concave over-estimator and convex under-estimator for the given function providing the tighest fit to the given function.  The envelope surrounds the given function, like an envelope encloses a letter, and limits the feasible solution space the most in comparison to all other concave over-estimators and convex under-estimators. Multiple concave over-estimators and multiple convex under-estimators may exist but there is only one concave envelope and one convex envelope for a given function and domain.    &lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;McCormick Envelopes: Theory, Methodology and Algorithmic Discussions&#039;&#039;&#039; ==&lt;br /&gt;
The McCormick Envelope, originally developed by Garth McCormick&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;, is a type of convex relaxation used for the optimization of bilinear (e.g., x*y, x+y) non-linear programming (NLP) problems. &lt;br /&gt;
&lt;br /&gt;
Each bilinear term is replaced with a new variable and four sets of constraints are added. The non-linear programming is converted to a relaxed convex linear programming (LP) which can be more easily solved. &lt;br /&gt;
&lt;br /&gt;
The LP solution gives a lower (L) bound and any feasible solution to the problem gives an upper (U) bound.&lt;br /&gt;
&lt;br /&gt;
As noted by Scott et al&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;, McCormick envelopes are effective since they are recursive, can be applied to a variety of applications, and are typically stronger than those resulting from convexification or linearization procedures. &lt;br /&gt;
&lt;br /&gt;
The following is a derivation of the McCormick Envelopes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;Let \ w = xy&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^{L}\leq x\leq x^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;y^{L}\leq y\leq y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;x^{L}, x^{U}, y^{L}, y^{U} &amp;lt;/math&amp;gt;are   upper  and   lower  bound  values  for  &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;y&amp;lt;/math&amp;gt;, respectively.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left (x-x^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left (y-y^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a * b\geq 0&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a * b=\left ( x-x^{L} \right )\left ( y-y^{L} \right )=xy-x^{L}y-xy^{L}+x^{L}y^{L}\geq 0 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{L}y+xy^{L}-x^{L}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x^{U}-x \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b = \left ( y^{U} -y\right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{U}y+xy^{U}-x^{U}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x^{U}-x\right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left ( y-y^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq x^{U}y+xy^{L}-x^{U}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x-x^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left ( y^{U}-y \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq xy^{U}+x^{L}y-x^{L}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The under-estimators of the function are represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{L}y+xy^{L}-x^{L}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{U}y+xy^{U}-x^{U}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The over-estimators of the function are represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq x^{U}y+xy^{L}-x^{U}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq xy^{U}+x^{L}y-x^{L}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following shows the relaxation of a non-convex problem:&lt;br /&gt;
&lt;br /&gt;
Original non-convex problem: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\min Z= \textstyle \sum_{i=1} \sum_{j=1}  c_{i,j}x_i x_j +g_0(x)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \sum_{i=1}\sum_{j=1} c_{i,j}^l x_i x_j + g_l (x) \leq 0,\forall l \in L&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^ L \leq x \leq x^U&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Replacing &amp;lt;math&amp;gt;u_{i,j} = x_i x_j&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
we obtain a relaxed, convex problem: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\min Z= \textstyle \sum_{i=1} \sum_{j=1}  c_{i,j} u_{i,j} +g_0(x)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \sum_{i=1}\sum_{j=1} c_{i,j}^l u_{i,j}+ g_l (x) \leq 0,\forall l \in L&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^L x_j + x_i x_j^L - {x_i}^L {x_j}^L, \forall  i,j \ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^U x_j + x_i x_j^U - {x_i}^U {x_j}^U, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^L x_j + x_i x_j^U - {x_i}^L {x_j}^U, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^U x_j + x_i x_j^L - {x_i}^U {x_j}^L, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^L \leq x \leq x^U,   \ \ u^L \leq u \leq u^U&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Good lower and upper bounds focus and minimize the feasible solution space; they reduce the number of iterations to find the optimal solution.  &lt;br /&gt;
&lt;br /&gt;
As discussed by Hazaji&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;, global optimization solvers focus initially on optimizing the lower and upper bounds, and when necessary, focus on domain partitioning.  By dividing the domain of a given variable into partitions or smaller regions, the solver is able to tailor and further tighten the convex relaxations of each partition. This strategy is known as the McCormick Piecewise relaxation&amp;lt;sup&amp;gt;4&amp;lt;/sup&amp;gt;.   &lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Example: Numerical&#039;&#039;&#039; ==&lt;br /&gt;
&amp;lt;math&amp;gt;min \  Z = xy + 6x + y&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \ xy \leq 18&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;0 \leq x \leq 10&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;0 \leq y \leq 2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;Let\   w = xy &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;min \ Z = -w + 6x + y&lt;br /&gt;
&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \ w \leq 18&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 10y + 2x - 20&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq 10y&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq 2x&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using GAMS, the solution is z= -76.2, x=10, y=1.8.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;GAMS code sample:&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
variable z;&lt;br /&gt;
&lt;br /&gt;
positive variable x, y, w;&lt;br /&gt;
&lt;br /&gt;
equations  obj, c1, c2, c3, c4, c5 ;&lt;br /&gt;
&lt;br /&gt;
obj..    z =e= -w -6*x + y;&lt;br /&gt;
&lt;br /&gt;
c1..     w =l= 18 ;&lt;br /&gt;
&lt;br /&gt;
c2..     w =g= 0;&lt;br /&gt;
&lt;br /&gt;
c3..     w =g= 10*y +2*x -20;&lt;br /&gt;
&lt;br /&gt;
c4..     w =l= 10*y;&lt;br /&gt;
&lt;br /&gt;
c5..     w =l= 2*x;&lt;br /&gt;
&lt;br /&gt;
x.up = 10;&lt;br /&gt;
&lt;br /&gt;
x.lo =0;    &lt;br /&gt;
&lt;br /&gt;
y.lo = 0;&lt;br /&gt;
&lt;br /&gt;
y.up = 2;       &lt;br /&gt;
&lt;br /&gt;
model course6800 /all/;&lt;br /&gt;
&lt;br /&gt;
option mip = baron;&lt;br /&gt;
&lt;br /&gt;
option optcr = 0;&lt;br /&gt;
&lt;br /&gt;
solve course6800 minimizing z using mip ;&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Applications&#039;&#039;&#039; ==&lt;br /&gt;
Bilinear functions occur in numerous engineering and natural science applications where McCormick Envelopes can be utilized, including the following : &lt;br /&gt;
&lt;br /&gt;
Computer vision &amp;lt;sup&amp;gt;4&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Super resolution imaging &amp;lt;sup&amp;gt;5&amp;lt;/sup&amp;gt;     &lt;br /&gt;
&lt;br /&gt;
Energy conversion networks &amp;lt;sup&amp;gt;6&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Cellular networks&amp;lt;sup&amp;gt;7&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Dynamic biological systems&amp;lt;sup&amp;gt;8&amp;lt;/sup&amp;gt;&lt;br /&gt;
== &#039;&#039;&#039;Conclusion&#039;&#039;&#039; ==&lt;br /&gt;
Non-convex NLPs are challenging to solve and may require a significant amount of time, computing resources, and effort to determine if the solution is global or the problem has no feasible solution.  McCormick Envelopes provide a relaxation technique for bilinear non-convex nonlinear programming problems.  McCormick Envelopes provide a straightforward technique of replacing each bilinear term with a new variable and adding four constraints. Due to the recursive nature of this technique, it may be applied to a wide variety of engineering and scientific applications involving bilinear terms.   &lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;References&#039;&#039;&#039; ==&lt;br /&gt;
# McCormick, Garth P.  Computability of Global Solutions To Factorable Nonconvex Solutions: Part I: Convex Underestimating Problems&lt;br /&gt;
# Scott, J. K. Stuber, M. D. &amp;amp; Barton, P. I. (2011). Generalized McCormick Relaxations. &#039;&#039;Journal of Global Optimization, Vol. 51, Issue 4&#039;&#039;, 569-606 doi: 10.1007/s10898-011-9664-7&lt;br /&gt;
# Hijazi, H., Perspective Envelopes for Bilinear Functions, unpublished manuscript, retrieved from: [https://www.google.com/url?sa=t&amp;amp;rct=j&amp;amp;q=&amp;amp;esrc=s&amp;amp;source=web&amp;amp;cd=&amp;amp;ved=2ahUKEwjSr7eu8K70AhVYmHIEHUJzCVsQFnoECAIQAQ&amp;amp;url=http%3A%2F%2Fwww.optimization-online.org%2FDB_FILE%2F2015%2F03%2F4841.pdf&amp;amp;usg=AOvVaw1xf9B1f-EPw0mG1LOqRfm9 Perspective Envelopes for Bilinear Functions]&lt;br /&gt;
#Bergamini, M., Aguirre, P. &amp;amp; Grossman, I. (2005). Logic-based outer approximation for globally optimal synthesis of process networks. &#039;&#039;Computers and Chemical Engineering 29 (2005)&#039;&#039; 1914–1933.&lt;br /&gt;
#Chandraker, M. &amp;amp; Kriegman, D. (n.d.): Globally Optimal Bilinear Programming for Computer Vision Applications. University of San Diego, CA. Retrieved from: http://vision.ucsd.edu&lt;br /&gt;
#Gronski, J. (2019). Non-Convex Optimization and Applications to Bilinear Programming and Super-Resolution Imaging. University of Colorado.  Retrieved from: &amp;lt;nowiki&amp;gt;https://www.google.com/url?sa=t&amp;amp;rct=j&amp;amp;q=&amp;amp;esrc=s&amp;amp;source=web&amp;amp;cd=&amp;amp;ved=2ahUKEwif3qO017H0AhWNknIEHebkAhMQFnoECA0QAQ&amp;amp;url=https%3A%2F%2Fscholar.colorado.edu%2Fdownloads%2Fwd375w61z&amp;amp;usg=AOvVaw09lnJJoZX3i_wwBGHin9LK&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
#Kantor, J., &amp;amp; Mousaw, P. (2012). A class of bilinear models for the optimization of energy conversion networks. &#039;&#039;Chemical Engineering Science, 67,&#039;&#039; 131-138. doi: 10.1016/j.ces.2011.08.033&lt;br /&gt;
#Ahmed, F., Naeem, M., Ejaz, W. &#039;&#039;et al.&#039;&#039; Renewable Energy Assisted Sustainable and Environment Friendly Energy Cooperation in Cellular Networks. &#039;&#039;Wireless Pers Commun&#039;&#039; &#039;&#039;&#039;108,&#039;&#039;&#039; 2585–2607 (2019). &amp;lt;nowiki&amp;gt;https://doi.org/10.1007/s11277-019-06539-z&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
#Miro et al.: Deterministic global optimization algorithm based on outer approximation for the parameter estimation of nonlinear dynamic biological systems. &#039;&#039;BMC Bioinformatics&#039;&#039; (2012) 13:90. doi: 10.1186/1471-2105-13-90 ·&lt;/div&gt;</summary>
		<author><name>Smu29</name></author>
	</entry>
	<entry>
		<id>https://optimization.cbe.cornell.edu/index.php?title=McCormick_envelopes&amp;diff=3718</id>
		<title>McCormick envelopes</title>
		<link rel="alternate" type="text/html" href="https://optimization.cbe.cornell.edu/index.php?title=McCormick_envelopes&amp;diff=3718"/>
		<updated>2021-11-27T22:08:32Z</updated>

		<summary type="html">&lt;p&gt;Smu29: corrected gams code&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Author: Susan Urban (smu29) (SYSEN 5800 Fall 2021) &lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Introduction&#039;&#039;&#039; ==&lt;br /&gt;
Optimization of a non-convex function f(x) is challenging since it may have multiple locally optimal solutions or no solution and it can take a significant amount of time, computing resources, and effort to determine if the solution is global or the problem has no feasible solution. Different techniques are used to address this challenge depending on the characteristics of the problem. &lt;br /&gt;
[[File:Image of updated estimators and envelopes.png|thumb|Figure 1: Relationships between the given function, concave over-estimators, convex under-estimators, a convex envelope, and a concave envelope. ]]&lt;br /&gt;
One technique used for a given non-convex function is the identification of a concave envelope and a convex envelope.  The concave envelope, and respectively the convex envelope, is the concave over-estimator and convex under-estimator for the given function providing the tighest fit to the given function.  The envelope surrounds the given function, like an envelope encloses a letter, and limits the feasible solution space the most in comparison to all other concave over-estimators and convex under-estimators. Multiple concave over-estimators and multiple convex under-estimators may exist but there is only one concave envelope and one convex envelope for a given function and domain.    &lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;McCormick Envelopes: Theory, Methodology and Algorithmic Discussions&#039;&#039;&#039; ==&lt;br /&gt;
The McCormick Envelope, originally developed by Garth McCormick&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;, is a type of convex relaxation used for the optimization of bilinear (e.g., x*y, x+y) non-linear programming (NLP) problems. &lt;br /&gt;
&lt;br /&gt;
Each bilinear term is replaced with a new variable and four sets of constraints are added. The non-linear programming is converted to a relaxed convex linear programming (LP) which can be more easily solved. &lt;br /&gt;
&lt;br /&gt;
The LP solution gives a lower (L) bound and any feasible solution to the problem gives an upper (U) bound.&lt;br /&gt;
&lt;br /&gt;
As noted by Scott et al&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;, McCormick envelopes are effective since they are recursive, can be applied to a variety of applications, and are typically stronger than those resulting from convexification or linearization procedures. &lt;br /&gt;
&lt;br /&gt;
The following is a derivation of the McCormick Envelopes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;Let \ w = xy&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^{L}\leq x\leq x^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;y^{L}\leq y\leq y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;x^{L}, x^{U}, y^{L}, y^{U} &amp;lt;/math&amp;gt;are   upper  and   lower  bound  values  for  &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;y&amp;lt;/math&amp;gt;, respectively.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left (x-x^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left (y-y^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a * b\geq 0&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a * b=\left ( x-x^{L} \right )\left ( y-y^{L} \right )=xy-x^{L}y-xy^{L}+x^{L}y^{L}\geq 0 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{L}y+xy^{L}-x^{L}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x^{U}-x \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b = \left ( y^{U} -y\right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{U}y+xy^{U}-x^{U}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x^{U}-x\right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left ( y-y^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq x^{U}y+xy^{L}-x^{U}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x-x^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left ( y^{U}-y \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq xy^{U}+x^{L}y-x^{L}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The under-estimators of the function are represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{L}y+xy^{L}-x^{L}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{U}y+xy^{U}-x^{U}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The over-estimators of the function are represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq x^{U}y+xy^{L}-x^{U}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq xy^{U}+x^{L}y-x^{L}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following shows the relaxation of a non-convex problem:&lt;br /&gt;
&lt;br /&gt;
Original non-convex problem: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\min Z= \textstyle \sum_{i=1} \sum_{j=1}  c_{i,j}x_i x_j +g_0(x)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \sum_{i=1}\sum_{j=1} c_{i,j}^l x_i x_j + g_l (x) \leq 0,\forall l \in L&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^ L \leq x \leq x^U&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Replacing &amp;lt;math&amp;gt;u_{i,j} = x_i x_j&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
we obtain a relaxed, convex problem: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\min Z= \textstyle \sum_{i=1} \sum_{j=1}  c_{i,j} u_{i,j} +g_0(x)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \sum_{i=1}\sum_{j=1} c_{i,j}^l u_{i,j}+ g_l (x) \leq 0,\forall l \in L&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^L x_j + x_i x_j^L - {x_i}^L {x_j}^L, \forall  i,j \ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^U x_j + x_i x_j^U - {x_i}^U {x_j}^U, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^L x_j + x_i x_j^U - {x_i}^L {x_j}^U, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^U x_j + x_i x_j^L - {x_i}^U {x_j}^L, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^L \leq x \leq x^U,   \ \ u^L \leq u \leq u^U&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Good lower and upper bounds focus and minimize the feasible solution space; they reduce the number of iterations to find the optimal solution.  &lt;br /&gt;
&lt;br /&gt;
As discussed by Hazaji&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;, global optimization solvers focus initially on optimizing the lower and upper bounds, and when necessary, focus on domain partitioning.  By dividing the domain of a given variable into partitions or smaller regions, the solver is able to tailor and further tighten the convex relaxations of each partition. This strategy is known as the McCormick Piecewise relaxation.  &lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Example: Numerical&#039;&#039;&#039; ==&lt;br /&gt;
&amp;lt;math&amp;gt;min \  Z = xy + 6x + y&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \ xy \leq 18&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;0 \leq x \leq 10&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;0 \leq y \leq 2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;Let\   w = xy &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;min \ Z = -w + 6x + y&lt;br /&gt;
&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \ w \leq 18&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 10y + 2x - 20&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq 10y&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq 2x&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using GAMS, the solution is z= -76.2, x=10, y=1.8.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;GAMS code sample:&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
variable z;&lt;br /&gt;
&lt;br /&gt;
positive variable x, y, w;&lt;br /&gt;
&lt;br /&gt;
equations  obj, c1, c2, c3, c4, c5 ;&lt;br /&gt;
&lt;br /&gt;
obj..    z =e= -w -6*x + y;&lt;br /&gt;
&lt;br /&gt;
c1..     w =l= 18 ;&lt;br /&gt;
&lt;br /&gt;
c2..     w =g= 0;&lt;br /&gt;
&lt;br /&gt;
c3..     w =g= 10*y +2*x -20;&lt;br /&gt;
&lt;br /&gt;
c4..     w =l= 10*y;&lt;br /&gt;
&lt;br /&gt;
c5..     w =l= 2*x;&lt;br /&gt;
&lt;br /&gt;
x.up = 10;&lt;br /&gt;
&lt;br /&gt;
x.lo =0;    &lt;br /&gt;
&lt;br /&gt;
y.lo = 0;&lt;br /&gt;
&lt;br /&gt;
y.up = 2;       &lt;br /&gt;
&lt;br /&gt;
model course6800 /all/;&lt;br /&gt;
&lt;br /&gt;
option mip = baron;&lt;br /&gt;
&lt;br /&gt;
option optcr = 0;&lt;br /&gt;
&lt;br /&gt;
solve course6800 minimizing z using mip ;&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Applications&#039;&#039;&#039; ==&lt;br /&gt;
Bilinear functions occur in numerous engineering and natural science applications where McCormick Envelopes can be utilized, including the following : &lt;br /&gt;
&lt;br /&gt;
Computer vision &amp;lt;sup&amp;gt;4&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Super resolution imaging &amp;lt;sup&amp;gt;5&amp;lt;/sup&amp;gt;     &lt;br /&gt;
&lt;br /&gt;
Energy conversion networks &amp;lt;sup&amp;gt;6&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Cellular networks&amp;lt;sup&amp;gt;7&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Dynamic biological systems&amp;lt;sup&amp;gt;8&amp;lt;/sup&amp;gt;&lt;br /&gt;
== &#039;&#039;&#039;Conclusion&#039;&#039;&#039; ==&lt;br /&gt;
Non-convex NLPs are challenging to solve and may require a significant amount of time, computing resources, and effort to determine if the solution is global or the problem has no feasible solution.  McCormick Envelopes provide a relaxation technique for bilinear non-convex nonlinear programming problems.  McCormick Envelopes provide a straightforward technique of replacing each bilinear term with a new variable and adding four constraints. Due to the recursive nature of this technique, it may be applied to a wide variety of engineering and scientific applications involving bilinear terms.   &lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;References&#039;&#039;&#039; ==&lt;br /&gt;
# McCormick, Garth P.  Computability of Global Solutions To Factorable Nonconvex Solutions: Part I: Convex Underestimating Problems&lt;br /&gt;
# Scott, J. K. Stuber, M. D. &amp;amp; Barton, P. I. (2011). Generalized McCormick Relaxations. Journal of Global Optimization, Vol. 51, Issue 4, 569-606 doi: 10.1007/s10898-011-9664-7&lt;br /&gt;
# Hijazi, H., Perspective Envelopes for Bilinear Functions, unpublished manuscript, retrieved from: [https://www.google.com/url?sa=t&amp;amp;rct=j&amp;amp;q=&amp;amp;esrc=s&amp;amp;source=web&amp;amp;cd=&amp;amp;ved=2ahUKEwjSr7eu8K70AhVYmHIEHUJzCVsQFnoECAIQAQ&amp;amp;url=http%3A%2F%2Fwww.optimization-online.org%2FDB_FILE%2F2015%2F03%2F4841.pdf&amp;amp;usg=AOvVaw1xf9B1f-EPw0mG1LOqRfm9 Perspective Envelopes for Bilinear Functions]&lt;br /&gt;
#Chandraker, M. &amp;amp; Kriegman, D. (n.d.): Globally Optimal Bilinear Programming for Computer Vision Applications. University of San Diego, CA. Retrieved from: https://www.google.com/url?sa=t&amp;amp;rct=j&amp;amp;q=&amp;amp;esrc=s&amp;amp;source=web&amp;amp;cd=&amp;amp;ved=2ahUKEwis69Say7H0AhXWp3IEHVGLBW4QFnoECC4QAQ&amp;amp;url=http%3A%2F%2Fvision.ucsd.edu%2F~manu%2Fpdf%2Fcvpr08_bilinear.pdf&amp;amp;usg=AOvVaw1h-cpWO81s41howVxYKq7F&lt;br /&gt;
#Gronski, J. (2019). Non-Convex Optimization and Applications to Bilinear Programming and Super-Resolution Imaging. University of Colorado.  Retrieved from: &amp;lt;nowiki&amp;gt;https://www.google.com/url?sa=t&amp;amp;rct=j&amp;amp;q=&amp;amp;esrc=s&amp;amp;source=web&amp;amp;cd=&amp;amp;ved=2ahUKEwif3qO017H0AhWNknIEHebkAhMQFnoECA0QAQ&amp;amp;url=https%3A%2F%2Fscholar.colorado.edu%2Fdownloads%2Fwd375w61z&amp;amp;usg=AOvVaw09lnJJoZX3i_wwBGHin9LK&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
#Kantor, J., &amp;amp; Mousaw, P. (2012). A class of bilinear models for the optimization of energy conversion networks. &#039;&#039;Chemical Engineering Science, 67,&#039;&#039; 131-138. doi: 10.1016/j.ces.2011.08.033&lt;br /&gt;
#Ahmed, F., Naeem, M., Ejaz, W. &#039;&#039;et al.&#039;&#039; Renewable Energy Assisted Sustainable and Environment Friendly Energy Cooperation in Cellular Networks. &#039;&#039;Wireless Pers Commun&#039;&#039; &#039;&#039;&#039;108,&#039;&#039;&#039; 2585–2607 (2019). &amp;lt;nowiki&amp;gt;https://doi.org/10.1007/s11277-019-06539-z&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
#Miro et al.: Deterministic global optimization algorithm based on outer approximation for the parameter estimation of nonlinear dynamic biological systems. &#039;&#039;BMC Bioinformatics&#039;&#039; (2012) 13:90. doi: 10.1186/1471-2105-13-90 ·&lt;/div&gt;</summary>
		<author><name>Smu29</name></author>
	</entry>
	<entry>
		<id>https://optimization.cbe.cornell.edu/index.php?title=McCormick_envelopes&amp;diff=3687</id>
		<title>McCormick envelopes</title>
		<link rel="alternate" type="text/html" href="https://optimization.cbe.cornell.edu/index.php?title=McCormick_envelopes&amp;diff=3687"/>
		<updated>2021-11-27T20:32:28Z</updated>

		<summary type="html">&lt;p&gt;Smu29: /* Application */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Author: Susan Urban (smu29) (SYSEN 5800 Fall 2021) &lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Introduction&#039;&#039;&#039; ==&lt;br /&gt;
Optimization of a non-convex function f(x) is challenging since it may have multiple locally optimal solutions or no solution and it can take a significant amount of time, computing resources, and effort to determine if the solution is global or the problem has no feasible solution. Different techniques are used to address this challenge depending on the characteristics of the problem. &lt;br /&gt;
[[File:Image of updated estimators and envelopes.png|thumb|Figure 1: Relationships between the given function, concave over-estimators, convex under-estimators, a convex envelope, and a concave envelope. ]]&lt;br /&gt;
One technique used for a given non-convex function is the identification of a concave envelope and a convex envelope.  The concave envelope, and respectively the convex envelope, is the concave over-estimator and convex under-estimator for the given function providing the tighest fit to the given function.  The envelope surrounds the given function, like an envelope encloses a letter, and limits the feasible solution space the most in comparison to all other concave over-estimators and convex under-estimators. Multiple concave over-estimators and multiple convex under-estimators may exist but there is only one concave envelope and one convex envelope for a given function and domain.    &lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;McCormick Envelopes: Theory, Methodology and Algorithmic Discussions&#039;&#039;&#039; ==&lt;br /&gt;
The McCormick Envelope, originally developed by Garth McCormick&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;, is a type of convex relaxation used for the optimization of bilinear (e.g., x*y, x+y) non-linear programming (NLP) problems. &lt;br /&gt;
&lt;br /&gt;
Each bilinear term is replaced with a new variable and four sets of constraints are added. The non-linear programming is converted to a relaxed convex linear programming (LP) which can be more easily solved. &lt;br /&gt;
&lt;br /&gt;
The LP solution gives a lower (L) bound and any feasible solution to the problem gives an upper (U) bound.&lt;br /&gt;
&lt;br /&gt;
As noted by Scott et al&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;, McCormick envelopes are effective since they are recursive, can be applied to a variety of applications, and are typically stronger than those resulting from convexification or linearization procedures. &lt;br /&gt;
&lt;br /&gt;
The following is a derivation of the McCormick Envelopes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;Let \ w = xy&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^{L}\leq x\leq x^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;y^{L}\leq y\leq y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;x^{L}, x^{U}, y^{L}, y^{U} &amp;lt;/math&amp;gt;are   upper  and   lower  bound  values  for  &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;y&amp;lt;/math&amp;gt;, respectively.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left (x-x^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left (y-y^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a * b\geq 0&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a * b=\left ( x-x^{L} \right )\left ( y-y^{L} \right )=xy-x^{L}y-xy^{L}+x^{L}y^{L}\geq 0 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{L}y+xy^{L}-x^{L}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x^{U}-x \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b = \left ( y^{U} -y\right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{U}y+xy^{U}-x^{U}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x^{U}-x\right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left ( y-y^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq x^{U}y+xy^{L}-x^{U}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x-x^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left ( y^{U}-y \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq xy^{U}+x^{L}y-x^{L}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The under-estimators of the function are represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{L}y+xy^{L}-x^{L}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{U}y+xy^{U}-x^{U}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The over-estimators of the function are represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq x^{U}y+xy^{L}-x^{U}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq xy^{U}+x^{L}y-x^{L}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following shows the relaxation of a non-convex problem:&lt;br /&gt;
&lt;br /&gt;
Original non-convex problem: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\min Z= \textstyle \sum_{i=1} \sum_{j=1}  c_{i,j}x_i x_j +g_0(x)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \sum_{i=1}\sum_{j=1} c_{i,j}^l x_i x_j + g_l (x) \leq 0,\forall l \in L&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^ L \leq x \leq x^U&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Replacing &amp;lt;math&amp;gt;u_{i,j} = x_i x_j&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
we obtain a relaxed, convex problem: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\min Z= \textstyle \sum_{i=1} \sum_{j=1}  c_{i,j} u_{i,j} +g_0(x)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \sum_{i=1}\sum_{j=1} c_{i,j}^l u_{i,j}+ g_l (x) \leq 0,\forall l \in L&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^L x_j + x_i x_j^L - {x_i}^L {x_j}^L, \forall  i,j \ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^U x_j + x_i x_j^U - {x_i}^U {x_j}^U, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^L x_j + x_i x_j^U - {x_i}^L {x_j}^U, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^U x_j + x_i x_j^L - {x_i}^U {x_j}^L, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^L \leq x \leq x^U,   \ \ u^L \leq u \leq u^U&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Good lower and upper bounds focus and minimize the feasible solution space; they reduce the number of iterations to find the optimal solution.  &lt;br /&gt;
&lt;br /&gt;
As discussed by Hazaji&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;, global optimization solvers focus initially on optimizing the lower and upper bounds, and when necessary, focus on domain partitioning.  By dividing the domain of a given variable into partitions or smaller regions, the solver is able to tailor and further tighten the convex relaxations of each partition.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Example: Numerical&#039;&#039;&#039; ==&lt;br /&gt;
&amp;lt;math&amp;gt;min \  Z = xy + 6x + y&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \ xy \leq 18&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;0 \leq x \leq 10&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;0 \leq y \leq 2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;Let\   w = xy &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;min \ Z = -w + 6x + y&lt;br /&gt;
&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \ w \leq 18&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 10y + 2x - 20&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq 10y&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq 2x&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using GAMS, the solution is z= -24, x=6, y=2.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;GAMS code sample:&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
variable z;&lt;br /&gt;
&lt;br /&gt;
positive variable x, y, w;&lt;br /&gt;
&lt;br /&gt;
equations  obj, c1, c2, c3, c4, c5 ;&lt;br /&gt;
&lt;br /&gt;
obj..    z =e= -w -2*x ;&lt;br /&gt;
&lt;br /&gt;
c1..     w =l= 12 ;&lt;br /&gt;
&lt;br /&gt;
c2..     w =g= 0;&lt;br /&gt;
&lt;br /&gt;
c3..     w =g= 6*y +3*x -18;&lt;br /&gt;
&lt;br /&gt;
c4..     w =l= 6*y;&lt;br /&gt;
&lt;br /&gt;
c5..     w =l= 3*x;&lt;br /&gt;
&lt;br /&gt;
x.up = 10;&lt;br /&gt;
&lt;br /&gt;
x.lo =0;    &lt;br /&gt;
&lt;br /&gt;
y.up = 2;  &lt;br /&gt;
&lt;br /&gt;
y.lo = 0;        &lt;br /&gt;
&lt;br /&gt;
model course5800 /all/;&lt;br /&gt;
&lt;br /&gt;
option mip = baron;&lt;br /&gt;
&lt;br /&gt;
option optcr = 0;&lt;br /&gt;
&lt;br /&gt;
solve course5800 minimizing z using mip ;&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Applications&#039;&#039;&#039; ==&lt;br /&gt;
Bilinear functions occur in numerous engineering and natural science applications where McCormick Envelopes can be utilized, including the following : &lt;br /&gt;
&lt;br /&gt;
Computer vision &amp;lt;sup&amp;gt;4&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Super resolution imaging &amp;lt;sup&amp;gt;5&amp;lt;/sup&amp;gt;     &lt;br /&gt;
&lt;br /&gt;
Energy conversion networks &amp;lt;sup&amp;gt;6&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Cellular networks&amp;lt;sup&amp;gt;7&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Dynamic biological systems&amp;lt;sup&amp;gt;8&amp;lt;/sup&amp;gt;&lt;br /&gt;
== &#039;&#039;&#039;Conclusion&#039;&#039;&#039; ==&lt;br /&gt;
Non-convex NLPs are challenging to solve and may require a significant amount of time, computing resources, and effort to determine if the solution is global or the problem has no feasible solution.  McCormick Envelopes provide a relaxation technique for bilinear non-convex nonlinear programming problems.  McCormick Envelopes provide a straightforward technique of replacing each bilinear term with a new variable and adding four constraints. Due to the recursive nature of this technique, it may be applied to a wide variety of engineering and scientific applications involving bilinear terms.   &lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;References&#039;&#039;&#039; ==&lt;br /&gt;
# McCormick, Garth P.  Computability of Global Solutions To Factorable Nonconvex Solutions: Part I: Convex Underestimating Problems&lt;br /&gt;
# Scott, J. K. Stuber, M. D. &amp;amp; Barton, P. I. (2011). Generalized McCormick Relaxations. Journal of Global Optimization, Vol. 51, Issue 4, 569-606 doi: 10.1007/s10898-011-9664-7&lt;br /&gt;
# Hijazi, H., Perspective Envelopes for Bilinear Functions, unpublished manuscript, retrieved from: [https://www.google.com/url?sa=t&amp;amp;rct=j&amp;amp;q=&amp;amp;esrc=s&amp;amp;source=web&amp;amp;cd=&amp;amp;ved=2ahUKEwjSr7eu8K70AhVYmHIEHUJzCVsQFnoECAIQAQ&amp;amp;url=http%3A%2F%2Fwww.optimization-online.org%2FDB_FILE%2F2015%2F03%2F4841.pdf&amp;amp;usg=AOvVaw1xf9B1f-EPw0mG1LOqRfm9 Perspective Envelopes for Bilinear Functions]&lt;br /&gt;
#Chandraker, M. &amp;amp; Kriegman, D. (n.d.): Globally Optimal Bilinear Programming for Computer Vision Applications. University of San Diego, CA. Retrieved from: https://www.google.com/url?sa=t&amp;amp;rct=j&amp;amp;q=&amp;amp;esrc=s&amp;amp;source=web&amp;amp;cd=&amp;amp;ved=2ahUKEwis69Say7H0AhXWp3IEHVGLBW4QFnoECC4QAQ&amp;amp;url=http%3A%2F%2Fvision.ucsd.edu%2F~manu%2Fpdf%2Fcvpr08_bilinear.pdf&amp;amp;usg=AOvVaw1h-cpWO81s41howVxYKq7F&lt;br /&gt;
#Gronski, J. (2019). Non-Convex Optimization and Applications to Bilinear Programming and Super-Resolution Imaging. University of Colorado.  Retrieved from: &amp;lt;nowiki&amp;gt;https://www.google.com/url?sa=t&amp;amp;rct=j&amp;amp;q=&amp;amp;esrc=s&amp;amp;source=web&amp;amp;cd=&amp;amp;ved=2ahUKEwif3qO017H0AhWNknIEHebkAhMQFnoECA0QAQ&amp;amp;url=https%3A%2F%2Fscholar.colorado.edu%2Fdownloads%2Fwd375w61z&amp;amp;usg=AOvVaw09lnJJoZX3i_wwBGHin9LK&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
#Kantor, J., &amp;amp; Mousaw, P. (2012). A class of bilinear models for the optimization of energy conversion networks. &#039;&#039;Chemical Engineering Science, 67,&#039;&#039; 131-138. doi: 10.1016/j.ces.2011.08.033&lt;br /&gt;
#Ahmed, F., Naeem, M., Ejaz, W. &#039;&#039;et al.&#039;&#039; Renewable Energy Assisted Sustainable and Environment Friendly Energy Cooperation in Cellular Networks. &#039;&#039;Wireless Pers Commun&#039;&#039; &#039;&#039;&#039;108,&#039;&#039;&#039; 2585–2607 (2019). &amp;lt;nowiki&amp;gt;https://doi.org/10.1007/s11277-019-06539-z&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
#Miro et al.: Deterministic global optimization algorithm based on outer approximation for the parameter estimation of nonlinear dynamic biological systems. &#039;&#039;BMC Bioinformatics&#039;&#039; (2012) 13:90. doi: 10.1186/1471-2105-13-90 ·&lt;/div&gt;</summary>
		<author><name>Smu29</name></author>
	</entry>
	<entry>
		<id>https://optimization.cbe.cornell.edu/index.php?title=McCormick_envelopes&amp;diff=3685</id>
		<title>McCormick envelopes</title>
		<link rel="alternate" type="text/html" href="https://optimization.cbe.cornell.edu/index.php?title=McCormick_envelopes&amp;diff=3685"/>
		<updated>2021-11-27T20:22:56Z</updated>

		<summary type="html">&lt;p&gt;Smu29: fixed superscripts again&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Author: Susan Urban (smu29) (SYSEN 5800 Fall 2021) &lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Introduction&#039;&#039;&#039; ==&lt;br /&gt;
Optimization of a non-convex function f(x) is challenging since it may have multiple locally optimal solutions or no solution and it can take a significant amount of time, computing resources, and effort to determine if the solution is global or the problem has no feasible solution. Different techniques are used to address this challenge depending on the characteristics of the problem. &lt;br /&gt;
[[File:Image of updated estimators and envelopes.png|thumb|Figure 1: Relationships between the given function, concave over-estimators, convex under-estimators, a convex envelope, and a concave envelope. ]]&lt;br /&gt;
One technique used for a given non-convex function is the identification of a concave envelope and a convex envelope.  The concave envelope, and respectively the convex envelope, is the concave over-estimator and convex under-estimator for the given function providing the tighest fit to the given function.  The envelope surrounds the given function, like an envelope encloses a letter, and limits the feasible solution space the most in comparison to all other concave over-estimators and convex under-estimators. Multiple concave over-estimators and multiple convex under-estimators may exist but there is only one concave envelope and one convex envelope for a given function and domain.    &lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;McCormick Envelopes: Theory, Methodology and Algorithmic Discussions&#039;&#039;&#039; ==&lt;br /&gt;
The McCormick Envelope, originally developed by Garth McCormick&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;, is a type of convex relaxation used for the optimization of bilinear (e.g., x*y, x+y) non-linear programming (NLP) problems. &lt;br /&gt;
&lt;br /&gt;
Each bilinear term is replaced with a new variable and four sets of constraints are added. The non-linear programming is converted to a relaxed convex linear programming (LP) which can be more easily solved. &lt;br /&gt;
&lt;br /&gt;
The LP solution gives a lower (L) bound and any feasible solution to the problem gives an upper (U) bound.&lt;br /&gt;
&lt;br /&gt;
As noted by Scott et al&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;, McCormick envelopes are effective since they are recursive, can be applied to a variety of applications, and are typically stronger than those resulting from convexification or linearization procedures. &lt;br /&gt;
&lt;br /&gt;
The following is a derivation of the McCormick Envelopes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;Let \ w = xy&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^{L}\leq x\leq x^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;y^{L}\leq y\leq y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;x^{L}, x^{U}, y^{L}, y^{U} &amp;lt;/math&amp;gt;are   upper  and   lower  bound  values  for  &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;y&amp;lt;/math&amp;gt;, respectively.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left (x-x^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left (y-y^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a * b\geq 0&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a * b=\left ( x-x^{L} \right )\left ( y-y^{L} \right )=xy-x^{L}y-xy^{L}+x^{L}y^{L}\geq 0 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{L}y+xy^{L}-x^{L}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x^{U}-x \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b = \left ( y^{U} -y\right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{U}y+xy^{U}-x^{U}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x^{U}-x\right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left ( y-y^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq x^{U}y+xy^{L}-x^{U}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x-x^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left ( y^{U}-y \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq xy^{U}+x^{L}y-x^{L}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The under-estimators of the function are represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{L}y+xy^{L}-x^{L}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{U}y+xy^{U}-x^{U}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The over-estimators of the function are represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq x^{U}y+xy^{L}-x^{U}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq xy^{U}+x^{L}y-x^{L}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following shows the relaxation of a non-convex problem:&lt;br /&gt;
&lt;br /&gt;
Original non-convex problem: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\min Z= \textstyle \sum_{i=1} \sum_{j=1}  c_{i,j}x_i x_j +g_0(x)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \sum_{i=1}\sum_{j=1} c_{i,j}^l x_i x_j + g_l (x) \leq 0,\forall l \in L&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^ L \leq x \leq x^U&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Replacing &amp;lt;math&amp;gt;u_{i,j} = x_i x_j&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
we obtain a relaxed, convex problem: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\min Z= \textstyle \sum_{i=1} \sum_{j=1}  c_{i,j} u_{i,j} +g_0(x)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \sum_{i=1}\sum_{j=1} c_{i,j}^l u_{i,j}+ g_l (x) \leq 0,\forall l \in L&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^L x_j + x_i x_j^L - {x_i}^L {x_j}^L, \forall  i,j \ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^U x_j + x_i x_j^U - {x_i}^U {x_j}^U, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^L x_j + x_i x_j^U - {x_i}^L {x_j}^U, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^U x_j + x_i x_j^L - {x_i}^U {x_j}^L, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^L \leq x \leq x^U,   \ \ u^L \leq u \leq u^U&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Good lower and upper bounds focus and minimize the feasible solution space; they reduce the number of iterations to find the optimal solution.  &lt;br /&gt;
&lt;br /&gt;
As discussed by Hazaji&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;, global optimization solvers focus initially on optimizing the lower and upper bounds, and when necessary, focus on domain partitioning.  By dividing the domain of a given variable into partitions or smaller regions, the solver is able to tailor and further tighten the convex relaxations of each partition.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Example: Numerical&#039;&#039;&#039; ==&lt;br /&gt;
&amp;lt;math&amp;gt;min \  Z = xy + 6x + y&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \ xy \leq 18&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;0 \leq x \leq 10&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;0 \leq y \leq 2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;Let\   w = xy &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;min \ Z = -w + 6x + y&lt;br /&gt;
&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \ w \leq 18&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 10y + 2x - 20&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq 10y&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq 2x&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using GAMS, the solution is z= -24, x=6, y=2.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;GAMS code sample:&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
variable z;&lt;br /&gt;
&lt;br /&gt;
positive variable x, y, w;&lt;br /&gt;
&lt;br /&gt;
equations  obj, c1, c2, c3, c4, c5 ;&lt;br /&gt;
&lt;br /&gt;
obj..    z =e= -w -2*x ;&lt;br /&gt;
&lt;br /&gt;
c1..     w =l= 12 ;&lt;br /&gt;
&lt;br /&gt;
c2..     w =g= 0;&lt;br /&gt;
&lt;br /&gt;
c3..     w =g= 6*y +3*x -18;&lt;br /&gt;
&lt;br /&gt;
c4..     w =l= 6*y;&lt;br /&gt;
&lt;br /&gt;
c5..     w =l= 3*x;&lt;br /&gt;
&lt;br /&gt;
x.up = 10;&lt;br /&gt;
&lt;br /&gt;
x.lo =0;    &lt;br /&gt;
&lt;br /&gt;
y.up = 2;  &lt;br /&gt;
&lt;br /&gt;
y.lo = 0;        &lt;br /&gt;
&lt;br /&gt;
model course5800 /all/;&lt;br /&gt;
&lt;br /&gt;
option mip = baron;&lt;br /&gt;
&lt;br /&gt;
option optcr = 0;&lt;br /&gt;
&lt;br /&gt;
solve course5800 minimizing z using mip ;&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Application&#039;&#039;&#039; ==&lt;br /&gt;
Bilinear functions occur in numerous engineering and natural science applications where McCormick Envelopes can be utilized, including the following : &lt;br /&gt;
&lt;br /&gt;
Computer vision &amp;lt;sup&amp;gt;4&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Super resolution imaging &amp;lt;sup&amp;gt;5&amp;lt;/sup&amp;gt;     &lt;br /&gt;
&lt;br /&gt;
Energy conversion networks &amp;lt;sup&amp;gt;6&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Cellular networks&amp;lt;sup&amp;gt;7&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Dynamic biological systems&amp;lt;sup&amp;gt;8&amp;lt;/sup&amp;gt;&lt;br /&gt;
== &#039;&#039;&#039;Conclusion&#039;&#039;&#039; ==&lt;br /&gt;
Non-convex NLPs are challenging to solve and may require a significant amount of time, computing resources, and effort to determine if the solution is global or the problem has no feasible solution.  McCormick Envelopes provide a relaxation technique for bilinear non-convex nonlinear programming problems.  McCormick Envelopes provide a straightforward technique of replacing each bilinear term with a new variable and adding four constraints. Due to the recursive nature of this technique, it may be applied to a wide variety of engineering and scientific applications involving bilinear terms.   &lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;References&#039;&#039;&#039; ==&lt;br /&gt;
# McCormick, Garth P.  Computability of Global Solutions To Factorable Nonconvex Solutions: Part I: Convex Underestimating Problems&lt;br /&gt;
# Scott, J. K. Stuber, M. D. &amp;amp; Barton, P. I. (2011). Generalized McCormick Relaxations. Journal of Global Optimization, Vol. 51, Issue 4, 569-606 doi: 10.1007/s10898-011-9664-7&lt;br /&gt;
# Hijazi, H., Perspective Envelopes for Bilinear Functions, unpublished manuscript, retrieved from: [https://www.google.com/url?sa=t&amp;amp;rct=j&amp;amp;q=&amp;amp;esrc=s&amp;amp;source=web&amp;amp;cd=&amp;amp;ved=2ahUKEwjSr7eu8K70AhVYmHIEHUJzCVsQFnoECAIQAQ&amp;amp;url=http%3A%2F%2Fwww.optimization-online.org%2FDB_FILE%2F2015%2F03%2F4841.pdf&amp;amp;usg=AOvVaw1xf9B1f-EPw0mG1LOqRfm9 Perspective Envelopes for Bilinear Functions]&lt;br /&gt;
#Chandraker, M. &amp;amp; Kriegman, D. (n.d.): Globally Optimal Bilinear Programming for Computer Vision Applications. University of San Diego, CA. Retrieved from: https://www.google.com/url?sa=t&amp;amp;rct=j&amp;amp;q=&amp;amp;esrc=s&amp;amp;source=web&amp;amp;cd=&amp;amp;ved=2ahUKEwis69Say7H0AhXWp3IEHVGLBW4QFnoECC4QAQ&amp;amp;url=http%3A%2F%2Fvision.ucsd.edu%2F~manu%2Fpdf%2Fcvpr08_bilinear.pdf&amp;amp;usg=AOvVaw1h-cpWO81s41howVxYKq7F&lt;br /&gt;
#Gronski, J. (2019). Non-Convex Optimization and Applications to Bilinear Programming and Super-Resolution Imaging. University of Colorado.  Retrieved from: &amp;lt;nowiki&amp;gt;https://www.google.com/url?sa=t&amp;amp;rct=j&amp;amp;q=&amp;amp;esrc=s&amp;amp;source=web&amp;amp;cd=&amp;amp;ved=2ahUKEwif3qO017H0AhWNknIEHebkAhMQFnoECA0QAQ&amp;amp;url=https%3A%2F%2Fscholar.colorado.edu%2Fdownloads%2Fwd375w61z&amp;amp;usg=AOvVaw09lnJJoZX3i_wwBGHin9LK&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
#Kantor, J., &amp;amp; Mousaw, P. (2012). A class of bilinear models for the optimization of energy conversion networks. &#039;&#039;Chemical Engineering Science, 67,&#039;&#039; 131-138. doi: 10.1016/j.ces.2011.08.033&lt;br /&gt;
#Ahmed, F., Naeem, M., Ejaz, W. &#039;&#039;et al.&#039;&#039; Renewable Energy Assisted Sustainable and Environment Friendly Energy Cooperation in Cellular Networks. &#039;&#039;Wireless Pers Commun&#039;&#039; &#039;&#039;&#039;108,&#039;&#039;&#039; 2585–2607 (2019). &amp;lt;nowiki&amp;gt;https://doi.org/10.1007/s11277-019-06539-z&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
#Miro et al.: Deterministic global optimization algorithm based on outer approximation for the parameter estimation of nonlinear dynamic biological systems. &#039;&#039;BMC Bioinformatics&#039;&#039; (2012) 13:90. doi: 10.1186/1471-2105-13-90 ·&lt;/div&gt;</summary>
		<author><name>Smu29</name></author>
	</entry>
	<entry>
		<id>https://optimization.cbe.cornell.edu/index.php?title=McCormick_envelopes&amp;diff=3682</id>
		<title>McCormick envelopes</title>
		<link rel="alternate" type="text/html" href="https://optimization.cbe.cornell.edu/index.php?title=McCormick_envelopes&amp;diff=3682"/>
		<updated>2021-11-27T20:20:12Z</updated>

		<summary type="html">&lt;p&gt;Smu29: corrected superscripts&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Author: Susan Urban (smu29) (SYSEN 5800 Fall 2021) &lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Introduction&#039;&#039;&#039; ==&lt;br /&gt;
Optimization of a non-convex function f(x) is challenging since it may have multiple locally optimal solutions or no solution and it can take a significant amount of time, computing resources, and effort to determine if the solution is global or the problem has no feasible solution. Different techniques are used to address this challenge depending on the characteristics of the problem. &lt;br /&gt;
[[File:Image of updated estimators and envelopes.png|thumb|Figure 1: Relationships between the given function, concave over-estimators, convex under-estimators, a convex envelope, and a concave envelope. ]]&lt;br /&gt;
One technique used for a given non-convex function is the identification of a concave envelope and a convex envelope.  The concave envelope, and respectively the convex envelope, is the concave over-estimator and convex under-estimator for the given function providing the tighest fit to the given function.  The envelope surrounds the given function, like an envelope encloses a letter, and limits the feasible solution space the most in comparison to all other concave over-estimators and convex under-estimators. Multiple concave over-estimators and multiple convex under-estimators may exist but there is only one concave envelope and one convex envelope for a given function and domain.    &lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;McCormick Envelopes: Theory, Methodology and Algorithmic Discussions&#039;&#039;&#039; ==&lt;br /&gt;
The McCormick Envelope, originally developed by Garth McCormick&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;, is a type of convex relaxation used for the optimization of bilinear (e.g., x*y, x+y) non-linear programming (NLP) problems. &lt;br /&gt;
&lt;br /&gt;
Each bilinear term is replaced with a new variable and four sets of constraints are added. The non-linear programming is converted to a relaxed convex linear programming (LP) which can be more easily solved. &lt;br /&gt;
&lt;br /&gt;
The LP solution gives a lower (L) bound and any feasible solution to the problem gives an upper (U) bound.&lt;br /&gt;
&lt;br /&gt;
As noted by Scott et al2, McCormick envelopes are effective since they are recursive, can be applied to a variety of applications, and are typically stronger than those resulting from convexification or linearization procedures. &lt;br /&gt;
&lt;br /&gt;
The following is a derivation of the McCormick Envelopes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;Let \ w = xy&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^{L}\leq x\leq x^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;y^{L}\leq y\leq y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;x^{L}, x^{U}, y^{L}, y^{U} &amp;lt;/math&amp;gt;are   upper  and   lower  bound  values  for  &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;y&amp;lt;/math&amp;gt;, respectively.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left (x-x^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left (y-y^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a * b\geq 0&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a * b=\left ( x-x^{L} \right )\left ( y-y^{L} \right )=xy-x^{L}y-xy^{L}+x^{L}y^{L}\geq 0 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{L}y+xy^{L}-x^{L}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x^{U}-x \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b = \left ( y^{U} -y\right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{U}y+xy^{U}-x^{U}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x^{U}-x\right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left ( y-y^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq x^{U}y+xy^{L}-x^{U}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x-x^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left ( y^{U}-y \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq xy^{U}+x^{L}y-x^{L}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The under-estimators of the function are represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{L}y+xy^{L}-x^{L}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{U}y+xy^{U}-x^{U}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The over-estimators of the function are represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq x^{U}y+xy^{L}-x^{U}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq xy^{U}+x^{L}y-x^{L}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following shows the relaxation of a non-convex problem:&lt;br /&gt;
&lt;br /&gt;
Original non-convex problem: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\min Z= \textstyle \sum_{i=1} \sum_{j=1}  c_{i,j}x_i x_j +g_0(x)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \sum_{i=1}\sum_{j=1} c_{i,j}^l x_i x_j + g_l (x) \leq 0,\forall l \in L&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^ L \leq x \leq x^U&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Replacing &amp;lt;math&amp;gt;u_{i,j} = x_i x_j&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
we obtain a relaxed, convex problem: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\min Z= \textstyle \sum_{i=1} \sum_{j=1}  c_{i,j} u_{i,j} +g_0(x)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \sum_{i=1}\sum_{j=1} c_{i,j}^l u_{i,j}+ g_l (x) \leq 0,\forall l \in L&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^L x_j + x_i x_j^L - {x_i}^L {x_j}^L, \forall  i,j \ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^U x_j + x_i x_j^U - {x_i}^U {x_j}^U, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^L x_j + x_i x_j^U - {x_i}^L {x_j}^U, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^U x_j + x_i x_j^L - {x_i}^U {x_j}^L, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^L \leq x \leq x^U,   \ \ u^L \leq u \leq u^U&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Good lower and upper bounds focus and minimize the feasible solution space; they reduce the number of iterations to find the optimal solution.  &lt;br /&gt;
&lt;br /&gt;
As discussed by Hazaji3, global optimization solvers focus initially on optimizing the lower and upper bounds, and when necessary, focus on domain partitioning.  By dividing the domain of a given variable into partitions or smaller regions, the solver is able to tailor and further tighten the convex relaxations of each partition.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Example: Numerical&#039;&#039;&#039; ==&lt;br /&gt;
&amp;lt;math&amp;gt;min \  Z = xy + 6x + y&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \ xy \leq 18&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;0 \leq x \leq 10&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;0 \leq y \leq 2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;Let\   w = xy &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;min \ Z = -w + 6x + y&lt;br /&gt;
&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \ w \leq 18&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 10y + 2x - 20&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq 10y&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq 2x&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using GAMS, the solution is z= -24, x=6, y=2.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;GAMS code sample:&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
variable z;&lt;br /&gt;
&lt;br /&gt;
positive variable x, y, w;&lt;br /&gt;
&lt;br /&gt;
equations  obj, c1, c2, c3, c4, c5 ;&lt;br /&gt;
&lt;br /&gt;
obj..    z =e= -w -2*x ;&lt;br /&gt;
&lt;br /&gt;
c1..     w =l= 12 ;&lt;br /&gt;
&lt;br /&gt;
c2..     w =g= 0;&lt;br /&gt;
&lt;br /&gt;
c3..     w =g= 6*y +3*x -18;&lt;br /&gt;
&lt;br /&gt;
c4..     w =l= 6*y;&lt;br /&gt;
&lt;br /&gt;
c5..     w =l= 3*x;&lt;br /&gt;
&lt;br /&gt;
x.up = 10;&lt;br /&gt;
&lt;br /&gt;
x.lo =0;    &lt;br /&gt;
&lt;br /&gt;
y.up = 2;  &lt;br /&gt;
&lt;br /&gt;
y.lo = 0;        &lt;br /&gt;
&lt;br /&gt;
model course5800 /all/;&lt;br /&gt;
&lt;br /&gt;
option mip = baron;&lt;br /&gt;
&lt;br /&gt;
option optcr = 0;&lt;br /&gt;
&lt;br /&gt;
solve course5800 minimizing z using mip ;&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Application&#039;&#039;&#039; ==&lt;br /&gt;
Bilinear functions occur in numerous engineering and natural science applications where McCormick Envelopes can be utilized, including the following : &lt;br /&gt;
&lt;br /&gt;
Computer vision &amp;lt;sup&amp;gt;4&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Super resolution imaging &amp;lt;sup&amp;gt;5&amp;lt;/sup&amp;gt;     &lt;br /&gt;
&lt;br /&gt;
Energy conversion networks &amp;lt;sup&amp;gt;6&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Cellular networks&amp;lt;sup&amp;gt;7&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Dynamic biological systems&amp;lt;sup&amp;gt;8&amp;lt;/sup&amp;gt;&lt;br /&gt;
== &#039;&#039;&#039;Conclusion&#039;&#039;&#039; ==&lt;br /&gt;
Non-convex NLPs are challenging to solve and may require a significant amount of time, computing resources, and effort to determine if the solution is global or the problem has no feasible solution.  McCormick Envelopes provide a relaxation technique for bilinear non-convex nonlinear programming problems.  McCormick Envelopes provide a straightforward technique of replacing each bilinear term with a new variable and adding four constraints. Due to the recursive nature of this technique, it may be applied to a wide variety of engineering and scientific applications involving bilinear terms.   &lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;References&#039;&#039;&#039; ==&lt;br /&gt;
# McCormick, Garth P.  Computability of Global Solutions To Factorable Nonconvex Solutions: Part I: Convex Underestimating Problems&lt;br /&gt;
# Scott, J. K. Stuber, M. D. &amp;amp; Barton, P. I. (2011). Generalized McCormick Relaxations. Journal of Global Optimization, Vol. 51, Issue 4, 569-606 doi: 10.1007/s10898-011-9664-7&lt;br /&gt;
# Hijazi, H., Perspective Envelopes for Bilinear Functions, unpublished manuscript, retrieved from: [https://www.google.com/url?sa=t&amp;amp;rct=j&amp;amp;q=&amp;amp;esrc=s&amp;amp;source=web&amp;amp;cd=&amp;amp;ved=2ahUKEwjSr7eu8K70AhVYmHIEHUJzCVsQFnoECAIQAQ&amp;amp;url=http%3A%2F%2Fwww.optimization-online.org%2FDB_FILE%2F2015%2F03%2F4841.pdf&amp;amp;usg=AOvVaw1xf9B1f-EPw0mG1LOqRfm9 Perspective Envelopes for Bilinear Functions]&lt;br /&gt;
#Chandraker, M. &amp;amp; Kriegman, D. (n.d.): Globally Optimal Bilinear Programming for Computer Vision Applications. University of San Diego, CA. Retrieved from: https://www.google.com/url?sa=t&amp;amp;rct=j&amp;amp;q=&amp;amp;esrc=s&amp;amp;source=web&amp;amp;cd=&amp;amp;ved=2ahUKEwis69Say7H0AhXWp3IEHVGLBW4QFnoECC4QAQ&amp;amp;url=http%3A%2F%2Fvision.ucsd.edu%2F~manu%2Fpdf%2Fcvpr08_bilinear.pdf&amp;amp;usg=AOvVaw1h-cpWO81s41howVxYKq7F&lt;br /&gt;
#Gronski, J. (2019). Non-Convex Optimization and Applications to Bilinear Programming and Super-Resolution Imaging. University of Colorado.  Retrieved from: &amp;lt;nowiki&amp;gt;https://www.google.com/url?sa=t&amp;amp;rct=j&amp;amp;q=&amp;amp;esrc=s&amp;amp;source=web&amp;amp;cd=&amp;amp;ved=2ahUKEwif3qO017H0AhWNknIEHebkAhMQFnoECA0QAQ&amp;amp;url=https%3A%2F%2Fscholar.colorado.edu%2Fdownloads%2Fwd375w61z&amp;amp;usg=AOvVaw09lnJJoZX3i_wwBGHin9LK&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
#Kantor, J., &amp;amp; Mousaw, P. (2012). A class of bilinear models for the optimization of energy conversion networks. &#039;&#039;Chemical Engineering Science, 67,&#039;&#039; 131-138. doi: 10.1016/j.ces.2011.08.033&lt;br /&gt;
#Ahmed, F., Naeem, M., Ejaz, W. &#039;&#039;et al.&#039;&#039; Renewable Energy Assisted Sustainable and Environment Friendly Energy Cooperation in Cellular Networks. &#039;&#039;Wireless Pers Commun&#039;&#039; &#039;&#039;&#039;108,&#039;&#039;&#039; 2585–2607 (2019). &amp;lt;nowiki&amp;gt;https://doi.org/10.1007/s11277-019-06539-z&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
#Miro et al.: Deterministic global optimization algorithm based on outer approximation for the parameter estimation of nonlinear dynamic biological systems. &#039;&#039;BMC Bioinformatics&#039;&#039; (2012) 13:90. doi: 10.1186/1471-2105-13-90 ·&lt;/div&gt;</summary>
		<author><name>Smu29</name></author>
	</entry>
	<entry>
		<id>https://optimization.cbe.cornell.edu/index.php?title=McCormick_envelopes&amp;diff=3680</id>
		<title>McCormick envelopes</title>
		<link rel="alternate" type="text/html" href="https://optimization.cbe.cornell.edu/index.php?title=McCormick_envelopes&amp;diff=3680"/>
		<updated>2021-11-27T20:13:20Z</updated>

		<summary type="html">&lt;p&gt;Smu29: updated the digram&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Author: Susan Urban (smu29) (SYSEN 5800 Fall 2021) &lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Introduction&#039;&#039;&#039; ==&lt;br /&gt;
Optimization of a non-convex function f(x) is challenging since it may have multiple locally optimal solutions or no solution and it can take a significant amount of time, computing resources, and effort to determine if the solution is global or the problem has no feasible solution. Different techniques are used to address this challenge depending on the characteristics of the problem. &lt;br /&gt;
[[File:Image of updated estimators and envelopes.png|thumb|Figure 1: Relationships between the given function, concave over-estimators, convex under-estimators, a convex envelope, and a concave envelope. ]]&lt;br /&gt;
One technique used for a given non-convex function is the identification of a concave envelope and a convex envelope.  The concave envelope, and respectively the convex envelope, is the concave over-estimator and convex under-estimator for the given function providing the tighest fit to the given function.  The envelope surrounds the given function, like an envelope encloses a letter, and limits the feasible solution space the most in comparison to all other concave over-estimators and convex under-estimators. Multiple concave over-estimators and multiple convex under-estimators may exist but there is only one concave envelope and one convex envelope for a given function and domain.    &lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;McCormick Envelopes: Theory, Methodology and Algorithmic Discussions&#039;&#039;&#039; ==&lt;br /&gt;
The McCormick Envelope&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt; is a type of convex relaxation used for optimization of bilinear (e.g., x*y, x+y) non-linear programming (NLP) problems. &lt;br /&gt;
&lt;br /&gt;
Each bilinear term is replaced with a new variable and four sets of constraints are added. The non-linear programming is converted to a relaxed convex linear programming which can be more easily solved. &lt;br /&gt;
&lt;br /&gt;
The LP solution gives a lower bound and any feasible solution gives an upper bound.&lt;br /&gt;
&lt;br /&gt;
As noted by Scott et al&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;, McCormick envelopes are effective since they are recursive, can be applied to a variety of applications, and are typically stronger than those resulting from convexification or linearization procedures. &lt;br /&gt;
&lt;br /&gt;
The following is a derivation of the McCormick Envelopes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;Let \ w = xy&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^{L}\leq x\leq x^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;y^{L}\leq y\leq y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;x^{L}, x^{U}, y^{L}, y^{U} &amp;lt;/math&amp;gt;are   upper  and   lower  bound  values  for  &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;y&amp;lt;/math&amp;gt;, respectively.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left (x-x^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left (y-y^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a * b\geq 0&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a * b=\left ( x-x^{L} \right )\left ( y-y^{L} \right )=xy-x^{L}y-xy^{L}+x^{L}y^{L}\geq 0 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{L}y+xy^{L}-x^{L}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x^{U}-x \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b = \left ( y^{U} -y\right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{U}y+xy^{U}-x^{U}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x^{U}-x\right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left ( y-y^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq x^{U}y+xy^{L}-x^{U}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x-x^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left ( y^{U}-y \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq xy^{U}+x^{L}y-x^{L}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The under-estimators of the function are represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{L}y+xy^{L}-x^{L}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{U}y+xy^{U}-x^{U}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The over-estimators of the function are represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq x^{U}y+xy^{L}-x^{U}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq xy^{U}+x^{L}y-x^{L}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following shows the relaxation of a non-convex problem:&lt;br /&gt;
&lt;br /&gt;
Original non-convex problem: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\min Z= \textstyle \sum_{i=1} \sum_{j=1}  c_{i,j}x_i x_j +g_0(x)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \sum_{i=1}\sum_{j=1} c_{i,j}^l x_i x_j + g_l (x) \leq 0,\forall l \in L&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^ L \leq x \leq x^U&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Replacing &amp;lt;math&amp;gt;u_{i,j} = x_i x_j&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
we obtain a relaxed, convex problem: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\min Z= \textstyle \sum_{i=1} \sum_{j=1}  c_{i,j} u_{i,j} +g_0(x)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \sum_{i=1}\sum_{j=1} c_{i,j}^l u_{i,j}+ g_l (x) \leq 0,\forall l \in L&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^L x_j + x_i x_j^L - {x_i}^L {x_j}^L, \forall  i,j \ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^U x_j + x_i x_j^U - {x_i}^U {x_j}^U, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^L x_j + x_i x_j^U - {x_i}^L {x_j}^U, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^U x_j + x_i x_j^L - {x_i}^U {x_j}^L, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^L \leq x \leq x^U,   \ \ u^L \leq u \leq u^U&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Good lower and upper bounds focus and minimize the feasible solution space; they reduce the number of iterations to find the optimal solution.  &lt;br /&gt;
&lt;br /&gt;
As discussed by Hazaji&amp;lt;sup&amp;gt;6&amp;lt;/sup&amp;gt;, global optimization solvers focus initially on optimizing the lower and upper bounds, and when necessary, focus on domain partitioning.  By dividing the domain of a given variable into partitions or smaller regions, the solver is able to tailor and further tighten the convex relaxations of each partition.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Example: Numerical&#039;&#039;&#039; ==&lt;br /&gt;
&amp;lt;math&amp;gt;min \  Z = xy + 6x + y&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \ xy \leq 18&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;0 \leq x \leq 10&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;0 \leq y \leq 2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;Let\   w = xy &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;min \ Z = -w + 6x + y&lt;br /&gt;
&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \ w \leq 18&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 10y + 2x - 20&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq 10y&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq 2x&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using GAMS, the solution is z= -24, x=6, y=2.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;GAMS code sample:&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
variable z;&lt;br /&gt;
&lt;br /&gt;
positive variable x, y, w;&lt;br /&gt;
&lt;br /&gt;
equations  obj, c1, c2, c3, c4, c5 ;&lt;br /&gt;
&lt;br /&gt;
obj..    z =e= -w -2*x ;&lt;br /&gt;
&lt;br /&gt;
c1..     w =l= 12 ;&lt;br /&gt;
&lt;br /&gt;
c2..     w =g= 0;&lt;br /&gt;
&lt;br /&gt;
c3..     w =g= 6*y +3*x -18;&lt;br /&gt;
&lt;br /&gt;
c4..     w =l= 6*y;&lt;br /&gt;
&lt;br /&gt;
c5..     w =l= 3*x;&lt;br /&gt;
&lt;br /&gt;
x.up = 10;&lt;br /&gt;
&lt;br /&gt;
x.lo =0;    &lt;br /&gt;
&lt;br /&gt;
y.up = 2;  &lt;br /&gt;
&lt;br /&gt;
y.lo = 0;        &lt;br /&gt;
&lt;br /&gt;
model course5800 /all/;&lt;br /&gt;
&lt;br /&gt;
option mip = baron;&lt;br /&gt;
&lt;br /&gt;
option optcr = 0;&lt;br /&gt;
&lt;br /&gt;
solve course5800 minimizing z using mip ;&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Application&#039;&#039;&#039; ==&lt;br /&gt;
Bilinear functions occur in numerous engineering and natural science applications where McCormick Envelopes can be utilized, including the following : &lt;br /&gt;
&lt;br /&gt;
Computer vision &amp;lt;sup&amp;gt;4&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Super resolution imaging &amp;lt;sup&amp;gt;5&amp;lt;/sup&amp;gt;     &lt;br /&gt;
&lt;br /&gt;
Energy conversion networks &amp;lt;sup&amp;gt;6&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Cellular networks&amp;lt;sup&amp;gt;7&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Dynamic biological systems&amp;lt;sup&amp;gt;8&amp;lt;/sup&amp;gt;&lt;br /&gt;
== &#039;&#039;&#039;Conclusion&#039;&#039;&#039; ==&lt;br /&gt;
Non-convex NLPs are challenging to solve and may require a significant amount of time, computing resources, and effort to determine if the solution is global or the problem has no feasible solution.  McCormick Envelopes provide a relaxation technique for bilinear non-convex nonlinear programming problems.  McCormick Envelopes provide a straightforward technique of replacing each bilinear term with a new variable and adding four constraints. Due to the recursive nature of this technique, it may be applied to a wide variety of engineering and scientific applications involving bilinear terms.   &lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;References&#039;&#039;&#039; ==&lt;br /&gt;
# McCormick, Garth P.  Computability of Global Solutions To Factorable Nonconvex Solutions: Part I: Convex Underestimating Problems&lt;br /&gt;
# Scott, J. K. Stuber, M. D. &amp;amp; Barton, P. I. (2011). Generalized McCormick Relaxations. Journal of Global Optimization, Vol. 51, Issue 4, 569-606 doi: 10.1007/s10898-011-9664-7&lt;br /&gt;
# Hijazi, H., Perspective Envelopes for Bilinear Functions, unpublished manuscript, retrieved from: [https://www.google.com/url?sa=t&amp;amp;rct=j&amp;amp;q=&amp;amp;esrc=s&amp;amp;source=web&amp;amp;cd=&amp;amp;ved=2ahUKEwjSr7eu8K70AhVYmHIEHUJzCVsQFnoECAIQAQ&amp;amp;url=http%3A%2F%2Fwww.optimization-online.org%2FDB_FILE%2F2015%2F03%2F4841.pdf&amp;amp;usg=AOvVaw1xf9B1f-EPw0mG1LOqRfm9 Perspective Envelopes for Bilinear Functions]&lt;br /&gt;
#Chandraker, M. &amp;amp; Kriegman, D. (n.d.): Globally Optimal Bilinear Programming for Computer Vision Applications. University of San Diego, CA. Retrieved from: https://www.google.com/url?sa=t&amp;amp;rct=j&amp;amp;q=&amp;amp;esrc=s&amp;amp;source=web&amp;amp;cd=&amp;amp;ved=2ahUKEwis69Say7H0AhXWp3IEHVGLBW4QFnoECC4QAQ&amp;amp;url=http%3A%2F%2Fvision.ucsd.edu%2F~manu%2Fpdf%2Fcvpr08_bilinear.pdf&amp;amp;usg=AOvVaw1h-cpWO81s41howVxYKq7F&lt;br /&gt;
#Gronski, J. (2019). Non-Convex Optimization and Applications to Bilinear Programming and Super-Resolution Imaging. University of Colorado.  Retrieved from: &amp;lt;nowiki&amp;gt;https://www.google.com/url?sa=t&amp;amp;rct=j&amp;amp;q=&amp;amp;esrc=s&amp;amp;source=web&amp;amp;cd=&amp;amp;ved=2ahUKEwif3qO017H0AhWNknIEHebkAhMQFnoECA0QAQ&amp;amp;url=https%3A%2F%2Fscholar.colorado.edu%2Fdownloads%2Fwd375w61z&amp;amp;usg=AOvVaw09lnJJoZX3i_wwBGHin9LK&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
#Kantor, J., &amp;amp; Mousaw, P. (2012). A class of bilinear models for the optimization of energy conversion networks. &#039;&#039;Chemical Engineering Science, 67,&#039;&#039; 131-138. doi: 10.1016/j.ces.2011.08.033&lt;br /&gt;
#Ahmed, F., Naeem, M., Ejaz, W. &#039;&#039;et al.&#039;&#039; Renewable Energy Assisted Sustainable and Environment Friendly Energy Cooperation in Cellular Networks. &#039;&#039;Wireless Pers Commun&#039;&#039; &#039;&#039;&#039;108,&#039;&#039;&#039; 2585–2607 (2019). &amp;lt;nowiki&amp;gt;https://doi.org/10.1007/s11277-019-06539-z&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
#Miro et al.: Deterministic global optimization algorithm based on outer approximation for the parameter estimation of nonlinear dynamic biological systems. &#039;&#039;BMC Bioinformatics&#039;&#039; (2012) 13:90. doi: 10.1186/1471-2105-13-90 ·&lt;/div&gt;</summary>
		<author><name>Smu29</name></author>
	</entry>
	<entry>
		<id>https://optimization.cbe.cornell.edu/index.php?title=File:Image_of_updated_estimators_and_envelopes.png&amp;diff=3678</id>
		<title>File:Image of updated estimators and envelopes.png</title>
		<link rel="alternate" type="text/html" href="https://optimization.cbe.cornell.edu/index.php?title=File:Image_of_updated_estimators_and_envelopes.png&amp;diff=3678"/>
		<updated>2021-11-27T20:08:40Z</updated>

		<summary type="html">&lt;p&gt;Smu29: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;updated estimators and envelopes&lt;/div&gt;</summary>
		<author><name>Smu29</name></author>
	</entry>
	<entry>
		<id>https://optimization.cbe.cornell.edu/index.php?title=McCormick_envelopes&amp;diff=3676</id>
		<title>McCormick envelopes</title>
		<link rel="alternate" type="text/html" href="https://optimization.cbe.cornell.edu/index.php?title=McCormick_envelopes&amp;diff=3676"/>
		<updated>2021-11-27T20:05:41Z</updated>

		<summary type="html">&lt;p&gt;Smu29: added a sentence&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Author: Susan Urban (smu29) (SYSEN 5800 Fall 2021) &lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Introduction&#039;&#039;&#039; ==&lt;br /&gt;
Optimization of a non-convex function f(x) is challenging since it may have multiple locally optimal solutions or no solution and it can take a significant amount of time, computing resources, and effort to determine if the solution is global or the problem has no feasible solution. Different techniques are used to address this challenge depending on the characteristics of the problem. &lt;br /&gt;
[[File:Consolidated image.png|thumb|Figure 1: Relationships between the given function f(x), concave over-estimators, convex under-estimators, concave envelope and convex envelope. ]]&lt;br /&gt;
One technique used for a given non-convex function is the identification of a concave envelope and a convex envelope.  The concave envelope, and respectively the convex envelope, is the concave over-estimator and convex under-estimator for the given function providing the tighest fit to the given function.  The envelope surrounds the given function, like an envelope encloses a letter, and limits the feasible solution space the most in comparison to all other concave over-estimators and convex under-estimators. Multiple concave over-estimators and multiple convex under-estimators may exist but there is only one concave envelope and one convex envelope for a given function and domain.   &lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;McCormick Envelopes: Theory, Methodology and Algorithmic Discussions&#039;&#039;&#039; ==&lt;br /&gt;
The McCormick Envelope&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt; is a type of convex relaxation used for optimization of bilinear (e.g., x*y, x+y) non-linear programming (NLP) problems. &lt;br /&gt;
&lt;br /&gt;
Each bilinear term is replaced with a new variable and four sets of constraints are added. The non-linear programming is converted to a relaxed convex linear programming which can be more easily solved. &lt;br /&gt;
&lt;br /&gt;
The LP solution gives a lower bound and any feasible solution gives an upper bound.&lt;br /&gt;
&lt;br /&gt;
As noted by Scott et al&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;, McCormick envelopes are effective since they are recursive, can be applied to a variety of applications, and are typically stronger than those resulting from convexification or linearization procedures. &lt;br /&gt;
&lt;br /&gt;
The following is a derivation of the McCormick Envelopes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;Let \ w = xy&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^{L}\leq x\leq x^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;y^{L}\leq y\leq y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;x^{L}, x^{U}, y^{L}, y^{U} &amp;lt;/math&amp;gt;are   upper  and   lower  bound  values  for  &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;y&amp;lt;/math&amp;gt;, respectively.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left (x-x^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left (y-y^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a * b\geq 0&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a * b=\left ( x-x^{L} \right )\left ( y-y^{L} \right )=xy-x^{L}y-xy^{L}+x^{L}y^{L}\geq 0 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{L}y+xy^{L}-x^{L}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x^{U}-x \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b = \left ( y^{U} -y\right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{U}y+xy^{U}-x^{U}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x^{U}-x\right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left ( y-y^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq x^{U}y+xy^{L}-x^{U}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x-x^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left ( y^{U}-y \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq xy^{U}+x^{L}y-x^{L}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The under-estimators of the function are represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{L}y+xy^{L}-x^{L}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{U}y+xy^{U}-x^{U}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The over-estimators of the function are represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq x^{U}y+xy^{L}-x^{U}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq xy^{U}+x^{L}y-x^{L}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following shows the relaxation of a non-convex problem:&lt;br /&gt;
&lt;br /&gt;
Original non-convex problem: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\min Z= \textstyle \sum_{i=1} \sum_{j=1}  c_{i,j}x_i x_j +g_0(x)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \sum_{i=1}\sum_{j=1} c_{i,j}^l x_i x_j + g_l (x) \leq 0,\forall l \in L&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^ L \leq x \leq x^U&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Replacing &amp;lt;math&amp;gt;u_{i,j} = x_i x_j&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
we obtain a relaxed, convex problem: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\min Z= \textstyle \sum_{i=1} \sum_{j=1}  c_{i,j} u_{i,j} +g_0(x)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \sum_{i=1}\sum_{j=1} c_{i,j}^l u_{i,j}+ g_l (x) \leq 0,\forall l \in L&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^L x_j + x_i x_j^L - {x_i}^L {x_j}^L, \forall  i,j \ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^U x_j + x_i x_j^U - {x_i}^U {x_j}^U, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^L x_j + x_i x_j^U - {x_i}^L {x_j}^U, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^U x_j + x_i x_j^L - {x_i}^U {x_j}^L, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^L \leq x \leq x^U,   \ \ u^L \leq u \leq u^U&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Good lower and upper bounds focus and minimize the feasible solution space; they reduce the number of iterations to find the optimal solution.  &lt;br /&gt;
&lt;br /&gt;
As discussed by Hazaji&amp;lt;sup&amp;gt;6&amp;lt;/sup&amp;gt;, global optimization solvers focus initially on optimizing the lower and upper bounds, and when necessary, focus on domain partitioning.  By dividing the domain of a given variable into partitions or smaller regions, the solver is able to tailor and further tighten the convex relaxations of each partition.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Example: Numerical&#039;&#039;&#039; ==&lt;br /&gt;
&amp;lt;math&amp;gt;min \  Z = xy + 6x + y&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \ xy \leq 18&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;0 \leq x \leq 10&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;0 \leq y \leq 2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;Let\   w = xy &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;min \ Z = -w + 6x + y&lt;br /&gt;
&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \ w \leq 18&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 10y + 2x - 20&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq 10y&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq 2x&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using GAMS, the solution is z= -24, x=6, y=2.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;GAMS code sample:&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
variable z;&lt;br /&gt;
&lt;br /&gt;
positive variable x, y, w;&lt;br /&gt;
&lt;br /&gt;
equations  obj, c1, c2, c3, c4, c5 ;&lt;br /&gt;
&lt;br /&gt;
obj..    z =e= -w -2*x ;&lt;br /&gt;
&lt;br /&gt;
c1..     w =l= 12 ;&lt;br /&gt;
&lt;br /&gt;
c2..     w =g= 0;&lt;br /&gt;
&lt;br /&gt;
c3..     w =g= 6*y +3*x -18;&lt;br /&gt;
&lt;br /&gt;
c4..     w =l= 6*y;&lt;br /&gt;
&lt;br /&gt;
c5..     w =l= 3*x;&lt;br /&gt;
&lt;br /&gt;
x.up = 10;&lt;br /&gt;
&lt;br /&gt;
x.lo =0;    &lt;br /&gt;
&lt;br /&gt;
y.up = 2;  &lt;br /&gt;
&lt;br /&gt;
y.lo = 0;        &lt;br /&gt;
&lt;br /&gt;
model course5800 /all/;&lt;br /&gt;
&lt;br /&gt;
option mip = baron;&lt;br /&gt;
&lt;br /&gt;
option optcr = 0;&lt;br /&gt;
&lt;br /&gt;
solve course5800 minimizing z using mip ;&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Application&#039;&#039;&#039; ==&lt;br /&gt;
Bilinear functions occur in numerous engineering and natural science applications, including the following : &lt;br /&gt;
&lt;br /&gt;
Computer vision &amp;lt;sup&amp;gt;4&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Super resolution imaging &amp;lt;sup&amp;gt;5&amp;lt;/sup&amp;gt;     &lt;br /&gt;
&lt;br /&gt;
Energy conversion networks &amp;lt;sup&amp;gt;6&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Cellular networks&amp;lt;sup&amp;gt;7&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Dynamic biological systems&amp;lt;sup&amp;gt;8&amp;lt;/sup&amp;gt;&lt;br /&gt;
== &#039;&#039;&#039;Conclusion&#039;&#039;&#039; ==&lt;br /&gt;
Non-convex NLPs are challenging to solve and may require a significant amount of time, computing resources, and effort to determine if the solution is global or the problem has no feasible solution.  McCormick Envelopes provide a relaxation technique for bilinear non-convex nonlinear programming problems.  McCormick Envelopes provide a straightforward technique of replacing each bilinear term with a new variable and adding four constraints. Due to the recursive nature of this technique, it may be applied to a wide variety of engineering and scientific applications involving bilinear terms.   &lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;References&#039;&#039;&#039; ==&lt;br /&gt;
# McCormick, Garth P.  Computability of Global Solutions To Factorable Nonconvex Solutions: Part I: Convex Underestimating Problems&lt;br /&gt;
# Scott, J. K. Stuber, M. D. &amp;amp; Barton, P. I. (2011). Generalized McCormick Relaxations. Journal of Global Optimization, Vol. 51, Issue 4, 569-606 doi: 10.1007/s10898-011-9664-7&lt;br /&gt;
# Hijazi, H., Perspective Envelopes for Bilinear Functions, unpublished manuscript, retrieved from: [https://www.google.com/url?sa=t&amp;amp;rct=j&amp;amp;q=&amp;amp;esrc=s&amp;amp;source=web&amp;amp;cd=&amp;amp;ved=2ahUKEwjSr7eu8K70AhVYmHIEHUJzCVsQFnoECAIQAQ&amp;amp;url=http%3A%2F%2Fwww.optimization-online.org%2FDB_FILE%2F2015%2F03%2F4841.pdf&amp;amp;usg=AOvVaw1xf9B1f-EPw0mG1LOqRfm9 Perspective Envelopes for Bilinear Functions]&lt;br /&gt;
#Chandraker, M. &amp;amp; Kriegman, D. (n.d.): Globally Optimal Bilinear Programming for Computer Vision Applications. University of San Diego, CA. Retrieved from: https://www.google.com/url?sa=t&amp;amp;rct=j&amp;amp;q=&amp;amp;esrc=s&amp;amp;source=web&amp;amp;cd=&amp;amp;ved=2ahUKEwis69Say7H0AhXWp3IEHVGLBW4QFnoECC4QAQ&amp;amp;url=http%3A%2F%2Fvision.ucsd.edu%2F~manu%2Fpdf%2Fcvpr08_bilinear.pdf&amp;amp;usg=AOvVaw1h-cpWO81s41howVxYKq7F&lt;br /&gt;
#Gronski, J. (2019). Non-Convex Optimization and Applications to Bilinear Programming and Super-Resolution Imaging. University of Colorado.  Retrieved from: &amp;lt;nowiki&amp;gt;https://www.google.com/url?sa=t&amp;amp;rct=j&amp;amp;q=&amp;amp;esrc=s&amp;amp;source=web&amp;amp;cd=&amp;amp;ved=2ahUKEwif3qO017H0AhWNknIEHebkAhMQFnoECA0QAQ&amp;amp;url=https%3A%2F%2Fscholar.colorado.edu%2Fdownloads%2Fwd375w61z&amp;amp;usg=AOvVaw09lnJJoZX3i_wwBGHin9LK&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
#Kantor, J., &amp;amp; Mousaw, P. (2012). A class of bilinear models for the optimization of energy conversion networks. &#039;&#039;Chemical Engineering Science, 67,&#039;&#039; 131-138. doi: 10.1016/j.ces.2011.08.033&lt;br /&gt;
#Ahmed, F., Naeem, M., Ejaz, W. &#039;&#039;et al.&#039;&#039; Renewable Energy Assisted Sustainable and Environment Friendly Energy Cooperation in Cellular Networks. &#039;&#039;Wireless Pers Commun&#039;&#039; &#039;&#039;&#039;108,&#039;&#039;&#039; 2585–2607 (2019). &amp;lt;nowiki&amp;gt;https://doi.org/10.1007/s11277-019-06539-z&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
#Miro et al.: Deterministic global optimization algorithm based on outer approximation for the parameter estimation of nonlinear dynamic biological systems. &#039;&#039;BMC Bioinformatics&#039;&#039; (2012) 13:90. doi: 10.1186/1471-2105-13-90 ·&lt;/div&gt;</summary>
		<author><name>Smu29</name></author>
	</entry>
	<entry>
		<id>https://optimization.cbe.cornell.edu/index.php?title=McCormick_envelopes&amp;diff=3673</id>
		<title>McCormick envelopes</title>
		<link rel="alternate" type="text/html" href="https://optimization.cbe.cornell.edu/index.php?title=McCormick_envelopes&amp;diff=3673"/>
		<updated>2021-11-27T19:53:29Z</updated>

		<summary type="html">&lt;p&gt;Smu29: Added more applications and references&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Author: Susan Urban (smu29) (SYSEN 5800 Fall 2021) &lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Introduction&#039;&#039;&#039; ==&lt;br /&gt;
Optimization of a non-convex function f(x) is challenging since it may have multiple locally optimal solutions or no solution and it can take a significant amount of time, computing resources, and effort to determine if the solution is global or the problem has no feasible solution. Different techniques are used to address this challenge depending on the characteristics of the problem. &lt;br /&gt;
[[File:Consolidated image.png|thumb|Figure 1: Relationships between the given function f(x), concave over-estimators, convex under-estimators, concave envelope and convex envelope. ]]&lt;br /&gt;
One technique used for a given non-convex function is the identification of a concave envelope and a convex envelope.  The concave envelope, and respectively the convex envelope, is the concave over-estimator and convex under-estimator for the given function providing the tighest fit to the given function.  The envelope surrounds the given function, like an envelope encloses a letter, and limits the feasible solution space the most in comparison to all other concave over-estimators and convex under-estimators. &lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;McCormick Envelopes: Theory, Methodology and Algorithmic Discussions&#039;&#039;&#039; ==&lt;br /&gt;
The McCormick Envelope&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt; is a type of convex relaxation used for optimization of bilinear (e.g., x*y, x+y) non-linear programming (NLP) problems. &lt;br /&gt;
&lt;br /&gt;
Each bilinear term is replaced with a new variable and four sets of constraints are added. The non-linear programming is converted to a relaxed convex linear programming which can be more easily solved. &lt;br /&gt;
&lt;br /&gt;
The LP solution gives a lower bound and any feasible solution gives an upper bound.&lt;br /&gt;
&lt;br /&gt;
As noted by Scott et al&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;, McCormick envelopes are effective since they are recursive, can be applied to a variety of applications, and are typically stronger than those resulting from convexification or linearization procedures. &lt;br /&gt;
&lt;br /&gt;
The following is a derivation of the McCormick Envelopes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;Let \ w = xy&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^{L}\leq x\leq x^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;y^{L}\leq y\leq y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;x^{L}, x^{U}, y^{L}, y^{U} &amp;lt;/math&amp;gt;are   upper  and   lower  bound  values  for  &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;y&amp;lt;/math&amp;gt;, respectively.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left (x-x^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left (y-y^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a * b\geq 0&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a * b=\left ( x-x^{L} \right )\left ( y-y^{L} \right )=xy-x^{L}y-xy^{L}+x^{L}y^{L}\geq 0 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{L}y+xy^{L}-x^{L}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x^{U}-x \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b = \left ( y^{U} -y\right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{U}y+xy^{U}-x^{U}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x^{U}-x\right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left ( y-y^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq x^{U}y+xy^{L}-x^{U}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x-x^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left ( y^{U}-y \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq xy^{U}+x^{L}y-x^{L}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The under-estimators of the function are represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{L}y+xy^{L}-x^{L}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{U}y+xy^{U}-x^{U}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The over-estimators of the function are represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq x^{U}y+xy^{L}-x^{U}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq xy^{U}+x^{L}y-x^{L}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following shows the relaxation of a non-convex problem:&lt;br /&gt;
&lt;br /&gt;
Original non-convex problem: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\min Z= \textstyle \sum_{i=1} \sum_{j=1}  c_{i,j}x_i x_j +g_0(x)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \sum_{i=1}\sum_{j=1} c_{i,j}^l x_i x_j + g_l (x) \leq 0,\forall l \in L&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^ L \leq x \leq x^U&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Replacing &amp;lt;math&amp;gt;u_{i,j} = x_i x_j&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
we obtain a relaxed, convex problem: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\min Z= \textstyle \sum_{i=1} \sum_{j=1}  c_{i,j} u_{i,j} +g_0(x)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \sum_{i=1}\sum_{j=1} c_{i,j}^l u_{i,j}+ g_l (x) \leq 0,\forall l \in L&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^L x_j + x_i x_j^L - {x_i}^L {x_j}^L, \forall  i,j \ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^U x_j + x_i x_j^U - {x_i}^U {x_j}^U, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^L x_j + x_i x_j^U - {x_i}^L {x_j}^U, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^U x_j + x_i x_j^L - {x_i}^U {x_j}^L, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^L \leq x \leq x^U,   \ \ u^L \leq u \leq u^U&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Good lower and upper bounds focus and minimize the feasible solution space; they reduce the number of iterations to find the optimal solution.  &lt;br /&gt;
&lt;br /&gt;
As discussed by Hazaji&amp;lt;sup&amp;gt;6&amp;lt;/sup&amp;gt;, global optimization solvers focus initially on optimizing the lower and upper bounds, and when necessary, focus on domain partitioning.  By dividing the domain of a given variable into partitions or smaller regions, the solver is able to tailor and further tighten the convex relaxations of each partition.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Example: Numerical&#039;&#039;&#039; ==&lt;br /&gt;
&amp;lt;math&amp;gt;min \  Z = xy + 6x + y&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \ xy \leq 18&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;0 \leq x \leq 10&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;0 \leq y \leq 2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;Let\   w = xy &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;min \ Z = -w + 6x + y&lt;br /&gt;
&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \ w \leq 18&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 10y + 2x - 20&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq 10y&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq 2x&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using GAMS, the solution is z= -24, x=6, y=2.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;GAMS code sample:&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
variable z;&lt;br /&gt;
&lt;br /&gt;
positive variable x, y, w;&lt;br /&gt;
&lt;br /&gt;
equations  obj, c1, c2, c3, c4, c5 ;&lt;br /&gt;
&lt;br /&gt;
obj..    z =e= -w -2*x ;&lt;br /&gt;
&lt;br /&gt;
c1..     w =l= 12 ;&lt;br /&gt;
&lt;br /&gt;
c2..     w =g= 0;&lt;br /&gt;
&lt;br /&gt;
c3..     w =g= 6*y +3*x -18;&lt;br /&gt;
&lt;br /&gt;
c4..     w =l= 6*y;&lt;br /&gt;
&lt;br /&gt;
c5..     w =l= 3*x;&lt;br /&gt;
&lt;br /&gt;
x.up = 10;&lt;br /&gt;
&lt;br /&gt;
x.lo =0;    &lt;br /&gt;
&lt;br /&gt;
y.up = 2;  &lt;br /&gt;
&lt;br /&gt;
y.lo = 0;        &lt;br /&gt;
&lt;br /&gt;
model course5800 /all/;&lt;br /&gt;
&lt;br /&gt;
option mip = baron;&lt;br /&gt;
&lt;br /&gt;
option optcr = 0;&lt;br /&gt;
&lt;br /&gt;
solve course5800 minimizing z using mip ;&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Application&#039;&#039;&#039; ==&lt;br /&gt;
Bilinear functions occur in numerous engineering and natural science applications, including the following : &lt;br /&gt;
&lt;br /&gt;
Computer vision &amp;lt;sup&amp;gt;4&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Super resolution imaging &amp;lt;sup&amp;gt;5&amp;lt;/sup&amp;gt;     &lt;br /&gt;
&lt;br /&gt;
Energy conversion networks &amp;lt;sup&amp;gt;6&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Cellular networks&amp;lt;sup&amp;gt;7&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Dynamic biological systems&amp;lt;sup&amp;gt;8&amp;lt;/sup&amp;gt;&lt;br /&gt;
== &#039;&#039;&#039;Conclusion&#039;&#039;&#039; ==&lt;br /&gt;
Non-convex NLPs are challenging to solve and may require a significant amount of time, computing resources, and effort to determine if the solution is global or the problem has no feasible solution.  McCormick Envelopes provide a relaxation technique for bilinear non-convex nonlinear programming problems.  McCormick Envelopes provide a straightforward technique of replacing each bilinear term with a new variable and adding four constraints. Due to the recursive nature of this technique, it may be applied to a wide variety of engineering and scientific applications involving bilinear terms.   &lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;References&#039;&#039;&#039; ==&lt;br /&gt;
# McCormick, Garth P.  Computability of Global Solutions To Factorable Nonconvex Solutions: Part I: Convex Underestimating Problems&lt;br /&gt;
# Scott, J. K. Stuber, M. D. &amp;amp; Barton, P. I. (2011). Generalized McCormick Relaxations. Journal of Global Optimization, Vol. 51, Issue 4, 569-606 doi: 10.1007/s10898-011-9664-7&lt;br /&gt;
# Hijazi, H., Perspective Envelopes for Bilinear Functions, unpublished manuscript, retrieved from: [https://www.google.com/url?sa=t&amp;amp;rct=j&amp;amp;q=&amp;amp;esrc=s&amp;amp;source=web&amp;amp;cd=&amp;amp;ved=2ahUKEwjSr7eu8K70AhVYmHIEHUJzCVsQFnoECAIQAQ&amp;amp;url=http%3A%2F%2Fwww.optimization-online.org%2FDB_FILE%2F2015%2F03%2F4841.pdf&amp;amp;usg=AOvVaw1xf9B1f-EPw0mG1LOqRfm9 Perspective Envelopes for Bilinear Functions]&lt;br /&gt;
#Chandraker, M. &amp;amp; Kriegman, D. (n.d.): Globally Optimal Bilinear Programming for Computer Vision Applications. University of San Diego, CA. Retrieved from: https://www.google.com/url?sa=t&amp;amp;rct=j&amp;amp;q=&amp;amp;esrc=s&amp;amp;source=web&amp;amp;cd=&amp;amp;ved=2ahUKEwis69Say7H0AhXWp3IEHVGLBW4QFnoECC4QAQ&amp;amp;url=http%3A%2F%2Fvision.ucsd.edu%2F~manu%2Fpdf%2Fcvpr08_bilinear.pdf&amp;amp;usg=AOvVaw1h-cpWO81s41howVxYKq7F&lt;br /&gt;
#Gronski, J. (2019). Non-Convex Optimization and Applications to Bilinear Programming and Super-Resolution Imaging. University of Colorado.  Retrieved from: &amp;lt;nowiki&amp;gt;https://www.google.com/url?sa=t&amp;amp;rct=j&amp;amp;q=&amp;amp;esrc=s&amp;amp;source=web&amp;amp;cd=&amp;amp;ved=2ahUKEwif3qO017H0AhWNknIEHebkAhMQFnoECA0QAQ&amp;amp;url=https%3A%2F%2Fscholar.colorado.edu%2Fdownloads%2Fwd375w61z&amp;amp;usg=AOvVaw09lnJJoZX3i_wwBGHin9LK&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
#Kantor, J., &amp;amp; Mousaw, P. (2012). A class of bilinear models for the optimization of energy conversion networks. &#039;&#039;Chemical Engineering Science, 67,&#039;&#039; 131-138. doi: 10.1016/j.ces.2011.08.033&lt;br /&gt;
#Ahmed, F., Naeem, M., Ejaz, W. &#039;&#039;et al.&#039;&#039; Renewable Energy Assisted Sustainable and Environment Friendly Energy Cooperation in Cellular Networks. &#039;&#039;Wireless Pers Commun&#039;&#039; &#039;&#039;&#039;108,&#039;&#039;&#039; 2585–2607 (2019). &amp;lt;nowiki&amp;gt;https://doi.org/10.1007/s11277-019-06539-z&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
#Miro et al.: Deterministic global optimization algorithm based on outer approximation for the parameter estimation of nonlinear dynamic biological systems. &#039;&#039;BMC Bioinformatics&#039;&#039; (2012) 13:90. doi: 10.1186/1471-2105-13-90 ·&lt;/div&gt;</summary>
		<author><name>Smu29</name></author>
	</entry>
	<entry>
		<id>https://optimization.cbe.cornell.edu/index.php?title=McCormick_envelopes&amp;diff=3665</id>
		<title>McCormick envelopes</title>
		<link rel="alternate" type="text/html" href="https://optimization.cbe.cornell.edu/index.php?title=McCormick_envelopes&amp;diff=3665"/>
		<updated>2021-11-27T19:28:59Z</updated>

		<summary type="html">&lt;p&gt;Smu29: added an application and reference&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Author: Susan Urban (smu29) (SYSEN 5800 Fall 2021) &lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Introduction&#039;&#039;&#039; ==&lt;br /&gt;
Optimization of a non-convex function f(x) is challenging since it may have multiple locally optimal solutions or no solution and it can take a significant amount of time, computing resources, and effort to determine if the solution is global or the problem has no feasible solution. Different techniques are used to address this challenge depending on the characteristics of the problem. &lt;br /&gt;
[[File:Consolidated image.png|thumb|Figure 1: Relationships between the given function f(x), concave over-estimators, convex under-estimators, concave envelope and convex envelope. ]]&lt;br /&gt;
One technique used for a given non-convex function is the identification of a concave envelope and a convex envelope.  The concave envelope, and respectively the convex envelope, is the concave over-estimator and convex under-estimator for the given function providing the tighest fit to the given function.  The envelope surrounds the given function, like an envelope encloses a letter, and limits the feasible solution space the most in comparison to all other concave over-estimators and convex under-estimators. &lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;McCormick Envelopes: Theory, Methodology and Algorithmic Discussions&#039;&#039;&#039; ==&lt;br /&gt;
The McCormick Envelope&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt; is a type of convex relaxation used for optimization of bilinear (e.g., x*y, x+y) non-linear programming (NLP) problems. &lt;br /&gt;
&lt;br /&gt;
Each bilinear term is replaced with a new variable and four sets of constraints are added. The non-linear programming is converted to a relaxed convex linear programming which can be more easily solved. &lt;br /&gt;
&lt;br /&gt;
The LP solution gives a lower bound and any feasible solution gives an upper bound.&lt;br /&gt;
&lt;br /&gt;
As noted by Scott et al&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;, McCormick envelopes are effective since they are recursive, can be applied to a variety of applications, and are typically stronger than those resulting from convexification or linearization procedures. &lt;br /&gt;
&lt;br /&gt;
The following is a derivation of the McCormick Envelopes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;Let \ w = xy&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^{L}\leq x\leq x^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;y^{L}\leq y\leq y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;x^{L}, x^{U}, y^{L}, y^{U} &amp;lt;/math&amp;gt;are   upper  and   lower  bound  values  for  &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;y&amp;lt;/math&amp;gt;, respectively.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left (x-x^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left (y-y^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a * b\geq 0&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a * b=\left ( x-x^{L} \right )\left ( y-y^{L} \right )=xy-x^{L}y-xy^{L}+x^{L}y^{L}\geq 0 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{L}y+xy^{L}-x^{L}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x^{U}-x \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b = \left ( y^{U} -y\right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{U}y+xy^{U}-x^{U}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x^{U}-x\right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left ( y-y^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq x^{U}y+xy^{L}-x^{U}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x-x^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left ( y^{U}-y \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq xy^{U}+x^{L}y-x^{L}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The under-estimators of the function are represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{L}y+xy^{L}-x^{L}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{U}y+xy^{U}-x^{U}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The over-estimators of the function are represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq x^{U}y+xy^{L}-x^{U}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq xy^{U}+x^{L}y-x^{L}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following shows the relaxation of a non-convex problem:&lt;br /&gt;
&lt;br /&gt;
Original non-convex problem: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\min Z= \textstyle \sum_{i=1} \sum_{j=1}  c_{i,j}x_i x_j +g_0(x)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \sum_{i=1}\sum_{j=1} c_{i,j}^l x_i x_j + g_l (x) \leq 0,\forall l \in L&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^ L \leq x \leq x^U&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Replacing &amp;lt;math&amp;gt;u_{i,j} = x_i x_j&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
we obtain a relaxed, convex problem: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\min Z= \textstyle \sum_{i=1} \sum_{j=1}  c_{i,j} u_{i,j} +g_0(x)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \sum_{i=1}\sum_{j=1} c_{i,j}^l u_{i,j}+ g_l (x) \leq 0,\forall l \in L&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^L x_j + x_i x_j^L - {x_i}^L {x_j}^L, \forall  i,j \ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^U x_j + x_i x_j^U - {x_i}^U {x_j}^U, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^L x_j + x_i x_j^U - {x_i}^L {x_j}^U, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^U x_j + x_i x_j^L - {x_i}^U {x_j}^L, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^L \leq x \leq x^U,   \ \ u^L \leq u \leq u^U&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Good lower and upper bounds focus and minimize the feasible solution space; they reduce the number of iterations to find the optimal solution.  &lt;br /&gt;
&lt;br /&gt;
As discussed by Hazaji&amp;lt;sup&amp;gt;6&amp;lt;/sup&amp;gt;, global optimization solvers focus initially on optimizing the lower and upper bounds, and when necessary, focus on domain partitioning.  By dividing the domain of a given variable into partitions or smaller regions, the solver is able to tailor and further tighten the convex relaxations of each partition.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Example: Numerical&#039;&#039;&#039; ==&lt;br /&gt;
&amp;lt;math&amp;gt;min \  Z = xy + 6x + y&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \ xy \leq 18&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;0 \leq x \leq 10&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;0 \leq y \leq 2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;Let\   w = xy &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;min \ Z = -w + 6x + y&lt;br /&gt;
&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \ w \leq 18&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 10y + 2x - 20&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq 10y&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq 2x&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using GAMS, the solution is z= -24, x=6, y=2.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;GAMS code sample:&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
variable z;&lt;br /&gt;
&lt;br /&gt;
positive variable x, y, w;&lt;br /&gt;
&lt;br /&gt;
equations  obj, c1, c2, c3, c4, c5 ;&lt;br /&gt;
&lt;br /&gt;
obj..    z =e= -w -2*x ;&lt;br /&gt;
&lt;br /&gt;
c1..     w =l= 12 ;&lt;br /&gt;
&lt;br /&gt;
c2..     w =g= 0;&lt;br /&gt;
&lt;br /&gt;
c3..     w =g= 6*y +3*x -18;&lt;br /&gt;
&lt;br /&gt;
c4..     w =l= 6*y;&lt;br /&gt;
&lt;br /&gt;
c5..     w =l= 3*x;&lt;br /&gt;
&lt;br /&gt;
x.up = 10;&lt;br /&gt;
&lt;br /&gt;
x.lo =0;    &lt;br /&gt;
&lt;br /&gt;
y.up = 2;  &lt;br /&gt;
&lt;br /&gt;
y.lo = 0;        &lt;br /&gt;
&lt;br /&gt;
model course5800 /all/;&lt;br /&gt;
&lt;br /&gt;
option mip = baron;&lt;br /&gt;
&lt;br /&gt;
option optcr = 0;&lt;br /&gt;
&lt;br /&gt;
solve course5800 minimizing z using mip ;&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Application&#039;&#039;&#039; ==&lt;br /&gt;
Bilinear functions occur in numerous engineering and natural science applications, including the following : &lt;br /&gt;
&lt;br /&gt;
Computer vision &amp;lt;sup&amp;gt;4&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Super resolution imaging &amp;lt;sup&amp;gt;5&amp;lt;/sup&amp;gt;     &lt;br /&gt;
&lt;br /&gt;
Energy conversion networks &amp;lt;sup&amp;gt;6&amp;lt;/sup&amp;gt;      &lt;br /&gt;
&lt;br /&gt;
                                       &lt;br /&gt;
&lt;br /&gt;
                                                         &lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Conclusion&#039;&#039;&#039; ==&lt;br /&gt;
Non-convex NLPs are challenging to solve and may require a significant amount of time, computing resources, and effort to determine if the solution is global or the problem has no feasible solution.  McCormick Envelopes provide a relaxation technique for bilinear non-convex nonlinear programming problems.  McCormick Envelopes provide a straightforward technique of replacing each bilinear term with a new variable and adding four contraints. Due to the recursive nature of this technique, it may be applied to a wide variety of engineering and scientific applications involving bilinear terms.   &lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;References&#039;&#039;&#039; ==&lt;br /&gt;
# McCormick, Garth P.  Computability of Global Solutions To Factorable Nonconvex Solutions: Part I: Convex Underestimating Problems&lt;br /&gt;
# Scott, J. K. Stuber, M. D. &amp;amp; Barton, P. I. (2011). Generalized McCormick Relaxations. Journal of Global Optimization, Vol. 51, Issue 4, 569-606 doi: 10.1007/s10898-011-9664-7&lt;br /&gt;
# Hijazi, H., Perspective Envelopes for Bilinear Functions, unpublished manuscript, retrieved from: [https://www.google.com/url?sa=t&amp;amp;rct=j&amp;amp;q=&amp;amp;esrc=s&amp;amp;source=web&amp;amp;cd=&amp;amp;ved=2ahUKEwjSr7eu8K70AhVYmHIEHUJzCVsQFnoECAIQAQ&amp;amp;url=http%3A%2F%2Fwww.optimization-online.org%2FDB_FILE%2F2015%2F03%2F4841.pdf&amp;amp;usg=AOvVaw1xf9B1f-EPw0mG1LOqRfm9 Perspective Envelopes for Bilinear Functions]&lt;br /&gt;
#Chandraker, M. &amp;amp; Kriegman, D. (n.d.): Globally Optimal Bilinear Programming for Computer Vision Applications. University of San Diego, CA. Retrieved from: https://www.google.com/url?sa=t&amp;amp;rct=j&amp;amp;q=&amp;amp;esrc=s&amp;amp;source=web&amp;amp;cd=&amp;amp;ved=2ahUKEwis69Say7H0AhXWp3IEHVGLBW4QFnoECC4QAQ&amp;amp;url=http%3A%2F%2Fvision.ucsd.edu%2F~manu%2Fpdf%2Fcvpr08_bilinear.pdf&amp;amp;usg=AOvVaw1h-cpWO81s41howVxYKq7F&lt;br /&gt;
#Gronski, J. (2019). Non-Convex Optimization and Applications to Bilinear Programming and Super-Resolution Imaging. University of Colorado.  Retrieved from: &amp;lt;nowiki&amp;gt;https://www.google.com/url?sa=t&amp;amp;rct=j&amp;amp;q=&amp;amp;esrc=s&amp;amp;source=web&amp;amp;cd=&amp;amp;ved=2ahUKEwif3qO017H0AhWNknIEHebkAhMQFnoECA0QAQ&amp;amp;url=https%3A%2F%2Fscholar.colorado.edu%2Fdownloads%2Fwd375w61z&amp;amp;usg=AOvVaw09lnJJoZX3i_wwBGHin9LK&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
#Kantor, J., &amp;amp; Mousaw, P. (2012). A class of bilinear models for the optimization of energy conversion networks. &#039;&#039;Chemical Engineering Science, 67,&#039;&#039; 131-138. doi: 10.1016/j.ces.2011.08.033&lt;/div&gt;</summary>
		<author><name>Smu29</name></author>
	</entry>
	<entry>
		<id>https://optimization.cbe.cornell.edu/index.php?title=McCormick_envelopes&amp;diff=3663</id>
		<title>McCormick envelopes</title>
		<link rel="alternate" type="text/html" href="https://optimization.cbe.cornell.edu/index.php?title=McCormick_envelopes&amp;diff=3663"/>
		<updated>2021-11-27T18:58:38Z</updated>

		<summary type="html">&lt;p&gt;Smu29: added a figure and other edits&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Author: Susan Urban (smu29) (SYSEN 5800 Fall 2021) &lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Introduction&#039;&#039;&#039; ==&lt;br /&gt;
Optimization of a non-convex function f(x) is challenging since it may have multiple locally optimal solutions or no solution and it can take a significant amount of time, computing resources, and effort to determine if the solution is global or the problem has no feasible solution. Different techniques are used to address this challenge depending on the characteristics of the problem. &lt;br /&gt;
[[File:Consolidated image.png|thumb|Figure 1: Relationships between the given function f(x), concave over-estimators, convex under-estimators, concave envelope and convex envelope. ]]&lt;br /&gt;
One technique used for a given non-convex function is the identification of a concave envelope and a convex envelope.  The concave envelope, and respectively the convex envelope, is the concave over-estimator and convex under-estimator for the given function providing the tighest fit to the given function.  The envelope surrounds the given function, like an envelope encloses a letter, and limits the feasible solution space the most in comparison to all other concave over-estimators and convex under-estimators. &lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;McCormick Envelopes: Theory, Methodology and Algorithmic Discussions&#039;&#039;&#039; ==&lt;br /&gt;
The McCormick Envelope&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt; is a type of convex relaxation used for optimization of bilinear (e.g., x*y, x+y) non-linear programming (NLP) problems. &lt;br /&gt;
&lt;br /&gt;
Each bilinear term is replaced with a new variable and four sets of constraints are added. The non-linear programming is converted to a relaxed convex linear programming which can be more easily solved. &lt;br /&gt;
&lt;br /&gt;
The LP solution gives a lower bound and any feasible solution gives an upper bound.&lt;br /&gt;
&lt;br /&gt;
As noted by Scott et al&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;, McCormick envelopes are effective since they are recursive, can be applied to a variety of applications, and are typically stronger than those resulting from convexification or linearization procedures. &lt;br /&gt;
&lt;br /&gt;
The following is a derivation of the McCormick Envelopes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;Let \ w = xy&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^{L}\leq x\leq x^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;y^{L}\leq y\leq y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;x^{L}, x^{U}, y^{L}, y^{U} &amp;lt;/math&amp;gt;are   upper  and   lower  bound  values  for  &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;y&amp;lt;/math&amp;gt;, respectively.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left (x-x^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left (y-y^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a * b\geq 0&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a * b=\left ( x-x^{L} \right )\left ( y-y^{L} \right )=xy-x^{L}y-xy^{L}+x^{L}y^{L}\geq 0 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{L}y+xy^{L}-x^{L}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x^{U}-x \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b = \left ( y^{U} -y\right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{U}y+xy^{U}-x^{U}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x^{U}-x\right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left ( y-y^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq x^{U}y+xy^{L}-x^{U}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x-x^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left ( y^{U}-y \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq xy^{U}+x^{L}y-x^{L}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The under-estimators of the function are represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{L}y+xy^{L}-x^{L}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{U}y+xy^{U}-x^{U}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The over-estimators of the function are represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq x^{U}y+xy^{L}-x^{U}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq xy^{U}+x^{L}y-x^{L}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following shows the relaxation of a non-convex problem:&lt;br /&gt;
&lt;br /&gt;
Original non-convex problem: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\min Z= \textstyle \sum_{i=1} \sum_{j=1}  c_{i,j}x_i x_j +g_0(x)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \sum_{i=1}\sum_{j=1} c_{i,j}^l x_i x_j + g_l (x) \leq 0,\forall l \in L&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^ L \leq x \leq x^U&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Replacing &amp;lt;math&amp;gt;u_{i,j} = x_i x_j&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
we obtain a relaxed, convex problem: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\min Z= \textstyle \sum_{i=1} \sum_{j=1}  c_{i,j} u_{i,j} +g_0(x)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \sum_{i=1}\sum_{j=1} c_{i,j}^l u_{i,j}+ g_l (x) \leq 0,\forall l \in L&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^L x_j + x_i x_j^L - {x_i}^L {x_j}^L, \forall  i,j \ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^U x_j + x_i x_j^U - {x_i}^U {x_j}^U, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^L x_j + x_i x_j^U - {x_i}^L {x_j}^U, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^U x_j + x_i x_j^L - {x_i}^U {x_j}^L, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^L \leq x \leq x^U,   \ \ u^L \leq u \leq u^U&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Good lower and upper bounds focus and minimize the feasible solution space; they reduce the number of iterations to find the optimal solution.  &lt;br /&gt;
&lt;br /&gt;
As discussed by Hazaji&amp;lt;sup&amp;gt;6&amp;lt;/sup&amp;gt;, global optimization solvers focus initially on optimizing the lower and upper bounds, and when necessary, focus on domain partitioning.  By dividing the domain of a given variable into partitions or smaller regions, the solver is able to tailor and further tighten the convex relaxations of each partition.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Example: Numerical&#039;&#039;&#039; ==&lt;br /&gt;
&amp;lt;math&amp;gt;min \  Z = xy + 6x + y&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \ xy \leq 18&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;0 \leq x \leq 10&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;0 \leq y \leq 2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;Let\   w = xy &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;min \ Z = -w + 6x + y&lt;br /&gt;
&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \ w \leq 18&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 10y + 2x - 20&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq 10y&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq 2x&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using GAMS, the solution is z= -24, x=6, y=2.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;GAMS code sample:&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
variable z;&lt;br /&gt;
&lt;br /&gt;
positive variable x, y, w;&lt;br /&gt;
&lt;br /&gt;
equations  obj, c1, c2, c3, c4, c5 ;&lt;br /&gt;
&lt;br /&gt;
obj..    z =e= -w -2*x ;&lt;br /&gt;
&lt;br /&gt;
c1..     w =l= 12 ;&lt;br /&gt;
&lt;br /&gt;
c2..     w =g= 0;&lt;br /&gt;
&lt;br /&gt;
c3..     w =g= 6*y +3*x -18;&lt;br /&gt;
&lt;br /&gt;
c4..     w =l= 6*y;&lt;br /&gt;
&lt;br /&gt;
c5..     w =l= 3*x;&lt;br /&gt;
&lt;br /&gt;
x.up = 10;&lt;br /&gt;
&lt;br /&gt;
x.lo =0;    &lt;br /&gt;
&lt;br /&gt;
y.up = 2;  &lt;br /&gt;
&lt;br /&gt;
y.lo = 0;        &lt;br /&gt;
&lt;br /&gt;
model course5800 /all/;&lt;br /&gt;
&lt;br /&gt;
option mip = baron;&lt;br /&gt;
&lt;br /&gt;
option optcr = 0;&lt;br /&gt;
&lt;br /&gt;
solve course5800 minimizing z using mip ;&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Application&#039;&#039;&#039; ==&lt;br /&gt;
Bilinear functions occur in numerous engineering and natural science applications, including the following : &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Computer vision 4&lt;br /&gt;
&lt;br /&gt;
Super resolution imaging 5                                           &lt;br /&gt;
&lt;br /&gt;
                                                         &lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Conclusion&#039;&#039;&#039; ==&lt;br /&gt;
Non-convex NLPs are challenging to solve and may require a significant amount of time, computing resources, and effort to determine if the solution is global or the problem has no feasible solution.  McCormick Envelopes provide a relaxation technique for bilinear non-convex nonlinear programming problems.  McCormick Envelopes provide a straightforward technique of replacing each bilinear term with a new variable and adding four contraints. Due to the recursive nature of this technique, it may be applied to a wide variety of engineering and scientific applications involving bilinear terms.   &lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;References&#039;&#039;&#039; ==&lt;br /&gt;
# McCormick, Garth P.  Computability of Global Solutions To Factorable Nonconvex Solutions: Part I: Convex Underestimating Problems&lt;br /&gt;
# Scott, J. K. Stuber, M. D. &amp;amp; Barton, P. I. (2011). Generalized McCormick Relaxations. Journal of Global Optimization, Vol. 51, Issue 4, 569-606 doi: 10.1007/s10898-011-9664-7&lt;br /&gt;
# Hijazi, H., Perspective Envelopes for Bilinear Functions, unpublished manuscript, retrieved from: [https://www.google.com/url?sa=t&amp;amp;rct=j&amp;amp;q=&amp;amp;esrc=s&amp;amp;source=web&amp;amp;cd=&amp;amp;ved=2ahUKEwjSr7eu8K70AhVYmHIEHUJzCVsQFnoECAIQAQ&amp;amp;url=http%3A%2F%2Fwww.optimization-online.org%2FDB_FILE%2F2015%2F03%2F4841.pdf&amp;amp;usg=AOvVaw1xf9B1f-EPw0mG1LOqRfm9 Perspective Envelopes for Bilinear Functions]&lt;br /&gt;
#Chandraker, M. &amp;amp; Kriegman, D. (n.d.): Globally Optimal Bilinear Programming for Computer Vision Applications. University of San Diego, CA. Retrieved from: https://www.google.com/url?sa=t&amp;amp;rct=j&amp;amp;q=&amp;amp;esrc=s&amp;amp;source=web&amp;amp;cd=&amp;amp;ved=2ahUKEwis69Say7H0AhXWp3IEHVGLBW4QFnoECC4QAQ&amp;amp;url=http%3A%2F%2Fvision.ucsd.edu%2F~manu%2Fpdf%2Fcvpr08_bilinear.pdf&amp;amp;usg=AOvVaw1h-cpWO81s41howVxYKq7F&lt;br /&gt;
#Gronski, J. (2019). Non-Convex Optimization and Applications to Bilinear Programming and Super-Resolution Imaging. University of Colorado.  Retrieved from: https://www.google.com/url?sa=t&amp;amp;rct=j&amp;amp;q=&amp;amp;esrc=s&amp;amp;source=web&amp;amp;cd=&amp;amp;ved=2ahUKEwif3qO017H0AhWNknIEHebkAhMQFnoECA0QAQ&amp;amp;url=https%3A%2F%2Fscholar.colorado.edu%2Fdownloads%2Fwd375w61z&amp;amp;usg=AOvVaw09lnJJoZX3i_wwBGHin9LK&lt;/div&gt;</summary>
		<author><name>Smu29</name></author>
	</entry>
	<entry>
		<id>https://optimization.cbe.cornell.edu/index.php?title=File:Consolidated_image.png&amp;diff=3657</id>
		<title>File:Consolidated image.png</title>
		<link rel="alternate" type="text/html" href="https://optimization.cbe.cornell.edu/index.php?title=File:Consolidated_image.png&amp;diff=3657"/>
		<updated>2021-11-27T18:41:17Z</updated>

		<summary type="html">&lt;p&gt;Smu29: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;consolidated envelopes and estimators&lt;/div&gt;</summary>
		<author><name>Smu29</name></author>
	</entry>
	<entry>
		<id>https://optimization.cbe.cornell.edu/index.php?title=McCormick_envelopes&amp;diff=3656</id>
		<title>McCormick envelopes</title>
		<link rel="alternate" type="text/html" href="https://optimization.cbe.cornell.edu/index.php?title=McCormick_envelopes&amp;diff=3656"/>
		<updated>2021-11-27T18:12:14Z</updated>

		<summary type="html">&lt;p&gt;Smu29: adjusted the outline of the content&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Author: Susan Urban (smu29) (SYSEN 5800 Fall 2021) &lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Introduction&#039;&#039;&#039; ==&lt;br /&gt;
Optimization of a non-convex function f(x) is challenging since it may have multiple locally optimal solutions or no solution and it can take a significant amount of time, computing resources, and effort to determine if the solution is global or the problem has no feasible solution. Different techniques are used to address this challenge depending on the characteristics of the problem. &lt;br /&gt;
&lt;br /&gt;
One technique used for a given non-convex function is the identification of a concave envelope and a convex envelope.  The concave envelope, and respectively the convex envelope, is the concave over-estimator and convex under-estimator for the given function providing the tighest fit to the given function.  The envelope surrounds the given function, like an envelope encloses a letter, and limits the feasible solution space the most in comparison to other concave over-estimators and convex under-estimators. &lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;McCormick Envelopes: Theory, Methodology and Algorithmic Discussions&#039;&#039;&#039; ==&lt;br /&gt;
The McCormick Envelope&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt; is a type of convex relaxation used for optimization of bilinear (e.g., x*y, x+y) non-linear programming (NLP) problems. &lt;br /&gt;
&lt;br /&gt;
Each bilinear term is replaced with a new variable and four sets of constraints are added. The non-linear programming is converted to a relaxed convex linear programming which can be more easily solved. &lt;br /&gt;
&lt;br /&gt;
The LP solution gives a lower bound and any feasible solution gives an upper bound.&lt;br /&gt;
&lt;br /&gt;
As noted by Scott et al&amp;lt;sup&amp;gt;5&amp;lt;/sup&amp;gt;, McCormick envelopes are effective since they are recursive, can be applied to a variety of applications, and are typically stronger than those resulting from convexification or linearization procedures. &lt;br /&gt;
&lt;br /&gt;
The following is a derivation of the McCormick Envelopes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;Let \ w = xy&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^{L}\leq x\leq x^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;y^{L}\leq y\leq y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;x^{L}, x^{U}, y^{L}, y^{U} &amp;lt;/math&amp;gt;are   upper  and   lower  bound  values  for  &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;y&amp;lt;/math&amp;gt;, respectively.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left (x-x^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left (y-y^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a * b\geq 0&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a * b=\left ( x-x^{L} \right )\left ( y-y^{L} \right )=xy-x^{L}y-xy^{L}+x^{L}y^{L}\geq 0 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{L}y+xy^{L}-x^{L}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x^{U}-x \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b = \left ( y^{U} -y\right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{U}y+xy^{U}-x^{U}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x^{U}-x\right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left ( y-y^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq x^{U}y+xy^{L}-x^{U}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x-x^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left ( y^{U}-y \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq xy^{U}+x^{L}y-x^{L}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The under-estimators of the function are represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{L}y+xy^{L}-x^{L}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{U}y+xy^{U}-x^{U}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The over-estimators of the function are represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq x^{U}y+xy^{L}-x^{U}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq xy^{U}+x^{L}y-x^{L}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following shows the relaxation of a non-convex problem:&lt;br /&gt;
&lt;br /&gt;
Original non-convex problem: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\min Z= \textstyle \sum_{i=1} \sum_{j=1}  c_{i,j}x_i x_j +g_0(x)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \sum_{i=1}\sum_{j=1} c_{i,j}^l x_i x_j + g_l (x) \leq 0,\forall l \in L&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^ L \leq x \leq x^U&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Replacing &amp;lt;math&amp;gt;u_{i,j} = x_i x_j&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
we obtain a relaxed, convex problem: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\min Z= \textstyle \sum_{i=1} \sum_{j=1}  c_{i,j} u_{i,j} +g_0(x)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \sum_{i=1}\sum_{j=1} c_{i,j}^l u_{i,j}+ g_l (x) \leq 0,\forall l \in L&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^L x_j + x_i x_j^L - {x_i}^L {x_j}^L, \forall  i,j \ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^U x_j + x_i x_j^U - {x_i}^U {x_j}^U, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^L x_j + x_i x_j^U - {x_i}^L {x_j}^U, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^U x_j + x_i x_j^L - {x_i}^U {x_j}^L, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^L \leq x \leq x^U,   \ \ u^L \leq u \leq u^U&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Good lower and upper bounds focus and minimize the feasible solution space; they reduce the number of iterations to find the optimal solution.  &lt;br /&gt;
&lt;br /&gt;
As discussed by Hazaji&amp;lt;sup&amp;gt;6&amp;lt;/sup&amp;gt;, global optimization solvers focus initially on optimizing the lower and upper bounds, and when necessary, focus on domain partitioning.  By dividing the domain of a given variable into partitions or smaller regions, the solver is able to tailor and further tighten the convex relaxations of each partition.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Example: Numerical&#039;&#039;&#039; ==&lt;br /&gt;
&amp;lt;math&amp;gt;min \  Z = xy + 6x + y&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \ xy \leq 18&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;0 \leq x \leq 10&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;0 \leq y \leq 2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;Let\   w = xy &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;min \ Z = -w + 6x + y&lt;br /&gt;
&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \ w \leq 18&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 10y + 2x - 20&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq 10y&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq 2x&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using GAMS, the solution is z= -24, x=6, y=2.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;GAMS code sample:&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
variable z;&lt;br /&gt;
&lt;br /&gt;
positive variable x, y, w;&lt;br /&gt;
&lt;br /&gt;
equations  obj, c1, c2, c3, c4, c5 ;&lt;br /&gt;
&lt;br /&gt;
obj..    z =e= -w -2*x ;&lt;br /&gt;
&lt;br /&gt;
c1..     w =l= 12 ;&lt;br /&gt;
&lt;br /&gt;
c2..     w =g= 0;&lt;br /&gt;
&lt;br /&gt;
c3..     w =g= 6*y +3*x -18;&lt;br /&gt;
&lt;br /&gt;
c4..     w =l= 6*y;&lt;br /&gt;
&lt;br /&gt;
c5..     w =l= 3*x;&lt;br /&gt;
&lt;br /&gt;
x.up = 10;&lt;br /&gt;
&lt;br /&gt;
x.lo =0;    &lt;br /&gt;
&lt;br /&gt;
y.up = 2;  &lt;br /&gt;
&lt;br /&gt;
y.lo = 0;        &lt;br /&gt;
&lt;br /&gt;
model course5800 /all/;&lt;br /&gt;
&lt;br /&gt;
option mip = baron;&lt;br /&gt;
&lt;br /&gt;
option optcr = 0;&lt;br /&gt;
&lt;br /&gt;
solve course5800 minimizing z using mip ;&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Application&#039;&#039;&#039; ==&lt;br /&gt;
Bilinear functions occur in numerous engineering and natural science applications, including the following : &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Computer vision 9&lt;br /&gt;
&lt;br /&gt;
Super resolution imaging &amp;lt;sup&amp;gt;10&amp;lt;/sup&amp;gt;                                           &lt;br /&gt;
&lt;br /&gt;
                                                         &lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Conclusion&#039;&#039;&#039; ==&lt;br /&gt;
Since non-convex NLPs are challenging to solve and may require a significant amount of time, computing resources, and effort to determine if the solution is global or the problem has no feasible solution.  McCormick Envelopes provide a relaxation technique for bilinear non-convex nonlinear programming problems.  McCormick Envelopes provide a straightforward technique that may be applied to bilinear expressions from multiple application areas.  &lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;References&#039;&#039;&#039; ==&lt;br /&gt;
# Dombrowski, J. (2015, June 7). Northwestern University Open Text Book on Process Optimization, McCormick Envelopes Retrieved from &amp;lt;nowiki&amp;gt;https://optimization.mccormick.northwestern.edu/index.php/McCormick_envelopes&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
# McCormick, Garth P.  Computability of Global Solutions To Factorable Nonconvex Solutions: Part I: Convex Underestimating Problems&lt;br /&gt;
# Scott, J. K. Stuber, M. D. &amp;amp; Barton, P. I. (2011). Generalized McCormick Relaxations. Journal of Global Optimization, Vol. 51, Issue 4, 569-606 doi: 10.1007/s10898-011-9664-7&lt;br /&gt;
# Hijazi, H., Perspective Envelopes for Bilinear Functions, unpublished manuscript, retrieved from: [https://www.google.com/url?sa=t&amp;amp;rct=j&amp;amp;q=&amp;amp;esrc=s&amp;amp;source=web&amp;amp;cd=&amp;amp;ved=2ahUKEwjSr7eu8K70AhVYmHIEHUJzCVsQFnoECAIQAQ&amp;amp;url=http%3A%2F%2Fwww.optimization-online.org%2FDB_FILE%2F2015%2F03%2F4841.pdf&amp;amp;usg=AOvVaw1xf9B1f-EPw0mG1LOqRfm9 Perspective Envelopes for Bilinear Functions]&lt;br /&gt;
# Androulakis, I., Maranas, C., Floudas, C.: alphabb: A global optimization method for general constrained nonconvex problems. Journal of Global Optimization 7(4), 337{363 (1995)&lt;br /&gt;
# Smith, E., Pantelides, C.: A symbolic reformulation/spatial branch-and-bound algorithm for the global optimisation of nonconvex fMINLPsg. Computers &amp;amp; Chemical Engineering 23(4), 457 { 478 (1999) &lt;br /&gt;
# Geunes, J., Pardalos, P.: Supply chain optimization, vol. 98. Springer Science &amp;amp; BusinessMedia (2006)&lt;br /&gt;
# Nahapetyan, A.: Bilinear programming: applications in the supply chain management bilinear programming: Applications in the supply chain management. In: C.A. Floudas, P.M. Pardalos (eds.) Encyclopedia of Optimization, pp. 282{288. Springer US (2009)&lt;br /&gt;
#Chandraker, M. &amp;amp; Kriegman, D. (n.d.): Globally Optimal Bilinear Programming for Computer Vision Applications. University of San Diego, CA. Retrieved from: https://www.google.com/url?sa=t&amp;amp;rct=j&amp;amp;q=&amp;amp;esrc=s&amp;amp;source=web&amp;amp;cd=&amp;amp;ved=2ahUKEwis69Say7H0AhXWp3IEHVGLBW4QFnoECC4QAQ&amp;amp;url=http%3A%2F%2Fvision.ucsd.edu%2F~manu%2Fpdf%2Fcvpr08_bilinear.pdf&amp;amp;usg=AOvVaw1h-cpWO81s41howVxYKq7F&lt;br /&gt;
#Gronski, J. (2019). Non-Convex Optimization and Applications to Bilinear Programming and Super-Resolution Imaging. University of Colorado.  Retrieved from: https://www.google.com/url?sa=t&amp;amp;rct=j&amp;amp;q=&amp;amp;esrc=s&amp;amp;source=web&amp;amp;cd=&amp;amp;ved=2ahUKEwif3qO017H0AhWNknIEHebkAhMQFnoECA0QAQ&amp;amp;url=https%3A%2F%2Fscholar.colorado.edu%2Fdownloads%2Fwd375w61z&amp;amp;usg=AOvVaw09lnJJoZX3i_wwBGHin9LK&lt;/div&gt;</summary>
		<author><name>Smu29</name></author>
	</entry>
	<entry>
		<id>https://optimization.cbe.cornell.edu/index.php?title=McCormick_envelopes&amp;diff=3413</id>
		<title>McCormick envelopes</title>
		<link rel="alternate" type="text/html" href="https://optimization.cbe.cornell.edu/index.php?title=McCormick_envelopes&amp;diff=3413"/>
		<updated>2021-11-26T12:30:17Z</updated>

		<summary type="html">&lt;p&gt;Smu29: added figures&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Author: Susan Urban (smu29) (SYSEN 5800 Fall 2021) &lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Introduction&#039;&#039;&#039; ==&lt;br /&gt;
Optimization of a non-convex function f(x) is challenging since it may have multiple locally optimal solutions or no solution and it can take a significant amount of time, resources, and effort to determine if the solution is global or the problem has no feasible solution. According to Castro&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;, &amp;quot;Gradient based solvers [are] unable to certify optimality&amp;lt;sup&amp;gt;&amp;quot;&amp;lt;/sup&amp;gt;. Different techniques are used to address this challenge depending on the characteristics of the problem. One technique used is convex envelopes&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
[[File:Overestimator and underestimator diagram 1.png|thumb|Figure 1: (reproduction from You, F. &amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;) depicts relationship of concave over-estimator and convex under-estimator to the function. ]]&lt;br /&gt;
Given a non-convex function f(x), g(x) is a convex envelope of f(x) for X &amp;lt;math&amp;gt;\in&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
·      g(x) is convex under-estimator of f(x)&lt;br /&gt;
&lt;br /&gt;
·     g(x)&amp;gt;=h(x) for all convex under-estimators h(x)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Figure 1 (reproduction from You, F.&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;) depicts the relationship between a function f(x) and the concave over-estimator and&lt;br /&gt;
&lt;br /&gt;
the convex under-estimator. A concave envelope is the tightest possible concave over-estimator of a function and a convex&lt;br /&gt;
&lt;br /&gt;
envelope is the tightest possible convex under-estimator of a function. Figure 2 (reproduction from You. F.&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;) depicts the&lt;br /&gt;
&lt;br /&gt;
concave and convex envelopes.&lt;br /&gt;
[[File:Concave and convex envelopes.png|thumb|Figure 2: (reproduction from You, F.&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;) depicts the relationship of the concave envelope and the convex envelope to the function. ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;McCormick Envelopes&#039;&#039;&#039; ==&lt;br /&gt;
In particular, for bilinear (e.g., x*y, x+y) non-linear programming (NLP) problems&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;, the McCormick Envelope&amp;lt;sup&amp;gt;4&amp;lt;/sup&amp;gt; is a type of convex relaxation used for optimization.  &lt;br /&gt;
&lt;br /&gt;
In case of an NLP, a linear programming (LP) relaxation is derived by replacing each bilinear term with a new variable and adding four sets of constraints. In the case of a mixed-integer linear programming (MINLP), a MILP relaxation is derived. This strategy is known as McCormick relaxation.&lt;br /&gt;
&lt;br /&gt;
The LP solution gives a lower bound and any feasible solution gives an upper bound.&lt;br /&gt;
&lt;br /&gt;
As noted by Scott et al&amp;lt;sup&amp;gt;5&amp;lt;/sup&amp;gt;, &amp;quot;McCormick envelopes are attractive due to their recursive nature of their definition, which affords wide applicability and easy implementation computationally.  Furthermore, these relaxations are typically stronger than those resulting from convexification or linearization procedures.&amp;quot; &lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Derivation of McCormick Envelopes&#039;&#039;&#039; ==&lt;br /&gt;
The following is a derivation of the McCormick Envelopes:&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;Let \ w = xy&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^{L}\leq x\leq x^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;y^{L}\leq y\leq y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;x^{L}, x^{U}, y^{L}, y^{U} &amp;lt;/math&amp;gt;are   upper  and   lower  bound  values  for  &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;y&amp;lt;/math&amp;gt;, respectively.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left (x-x^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left (y-y^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a * b\geq 0&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a * b=\left ( x-x^{L} \right )\left ( y-y^{L} \right )=xy-x^{L}y-xy^{L}+x^{L}y^{L}\geq 0 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{L}y+xy^{L}-x^{L}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x^{U}-x \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b = \left ( y^{U} -y\right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{U}y+xy^{U}-x^{U}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x^{U}-x\right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left ( y-y^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq x^{U}y+xy^{L}-x^{U}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x-x^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left ( y^{U}-y \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq xy^{U}+x^{L}y-x^{L}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The under-estimators of the function are represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{L}y+xy^{L}-x^{L}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{U}y+xy^{U}-x^{U}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The over-estimators of the function are represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq x^{U}y+xy^{L}-x^{U}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq xy^{U}+x^{L}y-x^{L}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Example: Convex Relaxation&#039;&#039;&#039; ==&lt;br /&gt;
The following shows the relaxation of a non-convex problem:&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Original non-convex problem: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\min Z= \textstyle \sum_{i=1} \sum_{j=1}  c_{i,j}x_i x_j +g_0(x)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \sum_{i=1}\sum_{j=1} c_{i,j}^l x_i x_j + g_l (x) \leq 0,\forall l \in L&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^ L \leq x \leq x^U&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Replacing &amp;lt;math&amp;gt;u_{i,j} = x_i x_j&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
we obtain a relaxed, convex problem: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\min Z= \textstyle \sum_{i=1} \sum_{j=1}  c_{i,j} u_{i,j} +g_0(x)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \sum_{i=1}\sum_{j=1} c_{i,j}^l u_{i,j}+ g_l (x) \leq 0,\forall l \in L&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^L x_j + x_i x_j^L - {x_i}^L {x_j}^L, \forall  i,j \ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^U x_j + x_i x_j^U - {x_i}^U {x_j}^U, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^L x_j + x_i x_j^U - {x_i}^L {x_j}^U, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^U x_j + x_i x_j^L - {x_i}^U {x_j}^L, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^L \leq x \leq x^U,   \ \ u^L \leq u \leq u^U&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Good bounds are essential to focus and minimize the feasible solution space and to reduce the number of iterations to find the optimal solution.  &amp;quot;Good bounds may be obtained either by inspection or solving the optimization problem to minimize (maximize) x, subject to the same constraints as the original problem.&amp;quot;&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As discussed by Hazaji&amp;lt;sup&amp;gt;6&amp;lt;/sup&amp;gt;, global optimization solvers implement bound contraction techniques and once the boundary is optimized, domain partitioning may become necessary. Spatial branch and bound schemes&amp;lt;sup&amp;gt;7,8&amp;lt;/sup&amp;gt;  are among the most effective partitioning methods in global optimization.  By dividing the domain of a given variable, the solver is able to divide the original domain into smaller regions, further tightening the convex relaxations of each partition.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Example: Numerical&#039;&#039;&#039; ==&lt;br /&gt;
&amp;lt;math&amp;gt;min \  Z = xy + 6x + y&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \ xy \leq 18&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;0 \leq x \leq 10&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;0 \leq y \leq 2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;Let\   w = xy &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;min \ Z = -w + 6x + y&lt;br /&gt;
&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \ w \leq 18&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 10y + 2x - 20&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq 10y&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq 2x&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using GAMS, the solution is z= -24, x=6, y=2.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;GAMS code sample:&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
variable z;&lt;br /&gt;
&lt;br /&gt;
positive variable x, y, w;&lt;br /&gt;
&lt;br /&gt;
equations  obj, c1, c2, c3, c4, c5 ;&lt;br /&gt;
&lt;br /&gt;
obj..    z =e= -w -2*x ;&lt;br /&gt;
&lt;br /&gt;
c1..     w =l= 12 ;&lt;br /&gt;
&lt;br /&gt;
c2..     w =g= 0;&lt;br /&gt;
&lt;br /&gt;
c3..     w =g= 6*y +3*x -18;&lt;br /&gt;
&lt;br /&gt;
c4..     w =l= 6*y;&lt;br /&gt;
&lt;br /&gt;
c5..     w =l= 3*x;&lt;br /&gt;
&lt;br /&gt;
x.up = 10;&lt;br /&gt;
&lt;br /&gt;
x.lo =0;    &lt;br /&gt;
&lt;br /&gt;
y.up = 2;  &lt;br /&gt;
&lt;br /&gt;
y.lo = 0;        &lt;br /&gt;
&lt;br /&gt;
model course5800 /all/;&lt;br /&gt;
&lt;br /&gt;
option mip = baron;&lt;br /&gt;
&lt;br /&gt;
option optcr = 0;&lt;br /&gt;
&lt;br /&gt;
solve course5800 minimizing z using mip ;&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Application&#039;&#039;&#039; ==&lt;br /&gt;
&amp;quot;Bilinear expressions are the most common non-convex components in mathematical formulations modeling problems in: &amp;lt;sup&amp;gt;6&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Chemical engineering &amp;lt;sup&amp;gt;9&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Process network problems&amp;lt;sup&amp;gt;10&amp;quot;&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Computer vision &amp;lt;sup&amp;gt;11&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Super resolution imaging &amp;lt;sup&amp;gt;12&amp;lt;/sup&amp;gt;                                           &lt;br /&gt;
&lt;br /&gt;
                                                         &lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Conclusion&#039;&#039;&#039; ==&lt;br /&gt;
McCormick Envelopes provide a relaxation technique for bilinear non-convex nonlinear programming problems&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;. Since non-convex NLPs are challenging to solve and may require a significant amount of time, resources, and effort to determine if the solution is global or the problem has no feasible solution.  McCormick Envelopes provide a straightforward technique that may be applied to bilinear expressions from multiple application areas.  &lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;References&#039;&#039;&#039; ==&lt;br /&gt;
# Castro, Pedro. &amp;quot;A Tighter Piecewise McCormick Relaxation for Bilinear Problems.&amp;quot; (n.d.):  June 2014. Web. 6 June 2015. Retrieved from: &amp;lt;&amp;lt;nowiki&amp;gt;http://minlp.cheme.cmu.edu/2014/papers/castro.pdf&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
# You, F. (2021). Lecture on Mixed Integer Non-Linear Programming (MINLP). Archives for SYSEN 5800 Computational Optimization (2021FA), Cornell University, Ithaca, NY.&lt;br /&gt;
# Dombrowski, J. (2015, June 7). Northwestern University Open Text Book on Process Optimization, McCormick Envelopes Retrieved from &amp;lt;nowiki&amp;gt;https://optimization.mccormick.northwestern.edu/index.php/McCormick_envelopes&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
# McCormick, Garth P.  Computability of Global Solutions To Factorable Nonconvex Solutions: Part I: Convex Underestimating Problems&lt;br /&gt;
# Scott, J. K. Stuber, M. D. &amp;amp; Barton, P. I. (2011). Generalized McCormick Relaxations. Journal of Global Optimization, Vol. 51, Issue 4, 569-606 doi: 10.1007/s10898-011-9664-7&lt;br /&gt;
# Hijazi, H., Perspective Envelopes for Bilinear Functions, unpublished manuscript, retrieved from: [https://www.google.com/url?sa=t&amp;amp;rct=j&amp;amp;q=&amp;amp;esrc=s&amp;amp;source=web&amp;amp;cd=&amp;amp;ved=2ahUKEwjSr7eu8K70AhVYmHIEHUJzCVsQFnoECAIQAQ&amp;amp;url=http%3A%2F%2Fwww.optimization-online.org%2FDB_FILE%2F2015%2F03%2F4841.pdf&amp;amp;usg=AOvVaw1xf9B1f-EPw0mG1LOqRfm9 Perspective Envelopes for Bilinear Functions]&lt;br /&gt;
# Androulakis, I., Maranas, C., Floudas, C.: alphabb: A global optimization method for general constrained nonconvex problems. Journal of Global Optimization 7(4), 337{363 (1995)&lt;br /&gt;
# Smith, E., Pantelides, C.: A symbolic reformulation/spatial branch-and-bound algorithm for the global optimisation of nonconvex fMINLPsg. Computers &amp;amp; Chemical Engineering 23(4), 457 { 478 (1999) &lt;br /&gt;
# Geunes, J., Pardalos, P.: Supply chain optimization, vol. 98. Springer Science &amp;amp; BusinessMedia (2006)&lt;br /&gt;
# Nahapetyan, A.: Bilinear programming: applications in the supply chain management bilinear programming: Applications in the supply chain management. In: C.A. Floudas, P.M. Pardalos (eds.) Encyclopedia of Optimization, pp. 282{288. Springer US (2009)&lt;br /&gt;
#Chandraker, M. &amp;amp; Kriegman, D. (n.d.): Globally Optimal Bilinear Programming for Computer Vision Applications. University of San Diego, CA. Retrieved from: https://www.google.com/url?sa=t&amp;amp;rct=j&amp;amp;q=&amp;amp;esrc=s&amp;amp;source=web&amp;amp;cd=&amp;amp;ved=2ahUKEwis69Say7H0AhXWp3IEHVGLBW4QFnoECC4QAQ&amp;amp;url=http%3A%2F%2Fvision.ucsd.edu%2F~manu%2Fpdf%2Fcvpr08_bilinear.pdf&amp;amp;usg=AOvVaw1h-cpWO81s41howVxYKq7F&lt;br /&gt;
#Gronski, J. (2019). Non-Convex Optimization and Applications to Bilinear Programming and Super-Resolution Imaging. University of Colorado.  Retrieved from: https://www.google.com/url?sa=t&amp;amp;rct=j&amp;amp;q=&amp;amp;esrc=s&amp;amp;source=web&amp;amp;cd=&amp;amp;ved=2ahUKEwif3qO017H0AhWNknIEHebkAhMQFnoECA0QAQ&amp;amp;url=https%3A%2F%2Fscholar.colorado.edu%2Fdownloads%2Fwd375w61z&amp;amp;usg=AOvVaw09lnJJoZX3i_wwBGHin9LK&lt;/div&gt;</summary>
		<author><name>Smu29</name></author>
	</entry>
	<entry>
		<id>https://optimization.cbe.cornell.edu/index.php?title=File:Concave_and_convex_envelopes.png&amp;diff=3412</id>
		<title>File:Concave and convex envelopes.png</title>
		<link rel="alternate" type="text/html" href="https://optimization.cbe.cornell.edu/index.php?title=File:Concave_and_convex_envelopes.png&amp;diff=3412"/>
		<updated>2021-11-26T12:20:07Z</updated>

		<summary type="html">&lt;p&gt;Smu29: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;concave and convex envelopes&lt;/div&gt;</summary>
		<author><name>Smu29</name></author>
	</entry>
	<entry>
		<id>https://optimization.cbe.cornell.edu/index.php?title=File:Overestimator_and_underestimator_diagram_1.png&amp;diff=3411</id>
		<title>File:Overestimator and underestimator diagram 1.png</title>
		<link rel="alternate" type="text/html" href="https://optimization.cbe.cornell.edu/index.php?title=File:Overestimator_and_underestimator_diagram_1.png&amp;diff=3411"/>
		<updated>2021-11-26T12:15:05Z</updated>

		<summary type="html">&lt;p&gt;Smu29: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;overestimator and underestimator&lt;/div&gt;</summary>
		<author><name>Smu29</name></author>
	</entry>
	<entry>
		<id>https://optimization.cbe.cornell.edu/index.php?title=McCormick_envelopes&amp;diff=3410</id>
		<title>McCormick envelopes</title>
		<link rel="alternate" type="text/html" href="https://optimization.cbe.cornell.edu/index.php?title=McCormick_envelopes&amp;diff=3410"/>
		<updated>2021-11-26T12:09:47Z</updated>

		<summary type="html">&lt;p&gt;Smu29: added figure references&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Author: Susan Urban (smu29) (SYSEN 5800 Fall 2021) &lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Introduction&#039;&#039;&#039; ==&lt;br /&gt;
Optimization of a non-convex function f(x) is challenging since it may have multiple locally optimal solutions or no solution and it can take a significant amount of time, resources, and effort to determine if the solution is global or the problem has no feasible solution. According to Castro&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;, &amp;quot;Gradient based solvers [are] unable to certify optimality&amp;lt;sup&amp;gt;&amp;quot;&amp;lt;/sup&amp;gt;. Different techniques are used to address this challenge depending on the characteristics of the problem. One technique used is convex envelopes&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
Given a non-convex function f(x), g(x) is a convex envelope of f(x) for X &amp;lt;math&amp;gt;\in&amp;lt;/math&amp;gt; S if:&lt;br /&gt;
&lt;br /&gt;
·      g(x) is convex under-estimator of f(x)&lt;br /&gt;
&lt;br /&gt;
·      g(x)&amp;gt;=h(x) for all convex under-estimators h(x)&lt;br /&gt;
&lt;br /&gt;
Figure 1 (reproduction from You, F.&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;) depicts the relationship between a function f(x) and the concave over-estimator and &lt;br /&gt;
&lt;br /&gt;
the convex under-estimator.  A concave envelope is the tightest possible concave over-estimator of a function and a convex &lt;br /&gt;
&lt;br /&gt;
envelope is the tightest possible convex under-estimator of a function.  Figure 2 (reproduction from You. F.&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;) depicts the&lt;br /&gt;
&lt;br /&gt;
concave and convex envelopes.   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;McCormick Envelopes&#039;&#039;&#039; ==&lt;br /&gt;
In particular, for bilinear (e.g., x*y, x+y) non-linear programming (NLP) problems&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;, the McCormick Envelope&amp;lt;sup&amp;gt;4&amp;lt;/sup&amp;gt; is a type of convex relaxation used for optimization.  &lt;br /&gt;
&lt;br /&gt;
In case of an NLP, a linear programming (LP) relaxation is derived by replacing each bilinear term with a new variable and adding four sets of constraints. In the case of a mixed-integer linear programming (MINLP), a MILP relaxation is derived. This strategy is known as McCormick relaxation.&lt;br /&gt;
&lt;br /&gt;
The LP solution gives a lower bound and any feasible solution gives an upper bound.&lt;br /&gt;
&lt;br /&gt;
As noted by Scott et al&amp;lt;sup&amp;gt;5&amp;lt;/sup&amp;gt;, &amp;quot;McCormick envelopes are attractive due to their recursive nature of their definition, which affords wide applicability and easy implementation computationally.  Furthermore, these relaxations are typically stronger than those resulting from convexification or linearization procedures.&amp;quot; &lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Derivation of McCormick Envelopes&#039;&#039;&#039; ==&lt;br /&gt;
The following is a derivation of the McCormick Envelopes:&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;Let \ w = xy&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^{L}\leq x\leq x^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;y^{L}\leq y\leq y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;x^{L}, x^{U}, y^{L}, y^{U} &amp;lt;/math&amp;gt;are   upper  and   lower  bound  values  for  &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;y&amp;lt;/math&amp;gt;, respectively.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left (x-x^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left (y-y^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a * b\geq 0&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a * b=\left ( x-x^{L} \right )\left ( y-y^{L} \right )=xy-x^{L}y-xy^{L}+x^{L}y^{L}\geq 0 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{L}y+xy^{L}-x^{L}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x^{U}-x \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b = \left ( y^{U} -y\right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{U}y+xy^{U}-x^{U}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x^{U}-x\right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left ( y-y^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq x^{U}y+xy^{L}-x^{U}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;a=\left ( x-x^{L} \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;b=\left ( y^{U}-y \right )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq xy^{U}+x^{L}y-x^{L}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The under-estimators of the function are represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{L}y+xy^{L}-x^{L}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\geq x^{U}y+xy^{U}-x^{U}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The over-estimators of the function are represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq x^{U}y+xy^{L}-x^{U}y^{L}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w\leq xy^{U}+x^{L}y-x^{L}y^{U}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Example: Convex Relaxation&#039;&#039;&#039; ==&lt;br /&gt;
The following shows the relaxation of a non-convex problem:&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Original non-convex problem: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\min Z= \textstyle \sum_{i=1} \sum_{j=1}  c_{i,j}x_i x_j +g_0(x)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \sum_{i=1}\sum_{j=1} c_{i,j}^l x_i x_j + g_l (x) \leq 0,\forall l \in L&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^ L \leq x \leq x^U&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Replacing &amp;lt;math&amp;gt;u_{i,j} = x_i x_j&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
we obtain a relaxed, convex problem: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\min Z= \textstyle \sum_{i=1} \sum_{j=1}  c_{i,j} u_{i,j} +g_0(x)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \sum_{i=1}\sum_{j=1} c_{i,j}^l u_{i,j}+ g_l (x) \leq 0,\forall l \in L&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^L x_j + x_i x_j^L - {x_i}^L {x_j}^L, \forall  i,j \ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^U x_j + x_i x_j^U - {x_i}^U {x_j}^U, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^L x_j + x_i x_j^U - {x_i}^L {x_j}^U, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;u_{i,j} \geq x_i^U x_j + x_i x_j^L - {x_i}^U {x_j}^L, \forall i,j \ &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;x^L \leq x \leq x^U,   \ \ u^L \leq u \leq u^U&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Good bounds are essential to focus and minimize the feasible solution space and to reduce the number of iterations to find the optimal solution.  &amp;quot;Good bounds may be obtained either by inspection or solving the optimization problem to minimize (maximize) x, subject to the same constraints as the original problem.&amp;quot;&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As discussed by Hazaji&amp;lt;sup&amp;gt;6&amp;lt;/sup&amp;gt;, global optimization solvers implement bound contraction techniques and once the boundary is optimized, domain partitioning may become necessary. Spatial branch and bound schemes&amp;lt;sup&amp;gt;7,8&amp;lt;/sup&amp;gt;  are among the most effective partitioning methods in global optimization.  By dividing the domain of a given variable, the solver is able to divide the original domain into smaller regions, further tightening the convex relaxations of each partition.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Example: Numerical&#039;&#039;&#039; ==&lt;br /&gt;
&amp;lt;math&amp;gt;min \  Z = xy + 6x + y&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \ xy \leq 18&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;0 \leq x \leq 10&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;0 \leq y \leq 2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;Let\   w = xy &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;min \ Z = -w + 6x + y&lt;br /&gt;
&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;s.t. \ w \leq 18&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \geq 10y + 2x - 20&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq 10y&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;w \leq 2x&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using GAMS, the solution is z= -24, x=6, y=2.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;GAMS code sample:&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
variable z;&lt;br /&gt;
&lt;br /&gt;
positive variable x, y, w;&lt;br /&gt;
&lt;br /&gt;
equations  obj, c1, c2, c3, c4, c5 ;&lt;br /&gt;
&lt;br /&gt;
obj..    z =e= -w -2*x ;&lt;br /&gt;
&lt;br /&gt;
c1..     w =l= 12 ;&lt;br /&gt;
&lt;br /&gt;
c2..     w =g= 0;&lt;br /&gt;
&lt;br /&gt;
c3..     w =g= 6*y +3*x -18;&lt;br /&gt;
&lt;br /&gt;
c4..     w =l= 6*y;&lt;br /&gt;
&lt;br /&gt;
c5..     w =l= 3*x;&lt;br /&gt;
&lt;br /&gt;
x.up = 10;&lt;br /&gt;
&lt;br /&gt;
x.lo =0;    &lt;br /&gt;
&lt;br /&gt;
y.up = 2;  &lt;br /&gt;
&lt;br /&gt;
y.lo = 0;        &lt;br /&gt;
&lt;br /&gt;
model course5800 /all/;&lt;br /&gt;
&lt;br /&gt;
option mip = baron;&lt;br /&gt;
&lt;br /&gt;
option optcr = 0;&lt;br /&gt;
&lt;br /&gt;
solve course5800 minimizing z using mip ;&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Application&#039;&#039;&#039; ==&lt;br /&gt;
&amp;quot;Bilinear expressions are the most common non-convex components in mathematical formulations modeling problems in: &amp;lt;sup&amp;gt;6&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Chemical engineering &amp;lt;sup&amp;gt;9&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Process network problems&amp;lt;sup&amp;gt;10&amp;quot;&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Computer vision &amp;lt;sup&amp;gt;11&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Super resolution imaging &amp;lt;sup&amp;gt;12&amp;lt;/sup&amp;gt;                                           &lt;br /&gt;
&lt;br /&gt;
                                                         &lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Conclusion&#039;&#039;&#039; ==&lt;br /&gt;
McCormick Envelopes provide a relaxation technique for bilinear non-convex nonlinear programming problems&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;. Since non-convex NLPs are challenging to solve and may require a significant amount of time, resources, and effort to determine if the solution is global or the problem has no feasible solution.  McCormick Envelopes provide a straightforward technique that may be applied to bilinear expressions from multiple application areas.  &lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;References&#039;&#039;&#039; ==&lt;br /&gt;
# Castro, Pedro. &amp;quot;A Tighter Piecewise McCormick Relaxation for Bilinear Problems.&amp;quot; (n.d.):  June 2014. Web. 6 June 2015. Retrieved from: &amp;lt;&amp;lt;nowiki&amp;gt;http://minlp.cheme.cmu.edu/2014/papers/castro.pdf&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
# You, F. (2021). Lecture on Mixed Integer Non-Linear Programming (MINLP). Archives for SYSEN 5800 Computational Optimization (2021FA), Cornell University, Ithaca, NY.&lt;br /&gt;
# Dombrowski, J. (2015, June 7). Northwestern University Open Text Book on Process Optimization, McCormick Envelopes Retrieved from &amp;lt;nowiki&amp;gt;https://optimization.mccormick.northwestern.edu/index.php/McCormick_envelopes&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
# McCormick, Garth P.  Computability of Global Solutions To Factorable Nonconvex Solutions: Part I: Convex Underestimating Problems&lt;br /&gt;
# Scott, J. K. Stuber, M. D. &amp;amp; Barton, P. I. (2011). Generalized McCormick Relaxations. Journal of Global Optimization, Vol. 51, Issue 4, 569-606 doi: 10.1007/s10898-011-9664-7&lt;br /&gt;
# Hijazi, H., Perspective Envelopes for Bilinear Functions, unpublished manuscript, retrieved from: [https://www.google.com/url?sa=t&amp;amp;rct=j&amp;amp;q=&amp;amp;esrc=s&amp;amp;source=web&amp;amp;cd=&amp;amp;ved=2ahUKEwjSr7eu8K70AhVYmHIEHUJzCVsQFnoECAIQAQ&amp;amp;url=http%3A%2F%2Fwww.optimization-online.org%2FDB_FILE%2F2015%2F03%2F4841.pdf&amp;amp;usg=AOvVaw1xf9B1f-EPw0mG1LOqRfm9 Perspective Envelopes for Bilinear Functions]&lt;br /&gt;
# Androulakis, I., Maranas, C., Floudas, C.: alphabb: A global optimization method for general constrained nonconvex problems. Journal of Global Optimization 7(4), 337{363 (1995)&lt;br /&gt;
# Smith, E., Pantelides, C.: A symbolic reformulation/spatial branch-and-bound algorithm for the global optimisation of nonconvex fMINLPsg. Computers &amp;amp; Chemical Engineering 23(4), 457 { 478 (1999) &lt;br /&gt;
# Geunes, J., Pardalos, P.: Supply chain optimization, vol. 98. Springer Science &amp;amp; BusinessMedia (2006)&lt;br /&gt;
# Nahapetyan, A.: Bilinear programming: applications in the supply chain management bilinear programming: Applications in the supply chain management. In: C.A. Floudas, P.M. Pardalos (eds.) Encyclopedia of Optimization, pp. 282{288. Springer US (2009)&lt;br /&gt;
#Chandraker, M. &amp;amp; Kriegman, D. (n.d.): Globally Optimal Bilinear Programming for Computer Vision Applications. University of San Diego, CA. Retrieved from: https://www.google.com/url?sa=t&amp;amp;rct=j&amp;amp;q=&amp;amp;esrc=s&amp;amp;source=web&amp;amp;cd=&amp;amp;ved=2ahUKEwis69Say7H0AhXWp3IEHVGLBW4QFnoECC4QAQ&amp;amp;url=http%3A%2F%2Fvision.ucsd.edu%2F~manu%2Fpdf%2Fcvpr08_bilinear.pdf&amp;amp;usg=AOvVaw1h-cpWO81s41howVxYKq7F&lt;br /&gt;
#Gronski, J. (2019). Non-Convex Optimization and Applications to Bilinear Programming and Super-Resolution Imaging. University of Colorado.  Retrieved from: https://www.google.com/url?sa=t&amp;amp;rct=j&amp;amp;q=&amp;amp;esrc=s&amp;amp;source=web&amp;amp;cd=&amp;amp;ved=2ahUKEwif3qO017H0AhWNknIEHebkAhMQFnoECA0QAQ&amp;amp;url=https%3A%2F%2Fscholar.colorado.edu%2Fdownloads%2Fwd375w61z&amp;amp;usg=AOvVaw09lnJJoZX3i_wwBGHin9LK&lt;/div&gt;</summary>
		<author><name>Smu29</name></author>
	</entry>
</feed>