# Economic lot scheduling problem

The economic lot scheduling problem (ELSP) is a problem in operations management and inventory theory that has been studied by many researchers for more than 50 years. The term was first used in 1958 by professor Jack D. Rogers of Berkeley, who extended the economic order quantity model to the case where there are several products to be produced on the same machine, so that one must decide both the lot size for each product and when each lot should be produced. The method illustrated by Jack D. Rogers draws on a 1956 paper from Welch, W. Evert. The ELSP is a mathematical model of a common issue for almost any company or industry: planning what to manufacture, when to manufacture and how much to manufacture.

## Model formulation

The classic ELSP is concerned with scheduling the production of several products on a single machine in order to minimize the total costs incurred (which include setup costs and inventory holding costs).
We assume a known, non-varying demand $d_{j},j=1,\cdots ,m$ for the m products (for example, there might be m=3 products and customers require 7 items a day of Product 1, 5 items a day of Product 2 and 2 items a day of Product 3). Customer demand is met from inventory and the inventory is replenished by our production facility.
A single machine is available which can make all the products, but not in a perfectly interchangeable way. Instead the machine needs to be set up to produce one product, incurring a setup cost and/or setup time, after which it will produce this product at a known rate $P_{j}$. When it is desired to produce a different product, the machine is stopped and another costly setup is required to begin producing the next product. Let $S_{ij}$ be the setup cost when switching from product i to product j and inventory cost $h_{j}$ is charged based on average inventory level of each item. N is the number of runs made, U the use rate, L the lot size and T the planning period.
To give a very concrete example, the machine might be a bottling machine and the products could be cases of bottled apple juice, orange juice and milk. The setup corresponds to the process of stopping the machine, cleaning it out and loading the tank of the machine with the desired fluid. This product switching must not be done too often or the setup costs will be large, but equally too long a production run of apple juice would be undesirable because it would lead to a large inventory investment and carrying cost for unsold cases of apple juice and perhaps stock-outs in orange juice and milk. The ELSP seeks the optimal trade off between these two extremes.

## Rogers algorithm

1.Define:
    $\theta =T/N=L/U$ = use period
    c$_L$=${\frac {hL(P-U)}{2PU}}+{\frac {S}{L}}$, the unit cost for a lot of size L
    $C_{N}=NLc_{L}=UT\left[{\frac {hL\left(P-U\right)}{2PU}}+{\frac {S}{L}}\right]$ the total cost for N lots. To obtain the optimum:
    ${\frac {d(C_{N})}{dL}}={\frac {hT\left(P-U\right)}{2P}}-{\frac {SUT}{L^{2}}}=0$
    Which yields $L_{0}={\sqrt {\frac {2USP}{h(P-U)}}}$ as the optimum lot size. Now let:
    $C_{N_{L\pm a}}=UT\left[{\frac {h\left(L\pm a\right)\left(P-U\right)}{2PU}}+{\frac {S}{L\pm a}}\right]$ be the total cost for N$_{L±a}$lots of size L±a
    $+\Delta =C_{N_{L+a}}-C_{N}=UT\left[{\frac {ha\left(P-U\right)}{2PU}}-{\frac {S}{{\frac {L^{2}}{a}}+L}}\right]$ be the incremental cost of changing from size L to L+a
    $-\Delta =C_{N_{L-a}}-C_{N}=UT\left[-{\frac {ha\left(P-U\right)}{2PU}}+{\frac {S}{{\frac {L^{2}}{a}}-L}}\right]$ be the incremental cost of changing from size L to L-a
2.
    Total quantity of an item required = UT
    Total production time for an item = UT/P
    Check that productive capacity is satisfied:
    $\sum _{i=1}^{m}{\frac {U_{i}T}{P_{i}}}\leq T$
    $\sum _{i=1}^{m}{\frac {U_{i}}{P_{i}}}\leq 1$
3.Compute:
    $\theta _{0}={\frac {L_{0}}{U}}$ as a whole number
    If for a certain item, θ$_0$ is not an even number, calculate:
    $L=U\left(\theta _{0}+1\right)$
    $L=U\left(\theta _{0}-1\right)$
    And change L$_0$ to L in the direction which incurs the least cost increase between +Δ and -Δ
4.Compute t$_p$=L/P for each item and list items in order of increasing θ=L/U
5.For each pair of items ij check:
    $\theta _{i}-t_{p_{i}}\geq t_{p_{j}}$
    $\theta _{j}-t_{p_{j}}\geq t_{p_{i}}$
    To forms pairs take the ith with the i+1th, i+2th, etc. If any of these inequalities is violated, calculate +Δ and -Δ for lot size increments of 2U and in order of size of cost change make step-by-step lot size changes. Repeat this step until both inequalities are satisfied.
6.$e_{ij}=d-t_{p_{i}}\leq \theta _{i}-t_{p_{i}}-t_{p_{j}}$
   * Form all possible pairs as in Step 5
   * For each pair, select θ$_i$ < θ$_j$
   * Determine whether t$_{pi}$ > t$_{pj}$, t$_{pi}$ < t$_{pj}$ or t$_{pi}$ = t$_{pj}$
   * Select a value for e$_{ij}$(e$_{ij}$=0,1,2,3,...,θ$_i$ - t$_{pi}$ - t$_{pj}$) and calculate t$_{pi}$+e and t$_{pj}$+e
   * Calculate M$_i$θ$_i$-M$_j$θ$_j$ by setting M$_i$=k and M$_j$=1,2,3,...,T/θ$_j$; ∀k∈(1,2,...,T/θ$_i$). Then check if one of the following boundary conditions is satisfied:
          for $t_{p_{i}}>t_{p_{j}}$ or $t_{p_{i}}<t_{p_{j}}$${\begin{cases}t_{p_{i}}+e\geq M_{i}\theta _{i}-M_{j}\theta _{j}>e\\t_{p_{i}}+e>M_{i}\theta _{i}-M_{j}\theta _{j}\geq t_{p_{i}}+e\\t_{p_{j}}+e\geq M_{i}\theta _{i}-M_{j}\theta _{j}>t_{p_{i}}+e\\t_{p_{i}}+t_{p_{j}}+e>M_{i}\theta _{i}-M_{j}\theta _{j}\geq t_{p_{j}}+e\end{cases}}$
          for $t_{p_{i}}=t_{p_{j}}$ ${\begin{cases}t_{p_{i}}+e>M_{i}\theta _{i}-M_{j}\theta _{j}>e\\t_{p_{i}}+t_{p_{j}}+e>M_{i}\theta _{i}-M_{j}\theta _{j}>t_{p_{j}}+e\\t_{p_{i}}+e=M_{i}\theta _{i}-M_{j}\theta _{j}=t_{p_{j}}+e\end{cases}}$
          If none of the boundary conditions is satisfied then e$_{ij}$ is non-interfering: if i=1 in e$_{ij}$, pick the next larger e in sub-step 4, if i≠1 go back to sub-step 2. If some boundary condition is satisfied go to sub-step 4. If, for any pair, no non-interfering e appears, go back to Step 5.
7.Enter items in schedule and check it's feasibility

## Stochastic ELSP

Of great importance in practice is to design, plan and operate shared capacity across multiple products with changeover times and costs in an uncertain demand environment. Beyond the selection of (expected) cycle times, with some amount of slack designed in ("safety time"), one has to also consider the amount of safety stock (buffer stock) that is needed to meet desired service level.

## Problem status

The problem is well known in the operations research community, and a large body of academic research work has been created to improve the model and to create new variations that solve specific issues.
The model is known as a NP-hard problem since it is not currently possible to find the optimal solution without checking nearly every possibility. What has been done follows two approaches: restricting the solution to be of a specific type (which makes it possible to find the optimal solution for the narrower problem), or approximate solution of the full problem using heuristics or genetic algorithms.