SOS!- Please help with simple model!

Use this forum to post Vensim related questions.
Post Reply
vensimnovice
Junior Member
Posts: 2
Joined: Sun Apr 03, 2005 7:44 pm

SOS!- Please help with simple model!

Post by vensimnovice »

Here's the issue:
"The lake has a maximum capacity of 1 million liters. If the amount of water in the lake exceeds 95% of capacity, operators open gates at the bottom of the lake to let water out at a rate of 500 liters per minute.The gates will remain open until the amount of water in the lake drops to 85% ofcapacity, at which time the gates automatically close."
I have the model set up with water in lake as stock, rainfall as inflow (this is given in the problem) and outflow and outflow. I don't know how to incorporate capacity and kick off the outflow when water level exceeds 95% of capacity and close the gates when water level goes down to 85% of capacity. Please help.
LAUJJL
Senior Member
Posts: 1427
Joined: Fri May 23, 2003 10:09 am
Vensim version: DSS

lake model

Post by LAUJJL »

Here is an example.
The variable called open is equal to 1 when the gates are open and 0 if the gates are closed.
The inflow must not be greater then the outflow when the gates are open.
J.J. Laublé
Attachments
lake.mdl
(2.89 KiB) Downloaded 385 times
Pruyn
Senior Member
Posts: 80
Joined: Fri Mar 05, 2004 2:34 pm

Post by Pruyn »

I think you made a mistake somewhere, since when I try your model with a random inflow, it will only bounce around te 95% limit. From vensimnovice's description I understood, the gates should remain open untill the level reached 85% of maximum.
I used a sample if true function to obtain this, see attached model.
Attachments
Lake.mdl
(2.26 KiB) Downloaded 385 times
LAUJJL
Senior Member
Posts: 1427
Joined: Fri May 23, 2003 10:09 am
Vensim version: DSS

lake mdl

Post by LAUJJL »

Hi Pruyn

You are right, there is a 'slight' bug.
The equation for previous open has open set to -open instead to open.
It has nothing to do with random inflows.
The wrong equations worked with my intial deterministic inputs but could not work even with other deterministic inputs.
Ï prefer to use a level instead of the sample if true, because it is easier to uderstand and because the sample if true function is not supposed to work with PLE or PLE plus.
The sample if true has a simpler sketch but it is more difficult to understand.
It was recently reported to work with with certain versions of PLE.
Joined the corrected model.
Thanks for reporting the error.
J.J. Laublé
Attachments
lake3.mdl
(2.94 KiB) Downloaded 382 times
Pruyn
Senior Member
Posts: 80
Joined: Fri Mar 05, 2004 2:34 pm

Post by Pruyn »

Hi Laubé,

I didn't take the time to check your model, since it looked solid. I prefer the sample if true, for I am working with large models and this simplifies the overview. But I see your point.

Jeroen
Post Reply