Setting start points for MultiStart

9 次查看(过去 30 天)
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

采纳的回答

Alan Weiss
Alan Weiss 2018-7-18
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 个评论
Alan Weiss
Alan Weiss 2018-7-18
编辑:Alan Weiss 2018-7-18
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 2018-7-18
Okay great, thanks a lot for your help.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Solver Outputs and Iterative Display 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by