谁帮忙看一下这个简单的matlab线性规划有什么问题?
目标:求matlab算约束条件x+y=43条件下,w=x+1.67y最小值>>f=[-1;-1.67];A=[];b=[];Aeq=[1,1];Beq=43;LB=[];...
目标:求matlab 算约束条件x+y=43条件下,w=x+1.67y最小值
>> f = [-1;-1.67];
A = [];
b=[];
Aeq = [1,1];
Beq = 43;
LB = [];
[x, favl] = linprog(f, A, b)
Exiting: One or more of the residuals, duality gap, or total relative error
has grown 100000 times greater than its minimum value so far:
the dual appears to be infeasible (and the primal unbounded).
(The primal residual < TolFun=1.00e-008.)
x =
1.0e+026 *
0.0000
1.4561
favl =
-2.4317e+026
怎么数这么大 展开
>> f = [-1;-1.67];
A = [];
b=[];
Aeq = [1,1];
Beq = 43;
LB = [];
[x, favl] = linprog(f, A, b)
Exiting: One or more of the residuals, duality gap, or total relative error
has grown 100000 times greater than its minimum value so far:
the dual appears to be infeasible (and the primal unbounded).
(The primal residual < TolFun=1.00e-008.)
x =
1.0e+026 *
0.0000
1.4561
favl =
-2.4317e+026
怎么数这么大 展开
2014-05-03
展开全部
1、linprog本来就是求最小化问题的,f没必要加负号。
2、如果只有这样一个等式约束,该问题无解(或者说解为无界)。这一点很容易理解,把约束条件变成x=43-y,代入到目标函数,得到w=43+0.67y,要使w取最小值,则y为无穷小。
2、如果只有这样一个等式约束,该问题无解(或者说解为无界)。这一点很容易理解,把约束条件变成x=43-y,代入到目标函数,得到w=43+0.67y,要使w取最小值,则y为无穷小。
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询