how can i put specific limitation of the output of function in optimization tool algorithms

조회 수: 1 (최근 30일)
Hi all can any one help me , i have equation regarding about optimization. for example
clear all
clc
fun = @(x)1+x(1)/(1+x(2)) - 3*x(1)*x(2) + x(2)*(1+x(1));
lb = [0,0];
ub = [1,2];
A = [];
b = [];
Aeq = [];
beq = [];
x0 = [0.5,1];
x = fmincon(fun,x0,A,b,Aeq,beq,lb,ub)
my question is how can i make the algorithm work to find the optimal value of x only if the result of output function (fun) just in over than 1 . if there any other optimization logarithm work under my question , please let me know
  댓글 수: 3
mohammed hussein
mohammed hussein 2016년 12월 6일
편집: mohammed hussein 2016년 12월 6일
thank you for your response
clear all
clc
fun = @(x)1+x(1)/(1+x(2)) - 3*x(1)*x(2) + x(2)*(1+x(1)); lb = [0,0]; ub = [1,2]; A = []; b = []; Aeq = []; beq = []; x0 = [0.5,1]; x = fmincon(fun,x0,A,b,Aeq,beq,lb,ub)
In normal optimization algorithm works to find the optimal parameter (X) that find min value of output (fun). i want the optimization algorithm can work in specific range value of output (fun). "just over 1" of output (fun) .
Alan Weiss
Alan Weiss 2016년 12월 6일
I am sorry, but I do not understand your question. Perhaps use different words or give an example of what is and what is not an output that satisfies you.
Alan Weiss
MATLAB mathematical toolbox documentation

댓글을 달려면 로그인하십시오.

채택된 답변

Matt J
Matt J 2017년 10월 12일
You can use a non-linear constraint to force fun(x)>=1, but your feasible region would probably consist of disjoint pieces. Because you only have two unknowns, it would probably be pretty easy to do a sweep over these parameters to find a solution close enough to the optimum to avoid getting stuck in the wrong piece.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Solver Outputs and Iterative Display에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by