Hi all
I have below function, but when I wanna simulate it, show error of expecting an operator.
I want to ask you to help me to solve this error.
IF THEN ELSE (Agricultural water demand > Agricultural surface water use rate, (MIN (Groundwater allocation volume for consumptive use/Time)-Industrial Groundwater Use-Domestic Groundwater Use), Agricultural water demand-Agricultural surface water use rate), 0)
a: Agricultural water demand > Agricultural surface water use rate
b:MIN ((Groundwater allocation volume for consumptive use/Time)-Industrial Groundwater Use-Domestic Groundwater Use), Agricultural water demand-Agricultural surface water use rate
c:0
Thanks
If then Else
-
- Super Administrator
- Posts: 4827
- Joined: Wed Mar 05, 2003 3:10 am
Re: If then Else
Try this, looks like your brackets are a little muddled up.
IF THEN ELSE ( Agricultural water demand > Agricultural surface water use rate
, MIN ( ( Groundwater allocation volume for consumptive use/Time ) - Industrial Groundwater Use-Domestic Groundwater Use
, Agricultural water demand-Agricultural surface water use rate)
, 0)
IF THEN ELSE ( Agricultural water demand > Agricultural surface water use rate
, MIN ( ( Groundwater allocation volume for consumptive use/Time ) - Industrial Groundwater Use-Domestic Groundwater Use
, Agricultural water demand-Agricultural surface water use rate)
, 0)
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: If then Else
Thank you so much.Administrator wrote: ↑Fri Jul 23, 2021 12:04 pm Try this, looks like your brackets are a little muddled up.
IF THEN ELSE ( Agricultural water demand > Agricultural surface water use rate
, MIN ( ( Groundwater allocation volume for consumptive use/Time ) - Industrial Groundwater Use-Domestic Groundwater Use
, Agricultural water demand-Agricultural surface water use rate)
, 0)
Re: If then Else
On other thought:
Groundwater allocation volume for consumptive use/Time will produce a declining allocation as simulation time increases. This would be especially problematic if INITIAL TIME = 0. Maybe a parameter describing the minimum time required to consume the remaining volume would be more appropriate?
Groundwater allocation volume for consumptive use/Time will produce a declining allocation as simulation time increases. This would be especially problematic if INITIAL TIME = 0. Maybe a parameter describing the minimum time required to consume the remaining volume would be more appropriate?
/*
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
*/