L-13 If-Then-Else
-
Upload
manuel-suero -
Category
Documents
-
view
220 -
download
0
Transcript of L-13 If-Then-Else
![Page 1: L-13 If-Then-Else](https://reader035.fdocuments.in/reader035/viewer/2022062317/5695d05f1a28ab9b02923455/html5/thumbnails/1.jpg)
7/23/2019 L-13 If-Then-Else
http://slidepdf.com/reader/full/l-13-if-then-else 1/12
Hydrologic Engineering Center
IF-Then-Else Blocks
Adding Conditional Logic to the HEC-
ResSim Operation Scheme
![Page 2: L-13 If-Then-Else](https://reader035.fdocuments.in/reader035/viewer/2022062317/5695d05f1a28ab9b02923455/html5/thumbnails/2.jpg)
7/23/2019 L-13 If-Then-Else
http://slidepdf.com/reader/full/l-13-if-then-else 2/12
Need for if-then-else logic
Typically, water
control system
regulations follow
conditional paths
for decision-making
Conditions are used
to determine the
applicability of
operational goalsand constraints
![Page 3: L-13 If-Then-Else](https://reader035.fdocuments.in/reader035/viewer/2022062317/5695d05f1a28ab9b02923455/html5/thumbnails/3.jpg)
7/23/2019 L-13 If-Then-Else
http://slidepdf.com/reader/full/l-13-if-then-else 3/12
IF-THEN-ELSE in HEC-ResSim
Operational constraints with
conditional statements
Compound conditions
Nested if-then-else
current inflow < 85% of Average
Or current inflow < 50 cms
current inflow > 85% of Average
And current inflow < 120% of Average
current inflow > 120% of Average
And current Date > 20 Mar 2005
And current Date < 15 Apr 2005
![Page 4: L-13 If-Then-Else](https://reader035.fdocuments.in/reader035/viewer/2022062317/5695d05f1a28ab9b02923455/html5/thumbnails/4.jpg)
7/23/2019 L-13 If-Then-Else
http://slidepdf.com/reader/full/l-13-if-then-else 4/12
How to…Create an IF block
From the Operationstab of the ReservoirEditor, select a zonein your currentoperation set…
Select New from the
If_Block menuor
Right-click on thezone in the tree.
Select Add IF Block…from the context
menu Give your IF Block a
name…
Press OK
![Page 5: L-13 If-Then-Else](https://reader035.fdocuments.in/reader035/viewer/2022062317/5695d05f1a28ab9b02923455/html5/thumbnails/5.jpg)
7/23/2019 L-13 If-Then-Else
http://slidepdf.com/reader/full/l-13-if-then-else 5/12
Adding Conditions
![Page 6: L-13 If-Then-Else](https://reader035.fdocuments.in/reader035/viewer/2022062317/5695d05f1a28ab9b02923455/html5/thumbnails/6.jpg)
7/23/2019 L-13 If-Then-Else
http://slidepdf.com/reader/full/l-13-if-then-else 6/12
Specifying Test Values
Constant -> numericvalue
Date/Time ->
ddmmmyyyy, hh:mm
Current Time Step
Time Series ->External Variable,Model Variable, orState Variable
Seasonal -> ddmmm
( ) -> groupconditional tests
![Page 7: L-13 If-Then-Else](https://reader035.fdocuments.in/reader035/viewer/2022062317/5695d05f1a28ab9b02923455/html5/thumbnails/7.jpg)
7/23/2019 L-13 If-Then-Else
http://slidepdf.com/reader/full/l-13-if-then-else 7/12
Test Values – Time Series
![Page 8: L-13 If-Then-Else](https://reader035.fdocuments.in/reader035/viewer/2022062317/5695d05f1a28ab9b02923455/html5/thumbnails/8.jpg)
7/23/2019 L-13 If-Then-Else
http://slidepdf.com/reader/full/l-13-if-then-else 8/12
Test Values – Time Series
![Page 9: L-13 If-Then-Else](https://reader035.fdocuments.in/reader035/viewer/2022062317/5695d05f1a28ab9b02923455/html5/thumbnails/9.jpg)
7/23/2019 L-13 If-Then-Else
http://slidepdf.com/reader/full/l-13-if-then-else 9/12
Test Operators
![Page 10: L-13 If-Then-Else](https://reader035.fdocuments.in/reader035/viewer/2022062317/5695d05f1a28ab9b02923455/html5/thumbnails/10.jpg)
7/23/2019 L-13 If-Then-Else
http://slidepdf.com/reader/full/l-13-if-then-else 10/12
Compound Conditional Test
![Page 11: L-13 If-Then-Else](https://reader035.fdocuments.in/reader035/viewer/2022062317/5695d05f1a28ab9b02923455/html5/thumbnails/11.jpg)
7/23/2019 L-13 If-Then-Else
http://slidepdf.com/reader/full/l-13-if-then-else 11/12
Add rules to the IF blockAdd ELSE IF and/or ELSE blocks
![Page 12: L-13 If-Then-Else](https://reader035.fdocuments.in/reader035/viewer/2022062317/5695d05f1a28ab9b02923455/html5/thumbnails/12.jpg)
7/23/2019 L-13 If-Then-Else
http://slidepdf.com/reader/full/l-13-if-then-else 12/12
ComplexExample