switching data entry options

Use this forum to post Vensim related questions.
Post Reply
tzallgoood
Newbie
Posts: 1
Joined: Thu Jul 09, 2009 7:18 pm

switching data entry options

Post by tzallgoood »

I am relatively new to SD and vensim. I have figured out how to define variables, read in data from a spreadsheet, etc. Is there a way to switch between reading in the data from the spreadsheet to allowing the user to set the value with a slider.

I was thinking about using IF THEN ELSE:

Variable 1[subscript1, subscript2] =
IF THEN ELSE(switch=1,
GET XLS CONSTANTS('*.xls','Sheet1','B2'),
GAME (50))

I am having trouble getting it to work. Am I on the right track? Is there a better way?

Thanks
bob@vensim.com
Senior Member
Posts: 1107
Joined: Wed Mar 12, 2003 2:46 pm

Post by bob@vensim.com »

GAME need to appear first on the right so you need

var1 = IT THEN ELSE(switch=1,const from spreadsheet,var from user)
const from spreadsheet = GET XLS CONSTANTS('test.xls','Sheet1','B2')
var from user = GAME (50)

That is, just break up what you are doing into multiple equations.
Post Reply