I’ve collected some Questions when reading through the logs, so that I don’t spam to much Topics.
“Then, this customer group is being assigned a waiter and SEATED. This is logged based on the id of the group, the table and the waiter (one or more).”
This is the old version. Why exactly was it possible back then to have multiple waiters seating one group?
“The orders are logged per group based on the id of the group, the waiter (one or more)”
same for this for ordering
“Customer arrivals, seating and ordering” for this step in general I understand it like this, that all actions are first executed and logged for one group and then the next. If my assumption is correct, at which place do we log delivery Orders? The case that it could be a deliveryOrder that was placed is explicitly mentioned in this particular step. do we just go through the customers who actually are within the restaurant first and then log the deliveryOrders? Or are they logged first? Or is my assumption just wrong and every substep is executed per group before moving to the next one? Or do we just mix them up in Order of their Id?
“In case a waiter delivers meals to the driver, they log this as well using the id of the waiter”
in this case it’s the exact opposite of my first question, can’t it happen that multiple waiters deliver one order to a deilvery driver?
also for the deliveryDrivers one small question: Theoretically it could happen that a deliveryDriver just gets a partial Order due to every Waiter reaching his servingLimit. Is that checked before the waiters start serving the deliveryOrder or do we have to follow the same partially served procedure as when serving normal customergroups?
For deliveries, the meals queue until all meals of an order are ready and a driver is free.
Then, all waiters with a SERVING tick load below the action limit deliver meals to the drivers
waiting outside the restaurant until their limit is reached or the condition is negated. The
waiters with the lowest id starts, and the order with the lowest id takes precedence.
To us this very much reads like multiple waiters can serve the meals to the driver. I.e. waiter1 still has some capacity, but their load is filled and then waiter2 serves the remaining meals….
If this is not the case, we would wish for more clarification.
another logging question from my side: on page 34 line 16-20
Then, the kitchen cooks the meals for the duration of the tick and logs all meals that were
finished this tick. The order is by cook id. This step can include meals started both in this
and in prior ticks, i.e., a duration of 0 tick signifies that the meal is finished in the same tick.
The log contains the id of the cook, the number of meals, the dish name and the duration
in ticks since the waiter TOOK THE ORDER responsible for the cooking of this dish.
[IMPORTANT] Kitchen Meal Cooked (R $restaurant:id): Cook $cook:id
finished cooking $meal:number meals of dish $dish:name $tick:number
ticks after ordering.
In our mind, it is possible that a cook cooks meals from different orders with different ordering ticks.
Example: we have 1 cook, Order1 has potato soup and beef pasta with ordering tick 1; the next tick order2 also has beef pasta. Then the cook gets assigned beef pasta from order1 and beef pasta from order2.
Now when the cook finishes cooking, which of those ordering ticks needs to be logged then?
lets consider this scenario: One cook is available and he can cook all the dishes we consider in this scenario:
Order 1 in tick 1: apples takes 2 ticks to finish.
Order 2 in tick 2: pen cakes 1 tick to finish.
Order 3 in tick 3: pen cakes 1 tick to finish.
It is possible, that a cook cooks dishes from different ticks, however only if a responsible cook is not available in the tick you order the food or is assigned in the ordering tick to a different meal.
We also thought of a scenario similar to yours. But our question in this case is, what exactly needs to be logged.
So from your example (imagine in this case we have one cook in the restaurant who can cook everything):
The cook gets assigned apples in tick 1.
When the cook finishes apples (in tick 3) it is clear, what is logged, since there was just one dish.
But in tick 4 the cook then gets assigned the pen cake dishes from order2 and order3. The cook finishes those dishes then in tick 5 and needs to log that they finsished meals. What do we need to log:
Do we log seperatly per cook per order, how many dishes were finished and then after how many ticks after ordering it took to finish.
In this case we would have 2 logger calls for this 1 cook in tick 5.
Or we have just one logger call per cook per tick (in which they finsish a dish) in this case the question remains what tick number we need to log (so 3 ticks after ordering for order 2; or 2 ticks after ordering for order 3)
Would we need to log both, or the minimum?
Also, could you clarify again how serving the dishes to a driver works? As we read from the specification, that multiple waiters can serve the order to a driver.
[IMPORTANT] Kitchen Dish Assignment (R $restaurant:id): Cook $cook:id
of type $cook:type starts cooking $number meals of dish $dish:name
based on order $order:id for orders $allOrder:id.
in this case this would be cook:id = 1, based on order:id = 2 and for orders allOrder:id = “2,3”.
Later when the meal is finished cooking, you log per order which dishes are finished:
[IMPORTANT] Kitchen Meal Cooked (R $restaurant:id): Cook $cook:id
finished cooking $meal:number meals of dish $dish:name $tick:number
ticks after ordering.
Regarding your question about the serving the dishes to a driver, there will be a clarification tomorrow.