Inspiration

At a campus festival, the same cup can serve several guests, but only if it comes back and gets washed before the next rush. Event teams can estimate total attendance and still miss that timing problem. Loopstock helps teams decide how many reusable cups to bring before they order single-use backups.

What it does

Enter drink orders by service wave, starting stock, return rate, return lag, and washing capacity. Loopstock shows where clean stock runs out and how many single-use cups would cover the gap. You can see the returns and wash backlog by wave, compare a slower-return scenario, and apply the minimum starting stock for either scenario. The two plans and their assumptions can be exported as one CSV.

In the built-in campus festival example, 240 starting cups cover 508 of 550 orders under expected conditions. The stress test puts the shortfall at 149 cups. Applying the stress scenario's recommendation of 389 starting cups brings projected fallback to zero.

How we built it

Loopstock is a static browser app in HTML, CSS, and JavaScript. A simulation tracks each wave's clean inventory, future return batches, and the queue of cups waiting to be washed. A binary search finds the smallest starting stock that covers every wave under the chosen assumptions. Playwright exercises the demo, edits, stock recommendation, and CSV export on desktop and mobile viewports.

Challenges we ran into

Returned cups and ready-to-serve cups are different inventory states. A batch can arrive in time and still wait behind other cups at the wash station. Keeping the wash queue in the simulation made it possible to explain a shortage by wave and check how the same demand behaves under stress.

Accomplishments that we're proud of

A judge can run the synthetic campus example from the first screen and go from a shortage to a revised plan in two clicks. The recommended stock is checked against the next smaller integer in the model tests. Each CSV row captures the assumptions and numbers needed to review that wave.

What we learned

Event-wide totals hide the service waves where the crew runs out of clean cups. In the demo, a longer turnaround leaves 65 orders without a reusable cup in wave three. Each assumption is visible, so teams can update the plan when they learn how their event actually operates.

What's next for Loopstock

Pilot the tool at a campus event. Use tallies at the drink station, return bins, and wash station to estimate throughput and update the assumptions. Use actual return timestamps to test whether a spread of return times improves the current fixed-lag model.

Waste impact and measurement

Loopstock targets disposable cups opened when an event runs short of clean reusable stock. For a pilot, compare similar events or service periods using single-use cups issued per 100 drink orders, with service interruptions tracked alongside waste. Record the reusable cups issued, returned, and washed by wave to compare the model with observed conditions. The demo is synthetic and shows projected fallback.

AI disclosure

OpenAI Codex, an AI coding agent, wrote the code and copy under human direction. The simulation and recommendations run deterministically in the browser.

Required extras

  • Track selection — Theme Track, Rethinking Waste.
  • Team — Solo.
  • Theme-track problem and impact measurement — Use the paragraph under Waste impact and measurement.
  • Public code repository — https://github.com/ryan930704/loopstock
  • Live demo / Try it out — https://loopstock.pages.dev/
  • Demo video URL — __VIDEO__ after uploading video/demo.mp4 to YouTube or Vimeo.
  • Gallery thumbnail — shots/01-overview.png. Gallery images — shots/02-stress-test.png and shots/03-stock-applied.png.
  • Additional custom prompts, file upload, and terms checkbox — 送件時依畫面。

Built With

Share this project:

Updates

Submission history