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

Project Level 4 average waiting time for customers #370

Open
ErMingYong opened this issue Apr 26, 2021 · 9 comments
Open

Project Level 4 average waiting time for customers #370

ErMingYong opened this issue Apr 26, 2021 · 9 comments

Comments

@ErMingYong
Copy link

I am currently having issues in the implementation and calculation of the average waiting time for customers for level 4 of the project. Specifically, I am stuck at test 4_2.

Can anyone provide insight or solution as to how the total waiting time is accumulated before averaging it out?

Screenshot 2021-04-26 221724

@clementyee303
Copy link

The sum of (current time of serve event - customer arrival time) / the total customers served

@raihanyusri
Copy link

It looks like you are not factoring in the rest time of the server into the waiting time of customers, just add them to the total waiting time and divide by the total number of customers served

@wglee99
Copy link

wglee99 commented Apr 26, 2021

Adding on to what was mentioned, it's likely that you're not adding the resting time of the servers to the customer's waiting time. What you can do for the total wait time is to add the times at which the waiting customers in the queue are served, then subtract away the event time of the wait event for these customers.

@e0560113
Copy link

you can add the resting times of the servers to the waiting times

@downmeanhigh
Copy link

don't forget to update the waittime so that it updates the rest time of server

@elizabethh07
Copy link

in my Simulator class, i did totalWaitingTime / numOfCustomersServed.
to add on to totalWaitingTime, I did getCurrentEventTime - currentEvent.getCustomer().getArrivalTime()

@timcheng112
Copy link

For me, I calculated the waitingTime (serveTime - arrTime of customer) in the EventRest class and summed it up until my PQ was empty before diving by the total num of customers served.

@kexinnnwang
Copy link

Each time the server rests, the customers waiting at the server will incur additional waiting time so you will need to update the total wait time and the time of the customers accordingly

@zhuoyunhui
Copy link

i think you need to account for the additional waiting time incurred when a customer waits at a server that rests

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

No branches or pull requests

10 participants