Active Initial question, Vector function

Use this forum to post Vensim related questions.
Post Reply
Travis
Senior Member
Posts: 141
Joined: Tue Jul 15, 2008 8:42 pm

Active Initial question, Vector function

Post by Travis »

I have a structure that is causing lots of active initial difference warnings. The structure uses a random number to select a subscript of an arrayed value. The vector function suggests that I do any mapping with the first subscript value, say Var[sub1]. But the random number may choose the fourth subscript, so Var[sub4]. That causes a warning.

What is a good way to make the warnings disappear, without turn off the preference? I like warnings in general.

Sample model attached.

TIA,
Travis
Attachments
randQuestion.mdl
(3.59 KiB) Downloaded 252 times
LAUJJL
Senior Member
Posts: 1427
Joined: Fri May 23, 2003 10:09 am
Vensim version: DSS

Re: Active Initial question, Vector function

Post by LAUJJL »

Hi Travis

There is first an unit error. It might be better to add a variable named time in month = time * month in a year.

It is difficult to give an advice. The structure is rather clumsy. Can you describe exactly the problem you are trying to model?

Regards.

JJ
Administrator
Super Administrator
Posts: 4599
Joined: Wed Mar 05, 2003 3:10 am

Re: Active Initial question, Vector function

Post by Administrator »

I'm looking into this. It looks like the report is an error, I just need to track down where it is.

Tony.
Advice to posters seeking help (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391

Units are important!
http://www.bbc.co.uk/news/magazine-27509559
Travis
Senior Member
Posts: 141
Joined: Tue Jul 15, 2008 8:42 pm

Re: Active Initial question, Vector function

Post by Travis »

JJ,

Sorry for the units error. This is part of a much bigger model, and I missed units when I cut it out. The bigger model passes unit check.

But to illustrate the question better, I made an much simpler model that has the same problem. Two vars: Random number into a Lookup. I get the Active Initial warning with this model. If there is a way to avoid this warning with a formulation change, I would be interested in learning it.

Tony, any luck on this? Is there a way to leave warnings in settings but do something differently to get these to go away?

Thanks,
Travis
Attachments
randQuestion v3.mdl
(1.28 KiB) Downloaded 251 times
tomfid
Administrator
Posts: 3812
Joined: Wed May 24, 2006 4:54 am

Re: Active Initial question, Vector function

Post by tomfid »

Have you tried checking the initialization step results by using Diff integration?
Travis
Senior Member
Posts: 141
Joined: Tue Jul 15, 2008 8:42 pm

Re: Active Initial question, Vector function

Post by Travis »

Tom,

I don't follow. The v3 model (most recent that I uploaded) doesn't have any integration. Just a random number between [0-1], then input into a lookup table. A warning pops up. To see, just open the model and run once.

t

btw, I've seen this warning for years on several models, but only now does it really start to bother me. I have a model that triggers this warning 50+ times each run, instead of once as in my v3 demo model.
Administrator
Super Administrator
Posts: 4599
Joined: Wed Mar 05, 2003 3:10 am

Re: Active Initial question, Vector function

Post by Administrator »

I don't get any warnings with the v3 model.
Advice to posters seeking help (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391

Units are important!
http://www.bbc.co.uk/news/magazine-27509559
Travis
Senior Member
Posts: 141
Joined: Tue Jul 15, 2008 8:42 pm

Re: Active Initial question, Vector function

Post by Travis »

Hmm. Have you tried the first model, with more variables? That definitely gets the warnings for me.

t
tomfid
Administrator
Posts: 3812
Joined: Wed May 24, 2006 4:54 am

Re: Active Initial question, Vector function

Post by tomfid »

Even if there's no integration, there's a step at time=initial time, which sets up stock initial values (if there were any). That may produce the warning, because the initialization step produces a different random # from the dynamic step. I'm looking into the RNG in general, so there may be a way to suppress this.
Travis
Senior Member
Posts: 141
Joined: Tue Jul 15, 2008 8:42 pm

Re: Active Initial question, Vector function

Post by Travis »

Okay, so it sounds like there is nothing I can do right now. Let me know if/when there is a fix for me to try.

Thanks for your help,
Travis
Post Reply