用mathematica解决线性规划问题时出现的错误:不知道怎么改正.Thread::tdlen:Objects of unequal length in 127.5 zC{xA,xB,xC,yA,yB,yC,zA,zB,zC}cannot be combined.Maximize::argtu :Maximize called with 1 argument; 2 or 3 arguments are
来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/20 11:49:09
用mathematica解决线性规划问题时出现的错误:不知道怎么改正.Thread::tdlen:Objects of unequal length in 127.5 zC{xA,xB,xC,yA,yB,yC,zA,zB,zC}cannot be combined.Maximize::argtu :Maximize called with 1 argument; 2 or 3 arguments are
用mathematica解决线性规划问题时出现的错误:不知道怎么改正.
Thread::tdlen:Objects of unequal length in 127.5 zC{xA,xB,xC,yA,yB,yC,zA,zB,zC}cannot be combined.
Maximize::argtu :Maximize called with 1 argument; 2 or 3 arguments are expected.
附:
Maximize[z=112.50*xA+97.50*xB+90*xC+60*yA+67.5*yB+52.5*yC+150*zA+135*zB+127.5*zC{xA+yA+zA==200,xB+yB+zB==400,xC+yC+zC==600,112.5*xA+97.50*xB+90*xC>=3750,60*yA+67.5*yB+52.5*yC>=1200,150*zA+135*zB+127.5*zC>=7500,xA>=0,xB>=0,xC>=0,yA>=0,yB>=0,yC>=0,zA>=0,zB>=0,zC>=0}{xA,xB,xC,yA,yB,yC,zA,zB,zC}]
求大侠搭救啊!要怎么修改?确保运行得了啊
用mathematica解决线性规划问题时出现的错误:不知道怎么改正.Thread::tdlen:Objects of unequal length in 127.5 zC{xA,xB,xC,yA,yB,yC,zA,zB,zC}cannot be combined.Maximize::argtu :Maximize called with 1 argument; 2 or 3 arguments are
错误多得数不清啊!
首先,两个列表(大括号)之间应该有逗号;其次,列表前也应有逗号;再次,使用Maximize求带约束的规划问题,应该把约束和最优化函数放在一个列表中;最后,不建议使用Maximize求线性规划问题,建议使用LinearProgramming.