当前位置:网站首页>Excel做题记录——整数规划优化模型
Excel做题记录——整数规划优化模型
2022-08-01 04:12:00 【Moqim Flourite.】
文章目录
题目:

一、首先根据题目要求提取信息,并列出数学模型:

二、通过Excel里的“规划求解”来解出答案:
1、创建数据表格:

2、根据数学模型设置数据:
最大价值量: =B7*B2+C7*C2+D7*D2+E7*E2
约束量: =B7*B3+C7*C3+D7*D3+E7*E3

3、使用“规划求解”功能求解:


设定目标:要为一个公式(我们刚刚写了),在表中的位置为A10;
设定可变单元格:选中数量的那四个单元格,因为在数学模型中他们为变量;
添加约束:根据数学模型中的两个公式添加:
i.变量都为整数:

ii.约束量(总重量)小于等于50:

都添加好后,就是这个界面——

然后点击“求解”:
最大价值量以及每种物品的数量就都一清二楚了。
点击“确定”,保留求出的值。
到这就完成这道题目了。
参考文章
边栏推荐
- The maximum quantity leetcode6133. Grouping (medium)
- Open source project site must-have & communication area function
- Take you to experience a type programming practice
- PMP 80个输入输出总结
- 【愚公系列】2022年07月 Go教学课程 024-函数
- Hackers can how bad to what degree?
- second uncle
- Passive anti-islanding-UVP/OVP and UFP/OFP passive anti-islanding model simulation based on simulink
- 开源项目站点必备&交流区功能
- What is a programming language
猜你喜欢

怀念故乡的面条

出现Command ‘vim‘ is available in the following places,vim: command not found等解决方法

开源项目站点必备&交流区功能

leetcode6132. 使数组中所有元素都等于零(简单,周赛)

Visual Studio提供的 Command Prompt 到底有啥用

This map drawing tool is amazing, I recommend it~~
![[Search topic] After reading the inevitable BFS solution to the shortest path problem](/img/f8/fbe906106dc8f7f7a6bd54d2dc3bc1.png)
[Search topic] After reading the inevitable BFS solution to the shortest path problem

TypeScript simplifies running ts-node

The bigger and bigger the project is, I split it like this

Unknown Bounded Array
随机推荐
【Make YOLO Great Again】YOLOv1-v7全系列大解析(Neck篇)
C# | 使用Json序列化对象时忽略只读的属性
test
怀念故乡的面条
The Flow Of Percona Toolkit pt-table-checksum
The kernel's handling of the device tree
Which interpolation is better for opencv to zoom in and out??
动态规划 01背包
Message Queuing Message Storage Design (Architecture Camp Module 8 Jobs)
Unknown Bounded Array
怀念故乡的月亮
让你的 Lottie 支持文字区域内自动换行
What is a programming language
【无标题】
This article takes you to understand the past and present of Mimir, Grafana's latest open source project
【堆】小红的数组
MySQL4
<JDBC> 批量插入 的四种实现方式:你真的get到了吗?
【愚公系列】2022年07月 .NET架构班 085-微服务专题 Abp vNext微服务网关
Flutter "Hello world" program code