フィルターのクリア

How to solve the nonlinear optimization problem.

1 回表示 (過去 30 日間)
Rajkumar Verma
Rajkumar Verma 2020 年 6 月 6 日
コメント済み: Rajkumar Verma 2020 年 6 月 8 日
Hello friends,
How can I solve the attached nonlinear optimization problem.

採用された回答

Alan Weiss
Alan Weiss 2020 年 6 月 7 日
This looks like a job for fmincon. Variables x (3-D) and t = x(4).
Objective function t = x(4).
Lower bound lb = [0,0,0,-Inf].
Linear constraint Aeq = [1 1 1 0], beq = 1.
Nonlinear constraint function as you have, with c(x) = a three-element vector F(x) - x(4). ceq = [].
I would take the initial point something like x0 = [1 1 1 30]/3.
Is that clear enough?
Alan Weiss
MATLAB mathematical toolbox documentation
  3 件のコメント
Alan Weiss
Alan Weiss 2020 年 6 月 8 日
I'm sorry, but I do not understand your code. Maybe you did it right, but what you wrote doesn't make sense to me. It should look like this:
lb = [0,0,0,-Inf];
Aeq = [1 1 1 0];
beq = 1;
x0 = [1 1 1 30]/3;
fun = @ObjectiveFunction;
Nonlcon = @NLcon;
A = [];
b = [];
ub = [];
[X, FVAL] = fmincon(fun, x0, A, b, Aeq, beq, lb, ub, Nonlcon)
function f = ObjectiveFunction(x)
f = x(4);
end
function [C, Ceq] = NLcon(x)
C(1)= (0.3*((1-((0.5422)^x(1))*((0.4142)^x(2))*((0.6818)^x(3)))/(1+((0.5422)^x(1))*((0.4142)^x(2))*((0.6818)^x(3))))+0.7*((1-((0.1892)^x(1))*((0.0905)^x(2))*((0.5422)^x(3)))/(1+((0.1892)^x(1))*((0.0905)^x(2))*((0.5422)^x(3)))))-x(4);
C(2)= (0.3*((1-((0.1892)^x(1))*((0.5422)^x(2))*((0.2968)^x(3)))/(1+((0.1892)^x(1))*((0.5422)^x(2))*((0.2968)^x(3))))+0.7*((1-((0.0905)^x(1))*((0.4142)^x(2))*((0.0905)^x(3)))/(1+((0.0905)^x(1))*((0.4142)^x(2))*((0.0905)^x(3)))))-x(4);
C(3)= (0.3*((1-((0.4142)^x(1))*((0.8340)^x(2))*((0.5422)^x(3)))/(1+((0.4142)^x(1))*((0.8340)^x(2))*((0.5422)^x(3))))+0.7*((1-((0.0905)^x(1))*((0.0905)^x(2))*((0.1892)^x(3)))/(1+((0.0905)^x(1))*((0.0905)^x(2))*((0.1892)^x(3)))))-x(4);
Ceq= [];
end
That ran for me without error.
Alan Weiss
MATLAB mathematical toolbox documentation
Rajkumar Verma
Rajkumar Verma 2020 年 6 月 8 日
Thanks. It is perfectely working.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeNonlinear Optimization についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by