Restaurant Simulation
A discrete-event model of a small restaurant at its busiest, built in Rockwell Arena to answer one question: what change makes the night more profitable without driving customers away? The model now runs in this page.
A night in 3D
The team's model, run by my JavaScript port, playing out in a paper diorama of the restaurant. Switching scenario keeps the same customers at the same moment, and clicking a party, a table or one of the staff follows it. The numbers and your own set-ups are in the top-down demo further down.

5:00 PM
Baseline
The restaurant as the case describes it: eight tables, two cooks, two waiters and about 42 groups a night.
Key
A diner's shirt color shows where the party is in its visit
- in line at the door
- being seated, ordering
- waiting for food
- eating
- waiting to pay, paying
- out by the exit
- left without eating (red tag: their bill)
- waiter (tray: bringing food)
- cook
- faded: off shift
White slips over the pass: orders waiting for a cook. Plates on the pass: food waiting for a waiter.
Drag to turn the view, scroll to zoom. Click a party, a table or one of the staff to follow it.Drag to turn the view, pinch to zoom. Tap a party, a table or one of the staff to follow it.
About this model: the team's model decides everything; the room is drawn for this page
The model decides everything that happens: arrivals, party sizes, walk-aways, the tables each party gets, every staff task and its duration, and who is on shift. The case gives no floor plan, so the room, the furniture and the paper people (their looks made up) are drawn for this page, and walking is animation timed by the model, not by the distances drawn. A test script compared the view with the model at 2,440 moments across 40 nights in all four scenarios, and through eight nights played live: nothing differed, and each played night ended with the same profit as the same night run directly. A red tag is the bill the model drew for that party when it arrived; whether they would have waited longer is not in the model.
The case
The SIE 431 term project is a case about Mi Cazuela, a busy Mexican restaurant in Tucson whose diners have started to complain about the wait, and some leave before they are seated. Each team models the restaurant, measures its profit and waiting times, then tests changes.
At a glance
- Course
- SIE 431, University of Arizona, Spring 2022
- Team
- Four, with me as lead programmer
- Built in
- Rockwell Arena
- Parts
- A (baseline), C (handhelds) and E (rush shifts)
- Ported
- To JavaScript in 2026
My team of four built the model in Rockwell Arena, a commercial simulation package. I was the lead programmer and did most of the Arena work. Of the case's lettered parts we did the baseline (Part A), handheld order entry (Part C) and the improvement each team proposes for itself (Part E). Ours was to staff the kitchen and the floor to the evening rush instead of keeping two cooks and two waiters on all night.
How the model works
Groups of one to four arrive at an hourly rate that follows the case's evening pattern: 5, 8, 11, 11, 5 and 2 groups an hour from 5 to 11 PM, about 42 a night. Ones and twos wait for a two-top (a table for two); threes and fours wait for a four-top, or for two free two-tops pushed together. Each of the two lines holds two groups, and a group that finds its line full walks away.
The numbers
| Groups a night | about 425 to 11 PM |
|---|---|
| Bill per diner | $10–$16 |
| Cook | $100a night |
| Waiter | $60a night |
| Overhead | $300a night |
| Handheld rent, Part C | $12per waiter, a night |
A waiter seats the group, takes the order and carries it to the kitchen. A cook makes each meal in turn and brings the plates out, a waiter delivers them, the group eats, and a waiter clears the table and takes payment. Each step's duration is drawn from a normal distribution given in the case. Each diner pays between $10 and $16, and the night costs $100 per cook, $60 per waiter, $300 of overhead and $1 of food per diner. In Part C each waiter's handheld rents for $12 a night.
Two parts took the most work. Seating a large group needs a free waiter as well as a table, which Arena expresses as a condition on the waiting line rather than a simple queue. And because each diner's bill is drawn separately, the model loops over a group's members at payment to add up its takings. Below, the team's Arena screens are redrawn from the model file and run live by the port; the 2022 recordings are one click away.
Redrawn from the team's compiled Arena model and run by the port's baseline. Blue numbers are Arena's counters; gray pills are parties waiting or inside a step, labeled with their size. On a narrow screen, scroll sideways.
What we found in 2022
Each replication is one night, from 5 PM until 3 AM so the last groups can finish. The baseline ran for 5,000 replications and the alternatives for 100. These are the team's Arena results.
| scenario | net profit / night | time in restaurant | of which waiting |
|---|---|---|---|
| Baseline | $489.73 ± 13.16 | 45.1 min | 13.3 min |
| C · handhelds | $485.79 ± 26.61 | 44.3 min | 14.7 min |
| E · rush shifts | $610.68 ± 20.72 | 56.9 min | 26.4 min |
Handhelds did not pay. They cut the waiters' busy time from 37% to 27%, but the orders only reached the cooks sooner and queued there: the kitchen, not the floor, was the bottleneck. Rush shifts looked like the winner, about $120 a night more, but at twice the wait, and 6.6 groups a night walked away.
Porting it to the browser (2026)
Arena files only open in Arena, so in 2026 I ported the model to JavaScript from the compiled model file, block by block, and checked it against the team's output. Over 50,000 simulated nights it matches the final runs of all three scenarios within their confidence intervals: profit, costs, staff utilization, time in the restaurant, waiting time and walk-aways.
That includes a quirk in the Arena model. When a small and a large group are released for seating at the same instant, the small group can take the two-top the large group was counting on, and the large group is dropped. It happens about 0.6 times a night, and the port keeps it so its numbers match.
The top-down view adds what the 3D view leaves out: the night's numbers, its profit as it happens, what the walk-aways cost, and sliders for your own set-up.
One night
The two lines at the door hold two groups each. A group that finds its line full walks away.
A thousand nights
Nights 1 to 1,000 of the set-up chosen here or in the demo above, against the same nights in the baseline room with two cooks and two waiters and the same number of groups. The same groups arrive at the same moments and order the same food, so the difference column is a paired comparison.
This set-up: Baseline
| per night | baseline | this set-up | difference |
|---|
Mean ± 95% confidence half-width. Staff are paid for every hour they are scheduled before 11 PM.
What the port showed (2026)
Running the scenarios on the same simulated customers, many thousands of nights at a time, sharpened two of the 2022 conclusions.
Part E's labor was undercounted. Our cost block ran once, at 5 PM, before the extra rush cook and waiter came on, so they were never paid. Paying every scheduled hour at the case's rates, the rush plan earns about $502 a night, $23.44 ± 0.47 more than the baseline on the same nights: still better, but by 5% rather than 25%, and it still doubles the wait.
Handhelds, on the other hand, help a little. On paired nights they are worth $3.49 ± 0.29 a night after paying their rent. A hundred independent replications, with a $27 margin of error, could not have seen a difference that small.
The demo pays staff for every scheduled hour, so its Part E row shows the corrected figure. Part D, a bigger room for a busier future, was not one of the parts my team chose; it is in the demo to try.
What the model leaves out
The case gives each step one duration and leaves the rest of a restaurant out, which was enough to compare the set-ups. The figures here are from the port: 4,000 paired nights per test, with staff paid for every scheduled hour.
If each line held four
| Extra profit | $63.6 ± 1.4a night, a ceiling |
|---|---|
| Walk-aways a night | 5.4 falls to 3.0 |
| Wait for those served | 15 rises to 22 min |
| Paired nights per test | 4,000 |
Impatience matters most. A group joins any line with room and waits as long as it takes; it leaves only when its line already holds two, and profit depends on that cap more than on any other assumption. Let each line hold four and the model earns $63.6 ± 1.4 more a night, almost three times the corrected rush plan: walk-aways fall from 5.4 to 3.0 a night, while the wait for those served grows from 15 to 22 minutes. Nobody in the model gives up partway through a line, so that figure is a ceiling, not a forecast. Real patience varies from person to person, and that spread decides how much of the gain is real.
The kitchen is the next gap. Every meal takes about five minutes, there is no menu, and one cook makes a whole party's order one plate at a time, so a table of four waits on about twenty minutes of one cook's work. Real dishes also take different times, and more uneven service times make queues longer even at the same average, so a menu would add waiting the model does not show.
A party also orders once and eats once, with no drinks or starters to add waiter trips, table time and takings. Clearing and payment are one three-minute step, and the table is free the moment the party pays, with no resetting to hold it during the rush, when tables are what the line is waiting for.
Walking and joining tables matter least. A waiter is just free or busy, with any walking apart from the kitchen trips folded into a step's time, and a large party can take any two free two-tops without anyone pushing them together. Only 6.5% of large parties end up on two two-tops, but both would matter when comparing layouts or giving waiters sections.
What would make the night flow better
These are changes the case did not ask about, roughly in order of promise. The waitlist and the table mix are tested with the port; the others would need changes to the model first.
The numbers
| Waiters busy | 37%of the night |
|---|---|
| Small groups walking away | 2.9 a night14% of those who come |
| Large groups walking away | 1.9 a night9% |
| Six two-tops, three four-tops | $6.4 ± 1.0less a night |
| Eight two-tops, two four-tops | $11.4 ± 1.1less a night |
A host with a waitlist is the most promising, though not for the obvious reason. The waiters are busy only 37% of the night, so taking seating off them gains little. The value is in a list that keeps people instead of two short lines that turn them away, a quoted wait so each group can decide, and a choice of which tables to give or join; a longer line alone is worth up to $64 a night. In the model the host would be a new resource that seats groups from a waitlist, each with its own patience.
A bar comes next. Ones and twos are half the arrivals but over half the walk-aways: 2.9 small groups a night walk away (14% of those who come) against 1.9 large ones (9%), and those who stay wait longer, 16.8 minutes against 14.5, all competing for the four two-tops. Bar stools, modeled as a third resource with its own server, would seat them and leave the tables for larger parties.
More hands in the kitchen, splitting a party's order between cooks or adding a prep cook before the rush, would shorten the wait for food: the same bottleneck that made the handhelds so weak. It turns into profit only as far as shorter waits stop people from leaving.
Two changes would not pay here. With a four-top taking the room of two two-tops, the team's four and four is already the most profitable mix: six two-tops and three four-tops earns $6.4 ± 1.0 less a night, and eight and two earns $11.4 ± 1.1 less, since more two-tops mean fewer walk-aways but fewer large parties, who bring more diners each. Waiter sections would pay only in a bigger room. Two waiters who share every table always serve faster than two with a section each, and what sections buy, less walking and regulars who know their waiter, is little across eight tables and needs walking times the model does not have.
What I took from it
Find the bottleneck before paying for speed: the handhelds made the floor faster, and the orders queued in the kitchen instead. Charge every cost on the same clock as the thing it pays for: our cost block ran once, before the rush staff came on, and that one timing mistake made a 5% gain look like 25%.
Compare options on the same simulated customers. A hundred independent nights could not separate the handhelds from the baseline; paired nights could. Matching the Arena output first, quirks included, is what let me trust the port enough to correct the original. And the assumption that moved profit most was not one we compared: the case's cap of two groups per line mattered more than either change we tested.
Where it goes next
If I picked the model back up, the first change would be patience: a waitlist, and a time each group is willing to wait. That decides how much of the longer-line gain is real, and it is what a host would be judged on.
The same building blocks (arrivals on a daily curve, queues people abandon, servers who are free or busy, shifts timed to a rush) describe other services too. A theme park's virtual queue with return times works like the waitlist; one shared line against a line per window at a festival food stand is the waiter-sections question; and a concert's entry surge and interval rush at the bars are the rush-shift question.
Want the details behind this one, or to talk about similar work?