nus-cs2030 / 2021-s1

27 stars 48 forks source link

Project 2 test 7_4 #578

Open Shandon96 opened 3 years ago

Shandon96 commented 3 years ago

Description

Hi guys, I'm on the last leg of project 2, but I don't know how to even start debugging test 7_4. Does anyone know the inputs, or any advice on what might be the problem? Any help is highly appreciated! image

Topic:

Specific Topics this question is related to (If Any)

Screenshots (if any):

Insert Images here if necessary

aaron-ljx commented 3 years ago

The inputs for 7_4 are 2, 5, 0, 10, 1000, 7, 1, 1, 0, 0.5. Best of luck :)

frisciliasultan commented 3 years ago

Seems like there is something wrong with the queue of the servers / waitEvent. Have you checked if you used the correct maxQueue? If it's correct, you might want to print out the servers and their queue status to see what went wrong.

itmeruoxin commented 3 years ago

you can try printing out the servers (with their queue lengths) and spot any unexpected jump/drop. might help in finding out where the transition went wrong

yaphuiyi commented 3 years ago

Try printing out your the number of customers in queue when each customer arrives, and check whether the queue number has been updated correctly! Helped me alot for debugging

Shandon96 commented 3 years ago

Thanks so much everyone!! Especially @aaron_ljx for the inputs, they were really helpful. I'm left with javadocs and checkstyles. All the best to the rest of us who are still struggling :)