Forum Discussion
OMoeng
Mar 02, 2022Copper Contributor
If Statement Monte Carlo Simulation
Hi All,
I am creating a Monte Carlo Simulation with multiple servers:
To choose a server, a customer is redirected to a server that finishes first, or has the lowest end time as seen in columns G, J and M.
If this was a two-server problem this would evaluate to:
=If(MAX(G$5:G5)<MAX(J$5:J5),1,2)
Given this is a three server problem I initially used an Ifs statement:
=IFS(AND(MAX(G$5:G5)<MAX(J$5:J5),MAX(G$5:G5)<MAX(M$5:M5)),1,AND(MAX(J$5:J5)<MAX(G$5:G5),MAX(J$5:J5)<MAX(M$5:M5)),2,AND(MAX(M$5:M5)<MAX(J$5:J5),MAX(M$5:M5)<MAX(G$5:G5)),3)
Where this leads to everything evaluating to FALSE, to fix this I then changed it as follows:
=IFS(AND(MAX(G$5:G5)<MAX(J$5:J5),MAX(G$5:G5)<MAX(M$5:M5)),1,AND(MAX(J$5:J5)<MAX(G$5:G5),MAX(J$5:J5)<MAX(M$5:M5)),2,TRUE,3)
Which all routes the customers to server 3, which means the last statement is always True.
Is there any way I can make this work?, I am trying to avoid using a '<=' because then it would prioritize the first server because it would be the first TRUE result in the IF statement.
Monte Carlo Multiple Servers
- tbailey297Copper Contributor
Did you ever find a solution to this? I have it working for 2 servers/tellers but can't make it work for 3. I've found your post and going to try to use your method as a starting point. If you have a solution please post it.