GET XLS CONSTANT + STEP functions

Use this forum to post Vensim related questions.
Post Reply
ema
Junior Member
Posts: 7
Joined: Wed Mar 07, 2018 8:12 am
Vensim version: DSS

GET XLS CONSTANT + STEP functions

Post by ema »

Dear Vensim support staff,

I have a model in which I am heavily using the GET XLS CONSTANT function to call initial stock values and parameter values from an Excel file. This allows me to easily change the initial conditions when initialising the run.

I would now like to test some shock dynamics, but realised that Vensim won't allow me to add a STEP function to the definition of the constant whose value I call via the GET XLS CONSTANT function. It gives me an error message: 'Only literals or variables separated by commas allowed'. The only way I managed to make it work is to create two distinct variables: one that calls the value from Excel, and another one equal to the first variable plus the STEP function.

Is there any more efficient way to do this?

All the best, and many thanks for your help.

Emanuele
Administrator
Super Administrator
Posts: 4589
Joined: Wed Mar 05, 2003 3:10 am

Re: GET XLS CONSTANT + STEP functions

Post by Administrator »

ema wrote:Is there any more efficient way to do this?
No, this is the most efficient and best way to do it.
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
tomfid
Administrator
Posts: 3808
Joined: Wed May 24, 2006 4:54 am

Re: GET XLS CONSTANT + STEP functions

Post by tomfid »

Also, this is true in general. A constant has to be a single number so that it can be attached to sliders, changed in optimizations, etc., regardless of its source.
Post Reply