利用Excel进行简单线性规划求解
利用Excel進(jìn)行簡單線性規(guī)劃求解
- 一、前言
- 二、問題描述
- 三、模型建立
- 四、模型求解
- 1、在Excel中輸入好模型參數(shù)
- 2、設(shè)置規(guī)劃求解器參數(shù)
- 3、進(jìn)行求解
- 4、求解結(jié)果
- 參考網(wǎng)址
一、前言
簡單線性規(guī)劃在Matlab 中很好進(jìn)行求解,最近偶然一次看到了用Excel進(jìn)行線性規(guī)劃求解,暴露了自己對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中輸入好模型參數(shù)
(具體細(xì)節(jié)可以參考目標(biāo)函數(shù)、約束公式的定義):
數(shù)據(jù)-規(guī)劃求解(沒有規(guī)劃求解的話,可以在燈泡那里點(diǎn)擊搜索 規(guī)劃求解 并把它顯示出來):
2、設(shè)置規(guī)劃求解器參數(shù)
包括設(shè)置目標(biāo)函數(shù)位置、目標(biāo)、自變量的位置、約束的具體關(guān)系
3、進(jìn)行求解
4、求解結(jié)果
參考網(wǎng)址
https://jingyan.baidu.com/article/19020a0a2bc918529c284269.html
? 記錄自己學(xué)習(xí)的同時,也希望能對大家有所幫助,歡迎留言交流!
總結(jié)
以上是生活随笔為你收集整理的利用Excel进行简单线性规划求解的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 散乱插值及MATLAB绘图函数
- 下一篇: ensp查看历史配置命令_学习华为ens