利用Excel进行简单线性规划求解

一、前言

简单线性规划在Matlab 中很好进行求解,最近偶然一次看到了用Excel进行线性规划求解,暴露了自己对excel的一无所知。哈哈哈,特此记录一下。

二、问题描述

Diet Problem in Linear Programming solved with Excel Solver
One of the classic applications of Linear Programming is the diet problem. The Diet Problem in Linear Programming was one of the first optimization problems studied in the 1930s and 1940s. The main goal is to select a set of foods that meets certain daily nutritional requirements and preferences and additionally at minimum cost. Let´s consider the following list of foods with their nutritional profile to illustrate this application:

在这里插入图片描述

We wish to propose a diet containing at least 2,000 (Kcal), at least 55 grams of protein and 800 (mg) of calcium. In addition, to provide some variety in the diet, some limits are set for the daily portions of food. This information is required to find the diet that has the lowest cost associated with meeting the above requirements.

三、模型建立

在这里插入图片描述

四、模型求解

1、在Excel中输入好模型参数

(具体细节可以参考目标函数、约束公式的定义):
在这里插入图片描述
数据-规划求解(没有规划求解的话,可以在灯泡那里点击搜索 规划求解 并把它显示出来):
在这里插入图片描述

2、设置规划求解器参数

包括设置目标函数位置、目标、自变量的位置、约束的具体关系
在这里插入图片描述

3、进行求解

在这里插入图片描述

4、求解结果

在这里插入图片描述

参考网址

https://jingyan.baidu.com/article/19020a0a2bc918529c284269.html


☀ 记录自己学习的同时,也希望能对大家有所帮助,欢迎留言交流!


  • 0
    点赞
  • 16
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值