© 2022 (CC BY) Gerd Wagner, Brandenburg University of Technology, Germany.
A lemonade seller makes lemonade in pitchers and sells it in paper cups at a stand in a street. Each day consists of the following process steps and phases:
A lemonade stand can be modeled in a generic way as an instance of a single product manufacturing company that uses an input inventory and transforms input items into an output item (the product). We make a series of three increasingly complex models of lemonade stands:
The Lemonade Stand Game was developed in 1973 by Bob Jamison for mainframe computers and was later ported to the Apple II platform in 1979 and distributed by Apple throughout the 1980s. Play the Apple II Lemonade Stand Game in an Apple II emulator.
It is assumed that the day starts at 8 am with demand forecasting, production planning and ordering the required materials. All ordered materials are delivered at 10 am. The planned quantity of lemonade is produced at 11 am. Abstracting away from individual purchase events, customer demand is aggregated in a daily demand event at 5 pm. Finally, the business day ends at 6 pm with dumping the remaining lemonade and ice cubes.
Following the Object Event Modeling and Simulation (OEM&S) paradigm, we first model the system's object types (defining its state structure) together with its event types in an information model, and then the system's dynamics in the form of event rules in a process model.
The Lemonade-Stand-1 model allows simulation-based active learning of the following topics:
A Bill of Materials (BoM) defines the composition of a product in the form of a list of component items, each with a quantity, as required for assembling a production unit. In general, a component item may also have a BoM, i.e. be composed of other items, such that a nested composition tree is obatined.
In the case of a lemonade stand with lemonade as a product, the production unit may be a 3.5 ltr pitcher of lemonade, so we may have the following BoM:
{"Lemon": 3, "Water": 2.5, "IceCubes": 20, "Sugar": 0.3}
The demand of a new day can be forecasted on the basis of the previously recorded daily demand data, which forms a time series. The two most common forecasting methods for time series are the Simple Moving Average and the Exponentially Weighted Moving Average methods. In the LemonadeStand-1 model, the Simple Moving Average method is used.
The production quantity (in number of batches) is planned according to the demand forecast, but under the constraints of using the available input items in stock and the budget available for purchasing additional input items.
The basic version of the LSG model contains the following object types:
and the following event types:
Notice that the bill of materials (BoM) for a product batch is modeled by the the collection-valued property bomItems
where each BoM item is of type BomItem
, associating a quantity with an input item type. The collection values of the
property bomItems
can be implemented in the form of maps where input item type names (such as "Lemon") are the keys and quantities are their values:
{"Lemon": 3, "Water": 2.5, "IceCubes": 50, "Sugar": 0.3}
A DPMN process design model can be decomposed into a set of event rule design models, one for each type of event specified in the design model.
T.B.D.
The JavaScript-based simulator OESjs implements the Object Event Simulation paradigm, and, consequently, allows a straight-forward coding of OEM class models and DPMN process models. You can inspect the model's OESjs code on the OES GitHub repo.
For implementing the information design model, we have to code all object types, event types and activity types specified in the model in the form of classes.
A DPMN process design model can be decomposed into a set of event rule design models, one for each type of event specified in the design model.