Week 5 Tutorial: Order six dinners
Compute the first orders by hand, implement the recurrence, and compare FIFO with earliest-deadline on the course's objective.
24 March 2027
Open Week 5 in the Lab →Try your own change on this week's case.
Two-hour tutorial: preparation, coding and checks
This week’s task#
Model: #01–#06, one L drone, full static trips and turnaround. No shared charging queue. Compare lateness, then final return, then energy.
Before you start · 15 minutes#
Read W5 and compute both N/F sequences from the lecture. Name the objective before comparing them.
Trace the example · 25 minutes#
Compare FIFO with earliest deadline. Both canonical runs have zero lateness; locate the difference in the final-return time.
Implement and compare · 55 minutes#
Complete myTimetable using the supplied trip-cost function. Calculate the first three rows by hand, including ready time, loading, delivery, return and next availability.
Use Open full Lab for editable inputs, strategy code, exports and the practice pack. The example on this page compares this week’s published cases; your local student runner must call the functions you complete.
Check and explain · 25 minutes#
Test readiness, turnaround and lateness measured at delivery. Submit the per-order table and two objective tuples with one sentence explaining the tie on lateness.
What to keep: A1: timetable recurrence and baseline comparison. Show the tutor your prediction, experiment and explanation for this week’s participation point; keep the record to develop your assignment.
Optional extension#
Open the order board, move an order and predict the later departures before running. Leave swap search and enumeration for W6.
W5 · One sequence, six deliveries.
How does moving one order change every departure after it?
One drone delivers six meals, one after another. Changing the order changes when it can start the next meal.
Sequence #01 → #02 → #03 → #04 → #05 → #06. Course objective (lateness, final return, energy): 0, 2558, 263271. This sequence is evaluated without an optimality claim.
Computed from this case · 2.32 ms · lab-1.0 · canonical-six
One drone · six complete trips
| Order | Ready | Load start | Depart | Deliver | Return | Lateness |
|---|---|---|---|---|---|---|
| #01 | 82 | 82 | 142 | 358 | 529 | 0 |
| #02 | 576 | 589 | 649 | 859 | 1024 | 0 |
| #03 | 937 | 1084 | 1144 | 1219 | 1249 | 0 |
| #04 | 1264 | 1309 | 1369 | 1645 | 1876 | 0 |
| #05 | 1681 | 1936 | 1996 | 2102 | 2163 | 0 |
| #06 | 2193 | 2223 | 2283 | 2443 | 2558 | 0 |
Read down the rows: moving one meal changes when every following meal can leave.
Explore the evidence, replay or open full Lab
Open full Lab ↗ for editable inputs, strategy code and saved comparisons.
Both canonical plans have zero lateness. Compare the final-return time and explain the tie on lateness.
Read the example above
Both canonical plans have zero lateness. Compare the final-return time and explain the tie on lateness.
One drone; complete trips · No shared charging in this model · Corridor reservations not active
| Inspect | Order | Ready | Load start | Depart | Deliver | Return | Lateness |
|---|---|---|---|---|---|---|---|
| #01 | 82 | 82 | 142 | 358 | 529 | 0 | |
| #02 | 576 | 589 | 649 | 859 | 1024 | 0 | |
| #03 | 937 | 1084 | 1144 | 1219 | 1249 | 0 | |
| #04 | 1264 | 1309 | 1369 | 1645 | 1876 | 0 | |
| #05 | 1681 | 1936 | 1996 | 2102 | 2163 | 0 | |
| #06 | 2193 | 2223 | 2283 | 2443 | 2558 | 0 |
Continue in the Lab →The same case, with every input open to change.
The spec
What you bring to the session. Written so a reader can tell whether it has been met without asking you.
- you can check the program's timetable by hand for the first three orders
- you declare the objective before the run and explain the result against it
- you can show a case where two objectives prefer different sequences
Teaching team
- Kofi Marchetti — tutor