- 431
- 0
- 约1.89千字
- 约 3页
- 2017-08-29 发布于浙江
- 举报
Mathematica求解线性规划
mathematica
|||i
mathematica
2009-06-24 14:59
:stlxv,/fouvey/blog/item/86b014d674cb03d5a044df1f.html
(* linear programming *)
Maximize[{x1 + x2 + x3 + x4, ( * objective function *)
x5 + x6 + x7 + x8 = 250000, (* conditions *)
x1 + x5 = 380000,
x2 + x6 = 265200,
x3 + x7 = 408100,
x4 + x8 = 130100,
2.85*x1 - 1.42*x2 + 4.27*x3 - 18.49*x4 = 0,
2.85*x5 - 1.42*x6 + 4.27*x7 - 18.49*x8 = 0,
16.5*x1 + 2*x2 - 4*x3 + 17*x4 = 0,
7.5*x5 - 7*x6 - 13.0*x7 + 8*x8 = 0,
x1 = 0, x2 = 0, x3 = 0, x4 = 0, x5 = 0, x6 = 0, x7 = 0, x8 = 0},
{x1, x2, x3, x4, x5, x6, x7, x8} (*
原创力文档

文档评论(0)