线性规划:单纯形法 [英] Linear Programming : Simplex Method
问题描述
尊敬的会员,
我需要使用线性编程来解决问题:单纯形法或任何算法(不使用任何类型的库)属于线性代码:
Respected members,
I need to solve a problem using Linear programming : simplex method or any algorithm (without using any sort of Libraries) which comes in category of linear code that is :
An Example: The Diet Problem
• A student is trying to decide on lowest cost diet that
provides sufficient amount of protein, with two choices:
– steak: 2 units of protein/pound, $3/pound
– peanut butter: 1 unit of protein/pound, $2/pound
• In proper diet, need 4 units protein/day.
Let x = # pounds peanut butter/day in the diet.
Let y = # pounds steak/day in the diet.
Goal: minimize 2x + 3y (total cost)
subject to constraints:
x + 2y ³ 4
x ³ 0, y ³ 0
这是一个优化问题。
•满足nu的任何解决方案满足要求被称为
a可行解决方案
•最低成本的可行解决方案称为
最优解决方案。
我坚持认为我如何在C#或Java语言上实现它..我如何开始相当困惑任何帮助将不胜感激。
谢谢
This is an optimization problem.
• Any solution meeting the nutritional demands is called
a feasible solution
• A feasible solution of minimum cost is called the
optimal solution.
I'm stuck that how do I implement it on C# or Java language .. How do i start quite confused any help will be appreciated.
Thanks
推荐答案
3 / pound
- peanut butter: 1 unit protein / pound,
3/pound – peanut butter: 1 unit of protein/pound,
2 / pound
• 在 正确的 diet ,需要 4 units 蛋白质/天。
让 x = # 磅 花生黄油/天 diet 。
让 y = # 磅牛排/天 饮食跨度>。
目标: 最小化 2x + 3y (总成本)
subject 约束:
x + 2y ³ 4
x ³ 0 , y ³ 0
2/pound • In proper diet, need 4 units protein/day. Let x = # pounds peanut butter/day in the diet. Let y = # pounds steak/day in the diet. Goal: minimize 2x + 3y (total cost) subject to constraints: x + 2y ³ 4 x ³ 0, y ³ 0
这是一个优化问题。
•满足nu的任何解决方案满足要求被称为
a可行解决方案
•最低成本的可行解决方案称为
最优解决方案。
我坚持认为我如何在C#或Java语言上实现它..我如何开始相当困惑任何帮助将不胜感激。
谢谢
This is an optimization problem.
• Any solution meeting the nutritional demands is called
a feasible solution
• A feasible solution of minimum cost is called the
optimal solution.
I'm stuck that how do I implement it on C# or Java language .. How do i start quite confused any help will be appreciated.
Thanks
你有谷歌吗?
- c#中的单纯形法 [ ^ ]
- java中的simplex方法 [ ^ ]
Did you Google?
- "simplex method in c#"[^]
- "simplex method in java"[^]
这篇关于线性规划:单纯形法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!