Functions

Use this forum to post Vensim related questions.
Post Reply
panos3
Junior Member
Posts: 2
Joined: Thu Dec 02, 2021 1:19 pm
Vensim version: PLE

Functions

Post by panos3 »

Hello,

In my model I have a variable depending on a lookup coefficient. As the time passes the coefficient either reduces or increases so does the variable. How can I set the variable to stay constant if the new value for the coefficient is lower than the previous one?
Administrator
Super Administrator
Posts: 4573
Joined: Wed Mar 05, 2003 3:10 am

Re: Functions

Post by Administrator »

I don't understand what you are explaining. But I'll have a guess.

You can use the SAMPLE IF TRUE function to keep the value. For example

my value = sample if true ( coefficient > my value , coefficient, coefficient )

This will only increase "my value" if coefficient is greater than the last value for "my value".
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
Post Reply