Attribution Non-Commercial (BY-NC)

31 views

Attribution Non-Commercial (BY-NC)

- multi-criteria_optimal_structural.pdf
- Linear Programming on Excel: Problems and Solutions
- UT Dallas Syllabus for math1325.501.08s taught by Tommy Thompson (txt074000)
- Sample Upload
- Summary Method of Mu
- PSK Method for Solving Type-1 and Type-3 Fuzzy Transportation Problems
- Alberto Marin-Sanguino, Eberhard O Voit, Carlos Gonzalez-Alcon and Nestor V Torres- Optimization of biotechnological systems through geometric programming
- Exercise 5 (Chap 5)
- itrcheck
- 06595641
- P.2008.09 - Optimization model to minimize the makespan in a Hospital's Gastroenterology Service.pdf
- An alternative model for integrated vendor–buyer inventory
- (1)APPlicationofIntensity Duration FrequencyCurveforKoreanRainfallDatausingcumulativeDistributionFunction
- 03 CGL Optimization of Transformer Tanks
- Multi-Objective Numerical Optimization 2008.pdf
- optimization project
- 01137550
- Lecture 2
- Final Mario
- Multi-Objective Welded Beam Optimization using Neutrosophic Goal Programming Technique

You are on page 1of 8

On this page Problem Formulation: Rosenbrocks Function Defining the Problem in Toolbox Syntax Running the Optimization Interpreting the Result

Consider the problem of minimizing Rosenbrocks function

over the unit disk , i.e., the disk of radius 1 centered at the origin. In other words, find x that minimizes the function f(x) over the set nonlinear function with a nonlinear constraint. . This problem is a minimization of a

Note Rosenbrocks function is a standard test function in optimization. It has a unique minimum value of 0 attained at the point (1,1). Finding the minimum is a challenge for some algorithms since it has a shallow minimum inside a deeply curved valley. Here are two views of Rosenbrocks function in the unit disk. The vertical axis is logscaled; in other words, the plot shows log(1+f(x)). Contour lines lie beneath the surface plot. Rosenbrocks function, logscaled: two views.

Code for generating the figure The function f(x) is called the objective function. This is the function you wish to minimize. The inequality is called a constraint. Constraints limit the set of x over which you may search for a minimum. You can have any number of constraints, which are inequalities or equations. All Optimization Toolbox optimization functions minimize an objective function. To maximize a function f, apply an optimization routine to minimize f. For more details about maximizing, see Maximizing an Objective. Back to Top

To use Optimization Toolbox software, you need to 1. Define your objective function in the MATLAB language, as a function file or anonymous function. This example will use a function file. 2. Define your constraint(s) as a separate file or anonymous function. Function File for Objective Function A function file is a text file containing MATLAB commands with the extension .m. Create a new function file in any text editor, or use the builtin MATLAB Editor as follows: 1. At the command line enter:

edit rosenbrock The MATLAB Editor opens. 2. In the editor enter: function f = rosenbrock(x) f = 100*(x(2) - x(1)^2)^2 + (1 - x(1))^2; 3. Save the file by selecting File > Save . File for Constraint Function Constraint functions must be formulated so that they are in the form c(x) 0 or ceq(x)=0. The constraint correct syntax. needs to be reformulated as in order to have the

Furthermore, toolbox functions that accept nonlinear constraints need to have both equality and inequality constraints defined. In this example there is only an inequality constraint, so you must pass an empty array [] as the equality constraint function ceq. With these considerations in mind, write a function file for the nonlinear constraint: 1. Create a file named unitdisk.m containing the following code: function [c, ceq] = unitdisk(x) c = x(1)^2 + x(2)^2 - 1; ceq = [ ]; 2. Save the file unitdisk.m . Back to Top

There are two ways to run the optimization: Using the Optimization Tool Graphical User Interface (GUI) Using command line functions; see Minimizing at the Command Line. Optimization Tool 1. Start the Optimization Tool by typing optimtool at the command line. The following GUI opens.

For more information about this tool, see Optimization Tool. 2. The default Solver fmincon - Constrained nonlinear minimization is selected. This solver is appropriate for this problem, since Rosenbrocks function is nonlinear, and the problem has a constraint. For more information about how to choose a solver, see Choosing a Solver. 3. In the Algorithm popup menu choose Active set the default Trust region reflective algorithm doesnt handle nonlinear constraints. 4. For Objective function enter @rosenbrock . The @ character indicates that this is a function handle of the file rosenbrock.m . 5. For Start point enter [0 0]. This is the initial point where fmincon begins its search for a minimum. 6. For Nonlinear constraint function enter @unitdisk , the function handle of unitdisk.m . Your Problem Setup and Results pane should match this figure.

7. In the Options pane (center bottom), select iterative in the Level of display popup menu. (If you dont see the option, click Display to command window .) This shows the progress of fmincon in the command window.

The following message appears in the box below the Start button: Optimization running. Objective function value: 0.045674808692966654 Local minimum possible. Constraints satisfied. fmincon stopped because the predicted change in the objective func is less than the default value of the function tolerance and const are satisfied to within the default value of the constraint tolera Your objective function value may differ slightly, depending on your computer system and version of Optimization Toolbox software. The message tells you that: The search for a constrained optimum ended because the derivative of the objective function is nearly 0 in directions allowed by the constraint. The constraint is very nearly satisfied. Exit Flags and Exit Messages discusses exit messages such as these. The minimizer x appears under Final point .

Minimizing at the Command Line You can run the same optimization from the command line, as follows. 1. Create an options structure to choose iterative display and the active-set algorithm: options = optimset('Display','iter','Algorithm','active-set') 2. Run the fmincon solver with the options structure, reporting both the location x of the minimizer, and value fval attained by the objective function: [x,fval] = fmincon(@rosenbrock,[0 0],... [],[],[],[],[],[],@unitdisk,options) The six sets of empty brackets represent optional constraints that are not being used in this example. See the fmincon function reference pages for the syntax.

MATLAB outputs a table of iterations, and the results of the optimization: Local minimum possible. Constraints satisfied. fmincon stopped because the predicted change in the objective func is less than the default value of the function tolerance and const are satisfied to within the default value of the constraint tolera <stopping criteria details> Active inequalities (to within options.TolCon = 1e-006): lower upper ineqlin ineqnonlin 1 x = 0.7864 fval = 0.0457 The message tells you that the search for a constrained optimum ended because the derivative of the objective function is nearly 0 in directions allowed by the constraint, and that the constraint is very nearly satisfied. Several phrases in the message contain links that give you more information about the terms used in the message. For more details about these links, see Enhanced Exit Messages . Back to Top 0.6177

The iteration table in the command window shows how MATLAB searched for the minimum value of Rosenbrocks function in the unit disk. This table is the same whether you use Optimization Tool or the command line. MATLAB reports the minimization as follows: Max Line search constraint steplength -1 -0.9375 0.125 -0.8601 0.0625 -0.836 0.25 -0.7969 1 -0.7193 1 -0.6783 1 -0.4972 1 -0.3427 1 -0.1592 0.5 -0.007618 1 -0.003788 0.5 -0.00189 0.5 -0.0009443 0.5 Directional Fir derivative opt -2 -2.41 -12.5 -4.07 -0.912 -1.07 -0.908 -0.833 -0.5 -0.284 -2.96 -1.23 -0.679

Iter F-count 0 3 1 9 2 16 3 21 4 24 5 27 6 30 7 33 8 36 9 40 10 43 11 47 12 51 13 55

f(x) 1 0.953127 0.808446 0.462347 0.340677 0.300877 0.261949 0.164971 0.110766 0.0750939 0.0580974 0.048247 0.0464333 0.0459218

0 0

14 15 16 17 18 19

59 63 67 71 75 79

0 0. 0. 0. 0. 0.0

This table might differ from yours depending on toolbox version and computing platform. The following description applies to the table as displayed. The first column, labeled Iter, is the iteration number from 0 to 19. fmincon took 19 iterations to converge. The second column, labeled F-count, reports the cumulative number of times Rosenbrocks function was evaluated. The final row shows anF-count of 79, indicating that fmincon evaluated Rosenbrocks function 79 times in the process of finding a minimum. The third column, labeled f(x), displays the value of the objective function. The final value, 0.0456766, is the minimum that is reported in the Optimization Tool Run solver and view results box, and at the end of the exit message in the command window. The fourth column, Max constraint , goes from a value of 1 at the initial value, to very nearly 0, 1.474e005, at the final iteration. This column shows the value of the constraint function unitdisk at each iteration. Since the value of unitdisk was nearly 0 at the final iteration, there.

The other columns of the iteration table are described in Iterative Display. Back to Top

Was this topic helpful?

Yes

No

Product Overview

- multi-criteria_optimal_structural.pdfUploaded byaomareltayeb
- Linear Programming on Excel: Problems and SolutionsUploaded byacetinkaya92
- UT Dallas Syllabus for math1325.501.08s taught by Tommy Thompson (txt074000)Uploaded byUT Dallas Provost's Technology Group
- Sample UploadUploaded byRaza Najam
- PSK Method for Solving Type-1 and Type-3 Fuzzy Transportation ProblemsUploaded byP.SENTHIL KUMAR
- Summary Method of MuUploaded byhazelmya
- Alberto Marin-Sanguino, Eberhard O Voit, Carlos Gonzalez-Alcon and Nestor V Torres- Optimization of biotechnological systems through geometric programmingUploaded byYopghm698
- Exercise 5 (Chap 5)Uploaded bypeikee
- itrcheckUploaded byTijana Vranic
- 06595641Uploaded byManohar Chamana
- P.2008.09 - Optimization model to minimize the makespan in a Hospital's Gastroenterology Service.pdfUploaded bycadc79
- An alternative model for integrated vendor–buyer inventoryUploaded byBrainy12345
- (1)APPlicationofIntensity Duration FrequencyCurveforKoreanRainfallDatausingcumulativeDistributionFunctionUploaded byRonald Paredes
- 03 CGL Optimization of Transformer TanksUploaded byjiong
- Multi-Objective Numerical Optimization 2008.pdfUploaded byxem3
- optimization projectUploaded byapi-273992327
- 01137550Uploaded byImam Fauzi
- Lecture 2Uploaded byRobert M. Mitchell
- Final MarioUploaded byAnonymous dUXvWL61
- Multi-Objective Welded Beam Optimization using Neutrosophic Goal Programming TechniqueUploaded byMia Amalia
- sample_10261Uploaded byabhishek gorkar
- 16 VIEWING AND EDITING OBJECT DATA.pdfUploaded byashish9601522605
- PAN-OS 4.1 CLI Reference GuideUploaded byJhonnySinatra
- APPROXIMATION VOGELS EFFECTIVENESS METHOD (VAM) MINIMIZE COST OF TRANSPORTATION.Uploaded byIJAR Journal
- HelpUploaded byddd
- A multi-year pavement maintenance program using a stochastic simulation-based genetic algorithm approach.pdfUploaded byRacun Bisa
- IPS Lab WorkUploaded byRavi
- PPT WDSUploaded byPALLAVI NIMBALKAR
- Osan Loo 2008Uploaded byOswaldo Vasquez
- STS Journal Article Review Format Written ReportUploaded byPatrick Padolina

- What is Retransmission (HARQ)Uploaded byNeoRa Rams
- 14 Fun & Festive Baby Shower GamesUploaded byDegee O. Gonzales
- Grout AbilityUploaded byRajni Sharma
- The Human Resource Management Function-The Employment CycleUploaded byMartin
- Pep Guardiola InglésUploaded byJavier Zamora Saborit
- Machine learning for information retrievalUploaded byfanzefirl
- Spectrum Biology Dec 2015Uploaded byGunjan
- TR-Warehousing Services NC IIUploaded byRichard Jumalon
- FollowingTheLaw.pdfUploaded bypablo1067
- September 2011 InterceptorUploaded byTeam Greely
- Moral NormsUploaded byMarielleVillarino
- Cow Farming PptUploaded byMuhammad Usman Ghani
- LAFD_EGAUploaded byjjespadas
- Audiovisual Translation and MultimodalityUploaded bySam
- SHRM - SkriptaUploaded byermin1987
- UMTS Network Planning Optimization and Inter Operation with GSM_p20.pdfUploaded byAmro Goneim
- Symmetry std VIUploaded byVrushali Bhoite
- Montana State Electrical Code BookletUploaded byMetis2011
- Resume EditUploaded byJann Anonuevo
- Hcg Accubind ElisaUploaded byJoão José Damian Salazar
- General Codes and Conventions of Film OpeningsUploaded bySamah Raja
- GENERALIZING THE BLACK-SCHOLES FORMULA TO MULTIVARIATE CONTINGENT CLAIMSUploaded byDirumil
- Short Circuit Current Duties of Circuit Breakers and FusesUploaded bykra_am
- Activity sheet-07 (Plum pudding model of the atom).docUploaded byNkemzi Elias Nzetengenle
- Teradek Cube Manual v3-2011Uploaded byantke
- 23974634 Final Assigment on Global Recession and Its Impact on Human Resources ManagementUploaded bykrithideep
- Reflective Practice in NursingUploaded byNining Komala Sari
- TOPIC SENTENCEUploaded byjohann reyes
- Easy INSIGHTS into 2012 - Golden Age and Earth Humanity´s Rapturous - ASCENSION by Russ MichaelUploaded byEvaDudkova
- EAW2_answerkey-1.pdfUploaded byHakrortana Bun

## Much more than documents.

Discover everything Scribd has to offer, including books and audiobooks from major publishers.

Cancel anytime.