You want to determine the quantities x1, x2, …, xn of n different foods, each containing m types of nutrients. The amount of the i-th nutrient in the j-th food is represented as an, and the prices of the n foods are c1,c2,…,cn. Your goal is to find a recipe where the content of each of the m nutrients is at least b1, b2, …, bm, while minimizing the total cost.
问题建模:
设 x 1 , x 2 , … , x n x_1, x_2, \ldots, x_n x1,x2,…,xn分别为 n 种不同食物的数量,其中每种食物包含 m 种营养成分。第 j 种食物中第 i 种营养成分的含量为 a i j a_{ij} aij,而 n 种食物的价格分别为 c 1 , c 2 , … , c n c_1, c_2, \ldots, c_n c1,c2,…,cn。目标是找到一种配方,其中每种营养成分的含量至少为 b 1 , b 2 , … , b m b_1, b_2, \ldots, b_m b1,b2,…,bm,同时最小化总成本。
线性规划建模:
目标函数:
min z = ∑ j = 1 n c j ⋅ x j \text{min } z = \sum_{j=1}^{n} c_j \cdot x_j min z=∑j=1ncj⋅xj
约束条件:
∑ j = 1 n a i j ⋅ x j ≥ b i , for i = 1 , 2 , … , m \sum_{j=1}^{n} a_{ij} \cdot x_j \geq b_i, \text{ for } i = 1, 2, \ldots, m ∑j=1naij⋅xj≥bi, for i=1,2,…,m
x j ≥ 0 , for j = 1 , 2 , … , n x_j \geq 0, \text{ for } j = 1, 2, \ldots, n xj≥0, for j=1,2,…,n
其中:
这个线性规划模型描述了在满足每种营养成分最小含量的条件下,最小化总成本的问题。
You now need to pack dormitory items. You have m items and n boxes, with enough boxes to accommodate all items. The space occupied by the i-th item is Ci, and the capacity of the j-th box is Sj. Your goal is to pack all items using as few boxes as possible.
问题建模:
设有 m 个宿舍用品和 n 个箱子,箱子足够容纳所有物品。第 i 个物品的体积为 C i C_i Ci,第 j 个箱子的容量为 S j S_j Sj。目标是使用尽可能少的箱子来装载所有物品。
线性规划建模:
目标函数:
min z = ∑ j = 1 n y j \text{min } z = \sum_{j=1}^{n} y_j min z=∑j=1nyj
约束条件:
∑ j = 1 n x i j = 1 , for i = 1 , 2 , … , m \sum_{j=1}^{n} x_{ij} = 1, \text{ for } i = 1, 2, \ldots, m ∑j=1nxij=1, for i=1,2,…,m
∑ i = 1 m C i ⋅ x i j ≤ S j ⋅ y j , for j = 1 , 2 , … , n \sum_{i=1}^{m} C_i \cdot x_{ij} \leq S_j \cdot y_j, \text{ for } j = 1, 2, \ldots, n ∑i=1mCi⋅xij≤Sj⋅yj, for j=1,2,…,n
x i j ∈ { 0 , 1 } , for i = 1 , 2 , … , m , and j = 1 , 2 , … , n x_{ij} \in \{0, 1\}, \text{ for } i = 1, 2, \ldots, m, \text{ and } j = 1, 2, \ldots, n xij∈{0,1}, for i=1,2,…,m, and j=1,2,…,n
y j ∈ { 0 , 1 } , for j = 1 , 2 , … , n y_j \in \{0, 1\}, \text{ for } j = 1, 2, \ldots, n yj∈{0,1}, for j=1,2,…,n
其中:
这个线性规划模型描述了在使用尽可能少的箱子的条件下,将所有物品装载的问题。第一组约束确保每个物品只能被装载到一个箱子中,第二组约束确保每个箱子的容量不超过其所装载物品的总体积。最小化目标函数表示使用的箱子数目。
On a farm, there are two different crops: wheat and soybeans. Planting one acre of wheat requires 5 units of fertilizer and 2 units of water, while planting one acre of soybeans requires 3 units of fertilizer and 4 units of water. The farm has 30 units of fertilizer and 20 units of water available. Each acre of wheat can be sold for 150 dollars, and each acre of soybeans can be sold for 120 dollars. The farm owner wants to maximize the total income.
问题建模:
在一片农场上,有两种不同的庄稼:小麦和大豆。种植一英亩小麦需要 5 单位的化肥和 2 单位的水,而种植一英亩大豆需要 3 单位的化肥和 4 单位的水。农场有 30 单位的化肥和 20 单位的水可用。每英亩小麦售价 150 美元,每英亩大豆售价 120 美元。农场主希望最大化总收入。
线性规划建模:
目标函数:
Maximize z = 150 x + 120 y \text{Maximize } z = 150x + 120y Maximize z=150x+120y
约束条件:
5 x + 3 y ≤ 30 5x + 3y \leq 30 5x+3y≤30
2 x + 4 y ≤ 20 2x + 4y \leq 20 2x+4y≤20
x , y ≥ 0 x, y \geq 0 x,y≥0
其中:
这个线性规划模型描述了在限制了化肥和水的条件下,最大化农场总收入的问题。目标函数表示总收入,约束条件表示可用的化肥和水的限制。希望通过调整小麦和大豆的种植面积,使总收入最大。
The company manufactures three products, A1, A2, and A3, utilizing resources such as metal sheets, labor, and machinery. The quantities of various resources required to manufacture one unit of each product are provided in the table below. Without considering fixed costs, the unit profits for each product are 40,000 yuan, 50,000 yuan, and 60,000 yuan, respectively. Available resources include 500 tons of metal sheets, 300 workers per month, and 100 machines per month. In addition to production, fixed costs must be paid: 1 million yuan for A1, 1.5 million yuan for A2, and 2 million yuan for A3. Develop a production plan for the company to maximize profits.
问题建模:
公司生产三种产品,A1、A2 和 A3,利用金属板、劳动力和机械等资源。生产每种产品所需的各种资源数量如下表所示。在不考虑固定成本的情况下,每种产品的单位利润分别为 40,000 元、50,000 元和 60,000 元。可用资源包括 500 吨金属板、每月 300 名工人和每月 100 台机器。除了生产成本外,还必须支付固定成本:A1 为 100 万元,A2 为 150 万元,A3 为 200 万元。制定一项生产计划,以最大化利润。
线性规划建模:
目标函数:
min z = 40000 x + 50000 y + 60000 z − ( 1000000 x + 1500000 y + 2000000 z ) \text{min } z = 40000x + 50000y + 60000z - (1000000x + 1500000y + 2000000z) min z=40000x+50000y+60000z−(1000000x+1500000y+2000000z)
约束条件:
2 x + 3 y + z ≤ 500 2x + 3y + z \leq 500 2x+3y+z≤500
4 x + y + 2 z ≤ 300 4x + y + 2z \leq 300 4x+y+2z≤300
x , y , z ≥ 0 x, y, z \geq 0 x,y,z≥0
其中:
这个线性规划模型描述了在限制了金属板、劳动力和机械等资源的条件下,最大化公司总利润的问题。目标函数表示总利润,约束条件表示可用的资源的限制。希望通过调整生产计划,使总利润最大。
The company plans to open branches in four districts in the urban area, with a total of 10 locations to choose from. Taking into account the consumption levels and residential density of residents in each district, the following rules are established:
In District 1, at most two points can be selected from A1, A2, and A3;
In District 2, at least one point must be selected from A4 and A5;
In District 3, at least one point must be selected from A6 and A7;
In District 4, at least two points must be selected from A8, A9, and A10.
The investment and annual profit for each point Aj vary depending on the location, as shown in the table below. The total investment of the company should not exceed 7.2 million yuan. Which sales points should be selected to maximize the company’s annual profit?
问题建模:
公司计划在城市区域的四个区开设分支机构,共有 10 个地点可供选择。考虑到每个区域居民的消费水平和居住密度,制定了以下规则:
在第 1 区,最多可以从 A1、A2 和 A3 中选择两个点;
在第 2 区,必须至少选择 A4 和 A5 中的一个点;
在第 3 区,必须至少选择 A6 和 A7 中的一个点;
在第 4 区,必须至少选择 A8、A9 和 A10 中的两个点。
每个点 Aj 的投资和年利润因位置不同而异,如下表所示。公司的总投资不得超过 720 万元。为了最大化公司的年利润,应选择哪些销售点?
线性规划建模:
目标函数:
min z = ∑ i = 1 10 ( 年利润 i − 投资 i ) ⋅ x i \text{min } z = \sum_{i=1}^{10} (\text{年利润}_i - \text{投资}_i) \cdot x_i min z=∑i=110(年利润i−投资i)⋅xi
约束条件:
∑ i = 1 3 x i ≤ 2 \sum_{i=1}^{3} x_i \leq 2 ∑i=13xi≤2
x 4 + x 5 ≥ 1 x_4 + x_5 \geq 1 x4+x5≥1
x 6 + x 7 ≥ 1 x_6 + x_7 \geq 1 x6+x7≥1
$x_8 + x_9 + x_{10} \geq 2 $
∑ i = 1 10 投资 i ⋅ x i ≤ 720 \sum_{i=1}^{10} \text{投资}_i \cdot x_i \leq 720 ∑i=110投资i⋅xi≤720
x i ∈ { 0 , 1 } , for i = 1 , 2 , … , 10 x_i \in \{0, 1\}, \text{ for } i = 1, 2, \ldots, 10 xi∈{0,1}, for i=1,2,…,10
其中:
这个线性规划模型描述了在限制了投资和销售点选择规则的条件下,最大化公司的年利润的问题。目标函数表示总利润,约束条件表示可用的投资和选择规则的限制。希望通过调整销售点的选择,使总利润最大。