Vensim Model Interface Run Time
|Muyuan Li 9 posts||
I am working on designing an interface for a vensim model. Since the users want to keep using the model in the future, but we just put historical data so far and set the run time as the time till now. I want to let the users change the run time and then the chart could automatically show the simulation result and the x-axis automatically change the label too. For example, it's June 2012 now. The model starts from January 2012, so the current run time is 6 (months). I hope the users could change how long the model could run, maybe another 6 months or another 1 year. In this matter, I hope the chart could show another more 6 month or 1 year result instead of the current 6 month. Also, the label of the chart could change from 1-6 to 1-12 or 1-18. If you have any idea or suggestion, please share with me. Thank you very much.
|Billy Schoen... Administrator 255 posts||
You will need to edit the equation for Final Time in your model. You can do that by placing a shadow variable for it in your sketch then converting it to a model variable (using the button to the left of the shadow variable button, and to the right of the flow icon). Once you have done that you can edit the equation for final time like a normal variable. To that equation you will want to do something like
6 + Extra Time
And to your model you will add a variable called Extra Time which represents the amount of extra time that the user wants to run. Make sure to set Extra Time to an auxiliary with gaming so that it can be changed over the course of the simulation. At this point you have finished editing your model and you now need to upload it to Simulate.
The charts in the UI designer will automatically adapt (along with the X axis labels)
Please log in to reply to topics.