线性规划:单纯形法 [英] Linear Programming : Simplex Method

查看:79
本文介绍了线性规划:单纯形法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尊敬的会员,



我需要使用线性编程来解决问题:单纯形法或任何算法(不使用任何类型的库)属于线性代码:

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


你有谷歌吗?

Did you Google?
  • "simplex method in c#"[^]
  • "simplex method in java"[^]


这篇关于线性规划:单纯形法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆