Implementing a nonlinear constraint with fmincon

1 回表示 (過去 30 日間)
Reed
Reed 2022 年 10 月 5 日
コメント済み: Torsten 2022 年 10 月 5 日
Hello, so my problem is implementing the condition such that c1*c4>0, c2*c5>0, and c3*c6>0
And so, when implementing in fmincon it makes sense to write it in a sense of (-1) * ci*cj <= 0
When implemented as this and calling the function handle
function [z, zeq] = nlcon_poly_ogden(c)
z = [-1*c(1)*c(4),-1*c(2)*c(5),-1*c(3)*c(6)];
zeq = [];
end
and calling @nlcon_poly_ogden in the problem declaration
nonlcon_ogden = @nlcon_poly_ogden
ogden_polyconvexity_gs_problem = createOptimProblem('fmincon', 'x0', r, 'objective', ***, ...
'lb',[],'ub',[],'nonlcon', nonlcon_ogden, 'Aeq', [], 'beq', [],'options', options);
run(gs, ogden_polyconvexity_gs_problem); % gs is a default GlobalSearch object
The resulting parameters are not satisfying the bounds.... is there something I am doing wrong?
  11 件のコメント
Reed
Reed 2022 年 10 月 5 日
@Torsten and so if instead i set "StartPointsTOrun" = "all" without the added lb and ub arguments in the problem declaration, then the parameters could take on any number but still satisfying our nonlcon constraint?
Torsten
Torsten 2022 年 10 月 5 日
I don't know of these specific settings - sorry.

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeSolver Outputs and Iterative Display についてさらに検索

製品


リリース

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by