l-13 if-then-else

12
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

Upload: manuel-suero

Post on 18-Feb-2018

220 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: L-13 If-Then-Else

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

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

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

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

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

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

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

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

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

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

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

7/23/2019 L-13 If-Then-Else

http://slidepdf.com/reader/full/l-13-if-then-else 12/12

ComplexExample