Is it possible to use the (:AND:) and/or (:OR:) in the 'IF' partof an IF THEN ELSE statement? I am getting errors. Please let me know. I cannot find much in the vensim manuals.
Thanks.
IF THEN ELSE statement
-
- Super Administrator
- Posts: 4832
- Joined: Wed Mar 05, 2003 3:10 am
I tried and I still get an error. I am attaching a file with the equation. Could you please take a look at it and let me know what the problem is?
- Attachments
-
- IF THEN ELSE.doc
- (20.5 KiB) Downloaded 507 times
Two things;
1. "sum" is a reserved word in Vensim (a function acting on subscripts)
2. you cannot use the construct
"14 < client response<= 21"
you have to use
"client response >14 :AND: client response <=21"
Other than that, this is the most complicated nested if-then-else structure I have seen in 15 years, there may very well be a parenthesis problem in there too!
Good luck
Lee
1. "sum" is a reserved word in Vensim (a function acting on subscripts)
2. you cannot use the construct
"14 < client response<= 21"
you have to use
"client response >14 :AND: client response <=21"
Other than that, this is the most complicated nested if-then-else structure I have seen in 15 years, there may very well be a parenthesis problem in there too!
Good luck
Lee