Hello,
In my model in Vensim I have one subscript StoreID with three different stores as elements. I want to compare what would happen with the stocks and flows in the model if one of these stores is closed.
My plan of action would be to remove one of the elements from the active list, so that it would be "unactive". The idea is that this store would then not be taken into account in the calculations. However when I run the simulation with that one element left out, the outcomes are still the same as with all three elements active.
Could anyone help me with what I am trying to do?
Tldr: is there any way to leave out one of the subscript elements without rewriting all the formulas/inputs etc?
Inactive subscripts
Re: Inactive subscripts
When you modify suscripts you must exit Vensim and enter it again and then make your run.
Is it not possible to modify interactively the structure of a Vensim model. i think that Ventity can do that.
if you want to make it possible to make a store inactive interactively, it is better to build a constant that will show which stores are active, value 0 or 1 and modify your equations accordingly, taking into consideration which stores are active. Doing that by modifying the structure, is more sophisticated and to my opinion more error prove. It is maybe possible to do it in Ventity in a clean way.
JJ
Is it not possible to modify interactively the structure of a Vensim model. i think that Ventity can do that.
if you want to make it possible to make a store inactive interactively, it is better to build a constant that will show which stores are active, value 0 or 1 and modify your equations accordingly, taking into consideration which stores are active. Doing that by modifying the structure, is more sophisticated and to my opinion more error prove. It is maybe possible to do it in Ventity in a clean way.
JJ
-
- Super Administrator
- Posts: 4658
- Joined: Wed Mar 05, 2003 3:10 am
Re: Inactive subscripts
You will need to modify the model. Removing them from the "active" list does not change the model in any way, all it does is remove them from graphs etc.BrittZ wrote: ↑Mon May 13, 2024 12:33 pm Hello,
In my model in Vensim I have one subscript StoreID with three different stores as elements. I want to compare what would happen with the stocks and flows in the model if one of these stores is closed.
My plan of action would be to remove one of the elements from the active list, so that it would be "unactive". The idea is that this store would then not be taken into account in the calculations. However when I run the simulation with that one element left out, the outcomes are still the same as with all three elements active.
Could anyone help me with what I am trying to do?
Tldr: is there any way to leave out one of the subscript elements without rewriting all the formulas/inputs etc?
Maybe the easiest thing to do is have a zero/one multiplier. Here is a simple example, create a constant that determines when the store closes (TIME STORE CLOSES), then work out if the store is "active" (STORE IS ACTIVE) and multiply existing calculations by this. If the store is inactive, the multiplier is zero.
TIME STORE CLOSES[storeid] = 50
STORE IS ACTIVE[storeID] = if then else (time < TIME STORE CLOSES[storeid] , 1 , 0 )
store revenue[storeID] = old calculation[storeID] * STORE IS ACTIVE[storeID]
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
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Units are important!
http://www.bbc.co.uk/news/magazine-27509559
Re: Inactive subscripts
Hello all,
Thank you for your quick replies. This sounds like a good foulproof way to work with the different IDs.
Thank you for your quick replies. This sounds like a good foulproof way to work with the different IDs.