欢迎 odoo 实施交流!

分享和讨论最佳内容和新营销理念,打造专业形象,共同成为更好的odoo 实施人员。

注册

只限註冊用戶才可與社群互動。
此問題已被標幟
1 回覆
1083 瀏覽次數


Step 1: Initial Demand Quantity

[ \text{Initial demand} = \max(\text{Forecast demand}, \text{Minimum quantity}) ]

Since the inventory is 0, we need to at least reach the minimum quantity of 10, unless the forecasted demand is higher.

Step 2: Adjust to the maximum quantity

[ \text{Adjusted demand quantity} = \min(\text{Preliminary demand quantity}, \text{Maximum quantity}) ]

The goal is to reach a maximum quantity of 100, so this step is essentially setting the demand to 100, as we are trying to directly achieve the maximum inventory level.

Step 3: Adjust to Multiple

Now, we need to ensure the adjusted quantity is a multiple of 3. The maximum quantity 100 is not a multiple of 3, so we need to find the closest multiple of 3 that does not exceed 100.

[ \text{Final order quantity} = \lfloor\frac{\text{Maximum quantity}}{\text{Multiple}}\rfloor \times \text{Multiple} ]

But here is a trap: the above formula might give 99 (33*3), but what we want is the nearest multiple of 3 that does not exceed the maximum number, and since our goal is to reach the maximum number, we should round up to the nearest multiple of 3.

[ \text{Final order quantity} = \lceil\frac{\text{Maximum quantity}}{\text{Multiple}}\rceil \times \text{Multiple} ]

However, since 100 is not a multiple of 3, we cannot directly use 100. The closest multiple of 3 that does not exceed 100 is 99, but to reach or approach the maximum quantity, we should look for the next multiple of 3 that does not exceed the maximum quantity, which is 102.

Therefore, the final order quantity is 102, which is the first multiple of 3 that is closest to and exceeds 100.

The summary formula is as follows:

[ \text{Final order quantity} = \min(\lceil\frac{\text{Maximum quantity}}{\text{Multiple}}\rceil \times \text{Multiple}, \text{Maximum quantity}) ]

But please note that since the maximum quantity of 100 is not a multiple of 3, we will actually set the order quantity to 102 to meet the multiple requirement while staying as close to the maximum quantity as possible. If the maximum quantity is divisible by 3, then the final order quantity will directly equal the maximum quantity.


頭像
捨棄
作者

Remaining quantity = Original order quantity % Multiple

Final order quantity = Original order quantity + Multiple - Remaining quantity

qty_to_order = max(orderpoint.product_min_qty, orderpoint.product_max_qty) - qty_forecast_with_visibility

頭像
捨棄