McCormick envelopes: Difference between revisions

From Cornell University Computational Optimization Open Textbook - Optimization Wiki
Jump to navigation Jump to search
(added figures)
(adjusted the outline of the content)
Line 2: Line 2:


== '''Introduction''' ==
== '''Introduction''' ==
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<sup>1</sup>, "Gradient based solvers [are] unable to certify optimality<sup>"</sup>. Different techniques are used to address this challenge depending on the characteristics of the problem. One technique used is convex envelopes<sup>2</sup>:
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.  


[[File:Overestimator and underestimator diagram 1.png|thumb|Figure 1: (reproduction from You, F. <sup>2</sup>) depicts relationship of concave over-estimator and convex under-estimator to the function. ]]
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.
Given a non-convex function f(x), g(x) is a convex envelope of f(x) for X <math>\in</math>


·      g(x) is convex under-estimator of f(x)
== '''McCormick Envelopes: Theory, Methodology and Algorithmic Discussions''' ==
The McCormick Envelope<sup>2</sup> is a type of convex relaxation used for optimization of bilinear (e.g., x*y, x+y) non-linear programming (NLP) problems.


·     g(x)>=h(x) for all convex under-estimators h(x)
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.  
 
 
Figure 1 (reproduction from You, F.<sup>2</sup>) depicts the relationship between a function f(x) and the concave over-estimator and
 
the convex under-estimator. A concave envelope is the tightest possible concave over-estimator of a function and a convex
 
envelope is the tightest possible convex under-estimator of a function. Figure 2 (reproduction from You. F.<sup>2</sup>) depicts the
 
concave and convex envelopes.
[[File:Concave and convex envelopes.png|thumb|Figure 2: (reproduction from You, F.<sup>2</sup>) depicts the relationship of the concave envelope and the convex envelope to the function. ]]
 
 
 
== '''McCormick Envelopes''' ==
In particular, for bilinear (e.g., x*y, x+y) non-linear programming (NLP) problems<sup>3</sup>, the McCormick Envelope<sup>4</sup> is a type of convex relaxation used for optimization.  
 
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.


The LP solution gives a lower bound and any feasible solution gives an upper bound.
The LP solution gives a lower bound and any feasible solution gives an upper bound.


As noted by Scott et al<sup>5</sup>, "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."
As noted by Scott et al<sup>5</sup>, 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.  


== '''Derivation of McCormick Envelopes''' ==
The following is a derivation of the McCormick Envelopes:
The following is a derivation of the McCormick Envelopes:<sup>2</sup>


<math>Let \ w = xy</math>
<math>Let \ w = xy</math>
Line 76: Line 58:


<math>w\geq x^{U}y+xy^{U}-x^{U}y^{U}</math>
<math>w\geq x^{U}y+xy^{U}-x^{U}y^{U}</math>


The over-estimators of the function are represented by:
The over-estimators of the function are represented by:
Line 85: Line 65:
<math>w\leq xy^{U}+x^{L}y-x^{L}y^{U}</math>
<math>w\leq xy^{U}+x^{L}y-x^{L}y^{U}</math>


== '''Example: Convex Relaxation''' ==
 
The following shows the relaxation of a non-convex problem:<sup>2</sup>
The following shows the relaxation of a non-convex problem:


Original non-convex problem:  
Original non-convex problem:  
Line 130: Line 110:
<math>x^L \leq x \leq x^U,  \ \ u^L \leq u \leq u^U</math>
<math>x^L \leq x \leq x^U,  \ \ u^L \leq u \leq u^U</math>


Good bounds are essential to focus and minimize the feasible solution space and to reduce the number of iterations to find the optimal solution.  "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."<sup>2</sup>
Good lower and upper bounds focus and minimize the feasible solution space; they reduce the number of iterations to find the optimal solution.   


As discussed by Hazaji<sup>6</sup>, global optimization solvers implement bound contraction techniques and once the boundary is optimized, domain partitioning may become necessary. Spatial branch and bound schemes<sup>7,8</sup>  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.
As discussed by Hazaji<sup>6</sup>, 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.


== '''Example: Numerical''' ==
== '''Example: Numerical''' ==
Line 146: Line 126:
<math>Let\  w = xy  
<math>Let\  w = xy  
</math>
</math>




Line 213: Line 194:


== '''Application''' ==
== '''Application''' ==
"Bilinear expressions are the most common non-convex components in mathematical formulations modeling problems in: <sup>6</sup>
Bilinear functions occur in numerous engineering and natural science applications, including the following :  
 
Chemical engineering <sup>9</sup>


Process network problems<sup>10"</sup>


Computer vision <sup>11</sup>
Computer vision 9


Super resolution imaging <sup>12</sup>                                            
Super resolution imaging <sup>10</sup>                                            


                                                          
                                                          


== '''Conclusion''' ==
== '''Conclusion''' ==
McCormick Envelopes provide a relaxation technique for bilinear non-convex nonlinear programming problems<sup>3</sup>. 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.   
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.   


== '''References''' ==
== '''References''' ==
# Castro, Pedro. "A Tighter Piecewise McCormick Relaxation for Bilinear Problems." (n.d.):  June 2014. Web. 6 June 2015. Retrieved from: <<nowiki>http://minlp.cheme.cmu.edu/2014/papers/castro.pdf</nowiki>
# You, F. (2021). Lecture on Mixed Integer Non-Linear Programming (MINLP). Archives for SYSEN 5800 Computational Optimization (2021FA), Cornell University, Ithaca, NY.
# Dombrowski, J. (2015, June 7). Northwestern University Open Text Book on Process Optimization, McCormick Envelopes Retrieved from <nowiki>https://optimization.mccormick.northwestern.edu/index.php/McCormick_envelopes</nowiki>
# Dombrowski, J. (2015, June 7). Northwestern University Open Text Book on Process Optimization, McCormick Envelopes Retrieved from <nowiki>https://optimization.mccormick.northwestern.edu/index.php/McCormick_envelopes</nowiki>
# McCormick, Garth P.  Computability of Global Solutions To Factorable Nonconvex Solutions: Part I: Convex Underestimating Problems
# McCormick, Garth P.  Computability of Global Solutions To Factorable Nonconvex Solutions: Part I: Convex Underestimating Problems

Revision as of 14:12, 27 November 2021

Author: Susan Urban (smu29) (SYSEN 5800 Fall 2021)

Introduction

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 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.

McCormick Envelopes: Theory, Methodology and Algorithmic Discussions

The McCormick Envelope2 is a type of convex relaxation used for optimization of bilinear (e.g., x*y, x+y) non-linear programming (NLP) problems.

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.

The LP solution gives a lower bound and any feasible solution gives an upper bound.

As noted by Scott et al5, 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.

The following is a derivation of the McCormick Envelopes:

where are   upper  and   lower  bound  values  for   and , respectively.

The under-estimators of the function are represented by:

The over-estimators of the function are represented by:


The following shows the relaxation of a non-convex problem:

Original non-convex problem:

Replacing

we obtain a relaxed, convex problem:

Good lower and upper bounds focus and minimize the feasible solution space; they reduce the number of iterations to find the optimal solution.

As discussed by Hazaji6, 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.

Example: Numerical


Using GAMS, the solution is z= -24, x=6, y=2.

GAMS code sample:

variable z;

positive variable x, y, w;

equations  obj, c1, c2, c3, c4, c5 ;

obj..    z =e= -w -2*x ;

c1..     w =l= 12 ;

c2..     w =g= 0;

c3..     w =g= 6*y +3*x -18;

c4..     w =l= 6*y;

c5..     w =l= 3*x;

x.up = 10;

x.lo =0;    

y.up = 2;  

y.lo = 0;       

model course5800 /all/;

option mip = baron;

option optcr = 0;

solve course5800 minimizing z using mip ;

Application

Bilinear functions occur in numerous engineering and natural science applications, including the following :


Computer vision 9

Super resolution imaging 10                                         

                                                       

Conclusion

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.

References

  1. Dombrowski, J. (2015, June 7). Northwestern University Open Text Book on Process Optimization, McCormick Envelopes Retrieved from https://optimization.mccormick.northwestern.edu/index.php/McCormick_envelopes
  2. McCormick, Garth P.  Computability of Global Solutions To Factorable Nonconvex Solutions: Part I: Convex Underestimating Problems
  3. Scott, J. K. Stuber, M. D. & Barton, P. I. (2011). Generalized McCormick Relaxations. Journal of Global Optimization, Vol. 51, Issue 4, 569-606 doi: 10.1007/s10898-011-9664-7
  4. Hijazi, H., Perspective Envelopes for Bilinear Functions, unpublished manuscript, retrieved from: Perspective Envelopes for Bilinear Functions
  5. 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)
  6. Smith, E., Pantelides, C.: A symbolic reformulation/spatial branch-and-bound algorithm for the global optimisation of nonconvex fMINLPsg. Computers & Chemical Engineering 23(4), 457 { 478 (1999)
  7. Geunes, J., Pardalos, P.: Supply chain optimization, vol. 98. Springer Science & BusinessMedia (2006)
  8. 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)
  9. Chandraker, M. & 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&rct=j&q=&esrc=s&source=web&cd=&ved=2ahUKEwis69Say7H0AhXWp3IEHVGLBW4QFnoECC4QAQ&url=http%3A%2F%2Fvision.ucsd.edu%2F~manu%2Fpdf%2Fcvpr08_bilinear.pdf&usg=AOvVaw1h-cpWO81s41howVxYKq7F
  10. 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&rct=j&q=&esrc=s&source=web&cd=&ved=2ahUKEwif3qO017H0AhWNknIEHebkAhMQFnoECA0QAQ&url=https%3A%2F%2Fscholar.colorado.edu%2Fdownloads%2Fwd375w61z&usg=AOvVaw09lnJJoZX3i_wwBGHin9LK