=SIMOUTPUT(expression,IF(condition,"WhenTrue","WhenFalse")
This will cause the output "WhenTrue" to contain conditional information
about 'expression' when the condition is true, and "WhenFalse" to
contain conditional information when it is false. The counts on these
outputs will be less than the sample size, but add up to the sample size.
However, in your case, if I am understand it correctly, the event will
essentially never happen, because you are hoping that the sum of a
number of continuous variables will exactly equal some target. The
probability of that happening is basically 0. You need a different
overall model that will only generate the mixes you want.
But your mail was not very clear, so perhaps I do not understand.
Prof. Eckstein
Thanks for the feedback.
I proceed down a similar path to what you described and found that,
indeed, only 1 in 1000 trials hit a product mix totaling exactly 100%.
Ooops.
So using nested IF(AND) statement, I opened up the solution to accept
product mix summing to between .98 and 1.02. That SIMOUTPUT equation
typically captures 600 TRUE of 1000 trials and charts nicely ... But all
of the 'False' conditions register as "0" values instead of being
ignored. So in 1000 trials, I'll get about 400 zeros. As you can
imagine, the min value, mean and standard deviation calculations all
capture the zeros and are meaningless.
At this point, I finished up the problem manually adjusting mean, std
dev, min/max and the charting. Client is satisfied. Longer term, I am
going to figure out how to get SIMOUTPUT to ignore the False conditions,
but haven't come up with a solution yet.
Regards. (again, YASAI is a really helpful tool and the range of example
problems on the website are very good. Thank you.)
Charlie Grace
It may be that YASAI originally had better behavior, but some recent
enhancements "rebugged" it.
Perhaps you could send your spreadsheet, or a something similar with
sanitized data, and I could see what is going on?
If there's a fix, I can put it in the next release (which I hope will
include Mac compatibility).
Thanks,
Jonathan
This is a neat approach! I just checked and it looks like it still works. I
think that fellow's issue is that he is inserting the IF as the first
argument to simOutput, not the second.
Dan