problem using reality check

Use this forum to post Vensim related questions.
Post Reply
LAUJJL
Senior Member
Posts: 1477
Joined: Fri May 23, 2003 10:09 am
Vensim version: DSS

problem using reality check

Post by LAUJJL »

Hi everybody

I am currently testing the systematic use of reality check in my models. I have a problem using it combined with the use of subscripts.
I have joined a simplistic model to illustrate the case.
The model has two competitors with the subscript competition with subscrpits c1,c2 which represent both competitors.
They have each a price per widget and they get a percentage of the demand of widgets each week depending on their price per widget.
The model describes this situation.
I want to build a reality check that verifies that if one of the competitor has its rival with a widget price equal to 0, than his own demand will be equal to 0.
I have modeled the reality check input in blue and the constraint in red. The test should logically have no failures, but there are failures that I cannot understand.
If somebody can point where I am wrong, It would help me greatly.
Best regards.
JJ

[Edited on 20-4-2009 by LAUJJL]
Attachments
essairc.mdl
(3.81 KiB) Downloaded 229 times
bob@vensim.com
Senior Member
Posts: 1107
Joined: Wed Mar 12, 2003 2:46 pm

Post by bob@vensim.com »

Hi JJ,

This is a known shortcoming in the implementation of Reality Check statements. When any subscript of a test input is active, that test input is considered active. Thus even when c2 has the 0 price the test input saying its competitors price is 0 is considered active, so it is tested for a 0 demand.

To work around this you need separate test inputs to set c1 and c2 prices to 0, and separate RC statements to go with those.
LAUJJL
Senior Member
Posts: 1477
Joined: Fri May 23, 2003 10:09 am
Vensim version: DSS

Problem with reality check

Post by LAUJJL »

Hi Bob

Thank you for the answer.
I have verified all the other reality checks that I have implemented in my original model and indeed, as they are all subscripted, Vensim does not verify every subscript independantly and supposes that all subscripted inputs are all simultaneously triggered. This gives of course impredictible results.
Logically then, it is not possible to use any subscripted input in a reality check constraint wether that constraint is subscripted or not. I have tried to find some work around, using unsubscripted constraint, but I still need to use subscripts in the input part of the constraint, and then it does not work.
When you mention active subscript, what do you mean by that? I have tried to desactivate one of the subscript in the suscript control, but it still does not work.
I think that I will have to build again all the reality checks, subscripts by subscripts. It is not very annoying if the number of subscripts are limited, but otherwise it may be rather cumbersome. Another way I will experiment, is driving
models through VBA. I have not yet experimented this method that permits to plan in advance the experimentation of a model and from which I expect to greatly improve my ability to analyse models. I may by using VBA, be able to make multiple RC checking, varying each time the parameter of the check.
Will this shortcoming be solved in later Vensim versions?
Best regards.
JJ

[Edited on 21-4-2009 by LAUJJL]
bob@vensim.com
Senior Member
Posts: 1107
Joined: Wed Mar 12, 2003 2:46 pm

Post by bob@vensim.com »

My comment about active subscripts may have been misleading. I was just suggesting that the test input need to use subscript elements, not subscript ranges, to be unique. As you have noted this is cumbersome.
Post Reply