# If Statement Monte Carlo Simulation

Occasional Visitor

# 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

0 Replies