100% found this document useful (4 votes)
39 views

MATLAB Global Optimization Toolbox User s Guide The Mathworks All Chapters Instant Download

MATLAB

Uploaded by

rosnohoopsks
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (4 votes)
39 views

MATLAB Global Optimization Toolbox User s Guide The Mathworks All Chapters Instant Download

MATLAB

Uploaded by

rosnohoopsks
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 40

Download the Full Version of textbook for Fast Typing at textbookfull.

com

MATLAB Global Optimization Toolbox User s Guide


The Mathworks

https://textbookfull.com/product/matlab-global-optimization-
toolbox-user-s-guide-the-mathworks/

OR CLICK BUTTON

DOWNLOAD NOW

Download More textbook Instantly Today - Get Yours Now at textbookfull.com


Recommended digital products (PDF, EPUB, MOBI) that
you can download immediately if you are interested.

MATLAB Optimization Toolbox User s Guide The Mathworks

https://textbookfull.com/product/matlab-optimization-toolbox-user-s-
guide-the-mathworks/

textboxfull.com

MATLAB Econometrics Toolbox User s Guide The Mathworks

https://textbookfull.com/product/matlab-econometrics-toolbox-user-s-
guide-the-mathworks/

textboxfull.com

MATLAB Bioinformatics Toolbox User s Guide The Mathworks

https://textbookfull.com/product/matlab-bioinformatics-toolbox-user-s-
guide-the-mathworks/

textboxfull.com

MATLAB Mapping Toolbox User s Guide The Mathworks

https://textbookfull.com/product/matlab-mapping-toolbox-user-s-guide-
the-mathworks/

textboxfull.com
MATLAB Trading Toolbox User s Guide The Mathworks

https://textbookfull.com/product/matlab-trading-toolbox-user-s-guide-
the-mathworks/

textboxfull.com

MATLAB Computer Vision Toolbox User s Guide The Mathworks

https://textbookfull.com/product/matlab-computer-vision-toolbox-user-
s-guide-the-mathworks/

textboxfull.com

MATLAB Curve Fitting Toolbox User s Guide The Mathworks

https://textbookfull.com/product/matlab-curve-fitting-toolbox-user-s-
guide-the-mathworks/

textboxfull.com

MATLAB Fuzzy Logic Toolbox User s Guide The Mathworks

https://textbookfull.com/product/matlab-fuzzy-logic-toolbox-user-s-
guide-the-mathworks/

textboxfull.com

MATLAB Image Processing Toolbox User s Guide The Mathworks

https://textbookfull.com/product/matlab-image-processing-toolbox-user-
s-guide-the-mathworks/

textboxfull.com
Global Optimization Toolbox
User's Guide

R2020a
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.
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)
Contents

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
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
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
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
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
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
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
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
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
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
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
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
Getting Started

17
1

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 Introducing Global Optimization Toolbox Functions

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-2
Comparison of Six Solvers

Comparison of Six Solvers


In this section...
“Function to Optimize” on page 1-3
“Six Solution Methods” on page 1-4
“Compare Syntax and Solutions” on page 1-9

Function to Optimize
This example shows how to minimize Rastrigin’s function with six solvers. Each solver has its own
characteristics. The characteristics lead to different solutions and run times. The results, examined in
“Compare Syntax and Solutions” on page 1-9, can help you choose an appropriate solver for your
own problems.

Rastrigin’s function has many local minima, with a global minimum at (0,0):

Ras(x) = 20 + x12 + x22 − 10 cos2πx1 + cos2πx2 .

Usually you don't know the location of the global minimum of your objective function. To show how
the solvers look for a global solution, this example starts all the solvers around the point [20,30],
which is far from the global minimum.

The rastriginsfcn.m file implements Rastrigin’s function. This file comes with Global Optimization
Toolbox software. This example employs a scaled version of Rastrigin’s function with larger basins of
attraction. For information, see “Basins of Attraction” on page 1-19.

rf2 = @(x)rastriginsfcn(x/10);

1-3
1 Introducing Global Optimization Toolbox Functions

This example minimizes rf2 using the default settings of fminunc (an Optimization Toolbox™
solver), patternsearch, and GlobalSearch. The example also uses ga and particleswarm with
nondefault options to start with an initial population around the point [20,30]. Because
surrogateopt requires finite bounds, the example uses surrogateopt with lower bounds of -70
and upper bounds of 130 in each variable.

Six Solution Methods


• “fminunc” on page 1-4
• “patternsearch” on page 1-5
• “ga” on page 1-6
• “particleswarm” on page 1-7
• “surrogateopt” on page 1-8
• “GlobalSearch” on page 1-8

fminunc

To solve the optimization problem using the fminunc Optimization Toolbox solver, enter:
rf2 = @(x)rastriginsfcn(x/10); % objective
x0 = [20,30]; % start point away from the minimum
[xf,ff,flf,of] = fminunc(rf2,x0)

fminunc returns

1-4
Comparison of Six Solvers

Local minimum found.

Optimization completed because the size of the gradient is


less than the default value of the function tolerance.

xf =
19.8991 29.8486
ff =
12.9344
flf =
1
of =

struct with fields:

iterations: 3
funcCount: 15
stepsize: 1.7776e-06
lssteplength: 1
firstorderopt: 5.9907e-09
algorithm: 'quasi-newton'
message: 'Local minimum found.…'

• xf is the minimizing point.


• ff is the value of the objective, rf2, at xf.
• flf is the exit flag. An exit flag of 1 indicates xf is a local minimum.
• of is the output structure, which describes the fminunc calculations leading to the solution.

patternsearch

To solve the optimization problem using the patternsearch Global Optimization Toolbox solver,
enter:
rf2 = @(x)rastriginsfcn(x/10); % objective
x0 = [20,30]; % start point away from the minimum
[xp,fp,flp,op] = patternsearch(rf2,x0)

patternsearch returns
Optimization terminated: mesh size less than options.MeshTolerance.
xp =
19.8991 -9.9496
fp =
4.9748
flp =
1
op =

struct with fields:

function: @(x)rastriginsfcn(x/10)
problemtype: 'unconstrained'
pollmethod: 'gpspositivebasis2n'
maxconstraint: []
searchmethod: []
iterations: 48
funccount: 174

1-5
1 Introducing Global Optimization Toolbox Functions

meshsize: 9.5367e-07
rngstate: [1x1 struct]
message: 'Optimization terminated: mesh size less than options.MeshTolerance.'

• xp is the minimizing point.


• fp is the value of the objective, rf2, at xp.
• flp is the exit flag. An exit flag of 1 indicates xp is a local minimum.
• op is the output structure, which describes the patternsearch calculations leading to the
solution.

ga

To solve the optimization problem using the ga Global Optimization Toolbox solver, enter:

rng default % for reproducibility


rf2 = @(x)rastriginsfcn(x/10); % objective
x0 = [20,30]; % start point away from the minimum
initpop = 10*randn(20,2) + repmat(x0,20,1);
opts = optimoptions('ga','InitialPopulationMatrix',initpop);
[xga,fga,flga,oga] = ga(rf2,2,[],[],[],[],[],[],[],opts)

initpop is a 20-by-2 matrix. Each row of initpop has mean [20,30], and each element is normally
distributed with standard deviation 10. The rows of initpop form an initial population matrix for the
ga solver.

opts is the options that set initpop as the initial population.

The final line calls ga, using the options.

ga uses random numbers, and produces a random result. In this case ga returns:

Optimization terminated: maximum number of generations exceeded.

xga =

-0.0042 -0.0024

fga =

4.7054e-05

flga =

oga =

struct with fields:

problemtype: 'unconstrained'
rngstate: [1×1 struct]
generations: 200
funccount: 9453

1-6
Comparison of Six Solvers

message: 'Optimization terminated: maximum number of generations exceeded.'


maxconstraint: []

• xga is the minimizing point.


• fga is the value of the objective, rf2, at xga.
• flga is the exit flag. An exit flag of 0 indicates that ga reached a function evaluation limit or an
iteration limit. In this case, ga reached an iteration limit.
• oga is the output structure, which describes the ga calculations leading to the solution.

particleswarm

Like ga, particleswarm is a population-based algorithm. So for a fair comparison of solvers,


initialize the particle swarm to the same population as ga.

rng default % for reproducibility


rf2 = @(x)rastriginsfcn(x/10); % objective
opts = optimoptions('particleswarm','InitialSwarmMatrix',initpop);
[xpso,fpso,flgpso,opso] = particleswarm(rf2,2,[],[],opts)

Optimization ended: relative change in the objective value


over the last OPTIONS.MaxStallIterations iterations is less than OPTIONS.FunctionTolerance.

xpso =

9.9496 0.0000

fpso =

0.9950

flgpso =

opso =

struct with fields:

rngstate: [1×1 struct]


iterations: 56
funccount: 1140
message: 'Optimization ended: relative change in the objective value ↵over the last OPTION

• xpso is the minimizing point.


• fpso is the value of the objective, rf2, at xpso.
• flgpso is the exit flag. An exit flag of 1 indicates xpso is a local minimum.
• opso is the output structure, which describes the particleswarm calculations leading to the
solution.

1-7
1 Introducing Global Optimization Toolbox Functions

surrogateopt

surrogateopt does not require a start point, but does require finite bounds. Set bounds of –70 to
130 in each component. To have the same sort of output as the other solvers, disable the default plot
function.
rng default % for reproducibility
lb = [-70,-70];
ub = [130,130];
rf2 = @(x)rastriginsfcn(x/10); % objective
opts = optimoptions('surrogateopt','PlotFcn',[]);
[xsur,fsur,flgsur,osur] = surrogateopt(rf2,lb,ub,opts)

Surrogateopt stopped because it exceeded the function evaluation limit set by


'options.MaxFunctionEvaluations'.

xsur =

-0.0033 0.0005

fsur =

2.2456e-05

flgsur =

osur =

struct with fields:

elapsedtime: 2.3877
funccount: 200
rngstate: [1×1 struct]
message: 'Surrogateopt stopped because it exceeded the function evaluation limit set by ↵

• xsur is the minimizing point.


• fsur is the value of the objective, rf2, at xsur.
• flgsur is the exit flag. An exit flag of 0 indicates that surrogateopt halted because it ran out of
function evaluations or time.
• osur is the output structure, which describes the surrogateopt calculations leading to the
solution.

GlobalSearch

To solve the optimization problem using the GlobalSearch solver, enter:


rf2 = @(x)rastriginsfcn(x/10); % objective
x0 = [20,30]; % start point away from the minimum
problem = createOptimProblem('fmincon','objective',rf2,...
'x0',x0);
gs = GlobalSearch;
[xg,fg,flg,og] = run(gs,problem)

1-8
Comparison of Six Solvers

problem is an optimization problem structure. problem specifies the fmincon solver, the rf2
objective function, and x0=[20,30]. For more information on using createOptimProblem, see
“Create Problem Structure” on page 3-4.

Note You must specify fmincon as the solver for GlobalSearch, even for unconstrained problems.

gs is a default GlobalSearch object. The object contains options for solving the problem. Calling
run(gs,problem) runs problem from multiple start points. The start points are random, so the
following result is also random.

In this case, the run returns:


GlobalSearch stopped because it analyzed all the trial points.

All 10 local solver runs converged with a positive local solver exit flag.

xg =

1.0e-07 *

-0.1405 -0.1405

fg =

flg =

og =

struct with fields:

funcCount: 2350
localSolverTotal: 10
localSolverSuccess: 10
localSolverIncomplete: 0
localSolverNoSolution: 0
message: 'GlobalSearch stopped because it analyzed all the trial points.↵↵All 10 local solver runs converged with a po

• xg is the minimizing point.


• fg is the value of the objective, rf2, at xg.
• flg is the exit flag. An exit flag of 1 indicates all fmincon runs converged properly.
• og is the output structure, which describes the GlobalSearch calculations leading to the
solution.

Compare Syntax and Solutions


One solution is better than another if its objective function value is smaller than the other. The
following table summarizes the results, accurate to one decimal.

Results fminunc patternsearch ga particleswar surrogateopt GlobalSearch


m
solution [19.9 29.9] [19.9 -9.9] [0 0] [10 0] [0 0] [0 0]
objective 12.9 5 0 1 0 0
# Fevals 15 174 9453 1140 200 2178

1-9
1 Introducing Global Optimization Toolbox Functions

These results are typical:

• fminunc quickly reaches the local solution within its starting basin, but does not explore outside
this basin at all. fminunc has a simple calling syntax.
• patternsearch takes more function evaluations than fminunc, and searches through several
basins, arriving at a better solution than fminunc. The patternsearch calling syntax is the
same as that of fminunc.
• ga takes many more function evaluations than patternsearch. By chance it arrived at a better
solution. In this case, ga found a point near the global optimum. ga is stochastic, so its results
change with every run. ga has a simple calling syntax, but there are extra steps to have an initial
population near [20,30].
• particleswarm takes fewer function evaluations than ga, but more than patternsearch. In
this case, particleswarm found a point with lower objective function value than
patternsearch, but higher than ga. Because particleswarm is stochastic, its results change
with every run. particleswarm has a simple calling syntax, but there are extra steps to have an
initial population near [20,30].
• surrogateopt stops when it reaches a function evaluation limit, which by default is 200 for a
two-variable problem. surrogateopt has a simple calling syntax, but requires finite bounds.
surrogateopt attempts to find a global solution, and in this case succeeded. Each function
evaluation in surrogateopt takes a longer time than in most other solvers, because
surrogateopt performs many auxiliary computations as part of its algorithm.
• GlobalSearch run takes the same order of magnitude of function evaluations as ga and
particleswarm, searches many basins, and arrives at a good solution. In this case,
GlobalSearch found the global optimum. Setting up GlobalSearch is more involved than
setting up the other solvers. As the example shows, before calling GlobalSearch, you must
create both a GlobalSearch object (gs in the example), and a problem structure (problem).
Then, you call the run method with gs and problem. For more details on how to run
GlobalSearch, see “Workflow for GlobalSearch and MultiStart” on page 3-3.

See Also

More About
• “Optimization Problem Setup”
• “Solver Behavior with a Nonsmooth Problem” on page 1-11

1-10
Solver Behavior with a Nonsmooth Problem

Solver Behavior with a Nonsmooth Problem


This example shows the importance of choosing an appropriate solver for optimization problems. It
also shows that a single point of non-smoothness can cause problems for Optimization Toolbox™
solvers.

In general, the solver decision tables provide guidance on which solver is likely to work best for your
problem. For smooth problems, see “Optimization Decision Table” (Optimization Toolbox). For
nonsmooth problems, see “Table for Choosing a Solver” on page 1-23 first, and for more information
consult “Global Optimization Toolbox Solver Characteristics” on page 1-24.

A Function with a Single Nonsmooth Point

1/2
The function f (x) = x is nonsmooth at the point 0, which is the minimizing point. Here is a 2-D
x(1) x(2)
plot using the matrix norm for the 4-D point .
0 0

figure
x = linspace(-5,5,51);
[xx,yy] = meshgrid(x);
zz = zeros(size(xx));
for ii = 1:length(x)
for jj = 1:length(x)
zz(ii,jj) = sqrt(norm([xx(ii,jj),yy(ii,jj);0,0]));
end
end

surf(xx,yy,zz)
xlabel('x(1)')
ylabel('x(2)')
title('Norm([x(1),x(2);0,0])^{1/2}')

1-11
Discovering Diverse Content Through
Random Scribd Documents
copies of the works possessed in a physical medium and
discontinue all use of and all access to other copies of Project
Gutenberg™ works.

• You provide, in accordance with paragraph 1.F.3, a full refund of


any money paid for a work or a replacement copy, if a defect in
the electronic work is discovered and reported to you within 90
days of receipt of the work.

• You comply with all other terms of this agreement for free
distribution of Project Gutenberg™ works.

1.E.9. If you wish to charge a fee or distribute a Project Gutenberg™


electronic work or group of works on different terms than are set
forth in this agreement, you must obtain permission in writing from
the Project Gutenberg Literary Archive Foundation, the manager of
the Project Gutenberg™ trademark. Contact the Foundation as set
forth in Section 3 below.

1.F.

1.F.1. Project Gutenberg volunteers and employees expend


considerable effort to identify, do copyright research on, transcribe
and proofread works not protected by U.S. copyright law in creating
the Project Gutenberg™ collection. Despite these efforts, Project
Gutenberg™ electronic works, and the medium on which they may
be stored, may contain “Defects,” such as, but not limited to,
incomplete, inaccurate or corrupt data, transcription errors, a
copyright or other intellectual property infringement, a defective or
damaged disk or other medium, a computer virus, or computer
codes that damage or cannot be read by your equipment.

1.F.2. LIMITED WARRANTY, DISCLAIMER OF DAMAGES - Except


for the “Right of Replacement or Refund” described in paragraph
1.F.3, the Project Gutenberg Literary Archive Foundation, the owner
of the Project Gutenberg™ trademark, and any other party
distributing a Project Gutenberg™ electronic work under this
agreement, disclaim all liability to you for damages, costs and
expenses, including legal fees. YOU AGREE THAT YOU HAVE NO
REMEDIES FOR NEGLIGENCE, STRICT LIABILITY, BREACH OF
WARRANTY OR BREACH OF CONTRACT EXCEPT THOSE
PROVIDED IN PARAGRAPH 1.F.3. YOU AGREE THAT THE
FOUNDATION, THE TRADEMARK OWNER, AND ANY
DISTRIBUTOR UNDER THIS AGREEMENT WILL NOT BE LIABLE
TO YOU FOR ACTUAL, DIRECT, INDIRECT, CONSEQUENTIAL,
PUNITIVE OR INCIDENTAL DAMAGES EVEN IF YOU GIVE
NOTICE OF THE POSSIBILITY OF SUCH DAMAGE.

1.F.3. LIMITED RIGHT OF REPLACEMENT OR REFUND - If you


discover a defect in this electronic work within 90 days of receiving it,
you can receive a refund of the money (if any) you paid for it by
sending a written explanation to the person you received the work
from. If you received the work on a physical medium, you must
return the medium with your written explanation. The person or entity
that provided you with the defective work may elect to provide a
replacement copy in lieu of a refund. If you received the work
electronically, the person or entity providing it to you may choose to
give you a second opportunity to receive the work electronically in
lieu of a refund. If the second copy is also defective, you may
demand a refund in writing without further opportunities to fix the
problem.

1.F.4. Except for the limited right of replacement or refund set forth in
paragraph 1.F.3, this work is provided to you ‘AS-IS’, WITH NO
OTHER WARRANTIES OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO WARRANTIES OF
MERCHANTABILITY OR FITNESS FOR ANY PURPOSE.

1.F.5. Some states do not allow disclaimers of certain implied


warranties or the exclusion or limitation of certain types of damages.
If any disclaimer or limitation set forth in this agreement violates the
law of the state applicable to this agreement, the agreement shall be
interpreted to make the maximum disclaimer or limitation permitted
by the applicable state law. The invalidity or unenforceability of any
provision of this agreement shall not void the remaining provisions.
1.F.6. INDEMNITY - You agree to indemnify and hold the
Foundation, the trademark owner, any agent or employee of the
Foundation, anyone providing copies of Project Gutenberg™
electronic works in accordance with this agreement, and any
volunteers associated with the production, promotion and distribution
of Project Gutenberg™ electronic works, harmless from all liability,
costs and expenses, including legal fees, that arise directly or
indirectly from any of the following which you do or cause to occur:
(a) distribution of this or any Project Gutenberg™ work, (b)
alteration, modification, or additions or deletions to any Project
Gutenberg™ work, and (c) any Defect you cause.

Section 2. Information about the Mission of


Project Gutenberg™
Project Gutenberg™ is synonymous with the free distribution of
electronic works in formats readable by the widest variety of
computers including obsolete, old, middle-aged and new computers.
It exists because of the efforts of hundreds of volunteers and
donations from people in all walks of life.

Volunteers and financial support to provide volunteers with the


assistance they need are critical to reaching Project Gutenberg™’s
goals and ensuring that the Project Gutenberg™ collection will
remain freely available for generations to come. In 2001, the Project
Gutenberg Literary Archive Foundation was created to provide a
secure and permanent future for Project Gutenberg™ and future
generations. To learn more about the Project Gutenberg Literary
Archive Foundation and how your efforts and donations can help,
see Sections 3 and 4 and the Foundation information page at
www.gutenberg.org.

Section 3. Information about the Project


Gutenberg Literary Archive Foundation
The Project Gutenberg Literary Archive Foundation is a non-profit
501(c)(3) educational corporation organized under the laws of the
state of Mississippi and granted tax exempt status by the Internal
Revenue Service. The Foundation’s EIN or federal tax identification
number is 64-6221541. Contributions to the Project Gutenberg
Literary Archive Foundation are tax deductible to the full extent
permitted by U.S. federal laws and your state’s laws.

The Foundation’s business office is located at 809 North 1500 West,


Salt Lake City, UT 84116, (801) 596-1887. Email contact links and up
to date contact information can be found at the Foundation’s website
and official page at www.gutenberg.org/contact

Section 4. Information about Donations to


the Project Gutenberg Literary Archive
Foundation
Project Gutenberg™ depends upon and cannot survive without
widespread public support and donations to carry out its mission of
increasing the number of public domain and licensed works that can
be freely distributed in machine-readable form accessible by the
widest array of equipment including outdated equipment. Many small
donations ($1 to $5,000) are particularly important to maintaining tax
exempt status with the IRS.

The Foundation is committed to complying with the laws regulating


charities and charitable donations in all 50 states of the United
States. Compliance requirements are not uniform and it takes a
considerable effort, much paperwork and many fees to meet and
keep up with these requirements. We do not solicit donations in
locations where we have not received written confirmation of
compliance. To SEND DONATIONS or determine the status of
compliance for any particular state visit www.gutenberg.org/donate.

While we cannot and do not solicit contributions from states where


we have not met the solicitation requirements, we know of no
prohibition against accepting unsolicited donations from donors in
such states who approach us with offers to donate.

International donations are gratefully accepted, but we cannot make


any statements concerning tax treatment of donations received from
outside the United States. U.S. laws alone swamp our small staff.

Please check the Project Gutenberg web pages for current donation
methods and addresses. Donations are accepted in a number of
other ways including checks, online payments and credit card
donations. To donate, please visit: www.gutenberg.org/donate.

Section 5. General Information About Project


Gutenberg™ electronic works
Professor Michael S. Hart was the originator of the Project
Gutenberg™ concept of a library of electronic works that could be
freely shared with anyone. For forty years, he produced and
distributed Project Gutenberg™ eBooks with only a loose network of
volunteer support.

Project Gutenberg™ eBooks are often created from several printed


editions, all of which are confirmed as not protected by copyright in
the U.S. unless a copyright notice is included. Thus, we do not
necessarily keep eBooks in compliance with any particular paper
edition.

Most people start at our website which has the main PG search
facility: www.gutenberg.org.

This website includes information about Project Gutenberg™,


including how to make donations to the Project Gutenberg Literary
Archive Foundation, how to help produce our new eBooks, and how
to subscribe to our email newsletter to hear about new eBooks.
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade

Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.

Let us accompany you on the journey of exploring knowledge and


personal growth!

textbookfull.com

You might also like