demand forecasting question

64 views
Skip to first unread message

CharlieG

unread,
Apr 16, 2012, 1:30:07 PM4/16/12
to yasai-simulation
Hi all. A question for the board.

I'd like to use YASAI for some demand forecasting for retail store,
where I have variables like market size, market share, mix of six
items (shirts, shoes, pants, etc). Each of these variables has range
of possible values that can be modeled - I'm starting with a normal
distribution for simplicity, but that could change. So its set up
with 1) single scenario, 2) a genNormal demand for each item 3) a
simOutput that simply adds the individual item demands. The problem
I'm having is with the sales mix. I want to only capture those
outputs where the product mix adds to 100%. Otherwise its an
irrelevant outcome; and it tends to spread apart the min and max of
the output.

Am I making sense? Suggestions anyone.

Jonathan Eckstein

unread,
Apr 22, 2012, 11:51:09 AM4/22/12
to yasai-si...@googlegroups.com
In general, you can use the name of a SIMOUTPUT to capture conditional
events, as in

=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

Charles Grace

unread,
Apr 22, 2012, 12:24:38 PM4/22/12
to yasai-si...@googlegroups.com
Prof Ekstein,

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

Jonathan Eckstein

unread,
Apr 24, 2012, 3:49:56 PM4/24/12
to yasai-si...@googlegroups.com
Hmmm. This sounds like strange behavior.

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

Dan Stratila

unread,
Apr 24, 2012, 4:12:59 PM4/24/12
to yasai-si...@googlegroups.com
> >> =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.

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

Jonathan Eckstein

unread,
May 2, 2012, 4:18:06 PM5/2/12
to yasai-si...@googlegroups.com
Just cleaning up some old mails...

It sounds like you used the "IF" for the expression part of the
SIMOUTPUT rather than the name. This mistake could produce the behavior
you describe.

Remember, the suggested form is

= SIMOUTPUT(expression,IF(validityCondition,"Name","ThrowAway"))

In this case, the output "Name" should track the things you want, and
"ThrowAway" will receive the unwanted garbage.

This trick was actually described in the original INFORMS Transactions
on Education paper about YASAI.

Jonathan
Reply all
Reply to author
Forward
0 new messages