max g(x,y)= x*k+(1-x)*log(1+((x*y)*l)/(1-x))
s.t: 0<=x<=1,0<=y<=1,
where k,l>0.
保持一个约束不变,函数g(x(/g(y(是一个凹函数。并通过不同k和l的Matlab仿真进行了验证。g(x,y(的仿真结果也给出了凹函数。当存在两个约束时,g(x,y(的最大值是多少?
也许你可以像下面的一样尝试fmincon
fn = @(v) -(v(1)*k+(1-v(1))*log(1+((v(1)*v(2))*l)/(1-v(1))));
Xopt = fmincon(fn,[0.5,0.5],[],[],[],[],[0;0]+eps,[1;1]-eps);
示例
k = 5;
l = 2;
fn = @(v) -(v(1)*k+(1-v(1))*log(1+((v(1)*v(2))*l)/(1-v(1))));
Xopt = fmincon(fn,[0.5,0.5],[],[],[],[],[0;0]+eps,[1;1]-eps);
使得
>> Xopt
Xopt =
0.99800
0.54714