Surrogate optimization throws error when I try to use the vectorized option
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Hello,
Attemting to use vectorized option in surrogate optimization fails and I am not able to figour out
the reason behind. I get the following error message
'UseVectorized' is not an option for SURROGATEOPT.
A list of options can be found on the SURROGATEOPT documentation page.
Bellow, I show you the main part (L believe this should be enough)
options=optimoptions('surrogateopt','PlotFcn'[],'MaxFunctionEvaluations',10^8,'UseVectorized',true,'MinSurrogatePoints',200,'OutputFcn',@(x,optimValues,state)myoutput_Spline(x,optimValues,state,dt,M));
surrogateopt(cost,lb,ub,options)
Any idea?
Thanks a lot!
Babak
4 Kommentare
Torsten
am 28 Aug. 2022
Bearbeitet: Torsten
am 28 Aug. 2022
Do you already get the error message when you form the options structure or after calling "surrogateopt" ?
What MATLAB version do you use ?
You noticed that you forgot a comma in your line of code ?
options=optimoptions('surrogateopt','PlotFcn'[],'MaxFunctionEvaluations',10^8,'UseVectorized',true,'MinSurrogatePoints',200,'OutputFcn',@(x,optimValues,state)myoutput_Spline(x,optimValues,state,dt,M));
-> here
Antworten (1)
Yash
am 27 Okt. 2023
Hello Mohammad Shojaei Arani,
I understand that you are encountering issues while utilizing the Vectorized option in Surrogate Optimization in MATLAB. I have executed your code in MATLAB R2021a, MATLAB R2022a, and MATLAB R2023a, and I did not encounter any errors.
Upon careful examination, I noticed that the line you provided has a missing comma, which may be the cause of the issue. Here is the corrected code snippet:
options=optimoptions('surrogateopt','PlotFcn',[],'MaxFunctionEvaluations',10^8,'UseVectorized',true,'MinSurrogatePoints',200,'OutputFcn',@(x,optimValues,state)myoutput_Spline(x,optimValues,state,dt,M))
I recommend adding the missing comma to the code, as shown above. This adjustment should resolve the problem you are facing.
I hope this information helps you in resolving the issue.
0 Kommentare
Siehe auch
Kategorien
Mehr zu Surrogate Optimization finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!