Dear Tom, Administrator,
I want to make a comparision between two consecutive value by IF THEN ELSE function. Then, I need to take these values and compare. Somthing like the following example.
IF THEN ELSE (value at Time i = value at Time i+1, 0, value at Time i+1 - value at Time i)
Could you please help me?
BR,
Taking a value of a specific time
Re: Taking a value of a specific time
I just solved it by constituting Time i+1 via DELAY FIXED function by one unit. Afterward, I deducted the two variables and it works! However, is there another direct solution?
-
- Super Administrator
- Posts: 4664
- Joined: Wed Mar 05, 2003 3:10 am
Re: Taking a value of a specific time
This is the correct way to do it.Hossein wrote:I just solved it by constituting Time i+1 via DELAY FIXED function by one unit. Afterward, I deducted the two variables and it works! However, is there another direct solution?
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
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Units are important!
http://www.bbc.co.uk/news/magazine-27509559
Re: Taking a value of a specific time
Dear Tom, Administrator,
I want to get the value of the first time of a flow and use it as the initial value of its level (please see the attached figure) i. e. I want to use the value of "Emission rate" at the first time as the initial value of "Total emission". Could you please help?
BR,
I want to get the value of the first time of a flow and use it as the initial value of its level (please see the attached figure) i. e. I want to use the value of "Emission rate" at the first time as the initial value of "Total emission". Could you please help?
BR,
- Attachments
-
- Untitled.png (92.67 KiB) Viewed 3383 times
-
- Super Administrator
- Posts: 4664
- Joined: Wed Mar 05, 2003 3:10 am
Re: Taking a value of a specific time
This should work, have you tried it?
total emissions = integ ( emissions rate, emissions rate).
total emissions = integ ( emissions rate, emissions rate).
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
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Units are important!
http://www.bbc.co.uk/news/magazine-27509559
Re: Taking a value of a specific time
Dear Administrator,
Thanks for your reply.
Actually, I did not try it because I thought since emission rate is changing, the initial value of total emission would also change! However, now, I tried it and worked!
Thanks again.
Thanks for your reply.
Actually, I did not try it because I thought since emission rate is changing, the initial value of total emission would also change! However, now, I tried it and worked!
Thanks again.
Re: Taking a value of a specific time
Setting
Total Emissions = Emissions Rate
is dimensionally inconsistent (TonC vs. TonC/year, for example).
You probably want to include some kind of time constant on the right hand side, so for example
Total Emissions = Emissions Rate*Initial History Duration
Initial History Duration = 1 year (or whatever).
Total Emissions = Emissions Rate
is dimensionally inconsistent (TonC vs. TonC/year, for example).
You probably want to include some kind of time constant on the right hand side, so for example
Total Emissions = Emissions Rate*Initial History Duration
Initial History Duration = 1 year (or whatever).
/*
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
*/