Inspiration

I worked as a student staff member at Worcester Dining Commons, and I watched a lot of good food go into the waste bin at the end of service. Sometimes fewer students showed up for a meal than the kitchen expected. Sometimes a rush came for 20 minutes, the kitchen cooked three big pans to keep up, and then the rush was over. Two of those pans were never served.

UMass Dining takes sustainability seriously. Its FY26 Sustainability Annual Report says waste per meal swipe fell 2%, from 7.33 to 7.19 oz. It also says 1.79 million pounds of food production was tracked with Metafoodx across 16 systems, and about 1,400 tons of food waste went to anaerobic digestion. Most of the overproduction goes to the digester, which is far better than a landfill. But it is still food that was bought, cooked, and never eaten. The best way to cut waste is to not cook that extra pan.

The data is already there. What a manager doesn't have is a way to use it before tonight's service: "If we cook smaller batches, will the Grill run out at 7 pm?" Dineamics combines that data with a simulated dining hall. A manager can test a change against student popularity, preferences, diets, a slow night or a sudden rush, before cooking anything.

What it does

Dineamics is a "what-if" simulator for Worcester Dining Commons. It replays dinner on the real menu for that date, with about 3,700 simulated students. Each student has their own diet, tastes, and patience. They arrive in waves after class, choose a line, skip lines that are too long, and either get a plate or find an empty pan.

A manager can watch the night play out on a floor plan, then try a change: smaller batches, an extra server, a busier night, or a new dish. Dineamics runs 30 paired nights and gives an honest verdict for each metric: better, worse, same, or can't tell. You can also type a change in plain English, like "one more server at Grill and 10% busier". Or give Sam the Minuteman, our planning agent, a goal like "cut waste 20% without any vegetarian dish running out". The result is a printable cook sheet with portions, batch sizes, and when to start the last batch.

How we built it

The engine is a discrete-event simulation in Python (SimPy). It has 12 real stations, pans that empty, expire, and get re-cooked, and a limited number of cooks and ovens. It includes real menus from umassdining.com for 8 dates, including Thanksgiving dinner.

One simulated night proves nothing, so every decision runs on N = 30 nights. The baseline and the change share the same random seeds (common random numbers), so both see the same students on the same night, and any difference comes from the decision, not from luck. For each metric m, where lower is better, we compare night by night:

$$d_i = m_i^{\text{change}} - m_i^{\text{base}}$$

$$w = \frac{1}{N}\sum_{i=1}^{N} \mathbf{1}[d_i \lt 0] \qquad \ell = \frac{1}{N}\sum_{i=1}^{N} \mathbf{1}[d_i \gt 0]$$

Here w is the share of nights where the change wins, and ℓ is the share where it loses. The verdict for each metric is:

$$\text{better} \iff w \geq 0.6 \ \text{and} \ \mathrm{median}(d) \lt 0 \qquad \text{worse} \iff \ell \geq 0.6 \ \text{and} \ \mathrm{median}(d) \gt 0$$

It is the same if the median difference is too small to matter, and otherwise it can't tell. We'd rather say "can't tell" than claim a win that isn't there.

  • Gemini API turns plain English into simulator settings through 13 declared functions. Gemini also drives Sam's loop: plan, simulate, read the results, adjust, up to 5 tries. Code, not the AI, decides whether a goal passed, and the final plan is checked again on 30 nights Sam never saw. Gemini also writes each student's story, using only the simulation's event log.

  • Tiger Data (TimescaleDB) stores every simulated and recorded night as time series. It uses hypertables and pgvector for similar-night search. Sam queries it through the Tiger MCP server with read-only SQL.

  • Vultr hosts the app. For heavy runs, our fleet command rents one 16-vCPU server per menu date, optimizes all dates in parallel, then deletes the server and keeps the result.

The front end is React + TypeScript (Vite), designed in Figma.

Challenges we ran into

UMass doesn't publish waste or swipe data per dish. So we built on the real menus, hours, stations, and floor plan, labeled every synthetic number in the app, and listed the exact data we would request from UMass Dining. Keeping the AI honest was the other big challenge. An early version of Sam "met" a waste goal by assuming fewer students would come. We hid the crowd and popularity settings from Sam, protected key dishes, and re-checked every final plan on unseen nights.

Accomplishments that we're proud of

We built a working dining hall where every student's choice shows up in the lines, the empty pans, and the food left at the end of the night. Then we ran it for 4,000 nights across all 8 menu dates. Some of the results surprised us: on Thanksgiving, the Southern Cornbread runs out on 97.6% of nights. We're especially proud of Sam. When a goal can't be met, Sam doesn't fake it. It says "closest plan, goal not fully met" and shows which check failed. And the app doesn't hide trade-offs either: on Nov 13, it found plans that cut waste by about 28.6%, but it also shows they cost about 6 more stockout-minutes a night. We also got the whole thing live at https://dineamics.compare/hall.

What we learned

We learned pretty fast that an AI model can't count 3,700 students through 12 stations, but it's really good at turning "one more server at Grill" into settings. So we let Gemini handle the words and let code handle the numbers, and that's when things started working. We also learned that one simulated night tells you almost nothing. Running 30 paired nights with the same students cut out enough luck to give real answers, and sometimes the honest answer is just "can't tell." Working in the kitchen taught me that the data is already there, but data alone doesn't decide how many pans to cook. And the biggest lesson: a simulator is a tool for exploring, not a crystal ball. Dineamics can show how different guesses play out, but to trust it with real students, it needs real kitchen data.

What's next for Dineamics

  • Calibrate the model with real UMass Dining data: swipe counts, production logs, and Metafoodx waste weights.
  • Expand to Franklin, Hampshire, and Berkshire. A new hall needs only new data files, not new code.

Built With

Share this project:

Updates

Submission history