How to use GlobalSearch to find global minimum

17 views (last 30 days)
Hi,
I have successfully used fmincon to find a solution to my optimization problem. The solution is a local minimum (but could be global).
Now I want to find the global minimum. I have seen the procedure in MATLAB documentation, but when I try to write
>> help globalsearch
globalsearch not found.
Do I need to downlaod anything to run global search? my version is MATLAB R2019b.
Thanks

Accepted Answer

Stephan
Stephan on 23 Oct 2019
Try the following:
ver
Its output should look somehow like this:
>> ver
-----------------------------------------------------------------------------------------------------
MATLAB Version: 9.7.0.1190202 (R2019b)
MATLAB License Number: ********
Operating System: Microsoft Windows 7 Professional Version 6.1 (Build 7601: Service Pack 1)
Java Version: Java 1.8.0_202-b08 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
-----------------------------------------------------------------------------------------------------
MATLAB Version 9.7 (R2019b)
Global Optimization Toolbox Version 4.2 (R2019b)
Optimization Toolbox Version 8.4 (R2019b)
Statistics and Machine Learning Toolbox Version 11.6 (R2019b)
Symbolic Math Toolbox Version 8.4 (R2019b)
...
All the toolboxes you have installed
If you do not find Global Optimization Toolbox here, install it or buy a license for it and then install it. A working and correct installation of this toolbox would lead to the following result:
>> help globalsearch
--- globalsearch not found. Showing help for GlobalSearch instead. ---
GlobalSearch A scatter-search based global optimization solver.
A GlobalSearch object presents a solver that attempts to locate the
solution with lowest objective function value. GlobalSearch solver
first generates trial points employing a Scatter Search method. These
trial points are then filtered and fmincon is started from each of the
filtered points.
GS = GlobalSearch constructs a new global search optimization solver
with its properties set to defaults.
GS = GlobalSearch(PROP, VAL, ...) specifies a set of property-value
pairs that are applied to the global search optimization solver before
creating it.
GS = GlobalSearch(OLDGS, PROP, VAL, ...) creates a copy of the
GlobalSearch solver OLDGS. GS will have the named properties altered
with the specified values.
GS = GlobalSearch(MS) constructs a new GlobalSearch solver and copies
the common parameter values in the multi-start solver MS into the new
solver GS.
GlobalSearch properties:
Display - content level of display
FunctionTolerance - minimum distance between two separate
objective function values
XTolerance - minimum distance between two separate
points
MaxTime - time allowed to run the solver
StartPointsToRun - additional filter for Stage 2 start
points
OutputFcn - user-defined output functions
PlotFcn - functions to plot solver progress
NumTrialPoints - number of trial points analyzed
BasinRadiusFactor - factor to determine the amount of
decrease in the basin radius
DistanceThresholdFactor - factor to tune the effect of the distance
filter
MaxWaitCycle - maximum number of consecutive points
analyzed before a threshold increase or
a basin of attraction decrease
NumStageOnePoints - number of trial points analyzed in Stage 1
PenaltyThresholdFactor - factor to determine the update amount in
the threshold for rejecting trial points
GlobalSearch method:
run - search for the best solution of a given
optimization problem
Typical workflow to run the GlobalSearch solver:
==============================================
1. Set up the PROBLEM structure
PROBLEM = createOptimProblem('fmincon','objective',...)
2. Construct the GlobalSearch solver
GS = GlobalSearch
3. Run the solver
run(GS,PROBLEM)
Example:
Run global search on the optimization problem
minimize peaks(x, y); subject to
(x+3)^2 + (y+3)^2 <= 36,
-3 <= x <= 3 and
-3 <= y <= 3.
Specify the first constraint in a MATLAB file function such as
function [c,ceq] = mycon(x)
c = (x(1)+3)^2 + (x(2)+3)^2 - 36;
ceq = [];
Implement the typical workflow
problem = createOptimProblem('fmincon','objective', ...
@(x) peaks(x(1), x(2)), 'x0', [1 2], 'lb', [-3 -3], ...
'ub', [3 3], 'nonlcon', @mycon)
gs = GlobalSearch
[x, f] = run(gs, problem)
See also MultiStart
Documentation for GlobalSearch
If you have a license and you already installed it try:
which GlobalSearch
which should give an output like:
...\MATLAB\R2019b\toolbox\globaloptim\globaloptim\GlobalSearch.m % GlobalSearch constructor
If you dont have this as result install the toolbox again. If it then still does not work you should contact TMW Service to help you solving the issue.
  1 Comment
Ahmed Ghamdi
Ahmed Ghamdi on 23 Oct 2019
Thanks!
MATLAB Version 9.7 (R2019b)
Simulink Version 10.0 (R2019b)
Control System Toolbox Version 10.7 (R2019b)
Curve Fitting Toolbox Version 3.5.10 (R2019b)
DSP System Toolbox Version 9.9 (R2019b)
Data Acquisition Toolbox Version 4.0.1 (R2019b)
Image Processing Toolbox Version 11.0 (R2019b)
Instrument Control Toolbox Version 4.1 (R2019b)
Optimization Toolbox Version 8.4 (R2019b)
Signal Processing Toolbox Version 8.3 (R2019b)
Simulink Control Design Version 5.4 (R2019b)
Statistics and Machine Learning Toolbox Version 11.6 (R2019b)
Symbolic Math Toolbox Version 8.4 (R2019b)
I guess I don't have global optimization toolbox.

Sign in to comment.

More Answers (0)

Categories

Find more on Get Started with Optimization Toolbox in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!