Setting start points for MultiStart

10 Ansichten (letzte 30 Tage)
Paul Knott
Paul Knott am 18 Jul. 2018
Kommentiert: Paul Knott am 18 Jul. 2018
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

Akzeptierte Antwort

Alan Weiss
Alan Weiss am 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 Kommentare
Alan Weiss
Alan Weiss am 18 Jul. 2018
Bearbeitet: Alan Weiss am 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
Paul Knott
Paul Knott am 18 Jul. 2018
Okay great, thanks a lot for your help.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by