$EOLCOM //
$TITLE PROTOTYPE HYDROECONOMIC OPTIMIZATION AND POLICY MODEL
$OFFSYMXREF OFFSYMLIST OffLISTING OFFUPPER
OPTION LIMROW= 00, LIMCOL = 0, solprint = on
$ontext
simple river basin hydro-economic model
Technical University of Valencia, Spain
Seminar: hydroeconomic models for water resource systems
may 2010
Email contacts:
Manuel Pulido Velázquez
Technical University of Valencia,Spain
mapuve@hma.upv.es
Frank A. Ward
New Mexico State University, USA
fward@nmsu.edu
$offtext
sets
***********************************************************************
i flows of all kinds
/
inflow_1 inflow at top of watershed
agr_u ag use
urb_u urban use
wet_u wetland use
agr_v downstream of ag gauge
urb_v downstream of urban gauge
wet_v downstream of wetlands gauge
outflow_1 outflow at bottom of watershed
/
inflow(i)
/inflow_1
/
use(i)
/agr_u
urb_u
wet_u
/
gauge(i)
/agr_v
urb_v
wet_v
/
outflow(i)
/outflow_1
/
table bv(i,gauge) basin plumbing
*entries are additions to flows at node at left from a 1 unit change in node flows at top
agr_v urb_v wet_v
* ---------------- headwater inflow node rows (+) ------
inflow_1 1
* ---------------- gauged flows (+) --------------------
agr_v 1
urb_v 1
wet_v
* --------------- use nodes (-) ----------------------
agr_u -1
urb_u -1
wet_u -1
parameter
TB0(i) total benefit at base water use
/agr_u 100000
urb_u 4800000
wet_u 100000
/
MB0(i) marginal benefit at base water use
/agr_u 10
urb_u 200
wet_u 400
/
w0(i) observed water use
/agr_u 1800
urb_u 900
wet_u 100
/
* model calibration.
* 2 parameters below, b1 and b2, calculate parameters of a quadratic benefits function
* That benefits function reproduces observed total and marginal benefits
* produced by the observed water use pattern.
* The function shows observed water use, total benefits, and marginal benefits.
* w0(i) is observed quantity of water of each ith use in a river basin
* TB0(i) is total benefits of that use
* MB0(i) is marginal benefits of that use
* The 3 equations below solve for b1 and b2 to reproduced that underlying total benefits fn
* TB0(i) = b0(i) + b1(i) * w0(i) + b2(i) * w0(i) **2
* MB0(i) = b1(i) + 2 * b2(i) * w0(i)
* Known terms are TB0(i), MB0(i), and w0(i)
B0(i) intercept in total benefits fn by use
B1(i) linear term in total benefits fn
B2(i) quadratic term in benefits fn
;
B0(i) = 0; // zero benefits at zero flows, can be adjusted
B2(i) = [1/(w0(i))**2] * [MB0(i) * w0(i) - TB0(i)] ;
B1(i) = [1/(w0(i)) ] * [TB0(i) - B2(i) * w0(i)**2];
display b0, b1, b2;
parameter source(inflow) annual basin inflows at headwaters -- snowpack or rain
/inflow_1 2800 /
parameter downstream(outflow) proposed (not current) annual basin downstream outflow requirement
/outflow_1 100/
alias (gauge, gaugep);
positive variables
X_v(i) flows all types
Benefit_v(i) benefit by use
variables
marg_benefit_v(use) marginal benefits can be negative
benefit_tot_v total benefits over uses
tot_use_v total water use over nodes
equations
*Hydrology in water terms
Inflows_e(inflow) inflows into basin snowpack or rain or imports
Xg_e(i) river flows inside basin
Outflows_e(outflow) outflows from basin required by law culture or custom
*Economics in money terms
Benefit_e(use) total benefit by use
Marg_benefit_e(use) marginal benefits by use
Benefit_tot_e total benefit over uses
;
Inflows_e(inflow).. X_v(inflow) =E= source(inflow); // iniflows into a river basin from top of watershed
Xg_e(gauge).. X_v(gauge) =E= sum(inflow, Bv(inflow, gauge) * X_v(inflow)) +
sum(gaugep, Bv(gaugep, gauge) * X_v(gaugep)) +
sum(use, Bv(use, gauge) * X_v(use)) ;
Outflows_e(outflow).. X_v(outflow) =e= X_v('wet_v'); // outflows = gauged flows downstream of wetlands
Benefit_e(use).. Benefit_v(use) =e= B0(use) +
B1(use) * X_v(use) +
B2(use) * X_v(use) * X_v(use); // quadratic total benefits fn
Marg_benefit_e(use).. Marg_benefit_v(use) =e= B1(use) + 2 * B2(use) * X_v(use); // linear marginal benefits fn
Benefit_tot_e.. Benefit_tot_v =e= sum(use, benefit_v(use)); // sum benefits over uses
model basepol /all/ ;
* 1st base model **************************************************************************************************
X_v.fx(use) = W0(use); // constrains base model to reproduces measured water use
solve basepol using nlp maximizing Benefit_tot_v; // results should reproduce measured use and benefits
* 2nd model run expands wetlands' use by 5 to find impact on existing uses and benefits ***************************
X_v.lo(use) = 0; // lower bound reduced to zero -- expands feasible space
X_v.up(use) = source('inflow_1'); // upper bound expanded to basin supply -- expands feasible space
X_v.up(use) = W0(use); // no use can use more than historical when wetlands gets more
X_v.up('wet_u') = W0('wet_u') + 5; // policy simulation: expand wetlands use by 5 to predict impacts
solve basepol using nlp maximizing Benefit_tot_v;
* 3rd model raises basin outflows by 100. It will reduce benefits ***********************************************
X_v.lo('outflow_1') = downstream('outflow_1'); //raise from 0 to 100 downstream flow reqts
solve basepol using nlp maximizing Benefit_tot_v;