Empty LISTVAR

Use this forum to post Vensim related questions.
Post Reply
almoon
Senior Member
Posts: 77
Joined: Tue May 06, 2008 9:20 am

Empty LISTVAR

Post by almoon »

I have a problem with the listvar it keeps give me that the listvar is empty so what is going on ?

do I need to change anything in my model to make it work ?
Administrator
Super Administrator
Posts: 4592
Joined: Wed Mar 05, 2003 3:10 am

Post by Administrator »

Can you post anything here that demonstrates the error?
bob@vensim.com
Senior Member
Posts: 1107
Joined: Wed Mar 12, 2003 2:46 pm

Post by bob@vensim.com »

The message occurs when the variable referred to is not a constant (or a gaming variable in game mode)
almoon
Senior Member
Posts: 77
Joined: Tue May 06, 2008 9:20 am

Post by almoon »

LISTVAR,"FINAL TIME",88,24,7,4,L|System|10|B|255-0-0,[0|60]10|20|30|40|50|60

so this is what I wrote, so what do you think the problem?
Administrator
Super Administrator
Posts: 4592
Joined: Wed Mar 05, 2003 3:10 am

Post by Administrator »

Are you running a game while trying to access the listbox?
almoon
Senior Member
Posts: 77
Joined: Tue May 06, 2008 9:20 am

Post by almoon »

Yes.
Administrator
Super Administrator
Posts: 4592
Joined: Wed Mar 05, 2003 3:10 am

Post by Administrator »

That's the reason. FINAL TIME is a constant, you cannot modify it during a game (you can only change it before the game starts).
almoon
Senior Member
Posts: 77
Joined: Tue May 06, 2008 9:20 am

Post by almoon »

mmmm and am not sure how to do that...
Administrator
Super Administrator
Posts: 4592
Joined: Wed Mar 05, 2003 3:10 am

Post by Administrator »

Have a screen where you set constants (like final time etc). Then move to a new screen when you start the run where you can change the gaming decisions.
almoon
Senior Member
Posts: 77
Joined: Tue May 06, 2008 9:20 am

Post by almoon »

Thanks, I did that but the problem is still available ,,,

but I was thinking is the final time is the same one in the model when we put the setting of the model?

maybe from there the problem ?
bob@vensim.com
Senior Member
Posts: 1107
Joined: Wed Mar 12, 2003 2:46 pm

Post by bob@vensim.com »

You need to look at the equation for FINAL TIME. Normally this is a constant, but many models, especially project models, make this a variable. If it is not a constant you won't be able to change it. I would not recommend making FINAL TIME a game variable.

A more useful question might be why you would want to change FINAL TIME anyway? If the user is tired of the game they can just stop playing.
Post Reply