Hello,
I have a small doubt in the logging part explanation in page 28 , line 2,3,4 and 6 . So for the order of printing log should it be : case 1 -
Restaurant id 1 print all its log related to customer arrival, kitchen scheduling , serving, delivering,eating,and escorting then same order for Restaurant id 2 and so on
Case 2 :
log Restaurant id 1 customer arrival then Restaurant id 2 customer arrival and id 3 and so on then once all restaurants are done then next task and same restaurant by restaurant.
which of the logging method is correct when they say - “logs will be performed separately
per restaurant in order of ascending id.“ and “The remainder of the tick is processed in the following order for the restaurant“
Thank you
Hi,
they are logged one by one within each tick. Restaurant by restaurant.
Thank you for the clarification
Can you explain this in more detail? I understand from your answer that you said case 2 is the right one, but in my understanding from the specification it has to be case 1.
So basically it is as the following:
Lets say that there is restaurant with id 1 and restaurant with id 2, the logs should tick by tick and in each tick you log things happening in restaurant with id 1 first and then the one with id 2. Maybe the following logs give you a better understanding as well:
[IMPORTANT] Simulation: Tick 1 (1) started.
[DEBUG] Restaurant Start (R 1): Restaurant 1 simulates a tick.
[then here some other logs for what happens in restaurant with id 1 (in the first tick)]
[DEBUG] Restaurant End (R 1): Restaurant 1 finished simulating the tick.
[DEBUG] Restaurant Start (R 2): Restaurant 2 simulates a tick.
[then here some other logs for what happens in restaurant with id 2 (in the first tick)]
[DEBUG] Restaurant End (R 2): Restaurant 2 finished simulating the tick.
So it is in tick 1 all the restaurants in the simulation are getting logged one by one as per the id
I hope this helps.
1 Like