This article is aboutFactory production planProblem introduction, mathematical models, solution results and application demonstrations, etc.

1. Introduction to the problem
In production planning problems, decisions and allocations need to be made on the type, quantity, and production capacity of products to be produced, so as to achieve maximum profits under limited production capacity. In order to help manufacturing companies make better decisions on the above issues, the following production scenarios are taken as examples to provide scenario-based solutions and solutions to Jiuzhang Intelligent's factory production planning problems.
Assume that the factory produces 7 products (PROD 1 to PROD 7), with a total of 4 grinders (GR), 2 vertical drills (VD), 3 horizontal drills (HD), 1 borer (BR) and 1 planer (PL). The unit profit of each product (defined as the unit sales price minus the cost of raw materials) and the production machines and unit production time (hours) required for each process are as follows.
Table 1 Unit profit of each product and unit processing time required for each process

During this month (January) and the following five months, some machines will be shut down for maintenance. The maintenance schedule and quantity schedule for these machines is as follows:
Table 2 Machine maintenance schedule

Due to market demand constraints, each product has a limited maximum sellable quantity per month. As shown in the following table:
Table 3 Maximum sales quantity limit of each product per month

In addition, constraints such as finished product inventory capacity limitations and work calendars need to be considered:
Inventory capacity limit:Maximum storage of 100 units per product per month. The plan is to have no inventory at the beginning of the period, but hope to have 50 units of each product in stock at the end of June. And if the products are stored in the warehouse, each product will have a unit inventory holding cost of 0.5 yuan deducted from the unit sales profit every month.
Work calendar:The factory works six days a week, so it can be assumed that there are only 24 working days per month, with two 8-hour shifts per working day.
Assume that there is no need to consider any sorting issues for the time being. To maximize total profits, when should the factory produce what product in what quantities?
2. Establishment of mathematical model
According to the introduction of the above problem, the following symbol definitions are made:
Table 4 Symbols and meanings of mathematical models

[Constraints]
(1) Production capacity constraints:
Equipment production capacity within the factory varies from month to month due to equipment maintenance and work calendar constraints. The remaining production capacity of each equipment per month can be calculated by the formulaabilitymj=(nm-nj)*24*8*2 obtained. Combined with the equipment processing time required for each product, the following constraints can be obtained:

(2) Inventory constraints:
The monthly inventory quantity is related to last month's inventory carryover, this month's sales quantity, and production quantity. The recursive relationship between each month's inventory quantity is based onHij-1+Mij=Sij+HijDecision, and the inventory at the beginning of the first month is 0, and the inventory at the end of the sixth month is 50, that is, there are certain requirements for the storage quantity of each product at the beginning and end of the production planning cycle, then for∀i∈I, all have the following constraints:

(3) Other variable constraints:
All variables should not be less than 0, andMij≤sold_maxij,Sij≤sold_maxij,
Maximum storage of 100 units per product per month, i.e.Hij≤100
【Objective function】
Assume that all the products we produce can be sold, that is, the total sales quantity = the total production quantity. Our solution goal is to maximize the total profit, which can be obtained by summing up the monthly unit product sales profit * production quantity, adding up the total profit for 6 months, and then subtracting the total inventory holding cost, that is:

3. Problem Solving and Application Demonstration
The above problem involves a total of 126 variables and 72 constraints. In addition, each month, 7 products have market sales limits and holding quantity limits. This gives a total of 84 upper bounds. We solve the original problem and can find the production planning time, quantity, corresponding inventory, and finally maximized total profit for each product in a few seconds. As shown below:

Figure 1 The quantity of each product that should be produced per month

Figure 2 The inventory amount should be set for each product every month

Figure 3 Expected profit from executing this production plan
The following is the web version of the solver we developed, which can import other data for one-click solving:

Machine-translated from the Chinese original 工厂生产计划 Factory Product Planning (published 2024-09-23). WeChat original ↗