Recipes: How do I...?¶
Each recipe answers one modelling question with a tiny model, the output it prints and a short explanation. The questions come first from the distributions, functions and blocks that no bundled model uses yet. Pick the question that is closest to yours, and copy the script as a start.
Service and repair times¶
Which family to use for a service, repair or cycle time, and why.
- How do I model handling times with an occasional very long one?
- How do I model a job made of several short steps?
- How do I model repair times with a long tail?
- How do I model an approval or reaction time that is never negative?
- How do I keep a skewed time between a minimum and a maximum?
- How do I use a histogram from a time study as a service time?
- How do I model a time that is a fixed part plus a random part?
- How do I stop a cycle time from going negative?
- How do I model a correction time that grows with a positioning error?
- What happens to a queue when service times have wild outliers?
Failures and arrivals¶
Machine lifetimes and arrivals that follow a plan.
Counts and chance¶
Whole-number counts: lines, defects, retests, samples and order sizes.
- How do I model the number of lines on an order?
- How do I count the defects in a batch?
- How do I model retesting until a part passes?
- How do I model inspecting a sample from a finite lot?
- How do I draw order sizes from my own data?
Delays, smoothing and forecasts¶
System-dynamics functions that delay, smooth and extrapolate a signal.
- How do I add a first-order information delay to a forecast?
- How do I delay goods in transit by a fixed time or a spread of times?
- How do I smooth a noisy signal?
- How do I extrapolate a growing trend?
- How do I total a subscripted value and remember a past one?
Rates, tests and money¶
Cycles, test inputs, discounting, safe division and trigonometry in rates.
- How do I add a daily or weekly cycle to a rate?
- How do I test a model with a step, a ramp and a pulse?
- How do I discount a stream of cash?
- How do I stop a ratio dividing by zero?
- How do I turn a heading and a distance into x and y?
- How do I work out an angle, a length or a count in an expression?
Agents¶
Reading the agents around an agent, in continuous space and on a grid.
- How do I let an agent react to the agents near it?
- How do I let an agent read the agents in the cells around it?
- How do I let an agent read the agents it is linked to?
Flow blocks¶
Blocks that shape a flow: buffers, belts, copies, pairs, pallets, custom rules and chargers.
- How do I limit the work waiting between two machines?
- How do I move parts along a belt?
- How do I turn one order into several jobs?
- How do I make two kinds of entity wait for each other?
- How do I pack parts on a pallet and unpack them later?
- How do I route entities by a rule I write in Python?
- How do I share a site's power limit between chargers?
Longer walk-throughs are on the learning path, and every element has a page under the reference.