Ordering Policies
deepbullwhip.policy.base.OrderingPolicy
Bases: ABC
Abstract ordering policy for a single echelon.
Source code in deepbullwhip/policy/base.py
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | |
compute_order(inventory_position, forecast_mean, forecast_std)
abstractmethod
Compute the non-negative order quantity for this period.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
inventory_position
|
float
|
On-hand inventory + pipeline - backorders. |
required |
forecast_mean
|
float
|
Point forecast of next-period demand. |
required |
forecast_std
|
float
|
Standard deviation of forecast error. |
required |
Returns:
| Type | Description |
|---|---|
float
|
Non-negative order quantity. |
Source code in deepbullwhip/policy/base.py
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | |
deepbullwhip.policy.order_up_to.OrderUpToPolicy
Bases: OrderingPolicy
Order-Up-To (OUT / base-stock) policy.
S = (L+1) * forecast_mean + z_alpha * forecast_std * sqrt(L+1) order = max(0, S - IP)
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
lead_time
|
int
|
Replenishment lead time in periods. |
required |
service_level
|
float
|
Target service level (e.g. 0.95). Used to set z_alpha. |
0.95
|
Source code in deepbullwhip/policy/order_up_to.py
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | |