Hi everyone, I have the following problem:
I have a electricity flow which is decribed as: capacity * "CHP on" ~J/S
capacity=5000 ~J/S
CHP on=IFTHENELSE(value X>0,1,0)
so the flow will only be switched on when value X>0 which is good. But at the moment the flow starts it needs to continue for 30minutes (which is de minimum runtime of the machine) regardless what value X will be after that.
Would you have any suggestions how to solve this problem?
thanks in advance,
best regards,
Wouter Maas
Electrical Switch
-
- Super Administrator
- Posts: 4841
- Joined: Wed Mar 05, 2003 3:10 am
The key is that the minimum run time constraint means that the machine's state is not memoryless. That means the machine's run status needs to be a level (state variable).
One approach is in the attached model.
You might also take a look at the discrete event models in the user guide, in C:\Program Files\Vensim\models\mguide\9DISCRET
Tom
One approach is in the attached model.
You might also take a look at the discrete event models in the user guide, in C:\Program Files\Vensim\models\mguide\9DISCRET
Tom
- Attachments
-
- elecSwitch.mdl
- (3.29 KiB) Downloaded 818 times
/*
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
*/
Dear Tom,
thanks a lot for the help! The system like this works indeed. I am only wondering about one the device starting and stopping. YOu devide there with the time step which makes the unit 1/minute. That means that I have to change the unit into 1/second if I change my timestep to second?
And I assume that the last start time needs to be: HP starting >0,Time,Time?
thanks again,
gr Wouter
[Edited on 7-14-2010 by walin]
[Edited on 7-14-2010 by walin]
thanks a lot for the help! The system like this works indeed. I am only wondering about one the device starting and stopping. YOu devide there with the time step which makes the unit 1/minute. That means that I have to change the unit into 1/second if I change my timestep to second?
And I assume that the last start time needs to be: HP starting >0,Time,Time?
thanks again,
gr Wouter
[Edited on 7-14-2010 by walin]
[Edited on 7-14-2010 by walin]
Correct on both points.
- units change to seconds (or whatever your time dimension is).
- my syntax of SAMPLE IF TRUE( starting, time, time ) works, because Vensim treats starting like a boolean variable, 0=false, >0 = true (I think) but your formulation, SAMPLE IF TRUE( starting>0, time, time) is probably clearer and more robust.
Tom
- units change to seconds (or whatever your time dimension is).
- my syntax of SAMPLE IF TRUE( starting, time, time ) works, because Vensim treats starting like a boolean variable, 0=false, >0 = true (I think) but your formulation, SAMPLE IF TRUE( starting>0, time, time) is probably clearer and more robust.
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
*/