How to use Global Search using fmincon with constraints and bounds?
Afficher commentaires plus anciens
I am trying to do Global search with fmincon as follows after following the tutorial https://www.mathworks.com/help/gads/example-finding-global-or-multiple-local-minima.html:
problem = createOptimProblem('fmincon',...
'objective',f,...
'x0',x0,...
'A',A,...
'b',b,...
'Aeq',Aeq,...
'beq',beq,...
'lb',lb,...
'ub',ub,...
'options',...
optimoptions(@fmincon,'Algorithm','sqp','Display','off'));
gs = GlobalSearch('Display','iter');
[x,fval] = run(gs,problem)
However, I am getting the following error:
Error using createOptimProblem (line 107)
No field A exists for PROBLEM structure.
Type "help createOptimProblem" for a list of valid fields for each solver.
Error in QPSK_optim_global (line 84)
problem = createOptimProblem('fmincon',...
How can I specify constraints and bounds in this case?
Réponses (1)
Mario Malic
le 18 Sep 2020
Modifié(e) : Mario Malic
le 18 Sep 2020
0 votes
Check the documentation, the fields were renamed to Aineq and bineq.
1 commentaire
Saurabh Sharma
le 20 Déc 2023
Modifié(e) : Saurabh Sharma
le 20 Déc 2023
Yes, it works.
Catégories
En savoir plus sur Direct Search dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!