Open TMTM98 opened 3 years ago
Hello, potentially this might be triggering some edge case for the "able to wait" logic (maybe for the greedy customer); perhaps you might want to relook at that portion of code?
hmm i think the problem here is the queue where customers wait in is not properly updated? maybe you didn't poll at the correct time thats why there's no space for the customer to queue
@linminsaw Should not be the case since the Served event of line 866 reduces the queue by 1, since line 866 appeared, it means the queue was indeed reduced.
If its any help, here is how the reduction happens in the Served event:
As you can see, if served was called by a wait event, there will be a queue reduction.
and here is what happens in arrival to call the next event:
and here is how the server is selected if the customer is greedy vs non-greedy:
Summary
Put a summary of the question
For some reason, the program could not allow Customer 254 to wait despite it being able to wait since the wait queue reduction happened at line 866 and since 868 takes place quite a while after 866, Customer 254 should have been able to wait.
Description
Describe the problem and code snippets if necessary
Can anyone provide any insight or the input for Case 5_4 so I can debug?
Screenshots (if any):
Insert Images here if necessary