Setting start points for MultiStart
조회 수: 10 (최근 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
댓글 수: 0
채택된 답변
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
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
추가 답변 (0개)
참고 항목
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!