Vensim Compare Help
Vensim Compare Help
Im trying to use a range of numbers in an IF THEN ELSE type of situation. so at 100 the number would be say 5 but at 20 the number would be 3. Im running into problems trying to implement this and could use a little help.
One possibility:
output = IF THEN ELSE( input = 100, 5, IF THEN ELSE( input = 20, 3, ... ))
If you have more than one or two states, this is likely to get confusing. You might consider a lookup instead.
Check the User's Guide, Chapter 8, "building a function with lookups"
Tom
output = IF THEN ELSE( input = 100, 5, IF THEN ELSE( input = 20, 3, ... ))
If you have more than one or two states, this is likely to get confusing. You might consider a lookup instead.
Check the User's Guide, Chapter 8, "building a function with lookups"
Tom
/*
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
Again, Help>Vensim Manuals>Contents - Chapter 8 is your best bet.
Alternatively, take a look at some sample models, which are typically in your Vensim directory. For example, C:\Program Files\Vensim\models\guide\CHAP08\COMPLETE\RABBIT3 has an example lookup, "effect of rabbit crowding on deaths".
Tom
Alternatively, take a look at some sample models, which are typically in your Vensim directory. For example, C:\Program Files\Vensim\models\guide\CHAP08\COMPLETE\RABBIT3 has an example lookup, "effect of rabbit crowding on deaths".
Tom
/*
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
-
- Super Administrator
- Posts: 4841
- Joined: Wed Mar 05, 2003 3:10 am