Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lab 8 Test Case 9_03 #334

Open
itzlnz opened this issue Nov 29, 2022 · 5 comments
Open

Lab 8 Test Case 9_03 #334

itzlnz opened this issue Nov 29, 2022 · 5 comments

Comments

@itzlnz
Copy link

itzlnz commented Nov 29, 2022

It seems like there is something buggy about the way I am updating Rest Time, but I am unable to identify what might have gone wrong with it. Could it be too late when I am retrieving the Rest Time? i.e. right after a Done event

Screenshot 2022-11-29 at 9 36 18 AM

@glendon29
Copy link

how do u implement ur rest event. personally for me what i did was to generate done and done rest.

@itzlnz
Copy link
Author

itzlnz commented Nov 29, 2022

Hmm I see. For me in the simulator, when curr event is a Done Event, I check if the server which is done with serving is human, then get the restTime and update their next freeTime, I don't have a Rest Event

Screenshot 2022-11-29 at 9 47 51 AM

@shecheeyee
Copy link

It might be due to the fact that the Serve is already scheduled beforehand, updating the server's available time will not affect the polling of events from PQ. What I did was update the events in PQ with the server's newest available time each time on top of updating the server's available time. Keeping in mind that you only update those events that are in the same queue as the previous Done event.

@izascia256
Copy link

Check if you are updating your servers after every event when you are nesting so many if statements one after another.

@itzlnz
Copy link
Author

itzlnz commented Nov 29, 2022

Got it, thank you all! My servers were updated accordingly but left out the part that @shecheeyee brought up. Ended up returning a new Serve Event at a later time (timing when server is done resting) when the currEvent is a Serve Event and the server is resting - it works now, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants