Setting start points for MultiStart

Hello,
I am trying to use MultiStart to optimise a high-dimensional function. I have a set of start points I'd like to feed into MultiStart, called "Start_Points". Start_Points is an n by m matrix, where each of the n rows is a different start point, and each start point is a length m vector. The Matlab documentation says I should first create a "problem". I do this as follows:
problem = createOptimProblem('fmincon','x0',Start_Points,'objective',......
But then I have to specify the start points again when running MultiStart. It says to do this as follows:
tpoints = CustomStartPointSet(Start_Points);
I then run MultiStart using:
run(ms,problem,tpoints);
But the following error is returned:
"Error using MultiStart/run (line 228) RUN expects CUSTOMSTARTPOINTSETS to have the same dimension as x0."
I tried to keep 'x0' empty in defining the problem, but this isn't allowed. If I make 'x0' a 1 by m vector then it runs without error (i.e. if I give it a single start point), but I want to give it multiple start points.
I guess my main questions are: What is the different between x0 and tpoints? When using MultiStart, does it just ignore x0 and use tpoints instead?
Thanks,
Paul

 Accepted Answer

Alan Weiss
Alan Weiss on 18 Jul 2018
Set Start Points for MultiStart describes how to set start points for MultiStart.
You have the wrong idea about what x0 represents. x0 is supposed to be a single start point, a 1-by- m vector. MultiStart runs the multiple start points in tpoints, you do not set the multiple start points in x0.
Alan Weiss
MATLAB mathematical toolbox documentation

3 Comments

Hi Alan,
Thanks for your answer. Just to check I understand your answer, does this mean that when using MultiStart it is irrelevant what x0 is set to, because MultiStart runs the start points in tpoints regardless of the value of x0? Matlab doesn't allow you to set x0=[], which lead to my confusion.
Many thanks,
Paul
Alan Weiss
Alan Weiss on 18 Jul 2018
Edited: Alan Weiss on 18 Jul 2018
Yes, as the documentation I pointed you to states, when you supply a CustomStartPointSet, MultiStart does not run x0. One purpose of x0 is to give the dimension of the problem, the number of variables. Yes, this could be extracted from the CustomStartPointSet, so MultiStart is not as smart as it could be. But requiring x0 ensures that the problem is well-formulated no matter what other inputs are supplied.
Alan Weiss
MATLAB mathematical toolbox documentation
Okay great, thanks a lot for your help.

Sign in to comment.

More Answers (0)

Products

Asked:

on 18 Jul 2018

Commented:

on 18 Jul 2018

Community Treasure Hunt

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

Start Hunting!