# INVENTRY.MOD

### From Support

*See also: How to read .MOD pages*

## Contents |

# Description

INVENTRY.MOD demonstrates the use of the SET function. In INVENTRY.MOD, an inventory replenishment process is simulated: several replenishment cycles are replicated; a self-canceling edge with an edge condition of SET{} is all it takes to shut off the previous cycle. When this edge executes, all variables are reset, including CLK being reset to zero, and the random number seed is set to the value of "X" from SET{X}.

See FACTORAL.MOD for another example of using the SET function.

# State Variables

Variable Name | Variable Description | Size | Type |
---|---|---|---|

Q | Optimal order quantity for each cycle | 1 | Integer |

R | Optimal reorder point for each cycle | 1 | Integer |

H_COST | Cumulative holding costs to meet cycle demand | 1 | Real |

T | The count of demand arrivals | 1 | Integer |

H | Unit-time holding cost | 1 | Real |

K | Fixed ordering cost | 1 | Real |

D | Poisson demand rate | 1 | Real |

L | Expected lead time (Normal) | 1 | Real |

N | Times that demands arrive during cycle | 256 | Real |

NT | Lead time when order should have been placed | 1 | Real |

CYCLE | Time duration of inventory cycle | 1,1 | Real |

# Vertices

Vertex Name | Vertex Description | State Changes |
---|---|---|

RUN | The simulation is started | None |

SALE | Sales of an item from inventory | H_COST=H_COST+H*CLK, N[T]=CLK |

ORDER | Approximate equal-cost order quantity | Q=T-1, CYCLE=N[Q], L=NOR{L;.1*L} |

REORD | Optimal reorder point computation | NT=(CYCLE-N[Q-T]) |

STOP | End of the replenishment cycle | R=T |

ERROR | Occurrence of a lead-time greater than cycle | None |

# Initialization Conditions

Variable | Description |
---|---|

H | Unit-time holding cost |

K | Fixed ordering cost |

D | Poisson demand rate |

L | Expected lead time (Normal) |

# Event Relationship Graph

# English Translation

An English translation is a verbal description of a model, automatically generated by SIGMA.

The SIGMA Model, INVENTRY.MOD, is a discrete event simulation. It models RETROSPECTIVE OPTIMAL INVENTORY CYCLE MANAGEMENT.

I. STATE VARIABLE DEFINITIONS.

For this simulation, the following state variables are defined:

H: UNIT-TIME HOLDING COST (real valued) K: FIXED ORDERING COST (real valued) D: POISSON DEMAND RATE (real valued) L: EXPECTED LEAD TIME (NORMAL) (real valued) Q: OPTIMAL ORDER QUANTITY FOR EACH CYCLE (integer valued) R: OPTIMAL REORDER POINT FOR EACH CYCLE (integer valued) N[256]: TIMES THAT DEMANDS ARRIVE DURING CYCLE (real valued) H_COST: CUMULATIVE HOLDING COSTS TO MEET CYCLE DEMAND (real valued) T: THE COUNT OF DEMAND ARRIVALS (integer valued) NT: LEAD TIME WHEN ORDER SHOULD HAVE BEEN PLACED (real valued) CYCLE: TIME DURATION OF INVENTORY CYCLE (real valued)

II. EVENT DEFINITIONS.

Simulation state changes are represented by event vertices (nodes or balls) in a SIGMA graph. Event vertex parameters, if any, are given in parentheses. Logical and dynamic relationships between pairs of events are represented in a SIGMA graph by edges (arrows) between event vertices. Unless otherwise stated, vertex execution priorities, to break time ties, are equal to 5.

1. The RUN(H,K,D,L) event occurs when START OF THE RUN. Initial values for, H,K,D,L, are needed for each run. After every occurrence of the RUN event: Unconditionally, SCHEDULE THE FIRST DEMAND; that is, schedule the SALE(T) event to occur in (1/D)*ERL{1} time units... using the parameter value(s) of 1.

2. The SALE(T) event occurs when SALES OF AN ITEM FROM INVENTORY. This event causes the following state change(s): H_COST=H_COST+H*CLK N[T]=CLK After every occurrence of the SALE event: If H_COST<K, then SCHEDULE THE NEXT DEMAND; that is, schedule the SALE(T) event to occur in (1/D)*ERL{1} time units... using the parameter value(s) of T+1. If H_COST>=K, then THE BREAK-EVEN POINT HAS BEEN REACHED; that is, schedule the ORDER() event to occur without delay. (Time ties are broken by an execution priority of 4.)

3. The ORDER() event occurs when APPROXIMATE EQUAL-COST ORDER QUANTITY. This event causes the following state change(s): Q=T-1 CYCLE=N[Q] L=NOR{L;.1*L} After every occurrence of the ORDER event: Unconditionally, USE THE LEAD TIME TO FIND THE REORDER POINT; that is, schedule the REORD(T) event to occur without delay... using the parameter value(s) of 1.

4. The REORD(T) event occurs when OPTIMAL REORDER POINT COMPUTATION. This event causes the following state change(s): NT=(CYCLE-N[Q-T]) After every occurrence of the REORD event: If (T<Q) and (NT<=L), then ITERATE THROUGH THE CUMULATIVE DEMAND TO FIND R; that is, schedule the REORD(T) event to occur without delay... using the parameter value(s) of T+1. If (NT>L) and (T<Q), then THE REORDER POINT IS FOUND, STOP THE CYCLE; that is, schedule the STOP() event to occur without delay. (Time ties are broken by an execution priority of 4.) If T>=Q, then schedule the ERROR() event to occur without delay.

5. The STOP() event occurs when END OF THE REPLENISHMENT CYCLE. This event causes the following state change(s): R=T After every occurrence of the STOP event: Unconditionally, INITIALIZE AND START RUNNING THE NEXT CYCLE; that is, schedule the RUN(H,K,D,L) event to occur without delay... using the parameter value(s) of 2,30,10,.5. (Time ties are broken by an execution priority of 2.) If SET{RND*32000}, then THIS CYCLE IS DONE, DO NOT STOP AGAIN!; that is, immediately cancel the next scheduled occurrence of the STOP event.

6. The ERROR() event occurs when OCCURRENCE OF A LEAD-TIME GREATER THAN CYCLE. No additional events are scheduled here.