Water: Use of Decision Tables To Simulate Management in SWAT+
Water: Use of Decision Tables To Simulate Management in SWAT+
Water: Use of Decision Tables To Simulate Management in SWAT+
Article
Use of Decision Tables to Simulate Management
in SWAT+
Jeffrey G. Arnold 1, *, Katrin Bieger 2 , Michael J. White 1 ID
, Raghavan Srinivasan 3 ID
,
John A. Dunbar 4 and Peter M. Allen 4
1 Grassland Soil and Water Res. Lab, USDA-ARS, Temple, TX 76502, USA; [email protected]
2 Texas A&M AgriLife, Temple, TX 76502, USA; [email protected]
3 Texas A&M AgriLife, College Station, TX 77840, USA; [email protected]
4 1301 S University Parks Dr, Waco, TX 76706, USA; [email protected] (J.A.D.);
[email protected] (P.M.A.)
* Correspondence: [email protected]; Tel.: +1-254-770-6502
Received: 9 May 2018; Accepted: 28 May 2018; Published: 31 May 2018
Abstract: Decision tables have been used for many years in data processing and business applications
to simulate complex rule sets. Several computer languages have been developed based on rule
systems and they are easily programmed in several current languages. Land management and
river–reservoir models simulate complex land management operations and reservoir management
in highly regulated river systems. Decision tables are a precise yet compact way to model the rule
sets and corresponding actions found in these models. In this study, we discuss the suitability of
decision tables to simulate management in the river basin scale Soil and Water Assessment Tool
(SWAT+) model. Decision tables are developed to simulate automated irrigation and reservoir
releases. A simple auto irrigation application of decision tables was developed using plant water
stress as a condition for irrigating corn in Texas. Sensitivity of the water stress trigger and irrigation
application amounts were shown on soil moisture and corn yields. In addition, the Grapevine
Reservoir near Dallas, Texas was used to illustrate the use of decision tables to simulate reservoir
releases. The releases were conditioned on reservoir volumes and flood season. The release rules
as implemented by the decision table realistically simulated flood releases as evidenced by a daily
Nash–Sutcliffe Efficiency (NSE) of 0.52 and a percent bias of −1.1%. Using decision tables to simulate
management in land, river, and reservoir models was shown to have several advantages over
current approaches, including: (1) mature technology with considerable literature and applications;
(2) ability to accurately represent complex, real world decision-making; (3) code that is efficient,
modular, and easy to maintain; and (4) tables that are easy to maintain, support, and modify.
1. Introduction
based on accumulated heat units. However, current algorithms in these models do not use modern
rule-based coding and do not use structured decision tables to input the conditions and action.
For example, EPIC, APEX, and SWAT+ currently have automated irrigation scheduling that is based
solely on a plant stress or water deficit trigger. Decision tables will allow us to easily add complex
conditions for scheduling the irrigation application (e.g., crop type, phenological stage, or water
availability in reservoirs) which is not possible in the current models.
1.4. Objectives
The aim of this study is to develop a robust and efficient methodology to simulate land and
water management in ecohydrologic models. Specific objectives are: (1) to discuss the suitability of
decision tables to simulate management in the river basin scale Soil and Water Assessment Tool [4,17]
model; and (2) to describe an enhanced SWAT+ framework which incorporates decision tables for
management and reservoir operations.
four quadrants: I. Conditions, II. Condition Alternatives, III. Action Entries or Outcomes, and IV.
Actions (Table 1).
Water 2018, 10, x FOR PEER REVIEW 3 of 10
Water 2018, 10, x FOR PEER REVIEW 3 of 10
Water 2018, 10, x FOR PEER REVIEW
Table 1. The four quadrants of a decision table. 3 of 10
Table 1. The four quadrants of a decision table.
Table 1. The four quadrants of a decision table.
Table 1. The four quadrants of a decision table.
I.I.Conditions
Conditions II.Condition
II. ConditionAlternatives
Alternatives
I. Conditions II. Condition Alternatives
I. Conditions II. Condition Alternatives
Table 2. Cont.
Quadrant II: Alternatives. There are four possible alternative operators: >, <, =, and -.
The alternative is the final piece to construct the “if” statement needed to implement the associated rule.
Condition Alternative
“soil_water hru 1 fc × 0.7” >
The model will determine if the soil water in hru (hydrologic response unit) 1 is greater than
0.7 × fc. The “-” symbol is used if the condition is not relevant for a specific alternative.
Quadrant III: Action Entries. Action entries or outcomes are either yes or no and specify whether or
not an action is triggered. Each condition within an alternative must be true. If all conditions specified
by an alternative are true, and the outcome is “y”, then the associated action will be performed.
The only options for action entries are “y” and “n”.
Quadrant IV: Actions. The action type and associated information needed to perform the action
are input in quadrant IV. The actions currently coded in SWAT+ are listed in Table 3. Most of the
actions are related to land management, including planting, harvesting, tillage, fertilizer applications,
and drainage water management. There are also currently actions for reservoir release and land use
change. For some actions, there are multiple options to execute the action. For the reservoir release
action, the user can input a release rate, a weir equation, or drawdown days. The decision table
contains a constant and file pointer for all the management actions. The file pointer corresponds to
the application type in the associated data file. The plant action points to plant growth parameters,
the harvest operation points to data for the method of harvest, and the tillage action points to the
tillage implement. Fertilizer and irrigation use the constant to specify the amount of fertilizer or water
applied and the file pointer corresponds to the data needed for the application method (e.g., sprinkler
irrigation or broadcast fertilizer). For the land-use change actions, the file pointer corresponds to the
updated land use.
Table 3. Actions currently coded in SWAT+ for use in the decision tables.
Conditions Subroutine. This subroutine loops through all conditions and checks all alternatives
Conditions Subroutine. This subroutine loops through all conditions and checks all alternatives
for each condition. Since all conditions must be met for an alternative to be positive, we start with the
foralternative
each condition.
being Since alland
positive conditions must be if
set it to negative met
anyfor an alternative
condition to beInside
is not met. positive, we start with
the conditions loop,the
alternative being positive
a case statement is usedand set it tothe
to identify negative if anyconditional
appropriate condition isvariable.
not met.Then,
Inside the conditions
appropriate SWAT+loop,
a case statement is used to identify the appropriate
variables are used relative to each conditional variable. conditional variable. Then, appropriate SWAT+
variables are used
Actions relative toThis
Subroutine. eachsubroutine
conditional variable.
loops through all actions and if one (or more) of the
Actions Subroutine.
alternatives Thiswill
is “y” the action subroutine loops
be performed. through
SWAT+ all actions
variables and if for
are updated oneeach
(or action
more)using
of the
alternatives is “y” the action will be performed. SWAT+ variables are updated for each
the constant and file pointer. When the variables are set for the specified action, the corresponding action using
theSWAT+
constant and file pointer.
subroutine When
is called as shown theinvariables
Table 3. are set for the specified action, the corresponding
SWAT+ subroutine is called as shown in Table 3.
3. Results
3. Results
The name of the decision table is “auto_irr” and it contains one condition, one alternative, and one
action. The logic flows clockwise from quadrant I to IV. In quadrant I, the conditional variable
(w_stress) for hru 0 is defined (0 specifies the current hru and thus can be used for any hru in the
simulation). The conditional limit is a constant (0.8). A limit variable and operator are not needed in
this case. Next, we use the alternative in quadrant II and determine if w_stress <0.8. If the outcome
is yes (“y” in quadrant III), we move clockwise to the action in quadrant IV. The action is to irrigate
25 mm using a sprinkler application (found in the irrigation data file).
This is the simplest case and could be input and coded without the use of a decision table.
However, users typically need to add additional conditions, i.e., only irrigate a certain crop in the
rotation, only irrigate during a certain growth stage, or only irrigate when reservoirs or aquifers are at
a specified level. The decision table allows for the addition of conditions and actions in a simple and
robust structure.
Soilmoisture,
Figure 1. Soil moisture,precipitation,
precipitation,
andand irrigation
irrigation of continuous
of continuous corncorn at Temple,
at Temple, TexasTexas using:
using: (1) a
(1) a plant
plant stressstress
triggertrigger of 0.8
of 0.8 and and application
application of 25 mm;of and
25 mm;
(2) a and
plant(2) a plant
stress stress
trigger trigger
of 0.6 of 0.6 and
and application
application
of 50 mm. of 50 mm.
The release rules as implemented by the decision table realistically simulated flood releases
as evidenced by a daily Nash–Sutcliffe Efficiency (NSE) of 0.52 and a percent bias of −1.1% [20].
Measured and simulated daily flows are shown in Figure 2. However, low flow releases were difficult
to simulate accurately due to uncertainty in specific local conditions and without understanding
of reservoir-specific release rules. We are developing simple generic rules that can be applied to
reservoirs across the U.S. for national policy simulations. With local knowledge of individual reservoir
release rules, the decision table could be modified to simulate very specific rules and test and optimize
alternative rule set parameters.
Water 2018, 10, x FOR PEER REVIEW 8 of 10
This is a relatively simple example focusing on flood control. More complex rules can easily be
addedflows.
to simulate reservoirs
Watershed managed
conditions in seriesirrigation
including by including conditions
demand, plant for other reservoirs
conditions, and soiland rivercan be
water
flows.added to the conditions
Watershed conditions.including
Also, weirirrigation
outflow as a function
demand, of storage
plant can replace
conditions, and soilthe constant
water outflow
can be
addedshown
to the in this example.
conditions. Also, weir outflow as a function of storage can replace the constant outflow
shown in this example.
2000
1800
Reservoir Outflow (ha-m)
Measured Outflow
1600
Simulated Outflow
1400
1200
1000
800
600
400
200
0
1987 1988 1989 1990
Time (daily)
Figure 2. Measured and simulated daily reservoir releases for Grapevine Reservoir near Dallas, Texas.
Figure 2. Measured and simulated daily reservoir releases for Grapevine Reservoir near Dallas, Texas.
3.2. Management Optimization
3.2.use
The Management Optimization
of a decision table as an external control on SWAT+ model runs also makes it possible to
find decision tables that optimize
The use of a decision tablecertain SWAT+
as an model
external outputs.
control Some choices
on SWAT+ of condition
model runs variable
also makes it possible
limitsto
and thedecision
find actions they trigger
tables will resultcertain
that optimize in more favorable
SWAT+ outcomes
model from
outputs. the SWAT+
Some choices model,
of condition
such as increased
variable crop
limits andyield or reductions
the actions in contaminant
they trigger will result outputs. Other choices
in more favorable of decision
outcomes table
from the SWAT+
parameters
model, will
suchproduce less favorable
as increased outcomes.
crop yield Findingin
or reductions a set of decision outputs.
contaminant parameters thatchoices
Other optimize
ofthe
decision
table parameters will produce less favorable outcomes. Finding a set of decision parameters that
optimize the output of SWAT+ in a specified way has the form of a non-linear optimization problem.
In optimization problems, one formulates an objective function to be minimized that consists of a
combination of model outputs, with assigned weights to specify the relative importance placed on
the different outputs. For example, it would be possible to define an objective function that decreases
Water 2018, 10, 713 9 of 10
output of SWAT+ in a specified way has the form of a non-linear optimization problem. In optimization
problems, one formulates an objective function to be minimized that consists of a combination of model
outputs, with assigned weights to specify the relative importance placed on the different outputs.
For example, it would be possible to define an objective function that decreases in amplitude as
predicted crop yields increase and contaminant outputs decrease, with the two competing factors
weighted according to their relative importance. The solution of the optimization problem is the set
of free variables that produce the smallest possible objective function. In this case, the free variables
would be the decision table condition limits and their associated actions, such as conditions under
which crops are irrigated and fertilized and how much water and fertilizer are applied. Non-linear
optimization problems such as this, in which the derivatives of the objective function with respect to
the free variables are not easily computed, are commonly solved by the method of simulated annealing,
which requires only repeated calculation of the objective function for different sets of free variables [21].
Combining simulated annealing with decision table controlled SWAT+ simulations could be used to
optimize management practices to fit different competing performance criteria.
(1) The structure of a decision table can be easily understood by model users. Decision tables were
developed over 50 years ago, and there is considerable literature and tutorials available on-line
related to developing decision tables.
(2) Decision tables accurately represent complex, real world decision-making.
(3) The code is more modular and easier to maintain than code to simulate management in existing
land management models.
(4) The code to implement decision tables is more efficient than languages developed for specific
river and reservoir models.
(5) Decision tables can be easily maintained and supported.
(6) It is relatively simple to add the decision tables approach to legacy land, river, and
reservoir models.
As incorporated into SWAT+, the decision table is a robust and efficient method to simulate
complex, rule-based management. Examples of automated irrigation and reservoir release were shown
and other management operations simulated with decision tables were listed. In addition, decision
tables have the potential for use in water rights and water transfers, states and transition of natural
ecosystems, and the management of animal herds.
Author Contributions: Conceptualization, J.G.A. and P.M.A.; Data curation, M.J.W.; Formal analysis, R.S.;
Investigation, J.G.A. and M.J.W.; Methodology, J.A.D.; Validation, K.B.; Writing (original draft), J.G.A.; Writing
(review and editing), K.B., M.J.W., R.S., J.A.D., and P.M.A.
Conflicts of Interest: The authors declare no conflict of interest.
Water 2018, 10, 713 10 of 10
References
1. Williams, J.R.; Jones, C.A.; Dyke, P.T. A modeling approach to determining the relationship between erosion
and soil productivity. Trans. ASAE 1984, 27, 129–144. [CrossRef]
2. Williams, J.R.; Izaurralde, R.C.; Williams, C.; Steglich, E.M. Agricultural Policy/Environmental Extender
Model—Theoretical Documentation Version 0806. Texas A&M AgriLife Research. Available online:
http://epicapex.tamu.edu/files/2017/03/THE-APEX0806-theoretical-documentation-Oct-2015.pdf
(accessed on 15 May 2015).
3. Tuppad, P.; Winchell, P.M.; Wang, X.; Srinivasan, R.; Williams, J.R. ArcAPEX: ArcGIS interface for agricultural
policy environmental extender (APEX) hydrology/water quality model. Int. Agric. Eng. J. 2009, 18, 59–71.
4. Bieger, K.; Arnold, J.G.; Rathjens, H.; White, M.J.; Bosch, D.D.; Allen, P.M.; Volk, M.; Srinivasan, R.
Introduction to SWAT+, a completely revised version of the Soil and Water Assessment Tool. J. Am. Water
Resour. Assoc. 2017, 53, 115–130. [CrossRef]
5. Arnold, J.G.; Moriasi, D.; Gassman, P.W.; Abbaspour, K.C.; White, M.J.; Srinivasan, R.; Santhi, C.;
Harmel, R.D.; van Griensven, A.; Van Liew, M.W.; et al. SWAT: Model use, calibration, and validation.
Trans. ASABE 2012, 55, 1491–1508. [CrossRef]
6. Wurbs, R.A. Reservoir/river systems management models. Texas Water J. 2012, 3, 26–41.
7. Wurbs, R.A. Modeling and Analysis of Reservoir System Operations; Prentice-Hall: Upper Saddle River, NJ, USA,
1996; ISBN 0-13-605924-4.
8. Labadie, J.W. MODSIM: Decision support system for integrated river basin management. In Proceedings
of the iEMS International Congress on Environmental Modelling and Software, Burlington, VT, USA,
24-28 June 2006.
9. Zagona, E.A.; Fulp, T.J.; Shane, R.; Magee, T.; Goranflo, H.M. RiverWare: A generalized tool for complex
reservoir system modeling. J. Am. Water Resour. Assoc. 2001, 37, 913–929. [CrossRef]
10. DHI. MIKE BASIN User’s Manual; DHI Water and Environment: Copenhagen, Denmark, 2006.
11. Sulis, A.; Sechi, G.M. Comparison of generic simulation models for water resource systems.
Environ. Model. Softw. 2013, 40, 214–225. [CrossRef]
12. Yates, D.; Sieber, J.; Purkey, D.; Huber-Lee, A. WEAP21—A demand-, priority-, and preference-driven water
planning model. Water Int. 2005, 30, 487–500. [CrossRef]
13. Gildersleeve, T.R. Decision Tables and Their Practical Application in Data Processing; Prentice Hall: Upper Saddle
River, NJ, USA, 1970; ISBN-13: 978-0131973763.
14. Giarratano, J.C.; Riley, G. Expert Systems, 3rd ed.; PWS Publishing Co.: Boston, MA, USA, 1998;
ISBN 0534950531.
15. Giarratano, J.C. CLIPS User’s Guide: Volume 1, Rules, CLIPS version 5.0; Software Technology Branch, Lyndon
B. Johnson Space Center: Houston, TX, USA, 1991.
16. Amerding, G.W. FORTAB: A Decision Table Language for Scientific Computing Applications; TR RM-3306-PR;
RAND Corporation: Pittsburgh, PA, USA, 1962.
17. Arnold, J.G.; Srinivasan, R.; Muttiah, R.S.; Williams, J.R. Large area hydrologic modeling and assessment
part I: Model development. J. Am. Water Resour. Assoc. 1998, 34, 73–89. [CrossRef]
18. Williams, J.R.; Arnold, J.G.; Kiniry, J.R.; Gassman, P.W.; Green, G.J. History of model development at Temple,
Texas. Hydrol. Sci. 2008, 53, 948–960. [CrossRef]
19. U.S. Army Corps of Engineers. Developing Seasonal and Long-Term Reservoir System Operation Plans Using
HEC-PRM; Report RD-40; Hydrologic Engineering Center: Davis, CA, USA, 1996; 445p.
20. Moriasi, D.N.; Arnold, J.G.; Van Liew, M.W.; Bingner, R.L.; Harmel, R.D.; Veith, T. Model evaluation
guidelines for systematic quantification of accuracy of watershed simulations. Trans. ASABE 2007, 50,
885–900. [CrossRef]
21. Sen, M.K.; Stoffa, P.L. Nonlinear one-dimensional seismic waveform inversion using simulated annealing.
Geophysics 1991, 56, 1624–1638. [CrossRef]
© 2018 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access
article distributed under the terms and conditions of the Creative Commons Attribution
(CC BY) license (http://creativecommons.org/licenses/by/4.0/).