利用Excel进行简单线性规划求解
利用Excel進行簡單線性規劃求解
- 一、前言
- 二、問題描述
- 三、模型建立
- 四、模型求解
- 1、在Excel中輸入好模型參數
- 2、設置規劃求解器參數
- 3、進行求解
- 4、求解結果
- 參考網址
一、前言
簡單線性規劃在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
? 記錄自己學習的同時,也希望能對大家有所幫助,歡迎留言交流!
總結
以上是生活随笔為你收集整理的利用Excel进行简单线性规划求解的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 散乱插值及MATLAB绘图函数
- 下一篇: ensp查看历史配置命令_学习华为ens