필터 지우기
필터 지우기

How to use Global Search using fmincon with constraints and bounds?

조회 수: 13 (최근 30일)
Rahul Bhadani
Rahul Bhadani 2020년 9월 18일
편집: Saurabh Sharma 2023년 12월 20일
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?

답변 (1개)

Mario Malic
Mario Malic 2020년 9월 18일
편집: Mario Malic 2020년 9월 18일
Check the documentation, the fields were renamed to Aineq and bineq.

카테고리

Help CenterFile Exchange에서 Global or Multiple Starting Point Search에 대해 자세히 알아보기

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by