Another head-scratching puzzle. Something is setting an attribute to “0”. I can even remove the one place where’s set, and it’s still set to “0”. I’m using an attribute instead of a stock for a boolean 1 or 0, due to the awkwardness and diagram clutter of changing stock values with flows and an input from the stock.
On the Voter entity, the attribute is temp refPol equals politician supported.
I started setting the attribute to “1” or “0”. The first initial value for the attribute was “0”, so the model may have remembered that somewhere. Then I changed the initial value to “x” and started using “false1” and “true1” for settings, in case Ventity was converting “false” to 0 and “true” to 1. Nothing helped.
A clue is in the Equation Listing Control, searching on “temp refPol”. Notice the selected row. It has Expression “0”. But on that action, the attribute is being read, not set.
Why is an attribute being set to “0”?
-
- Senior Member
- Posts: 68
- Joined: Wed Sep 15, 2004 9:01 pm
- Vensim version: DSS
-
- Senior Member
- Posts: 68
- Joined: Wed Sep 15, 2004 9:01 pm
- Vensim version: DSS
Re: Why is an attribute being set to “0”?
Good news. Thinking about this further and lessons learned from previous bugs, I looked for an undeleted atribute for the attribute in question, before I changed it to a shadow. I found it, deleted it, and now the model sets the attribute appropriately. "0" no longer appears in Equation Listing. So thanks for your help earlier, it helped here!
Re: Why is an attribute being set to “0”?
Great!
/*
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/