Minimax and Maximin Optimization 3/16/21, 3:46 PM !! !! !! !! !! !! !! !! !! OPTIONS: Design Optimization view edit history print syllabus book schedule Minimax and Maximin Optimization SEARCH A minimax problem seeks to minimize the maximum value of a number of decision variables. It is sometimes applied to minimize the possible loss for a worst case Go (maximum loss) scenario. A maximin problem maximizes the minimum value. It is used to maximize the minimum objective (such as profit or revenue) for all potential scenarios. Minimax Suppose that we want to minimize the maximum of 3 variables and the sum of those COURSE variables must add up to 15. This problem is posed as: INFORMATION min max(x1,x2,x3) Syllabus s.t. x1 + x2 + x3 = 15 Book Chapters Info Sheet The minimax problem is transformed for efficient solution by gradient-based Schedule optimization solvers that require continuous first and second derivatives. Posing the Expectations problem in this way allows rapid convergence to a solution. The minimax problem Competencies can be alternatively expressed by minimizing an additional variable Z that is an Optimization Software upper bound for each of the individual variables (x1, x2, and x3). YouTube Playlist min Z s.t. x1 + x2 + x3 = 15 Z >= x1 Z >= x2 RELATED COURSES Z >= x3 Begin Python Begin Matlab The minimax optimization solution is now a minimization with additional inequality constraints with Z. Python Gekko solves the minimax problem. Begin Java from gekko import GEKKO Engineering Computing m = GEKKO(remote=False) x1,x2,x3,Z = m.Array(m.Var,4) Data Science m.Minimize(Z) m.Equation(x1+x2+x3==15) Machine Learning m.Equations([Z>=x1,Z>=x2,Z>=x3]) m.solve() print('x1: ',x1.value[0]) Control (MATLAB) print('x2: ',x2.value[0]) print('x3: ',x3.value[0]) Control (Python) print('Z: ',Z.value[0]) [$[Get Code]] Optimization The solution is that all of the variables are equal to 5 to minimize the maximum Dynamic Optimization value. The sum of the variables must equal 15 so this is optimal solution. x1: 5.0 HOMEWORK x2: 5.0 x3: 5.0 Optimization Basics Z: 4.9999999901 Tubular Column Two Bar Truss The value of Z is not exactly equal to 5. This is because of small numerical errors Step Cone Pulley from the IPOPT optimizer. The optimizer reports a successful solution when a Rocket Launch precision tolerance is met. Spring Design Heat Integration Maximin Slurry Pipeline Suppose that we instead want to maximize the minimum of 3 variables and the sum Oxygen Storage of those variables must add up to 15. This problem is posed as: Quasi-Newton Methods Discrete Design max min(x1,x2,x3) Simulated Annealing s.t. x1 + x2 + x3 = 15 KKT Conditions http://apmonitor.com/me575/index.php/Main/MiniMax Page 1 of 4 Minimax and Maximin Optimization 3/16/21, 3:46 PM Interior Point Method The maximin problem is likewise transformed with an additional variable Z. However, Z is now a lower bound for each of the individual variables (x1, x2, and x3). PROJECTS Application Project max Z s.t. x1 + x2 + x3 = 15 Solver Project Z <= x1 Z <= x2 Z <= x3 ACTIVITIES 1-MATLAB and Python The maximin optimization solution is now a maximization problem with additional 2-Equation Residuals inequality constraints with Z. Python Gekko also solves the maximin problem. 3-Financial Objectives from gekko import GEKKO 4-Parallel Computing m = GEKKO(remote=False) 5-Advanced Programming m.options.SOLVER = 1 x1,x2,x3,Z = m.Array(m.Var,4) 6-Logical Conditions m.Maximize(Z) m.Equation(x1+x2+x3==15) 7-Simulated Annealing m.Equations([Z<=x1,Z<=x2,Z<=x3]) 8-Climate Control m.solve() print('x1: ',x1.value[0]) 9-Dynamic Estimation print('x2: ',x2.value[0]) 10-Vapor Liquid Equilibrium print('x3: ',x3.value[0]) print('Z: ',Z.value[0]) 11-Ethyl Acetate Kinetics [$[Get Code]] 12-Dye Fading Kinetics The solution is that all of the variables are equal to 5 to maximize the minimum 13-Linear Regression value. The sum of the variables must equal 15 so this is same optimal solution as 14-Nonlinear Regression the minimax problem. 15-Knapsack Optimization x1: 5.0 LECTURE NOTES x2: 5.0 x3: 5.0 Optimization Introduction Z: 5.0 Mathematical Modeling Unconstrained Optimization The value of Z is now exactly equal to 5. This is because of the switch to the APOPT Discrete Optimization optimizer (m.options.SOLVER=1) that is an active-set SQP optimizer as opposed to Genetic Algorithms the interior point IPOPT optimizer that uses a barrier function. Constrained Optimization Solve Minimax Problem Online Robust Optimization Dynamic Optimization The solution to Minimax problem can be determined by expressing the optimization problem in the APMonitor Modeling Language and solved through a web browser. To solve this simple example problem, select the link below: EXTRA CONTENT Example #1: Click to Solve minimax Optimization Problem Box Folding Circle Challenge Linear Programming Minimax or Maximin Slack Variables Admin The solution is shown above with all variables being equal to a value of 5. This solution is the minimum possible solution out of the maximum of all variable (x1, x2, x3) combinations. The additional slack variables are automatically added to the model to transform the inequality constraints (e.g. Z >= x1) into equality constraints (e.g. Z = x1 + slk, slk >= 0). Integer Solution to Minimax Problem Suppose that the variables in the above example problem are required to be integer http://apmonitor.com/me575/index.php/Main/MiniMax Page 2 of 4 Minimax and Maximin Optimization 3/16/21, 3:46 PM (1, 2, 3, etc) values instead of continuous values. In this case, the solution would be the same because the continuous problem has an integer solution. However, if the sum of the variables (x1 + x2 + x3) were set equal to 16 instead of 15, the solution would be different. In Python Gekko an integer solution can be obtained with integer=True and by switching to the APOPT solver with m.options.solver=1. from gekko import GEKKO m = GEKKO(remote=False) x1,x2,x3,Z = m.Array(m.Var,4,integer=True) m.Minimize(Z) m.Equation(x1+x2+x3==16) m.Equations([Z>=x1,Z>=x2,Z>=x3]) m.options.solver=1 m.solve() print('x1: ',x1.value[0]) print('x2: ',x2.value[0]) print('x3: ',x3.value[0]) print('Z: ',Z.value[0]) [$[Get Code]] Valid solutions are any combination of 15,15,16. To require that the variables have an integer value in APMonitor, the prefix int is added. Example #2: Click to Solve minimax Problem with Integer Variables Solving the problem with the modified variable names gives a numerical solution of x1 = 5, x2 = 6, x3 = 5. There are three potential solutions with one of the variables being equal to 6 while the others are equal to 5. Mixed Integer Nonlinear Programming (MINLP) Selecting a solver that does not handle integer variables (such as IPOPT) results in a relaxed continuous variable solution because the integer variable requirements are ignored. Selecting a mixed integer nonlinear programming (MINLP) solver such as APOPT will attempt to find an integer solution. Maximin Optimization Problem The maximin problem is similar to the minimax problem but it seeks to maximize the minimum of all available options. max min (x1,x2,x3) s.t. x1 + x2 + x3 = 17 http://apmonitor.com/me575/index.php/Main/MiniMax Page 3 of 4 Minimax and Maximin Optimization 3/16/21, 3:46 PM The minimax problem can be alternatively posed by maximizing an additional variable Z that is a lower bound for each of the individual variables. max Z s.t. x1 + x2 + x3 = 17 Z <= x1 Z <= x2 Z <= x3 Example #3: Click to Solve maximin Problem with Integer Variables Solving the maximin problem with integer variables gives a numerical solution of x1 = 6, x2 = 6, x3 = 5. There are three potential solutions with one of the variables being equal to 5 while the others are equal to 6. Last modified October 28, 2020, at 02:32 PM http://apmonitor.com/me575/index.php/Main/MiniMax Page 4 of 4.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages4 Page
-
File Size-