Situation: I have data in XLS that I would like to use to initialize a variable in a model. Currently it is stored in a Tabbed Array var in the model.
BUT, I would the like to control that variable value using a slider when running in SyntheSim. Is this possible somehow?
For instance, I was wondering if an ACTIVE INITIAL would, so that a second variable would be initialized by the Tabbed Array value, and then act like a normal constant (with slider).
Anyway to do this?
Tabbed Array and slider?
Re: Tabbed Array and slider?
The GET ... CONSTANTS functions are compatible with synthesim. ACTIVE INITIAL won't work.
https://www.vensim.com/documentation/in ... stants.htm or https://www.vensim.com/documentation/fn ... stants.htm
https://www.vensim.com/documentation/in ... stants.htm or https://www.vensim.com/documentation/fn ... stants.htm
/*
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
*/
Re: Tabbed Array and slider?
Double checking because I didn't think this was true: GET DIRECT CONSTANT() will give me a standard slider in SyntheSim, initialized by the value in the external file? We'd like to not have to use the Input Tool slider, but instead the normal default slider that constant get for free.
Re: Tabbed Array and slider?
I just tested GET XLS and yes, it works that way.
/*
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
*/
Re: Tabbed Array and slider?
Got this working. For others in the future, we figured out what wasn't working at first.
GET DIRECT() provides a slide when there are no subscripts. I guess this is like any subscripted constant. We were using GET DIRECT for a range of XLS cells, since that is the obvious way to read in an array of values.
So what ended up doing was creating a var for each subscript value, and then merging into a new subscripted var for later use in the model. Each of the new, non-subscripted vars uses GET DIRECT for different single cells in XLS, so they now each have sliders.
Thanks Tom.
GET DIRECT() provides a slide when there are no subscripts. I guess this is like any subscripted constant. We were using GET DIRECT for a range of XLS cells, since that is the obvious way to read in an array of values.
So what ended up doing was creating a var for each subscript value, and then merging into a new subscripted var for later use in the model. Each of the new, non-subscripted vars uses GET DIRECT for different single cells in XLS, so they now each have sliders.
Thanks Tom.
Re: Tabbed Array and slider?
That shouldn't be necessary. GET DIRECT should give you a slider whether or not there's a subscript. Example:
/*
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
*/