Page 1 of 1

Select a value of a variable during simulations

Posted: Tue Jul 06, 2010 7:08 pm
by claudia
I Try to select a value of a variable at a specific time, for example, my variable is AREA. At time = 2 , this area becomes positive (the only time it is positive, after time 2, it ll be equal to 0 again like before time =2) and I want to conserve this positive value for the rest of the simulations (from time =2 to final time).
I don't know which function I have to use for it. I hope someone can help me ?

Posted: Wed Jul 07, 2010 11:18 am
by Lee Jones
Use the SAMPLE_IF_TRUE function

Posted: Wed Jul 07, 2010 11:40 am
by tomfid
For example, SAMPLE IF TRUE(AREA>0,AREA,AREA), or SAMPLE IF TRUE(AREA>0,AREA,:NA:) - the 2nd version returns a null result (the special value :NA:) until the AREA value is first defined.