Share E-Book

MATLAB Global Optimization Toolbox™ Users Guide (The MathWorks, Inc.) (z-library.sk, 1lib.sk, z-lib.sk)

Author

,

Rating No ratings yet

Log in to rate

Matlab
Language English

No Description

Format PDF
Size 9.4 MB
5
Views
(First 20 pages)

Registered users can read the full content for free

Register as a Gaohf Library member to read the complete e-book online for free and enjoy a better reading experience.

Page 1
Global Optimization Toolbox User's Guide R2020a
Page 2
How to Contact MathWorks Latest news: www.mathworks.com Sales and services: www.mathworks.com/sales_and_services User community: www.mathworks.com/matlabcentral Technical support: www.mathworks.com/support/contact_us Phone: 508-647-7000 The MathWorks, Inc. 1 Apple Hill Drive Natick, MA 01760-2098 Global Optimization Toolbox User's Guide © COPYRIGHT 2004–2020 by The MathWorks, Inc. The software described in this document is furnished under a license agreement. The software may be used or copied only under the terms of the license agreement. No part of this manual may be photocopied or reproduced in any form without prior written consent from The MathWorks, Inc. FEDERAL ACQUISITION: This provision applies to all acquisitions of the Program and Documentation by, for, or through the federal government of the United States. By accepting delivery of the Program or Documentation, the government hereby agrees that this software or documentation qualifies as commercial computer software or commercial computer software documentation as such terms are used or defined in FAR 12.212, DFARS Part 227.72, and DFARS 252.227-7014. Accordingly, the terms and conditions of this Agreement and only those rights specified in this Agreement, shall pertain to and govern the use, modification, reproduction, release, performance, display, and disclosure of the Program and Documentation by the federal government (or other entity acquiring for or through the federal government) and shall supersede any conflicting contractual terms or conditions. If this License fails to meet the government's needs or is inconsistent in any respect with federal procurement law, the government agrees to return the Program and Documentation, unused, to The MathWorks, Inc. Trademarks MATLAB and Simulink are registered trademarks of The MathWorks, Inc. See www.mathworks.com/trademarks for a list of additional trademarks. Other product or brand names may be trademarks or registered trademarks of their respective holders. Patents MathWorks products are protected by one or more U.S. patents. Please see www.mathworks.com/patents for more information.
Page 3
Revision History January 2004 Online only New for Version 1.0 (Release 13SP1+) June 2004 First printing Revised for Version 1.0.1 (Release 14) October 2004 Online only Revised for Version 1.0.2 (Release 14SP1) March 2005 Online only Revised for Version 1.0.3 (Release 14SP2) September 2005 Second printing Revised for Version 2.0 (Release 14SP3) March 2006 Online only Revised for Version 2.0.1 (Release 2006a) September 2006 Online only Revised for Version 2.0.2 (Release 2006b) March 2007 Online only Revised for Version 2.1 (Release 2007a) September 2007 Third printing Revised for Version 2.2 (Release 2007b) March 2008 Online only Revised for Version 2.3 (Release 2008a) October 2008 Online only Revised for Version 2.4 (Release 2008b) March 2009 Online only Revised for Version 2.4.1 (Release 2009a) September 2009 Online only Revised for Version 2.4.2 (Release 2009b) March 2010 Online only Revised for Version 3.0 (Release 2010a) September 2010 Online only Revised for Version 3.1 (Release 2010b) April 2011 Online only Revised for Version 3.1.1 (Release 2011a) September 2011 Online only Revised for Version 3.2 (Release 2011b) March 2012 Online only Revised for Version 3.2.1 (Release 2012a) September 2012 Online only Revised for Version 3.2.2 (Release 2012b) March 2013 Online only Revised for Version 3.2.3 (Release 2013a) September 2013 Online only Revised for Version 3.2.4 (Release 2013b) March 2014 Online only Revised for Version 3.2.5 (Release 2014a) October 2014 Online only Revised for Version 3.3 (Release 2014b) March 2015 Online only Revised for Version 3.3.1 (Release 2015a) September 2015 Online only Revised for Version 3.3.2 (Release 2015b) March 2016 Online only Revised for Version 3.4 (Release 2016a) September 2016 Online only Revised for Version 3.4.1 (Release 2016b) March 2017 Online only Revised for Version 3.4.2 (Release 2017a) September 2017 Online only Revised for Version 3.4.3 (Release 2017b) March 2018 Online only Revised for Version 3.4.4 (Release 2018a) September 2018 Online only Revised for Version 4.0 (Release 2018b) March 2019 Online only Revised for Version 4.1 (Release 2019a) September 2019 Online only Revised for Version 4.2 (Release 2019b) March 2020 Online only Revised for Version 4.3 (Release 2020a)
Page 4
(This page has no text content)
Page 5
Getting Started Introducing Global Optimization Toolbox Functions 1 Global Optimization Toolbox Product Description . . . . . . . . . . . . . . . 1-2 Key Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2 Comparison of Six Solvers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-3 Function to Optimize . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-3 Six Solution Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-4 Compare Syntax and Solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-9 Solver Behavior with a Nonsmooth Problem . . . . . . . . . . . . . . . . . . . 1-11 What Is Global Optimization? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-18 Local vs. Global Optima . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-18 Basins of Attraction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-19 Optimization Workflow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-22 Table for Choosing a Solver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-23 Global Optimization Toolbox Solver Characteristics . . . . . . . . . . . . 1-24 Solver Choices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-24 Explanation of “Desired Solution” . . . . . . . . . . . . . . . . . . . . . . . . . . 1-24 Choosing Between Solvers for Smooth Problems . . . . . . . . . . . . . . . 1-26 Choosing Between Solvers for Nonsmooth Problems . . . . . . . . . . . . 1-26 Solver Characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-27 Why Are Some Solvers Objects? . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-29 Write Files for Optimization Functions 2 Compute Objective Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-2 Objective (Fitness) Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-2 Write a Function File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-2 Write a Vectorized Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-3 Gradients and Hessians . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-4 Maximizing vs. Minimizing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-5 v Contents
Page 6
Write Constraints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-6 Consult Optimization Toolbox Documentation . . . . . . . . . . . . . . . . . . 2-6 Set Bounds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-6 Ensure ga Options Maintain Feasibility . . . . . . . . . . . . . . . . . . . . . . . 2-6 Gradients and Hessians . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-7 Vectorized Constraints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-7 Set and Change Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-9 View Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-10 Using GlobalSearch and MultiStart 3 Problems That GlobalSearch and MultiStart Can Solve . . . . . . . . . . . . . . . 3-2 Workflow for GlobalSearch and MultiStart . . . . . . . . . . . . . . . . . . . . . . . . . 3-3 Create Problem Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-4 About Problem Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-4 Using the createOptimProblem Function . . . . . . . . . . . . . . . . . . . . . . . . . 3-4 Exporting from the Optimization app . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-6 Create Solver Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-10 What Is a Solver Object? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-10 Properties (Global Options) of Solver Objects . . . . . . . . . . . . . . . . . . . . . 3-10 Creating a Nondefault GlobalSearch Object . . . . . . . . . . . . . . . . . . . . . . 3-11 Creating a Nondefault MultiStart Object . . . . . . . . . . . . . . . . . . . . . . . . . 3-12 Set Start Points for MultiStart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-13 Four Ways to Set Start Points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-13 Positive Integer for Start Points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-13 RandomStartPointSet Object for Start Points . . . . . . . . . . . . . . . . . . . . . 3-13 CustomStartPointSet Object for Start Points . . . . . . . . . . . . . . . . . . . . . . 3-14 Cell Array of Objects for Start Points . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-15 Run the Solver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-16 Optimize by Calling run . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-16 Example of Run with GlobalSearch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-16 Example of Run with MultiStart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-17 Single Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-19 Multiple Solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-20 About Multiple Solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-20 Change the Definition of Distinct Solutions . . . . . . . . . . . . . . . . . . . . . . . 3-22 Iterative Display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-24 Types of Iterative Display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-24 Examine Types of Iterative Display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-24 Global Output Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-26 vi Contents
Page 7
Visualize the Basins of Attraction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-27 Output Functions for GlobalSearch and MultiStart . . . . . . . . . . . . . . . . . 3-30 What Are Output Functions? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-30 GlobalSearch Output Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-30 No Parallel Output Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-31 Plot Functions for GlobalSearch and MultiStart . . . . . . . . . . . . . . . . . . . 3-33 What Are Plot Functions? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-33 MultiStart Plot Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-33 No Parallel Plot Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-35 How GlobalSearch and MultiStart Work . . . . . . . . . . . . . . . . . . . . . . . . . . 3-37 Multiple Runs of a Local Solver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-37 Differences Between the Solver Objects . . . . . . . . . . . . . . . . . . . . . . . . . 3-37 GlobalSearch Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-38 MultiStart Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-41 Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-43 Can You Certify That a Solution Is Global? . . . . . . . . . . . . . . . . . . . . . . . . 3-44 No Guarantees . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-44 Check if a Solution Is a Local Solution with patternsearch . . . . . . . . . . . 3-44 Identify a Bounded Region That Contains a Global Solution . . . . . . . . . . 3-45 Use MultiStart with More Start Points . . . . . . . . . . . . . . . . . . . . . . . . . . 3-45 Refine Start Points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-47 About Refining Start Points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-47 Methods of Generating Start Points . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-47 Example: Searching for a Better Solution . . . . . . . . . . . . . . . . . . . . . . . . 3-49 Change Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-54 How to Determine Which Options to Change . . . . . . . . . . . . . . . . . . . . . 3-54 Changing Local Solver Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-54 Changing Global Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-55 Reproduce Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-57 Identical Answers with Pseudorandom Numbers . . . . . . . . . . . . . . . . . . . 3-57 Steps to Take in Reproducing Results . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-57 Example: Reproducing a GlobalSearch or MultiStart Result . . . . . . . . . . 3-57 Parallel Processing and Random Number Streams . . . . . . . . . . . . . . . . . 3-58 Find Global or Multiple Local Minima . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-60 Function to Optimize . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-60 Single Global Minimum Via GlobalSearch . . . . . . . . . . . . . . . . . . . . . . . . 3-61 Multiple Local Minima Via MultiStart . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-62 Maximizing Monochromatic Polarized Light Interference Patterns Using GlobalSearch and MultiStart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-66 Optimize Using Only Feasible Start Points . . . . . . . . . . . . . . . . . . . . . . . . 3-78 MultiStart Using lsqcurvefit or lsqnonlin . . . . . . . . . . . . . . . . . . . . . . . . . 3-81 Parallel MultiStart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-85 Steps for Parallel MultiStart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-85 vii
Page 8
Speedup with Parallel Computing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-86 Isolated Global Minimum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-88 Difficult-To-Locate Global Minimum . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-88 Default Settings Cannot Find the Global Minimum — Add Bounds . . . . . 3-89 GlobalSearch with Bounds and More Start Points . . . . . . . . . . . . . . . . . . 3-90 MultiStart with Bounds and Many Start Points . . . . . . . . . . . . . . . . . . . . 3-90 MultiStart Without Bounds, Widely Dispersed Start Points . . . . . . . . . . . 3-91 MultiStart with a Regular Grid of Start Points . . . . . . . . . . . . . . . . . . . . . 3-91 MultiStart with Regular Grid and Promising Start Points . . . . . . . . . . . . 3-92 Using Direct Search 4 What Is Direct Search? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-2 Optimize Using the GPS Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-3 Objective Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-3 Finding the Minimum of the Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-4 Plotting the Objective Function Values and Mesh Sizes . . . . . . . . . . . . . . . 4-5 Coding and Minimizing an Objective Function Using Pattern Search . . . 4-7 Constrained Minimization Using Pattern Search . . . . . . . . . . . . . . . . . . . 4-11 Effects of Pattern Search Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-15 Pattern Search Terminology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-21 Patterns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-21 Meshes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-21 Polling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-22 Expanding and Contracting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-22 How Pattern Search Polling Works . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-24 Context . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-24 Successful Polls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-25 An Unsuccessful Poll . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-27 Successful and Unsuccessful Polls in MADS . . . . . . . . . . . . . . . . . . . . . . 4-27 Displaying the Results at Each Iteration . . . . . . . . . . . . . . . . . . . . . . . . . 4-28 More Iterations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-28 Poll Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-29 Complete Poll . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-30 Stopping Conditions for the Pattern Search . . . . . . . . . . . . . . . . . . . . . . 4-30 Robustness of Pattern Search . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-32 Searching and Polling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-33 Definition of Search . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-33 How to Use a Search Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-34 Search Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-35 When to Use Search . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-35 Setting Solver Tolerances . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-37 viii Contents
Page 9
Search and Poll . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-38 Using a Search Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-38 Search Using a Different Solver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-40 Nonlinear Constraint Solver Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-42 Custom Plot Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-44 About Custom Plot Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-44 Creating the Custom Plot Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-44 Setting Up the Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-44 Using the Custom Plot Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-45 How the Plot Function Works . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-47 Pattern Search Climbs Mount Washington . . . . . . . . . . . . . . . . . . . . . . . . 4-48 Set Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-53 Set Options Using optimoptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-53 Create Options and Problems Using the Optimization App . . . . . . . . . . . 4-54 Polling Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-56 Using a Complete Poll in a Generalized Pattern Search . . . . . . . . . . . . . . 4-56 Compare the Efficiency of Poll Options . . . . . . . . . . . . . . . . . . . . . . . . . . 4-59 Set Mesh Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-66 Mesh Expansion and Contraction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-66 Mesh Accelerator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-71 Linear and Nonlinear Constrained Minimization Using patternsearch . 4-74 Linearly Constrained Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-74 Nonlinearly Constrained Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-77 Use Cache . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-80 Vectorize the Objective and Constraint Functions . . . . . . . . . . . . . . . . . . 4-84 Vectorize for Speed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-84 Vectorized Objective Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-84 Vectorized Constraint Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-86 Example of Vectorized Objective and Constraints . . . . . . . . . . . . . . . . . . 4-86 Optimize an ODE in Parallel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-88 Optimization of Stochastic Objective Function . . . . . . . . . . . . . . . . . . . . . 4-97 Using the Genetic Algorithm 5 What Is the Genetic Algorithm? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-2 Minimize Rastrigin's Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-3 Rastrigin's Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-3 Finding the Minimum of Rastrigin's Function . . . . . . . . . . . . . . . . . . . . . . 5-4 Finding the Minimum from the Command Line . . . . . . . . . . . . . . . . . . . . . 5-5 ix
Page 10
Displaying Plots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-6 Genetic Algorithm Terminology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-9 Fitness Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-9 Individuals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-9 Populations and Generations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-9 Diversity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-9 Fitness Values and Best Fitness Values . . . . . . . . . . . . . . . . . . . . . . . . . . 5-10 Parents and Children . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-10 How the Genetic Algorithm Works . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-11 Outline of the Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-11 Initial Population . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-11 Creating the Next Generation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-12 Plots of Later Generations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-14 Stopping Conditions for the Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . 5-14 Selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-15 Reproduction Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-16 Mutation and Crossover . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-16 Coding and Minimizing a Fitness Function Using the Genetic Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-18 Constrained Minimization Using the Genetic Algorithm . . . . . . . . . . . . . 5-23 Effects of Genetic Algorithm Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-28 Mixed Integer ga Optimization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-35 Solving Mixed Integer Optimization Problems . . . . . . . . . . . . . . . . . . . . . 5-35 Characteristics of the Integer ga Solver . . . . . . . . . . . . . . . . . . . . . . . . . 5-36 Effective Integer ga . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-41 Integer ga Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-41 Solving a Mixed Integer Engineering Design Problem Using the Genetic Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-43 Nonlinear Constraint Solver Algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . 5-52 Augmented Lagrangian Genetic Algorithm . . . . . . . . . . . . . . . . . . . . . . . 5-52 Penalty Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-53 Create Custom Plot Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-55 About Custom Plot Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-55 Creating the Custom Plot Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-55 Using the Plot Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-56 How the Plot Function Works . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-57 Reproduce Results in Optimization App . . . . . . . . . . . . . . . . . . . . . . . . . . 5-58 Resume ga . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-59 Resuming ga From the Final Population . . . . . . . . . . . . . . . . . . . . . . . . . 5-59 Resuming ga From a Previous Run . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-62 Options and Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-64 Running ga with the Default Options . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-64 Setting Options at the Command Line . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-64 x Contents
Page 11
Additional Output Arguments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-65 Use Exported Options and Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-67 Reproduce Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-68 Run ga from a File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-70 Population Diversity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-72 Importance of Population Diversity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-72 Setting the Initial Range . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-72 Custom Plot Function and Linear Constraints in ga . . . . . . . . . . . . . . . . . 5-75 Setting the Population Size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-79 Fitness Scaling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-80 Scaling the Fitness Scores . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-80 Comparing Rank and Top Scaling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-81 Vary Mutation and Crossover . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-83 Setting the Amount of Mutation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-83 Setting the Crossover Fraction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-85 Comparing Results for Varying Crossover Fractions . . . . . . . . . . . . . . . . 5-88 Global vs. Local Minima Using ga . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-90 Searching for a Global Minimum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-90 Running the Genetic Algorithm on the Example . . . . . . . . . . . . . . . . . . . 5-91 Hybrid Scheme in the Genetic Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . 5-96 Set Maximum Number of Generations . . . . . . . . . . . . . . . . . . . . . . . . . . 5-101 Vectorize the Fitness Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-103 Vectorize for Speed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-103 Vectorized Constraints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-103 Nonlinear Constraints Using ga . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-105 Custom Output Function for Genetic Algorithm . . . . . . . . . . . . . . . . . . . 5-109 Custom Data Type Optimization Using the Genetic Algorithm . . . . . . . 5-113 When to Use a Hybrid Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-120 Particle Swarm Optimization 6 What Is Particle Swarm Optimization? . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-2 Optimize Using Particle Swarm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-3 Particle Swarm Output Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-6 xi
Page 12
Particle Swarm Optimization Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-9 Algorithm Outline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-9 Initialization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-9 Iteration Steps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-10 Stopping Criteria . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-11 Tune Particle Swarm Optimization Process . . . . . . . . . . . . . . . . . . . . . . . . 6-12 Surrogate Optimization 7 What Is Surrogate Optimization? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-2 Surrogate Optimization Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-3 Serial surrogateopt Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-3 Mixed-Integer surrogateopt Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-7 surrogateopt Algorithm with Nonlinear Constraints . . . . . . . . . . . . . . . . . 7-9 Parallel surrogateopt Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-9 Parallel Mixed-Integer surrogateopt Algorithm . . . . . . . . . . . . . . . . . . . . 7-10 Surrogate Optimization of Multidimensional Function . . . . . . . . . . . . . . 7-11 Modify surrogateopt Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-18 Interpret surrogateoptplot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-24 Compare Surrogate Optimization with Other Solvers . . . . . . . . . . . . . . . 7-30 Surrogate Optimization with Nonlinear Constraint . . . . . . . . . . . . . . . . . 7-40 Surrogate Optimization of Six-Element Yagi-Uda Antenna . . . . . . . . . . . 7-46 Work with Checkpoint Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-55 Checkpoint for Restarting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-55 Change Options to Extend or Monitor Optimization . . . . . . . . . . . . . . . . 7-57 Code for Robust Surrogate Optimization . . . . . . . . . . . . . . . . . . . . . . . . . 7-59 Mixed-Integer Surrogate Optimization . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-61 Fix Variables in surrogateopt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-63 Integer Optimization with Custom Output Function . . . . . . . . . . . . . . . . 7-66 Convert Nonlinear Constraints Between surrogateopt Form and Other Solver Forms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-73 Why Convert Constraint Forms? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-73 Convert from surrogateopt Structure Form to Other Solvers . . . . . . . . . . 7-73 Convert from Other Solvers to surrogateopt Structure Form . . . . . . . . . . 7-75 Solve Feasibility Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-77 xii Contents
Page 13
Solve Nonlinear Problem with Integer and Nonlinear Constraints . . . . . 7-82 Using Simulated Annealing 8 What Is Simulated Annealing? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-2 Minimize Function with Many Local Minima . . . . . . . . . . . . . . . . . . . . . . . 8-3 Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-3 Minimize at the Command Line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-4 Minimize Using the Optimization App . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-4 Simulated Annealing Terminology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-6 Objective Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-6 Temperature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-6 Annealing Parameter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-6 Reannealing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-6 How Simulated Annealing Works . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-8 Outline of the Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-8 Stopping Conditions for the Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-9 Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-10 Reproduce Your Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-11 Minimization Using Simulated Annealing Algorithm . . . . . . . . . . . . . . . . 8-13 Simulated Annealing Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-16 Multiprocessor Scheduling using Simulated Annealing with a Custom Data Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-22 Multiobjective Optimization 9 What Is Multiobjective Optimization? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-2 gamultiobj Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-5 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-5 Multiobjective Terminology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-5 Initialization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-7 Iterations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-7 Stopping Conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-7 Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-8 paretosearch Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-9 paretosearch Algorithm Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-9 Definitions for paretosearch Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-9 Sketch of paretosearch Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-12 xiii
Page 14
Initialize Search . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-13 Create Archive and Incumbents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-13 Poll to Find Better Points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-13 Update archive and iterates Structures . . . . . . . . . . . . . . . . . . . . . . . . . . 9-14 Stopping Conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-14 Returned Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-15 Modifications for Parallel Computation and Vectorized Function Evaluation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-15 Run paretosearch Quickly . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-15 gamultiobj Options and Syntax: Differences from ga . . . . . . . . . . . . . . . . 9-17 Pareto Front for Two Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-18 Multiobjective Optimization with Two Objectives . . . . . . . . . . . . . . . . . . 9-18 Performing the Optimization with Optimization App . . . . . . . . . . . . . . . . 9-18 Performing the Optimization at the Command Line . . . . . . . . . . . . . . . . . 9-21 Alternate Views . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-21 Compare paretosearch and gamultiobj . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-23 Plot 3-D Pareto Front . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-34 Performing a Multiobjective Optimization Using the Genetic Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-39 Multiobjective Genetic Algorithm Options . . . . . . . . . . . . . . . . . . . . . . . . 9-44 Design Optimization of a Welded Beam . . . . . . . . . . . . . . . . . . . . . . . . . . 9-53 Parallel Processing 10 How Solvers Compute in Parallel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-2 Parallel Processing Types in Global Optimization Toolbox . . . . . . . . . . . . 10-2 How Toolbox Functions Distribute Processes . . . . . . . . . . . . . . . . . . . . . 10-3 How to Use Parallel Processing in Global Optimization Toolbox . . . . . . 10-11 Multicore Processors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-11 Processor Network . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-12 Parallel Search Functions or Hybrid Functions . . . . . . . . . . . . . . . . . . . 10-14 Testing Parallel Optimization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-16 Minimizing an Expensive Optimization Problem Using Parallel Computing Toolbox™ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-17 xiv Contents
Page 15
Options Reference 11 GlobalSearch and MultiStart Properties (Options) . . . . . . . . . . . . . . . . . 11-2 How to Set Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-2 Properties of Both Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-2 GlobalSearch Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-5 MultiStart Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-6 Pattern Search Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-7 Optimization App vs. Command Line . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-7 Plot Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-7 Poll Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-10 Multiobjective Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-11 Search Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-12 Mesh Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-15 Constraint Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-16 Cache Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-16 Stopping Criteria . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-17 Output Function Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-18 Display to Command Window Options . . . . . . . . . . . . . . . . . . . . . . . . . . 11-19 Vectorized and Parallel Options (User Function Evaluation) . . . . . . . . . 11-20 Options Table for Pattern Search Algorithms . . . . . . . . . . . . . . . . . . . . 11-22 Genetic Algorithm Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-24 Optimization App vs. Command Line . . . . . . . . . . . . . . . . . . . . . . . . . . 11-24 Plot Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-25 Population Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-28 Fitness Scaling Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-30 Selection Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-31 Reproduction Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-33 Mutation Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-33 Crossover Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-35 Migration Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-38 Constraint Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-38 Multiobjective Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-39 Hybrid Function Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-40 Stopping Criteria Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-41 Output Function Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-42 Display to Command Window Options . . . . . . . . . . . . . . . . . . . . . . . . . . 11-44 Vectorize and Parallel Options (User Function Evaluation) . . . . . . . . . . 11-44 Particle Swarm Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-46 Specifying Options for particleswarm . . . . . . . . . . . . . . . . . . . . . . . . . . 11-46 Swarm Creation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-46 Display Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-47 Algorithm Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-47 Hybrid Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-48 Output Function and Plot Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-49 Parallel or Vectorized Function Evaluation . . . . . . . . . . . . . . . . . . . . . . 11-50 Stopping Criteria . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-51 Surrogate Optimization Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-52 Algorithm Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-52 Stopping Criteria . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-52 xv
Page 16
Command-Line Display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-53 Output Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-54 Plot Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-56 Parallel Computing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-56 Checkpoint File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-57 Simulated Annealing Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-59 Set Simulated Annealing Options at the Command Line . . . . . . . . . . . . 11-59 Plot Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-59 Temperature Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-60 Algorithm Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-61 Hybrid Function Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-62 Stopping Criteria Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-63 Output Function Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-63 Display Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-64 Options Changes in R2016a . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-66 Use optimoptions to Set Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-66 Options that optimoptions Hides . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-66 Table of Option Names in Legacy Order . . . . . . . . . . . . . . . . . . . . . . . . 11-68 Table of Option Names in Current Order . . . . . . . . . . . . . . . . . . . . . . . . 11-71 Functions 12 xvi Contents
Page 17
Getting Started 17
Page 18
(This page has no text content)
Page 19
Introducing Global Optimization Toolbox Functions • “Global Optimization Toolbox Product Description” on page 1-2 • “Comparison of Six Solvers” on page 1-3 • “Solver Behavior with a Nonsmooth Problem” on page 1-11 • “What Is Global Optimization?” on page 1-18 • “Optimization Workflow” on page 1-22 • “Table for Choosing a Solver” on page 1-23 • “Global Optimization Toolbox Solver Characteristics” on page 1-24 1
Page 20
Global Optimization Toolbox Product Description Solve multiple maxima, multiple minima, and nonsmooth optimization problems Global Optimization Toolbox provides functions that search for global solutions to problems that contain multiple maxima or minima. Toolbox solvers include surrogate, pattern search, genetic algorithm, particle swarm, simulated annealing, multistart, and global search. You can use these solvers for optimization problems where the objective or constraint function is continuous, discontinuous, stochastic, does not possess derivatives, or includes simulations or black-box functions. For problems with multiple objectives, you can identify a Pareto front using genetic algorithm or pattern search solvers. You can improve solver effectiveness by adjusting options and, for applicable solvers, customizing creation, update, and search functions. You can use custom data types with the genetic algorithm and simulated annealing solvers to represent problems not easily expressed with standard data types. The hybrid function option lets you improve a solution by applying a second solver after the first. Key Features • Surrogate solver for problems with lengthy objective function execution times and bound constraints • Pattern search solvers for single and multiple objective problems with linear, nonlinear, and bound constraints • Genetic algorithm for problems with linear, nonlinear, bound, and integer constraints • Multiobjective genetic algorithm for problems with linear, nonlinear, and bound constraints • Particle swarm solver for bound constraints • Simulated annealing solver for bound constraints • Multistart and global search solvers for smooth problems with linear, nonlinear, and bound constraints 1 Introducing Global Optimization Toolbox Functions 1-2
The above is a preview of the first 20 pages. Register to read the complete e-book.

Recommended for You

Loading recommended books...
Failed to load, please try again later

Tip the Site

Scan the WeChat Pay or Alipay code to tip. No login required.

WeChat Pay
Alipay
← Back to List