# Just In Time

See just-in-time compilation for the technique for improving the performance of interpreted programs in computing.

Just In Time (JIT) is an inventory strategy implemented to improve the return on investment of a business by reducing in-process inventory and its associated costs. The process is driven by a series of signals, or Kanban (Jp. カンバン also 看板), that tell production processes to make the next part. Kanban are usually simple visual signals, such as the presence or absence of a part on a shelf. JIT causes dramatic improvements in a manufacturing organization's return on investment, quality, and efficiency.

The technique of Just In Time Programming is used as a programming method that allows to (re-)write parts of a running system. As this shortens the Development Cycle it causes a tighter feedback between the program construction and its effects.

## History

The technique was first adopted and publicised by Toyota Motor Corporation of Japan as part of its Toyota Production System (TPS).

Japanese corporations cannot afford large amounts of land to warehouse finished products and parts. Before the 1950s, this was thought to be a disadvantage because it reduced the economic lot size. (An economic lot size is the number of identical products that should be produced, given the cost of changing the production process over to another product.) The undesirable result was poor return on investment for a factory.

The chief engineer at Toyota in the 1950s examined accounting assumptions and realized that another method was possible. The factory could be made more flexible, reducing the overhead costs of retooling and reducing the economic lot size to the available warehouse space.

Over a period of several years, Toyota engineers redesigned car models for commonality of tooling for such production processes as paint-spraying and welding. Toyota was one of the first to apply flexible robotic systems for these tasks. Some of the changes were as simple as standardizing the hole sizes used to hang parts on hooks. The number and types of fasteners were reduced in order to standardize assembly steps and tools. In some cases, identical subassemblies could be used in several models.

Toyota engineers then determined that the remaining critical bottleneck in the retooling process was the time required to change the stamping dies used for body parts. These were adjusted by hand, using crowbars and wrenches. It sometimes took as long as several days to install a large (multiton) die set and adjust it for acceptable quality. Further, these were usually installed one at a time by a team of experts, so that the line was down for several weeks.

Toyota implemented a program called Single Minute Exchange of Die (SMED). With very simple fixtures, measurements were substituted for adjustments. Almost immediately, die change times fell to about half an hour. At the same time, quality of the stampings became controlled by a written recipe, reducing the skill required for the change. Analysis showed that the remaining time was used to search for hand tools and move dies. Procedural changes (such as moving the new die in place with the line in operation) and dedicated tool-racks reduced the die-change times to as little as 40 seconds. Dies were changed in a ripple through the factory as a new product began flowing.

After SMED, economic lot sizes fell to as little as one vehicle in some Toyota plants.

Carrying the process into parts-storage made it possible to store as little as one part in each assembly station. When a part disappeared, that was used as a signal to produce or order a replacement.

## Effects

Some of the results were unexpected. A huge amount of cash appeared, apparently from nowhere, as in-process inventory was built out and sold. This by itself generated tremendous enthusiasm in upper management.

Another surprising effect was that the response time of the factory fell to about a day. This improved customer satisfaction by providing vehicles usually within a day or two of the minimum economic shipping delay.

Also, many vehicles began to be built to order, completely eliminating any risk that they would not be sold. This dramatically improved the company's return on equity by eliminating a major source of risk.

Since assemblers no longer had a choice of which part to use, every part had to fit perfectly. The result was a severe quality assurance crisis, and a dramatic improvement in product quality. Eventually, Toyota redesigned every part of its vehicles to eliminate or widen tolerances, while simultaneously implementing careful statistical controls. (See Total Quality Management). Toyota had to test and train suppliers of parts in order to assure quality and delivery. In some cases, the company eliminated multiple suppliers.

When a process problem or bad parts surfaced on the production line, the entire production line had to be slowed or even stopped. No inventory meant that a line could not operate from in-process inventory while a production problem was fixed. Many people in Toyota confidently predicted that the initiative would be abandoned for this reason. In the first week, line stops occurred almost hourly. But by the end of the first month, the rate had fallen to a few line stops per day. After six months, line stops had so little economic effect that Toyota installed an overhead pull-line, similar to a bus bell-pull, that permitted any worker on the production line to order a line stop for a process or quality problem. Even with this, line stops fell to a few per week.

The result was a factory that became the envy of the industrialized world, and has since been widely emulated.

The Just in Time philosophy was also applied other segments of the supply chain in several types of industries. In the commercial sector, it meant eliminating one or all of the warehouses in the link between a factory and a retail establishment.

## Problems

Just in Time production allows companies to reduce both inventory and the entire production chain. It encourages the removal of all surplus, including surplus factories. Under normal business conditions this is not a problem. However, if there is any disruption at any given point in the supply chain, then all production grinds to a halt.

Evidence of the problem with Just in Time production became clear in the wake of Hurricane Katrina and Hurricane Rita, both of which hit the US Gulf coast in 2005. At that time, no new oil refineries had been built in the US since 1976. During that time period, companies actually shut down several refineries to reduce capacity. The old refineries still operating ran at full capacity, so no new refineries were needed according to Just in Time theory since they would only produce surplus gasoline. However, most of these refineries were clustered around the Gulf coast. When the Katrina hit, 15 oil refineries in Mississippi and Louisiana representing 20% of US refining capacity was shut down. Rita damaged another 16 refineries in Texas, accounting for 2.3 million barrels per day of capacity shut down.

The lack of surplus in oil refining caused a shock to the United States. Gasoline prices surged. Had companies not shut down refineries in order to reduce capacity according to Just in Time theory, particularly refineries on the west coast, then it is likely that gasoline prices would have remained stable.

## Theory

Consider a (highly) simplified mathematical model of the ordering process.

Let:

${\displaystyle K={\mbox{the incremental cost of placing an order}}}$

${\displaystyle kc={\mbox{the annual cost of carrying one unit of inventory}}}$

${\displaystyle D={\mbox{annual demand in units}}}$

${\displaystyle Q={\mbox{optimal order size in units}}}$

${\displaystyle TC={\mbox{total cost over the year}}}$

We want to know ${\displaystyle Q}$.

We assume that demand is constant and that the company runs down the stock to zero and then places an order, which arrives instantly. Hence the average stock held (the average of zero and ${\displaystyle Q}$, assuming constant usage) is ${\displaystyle Q/2}$. Also, the annual number of orders placed is ${\displaystyle D/Q}$.

${\displaystyle TC}$ consists of two components. The first is the cost of carrying inventory, which is given by ${\displaystyle Q*kc/2}$, i.e. the average inventory times the carrying cost per unit. The second cost is the cost of placing orders, given by ${\displaystyle D*K/Q}$, the annual number of orders, ${\displaystyle D/Q}$. times the cost per order, ${\displaystyle K}$.

Thus total annual cost is

${\displaystyle TC={\frac {Q\times kc}{2}}+{\frac {D\times K}{Q}}}$.

We differentiate ${\displaystyle TC}$ with respect to ${\displaystyle Q}$ and set it equal to 0 to find the ${\displaystyle Q}$ for minimum total cost, giving

${\displaystyle {\frac {d(TC)}{dQ}}={\frac {kc}{2}}-{\frac {K\times D}{Q^{2}}}=0}$

${\displaystyle Q^{2}={\frac {2\times K\times D}{kc}}}$

${\displaystyle Q={\sqrt {\frac {2\times K\times D}{kc}}}}$

which is known as the Economic Order Quantity or EOQ formula.

The key Japanese breakthrough was to reduce ${\displaystyle K}$ to a very low level and to resupply frequently instead of holding excess stocks. In practice JIT works well for many businesses, but it is not appropriate if ${\displaystyle K}$ is not small. The theory above can be fairly easily adapted to take into account realistic features such as delays in delivery times and fluctuations in demand. Both of these are usually modelled by normal distributions. The delay in delivery, in particular, means that additional 'safety stocks' need to be held if a stockout is to be rendered very unlikely.