How GlobalSearch and MultiStart Work - MATLAB & Simulink - MathWorks (2024)

How GlobalSearch and MultiStart Work

Multiple Runs of a Local Solver

GlobalSearch and MultiStart havesimilar approaches to finding global or multiple minima. Both algorithmsstart a local solver (such as fmincon) from multiplestart points. The algorithms use multiple start points to sample multiplebasins of attraction. For more information, see Basins of Attraction.

Differences Between the Solver Objects

GlobalSearch and MultiStart Algorithm Overview contains asketch of the GlobalSearch and MultiStart algorithms.

GlobalSearch and MultiStart Algorithm Overview

How GlobalSearch and MultiStart Work- MATLAB & Simulink- MathWorks (1)

The main differences between GlobalSearch and MultiStart are:

  • GlobalSearch uses a scatter-searchmechanism for generating start points. MultiStart usesuniformly distributed start points within bounds, or user-suppliedstart points.

  • GlobalSearch analyzes start pointsand rejects those points that are unlikely to improve the best localminimum found so far. MultiStart runs all start points(or, optionally, all start points that are feasible with respect tobounds or inequality constraints).

  • MultiStart gives a choice of localsolver: fmincon, fminunc, lsqcurvefit,or lsqnonlin. The GlobalSearch algorithmuses fmincon.

  • MultiStart can run in parallel, distributingstart points to multiple processors for local solution. To run MultiStart inparallel, see How to Use Parallel Processing in Global Optimization Toolbox.

Deciding Which Solver to Use

The differences between these solver objects boil down to thefollowing decision on which to use:

  • Use GlobalSearch to find a singleglobal minimum most efficiently on a single processor.

  • Use MultiStart to:

    • Find multiple local minima.

    • Run in parallel.

    • Use a solver other than fmincon.

    • Search thoroughly for a global minimum.

    • Explore your own start points.

GlobalSearch Algorithm

For a description of the algorithm, see Ugray et al. [1].

When you run a GlobalSearch object,the algorithm performs the following steps:

  • Run fmincon from x0

  • Generate Trial Points

  • Obtain Stage 1 Start Point, Run

  • Initialize Basins, Counters, Threshold

  • Begin Main Loop

  • Examine Stage 2 Trial Point to See if fmincon Runs

  • When fmincon Runs

  • When fmincon Does Not Run

  • Create GlobalOptimSolution

Run fmincon from x0

GlobalSearch runs fmincon fromthe start point you give in the problem structure.If this run converges, GlobalSearch records the startpoint and end point for an initial estimate on the radius of a basinof attraction. Furthermore, GlobalSearch recordsthe final objective function value for use in the score function(see Obtain Stage 1 Start Point, Run).

The score function is the sum of the objective function valueat a point and a multiple of the sum of the constraint violations.So a feasible point has score equal to its objective function value.The multiple for constraint violations is initially 1000. GlobalSearch updatesthe multiple during the run.

Generate Trial Points

GlobalSearch uses the scatter search algorithmto generate a set of NumTrialPoints trial points.Trial points are potential start points. For a description of thescatter search algorithm, see Glover [2]. GlobalSearch generatestrial points within any finite bounds you set (lb and ub).Unbounded components have artificial bounds imposed: lb =-1e4+1, ub= 1e4+1. This rangeis not symmetric about the origin so that the origin is not in thescatter search. Components with one-sided bounds have artificial boundsimposed on the unbounded side, shifted by the finite bounds to keep lb<ub.

Obtain Stage 1 Start Point, Run

GlobalSearch evaluates the score function ofa set of NumStageOnePoints trial points. It thentakes the point with the best score and runs fmincon fromthat point. GlobalSearch removes the set of NumStageOnePoints trialpoints from its list of points to examine.

Initialize Basins, Counters, Threshold

The localSolverThreshold is initially thesmaller of the two objective function values at the solution points.The solution points are the fmincon solutionsstarting from x0 and from the Stage 1 start point.If both of these solution points do not exist or are infeasible, localSolverThreshold isinitially the penalty function value of the Stage 1 start point.

The GlobalSearch heuristic assumption is thatbasins of attraction are spherical. The initial estimate of basinsof attraction for the solution point from x0 andthe solution point from Stage 1 are spheres centered at the solutionpoints. The radius of each sphere is the distance from the initialpoint to the solution point. These estimated basins can overlap.

There are two sets of counters associated with the algorithm.Each counter is the number of consecutive trial points that:

  • Lie within a basin of attraction. There is one counterfor each basin.

  • Have score function greater than localSolverThreshold.For a definition of the score, see Run fmincon from x0.

All counters are initially 0.

Begin Main Loop

GlobalSearch repeatedly examines a remainingtrial point from the list, and performs the following steps. It continuallymonitors the time, and stops the search if elapsed time exceeds MaxTime seconds.

Examine Stage 2 Trial Point to See if fmincon Runs

Call the trial point p. Run fmincon from p ifthe following conditions hold:

  • p is not in any existing basin.The criterion for every basin i is:

    |p - center(i)| > DistanceThresholdFactor * radius(i).

    DistanceThresholdFactor is an option (defaultvalue 0.75).

    radius is an estimated radius that updatesin UpdateBasin Radius and Threshold and React to Large Counter Values.

  • score(p) < localSolverThreshold.

  • (optional) p satisfies bound and/orinequality constraints. This test occurs if you set the StartPointsToRun propertyof the GlobalSearch object to 'bounds' or 'bounds-ineqs'.

When fmincon Runs

  1. Reset Counters

    Set the counters for basins and threshold to 0.

  2. Update Solution Set

    If fmincon runs starting from p,it can yield a positive exit flag, which indicates convergence. Inthat case, GlobalSearch updates the vector of GlobalOptimSolution objects.Call the solution point xp and the objective functionvalue fp. There are two cases:

    • For every other solution point xq withobjective function value fq,

      |xq - xp| > XTolerance * max(1,|xp|)

      or

      |fq - fp| > FunctionTolerance * max(1,|fp|).

      In this case, GlobalSearch creates a new element in the vector of GlobalOptimSolution objects. For details of the information contained in each object, see GlobalOptimSolution.

    • For some other solution point xq withobjective function value fq,

      |xq - xp| <= XTolerance * max(1,|xp|)

      and

      |fq - fp| <= FunctionTolerance * max(1,|fp|).

      In this case, GlobalSearch regards xp asequivalent to xq. The GlobalSearch algorithmmodifies the GlobalOptimSolution of xq byadding p to the cell array of X0 points.

      There is one minor tweak that can happen to this update. Ifthe exit flag for xq is greater than 1,and the exit flag for xp is 1,then xp replaces xq. This replacementcan lead to some points in the same basin being more than a distanceof XTolerance from xp.

  3. Update Basin Radius and Threshold

    If the exit flag of the current fmincon runis positive:

    1. Set threshold to the score value at start point p.

    2. Set basin radius for xp equal to themaximum of the existing radius (if any) and the distance between p and xp.

  4. Report to Iterative Display

    When the GlobalSearch Display propertyis 'iter', every point that fmincon runscreates one line in the GlobalSearch iterative display.

When fmincon Does Not Run

  1. Update Counters

    Increment the counter for every basin containing p.Reset the counter of every other basin to 0.

    Increment the threshold counter if score(p)>=localSolverThreshold.Otherwise, reset the counter to 0.

  2. React to Large Counter Values

    For each basin with counter equal to MaxWaitCycle,multiply the basin radius by 1BasinRadiusFactor. Reset the counterto 0. (Both MaxWaitCycle and BasinRadiusFactor aresettable properties of the GlobalSearch object.)

    If the threshold counter equals MaxWaitCycle,increase the threshold:

    new threshold = threshold + PenaltyThresholdFactor*(1 +abs(threshold)).

    Reset the counter to 0.

  3. Report to Iterative Display

    Every 200th trial point creates one line in the GlobalSearch iterativedisplay.

Create GlobalOptimSolution

After reaching MaxTime seconds or running out of trial points, GlobalSearch creates a vector of GlobalOptimSolution objects. (These points correspond to positive fmincon exit flags.) GlobalSearch orders the vector by objective function value, from lowest (best) to highest (worst). This concludes the algorithm.

MultiStart Algorithm

When you run a MultiStart object,the algorithm performs the following steps:

  • Validate Inputs

  • Generate Start Points

  • Filter Start Points (Optional)

  • Run Local Solver

  • Check Stopping Conditions

  • Create GlobalOptimSolution Object

Validate Inputs

MultiStart checks input arguments for validity. Checks include running the local solver once on problem inputs. Even when run in parallel, MultiStart performs these checks serially.

Generate Start Points

If you call MultiStart with the syntax

[x,fval] = run(ms,problem,k)

for an integer k, MultiStart generates k-1 start points exactly asif you used a RandomStartPointSet object. The algorithmalso uses the x0 start point from the problem structure,for a total of k start points.

A RandomStartPointSet object does not have any points stored inside the object. Instead, MultiStart calls list, which generates random points within the bounds given by the problem structure. If an unbounded component exists, list uses an artificial bound given by the ArtificialBound property of the RandomStartPointSet object.

If you provide a CustomStartPointSet object, MultiStart doesnot generate start points, but uses the points in the object.

Filter Start Points (Optional)

If you set the StartPointsToRun propertyof the MultiStart object to 'bounds' or 'bounds-ineqs', MultiStart doesnot run the local solver from infeasible start points. In this context,“infeasible” means start points that do not satisfybounds, or start points that do not satisfy both bounds and inequalityconstraints.

The default setting of StartPointsToRun is 'all'.In this case, MultiStart does not discard infeasiblestart points.

Run Local Solver

MultiStart runs the local solver specifiedin problem.solver, starting at the points thatpass the StartPointsToRun filter. If MultiStart isrunning in parallel, it sends start points to worker processors oneat a time, and the worker processors run the local solver.

At each of its iterations, the local solver checks whether MaxTime seconds have elapsed since MultiStart began calculating. If so, MultiStart exits that iteration without reporting a solution.

When the local solver stops, MultiStart stores the results that correspond to positive local solver exit flags and continues to the next step.

Report to Iterative Display.When the MultiStart Display propertyis 'iter', every point that the local solver runscreates one line in the MultiStart iterative display.

Check Stopping Conditions

MultiStart stops when it runs out of startpoints. It also stops when it exceeds a total run time of MaxTime seconds.

Create GlobalOptimSolution Object

After MultiStart reaches a stopping condition, the algorithm creates a vector of GlobalOptimSolution objects (all of which correspond to positive local solver exit flags) as follows:

  1. Sort the local solutions by objective function value(Fval) from lowest to highest. For the lsqnonlin and lsqcurvefit localsolvers, the objective function is the norm of the residual.

  2. Loop over the local solutions j beginningwith the lowest (best) Fval.

  3. Find all the solutions k satisfyingboth:

    |Fval(k)-Fval(j)|<=FunctionTolerance*max(1,|Fval(j)|)

    |x(k)-x(j)|<=XTolerance*max(1,|x(j)|)

  4. Record j, Fval(j),the local solver output structure for j,and a cell array of the start points for j andall the k. Remove those points k fromthe list of local solutions. This point is one entry in the vectorof GlobalOptimSolution objects.

The resulting vector of GlobalOptimSolution objectsis in order by Fval, from lowest (best) to highest(worst).

Report to Iterative Display.After examining all the local solutions, MultiStart givesa summary to the iterative display. This summary includes the numberof local solver runs that converged, the number that failed to converge,and the number that had errors.

Bibliography

[1] Ugray, Zsolt, Leon Lasdon, John C. Plummer,Fred Glover, James Kelly, and Rafael Martí. ScatterSearch and Local NLP Solvers: A Multistart Framework for Global Optimization.INFORMS Journal on Computing, Vol. 19, No. 3, 2007, pp. 328–340.

[2] Glover, F. “A template for scattersearch and path relinking.” Artificial Evolution (J.-K.Hao, E.Lutton, E.Ronald, M.Schoenauer, D.Snyers, eds.). Lecture Notesin Computer Science, 1363, Springer, Berlin/Heidelberg, 1998, pp.13–54.

[3] Dixon, L. and G. P. Szegö. “TheGlobal Optimization Problem: an Introduction.” TowardsGlobal Optimisation 2 (Dixon, L. C. W. and G. P. Szegö,eds.). Amsterdam, The Netherlands: North Holland, 1978.

Related Topics

  • Global or Multiple Starting Point Search

MATLAB Command

You clicked a link that corresponds to this MATLAB command:

 

Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.

How GlobalSearch and MultiStart Work- MATLAB & Simulink- MathWorks (2)

Select a Web Site

Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .

You can also select a web site from the following list:

Americas

  • América Latina (Español)
  • Canada (English)
  • United States (English)

Europe

  • Belgium (English)
  • Denmark (English)
  • Deutschland (Deutsch)
  • España (Español)
  • Finland (English)
  • France (Français)
  • Ireland (English)
  • Italia (Italiano)
  • Luxembourg (English)
  • Netherlands (English)
  • Norway (English)
  • Österreich (Deutsch)
  • Portugal (English)
  • Sweden (English)
  • Switzerland
    • Deutsch
    • English
    • Français
  • United Kingdom (English)

Asia Pacific

Contact your local office

How GlobalSearch and MultiStart Work
- MATLAB & Simulink
- MathWorks (2024)

References

Top Articles
Latest Posts
Article information

Author: Manual Maggio

Last Updated:

Views: 5683

Rating: 4.9 / 5 (69 voted)

Reviews: 84% of readers found this page helpful

Author information

Name: Manual Maggio

Birthday: 1998-01-20

Address: 359 Kelvin Stream, Lake Eldonview, MT 33517-1242

Phone: +577037762465

Job: Product Hospitality Supervisor

Hobby: Gardening, Web surfing, Video gaming, Amateur radio, Flag Football, Reading, Table tennis

Introduction: My name is Manual Maggio, I am a thankful, tender, adventurous, delightful, fantastic, proud, graceful person who loves writing and wants to share my knowledge and understanding with you.