Analysis of water allocation results

Considering all demands as exogenous and climate independent, we explore the solution of the water allocation problem in function of the runoff conditions.

Assumptions

All demands are exogenous and set to the 2010 estimates by USGS at the county-scale. Within each county, water demands are met using several sources conjunctively: surface water, groundwater or by importing water from a supersource. The optimization finds the optimal solution in terms of cost, surface water being considered as the cheapest option, followed by groundwater, then importation. The optimization is performed for two timesteps of 6 months. Several runs are performed each with a different climate.

Case 1: optimization without reservoir


In [28]:
include("../analysis/analysis_conjunctive.jl");


┌──────────────────────────────────────────────────┐
    ▄▄    ▄▄      ▄▄    ▄▄       ▄▄▄▄    ▄▄    ▄▄ 
   ████   ██      ██   ████    ▄█▀▀▀▀█   ██    ██ 
   ████   ▀█▄  ▄█▀   ████    ██▄       ██    ██ 
  ██     ██ ██ ██     ██    ▀████▄   ████████ 
  ██████   ███▀▀███   ██████        ▀██  ██    ██ 
 ▄██  █▄  ███  ███  ▄█  ██▄  █▄▄▄▄▄█▀  ██    ██ 
 ▀▀    ▀▀  ▀▀▀  ▀▀▀  ▀▀    ▀▀   ▀▀▀▀▀    ▀▀    ▀▀ 
└──────────────────────────────────────────────────┘

Welcome to AWASH, the America's Water Model, version 0.7.

Loading from saved region network...
Loading from saved water network...
WARNING: replacing module _mimi_implementation_WaterDemand
WARNING: replacing module _mimi_implementation_WaterNetwork
Optimize a model with 68238 rows, 112306 columns and 4044378 nonzeros
Coefficient statistics:
  Matrix range    [1e+00, 1e+00]
  Objective range [1e-01, 1e+03]
  Bounds range    [0e+00, 0e+00]
  RHS range       [4e-02, 5e+06]

Concurrent LP optimizer: dual simplex and barrier
Showing barrier log only...

Presolve removed 16528 rows and 20567 columns
Presolve time: 1.73s
Presolved: 51710 rows, 91739 columns, 3586900 nonzeros

Ordering time: 4.85s

Barrier statistics:
 AA' NZ     : 4.708e+06
 Factor NZ  : 3.282e+07 (roughly 300 MBytes of memory)
 Factor Ops : 1.035e+11 (roughly 4 seconds per iteration)
 Threads    : 1

Barrier performed 0 iterations in 13.51 seconds
Barrier solve interrupted - model solved by another algorithm


Solved with dual simplex
Solved in 32292 iterations and 13.77 seconds
Optimal objective  5.483363160e+07
 14.142333 seconds (475.85 k allocations: 169.625 MB, 0.75% gc time)
waterfromsupersource
All zero.
withdrawals
[76802.9856,0.0,28630.982105894487,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,15277.6416,4030.6336189381973,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,77.8455430176565,0.0,0.0,0.0,0.0,201.06661104972378,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,3142.309473250909,0.0,0.0,0.0,0.0,0.0,184.07704628099174,0.0,4261.620944215958,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,120.20861097435898,0.0,897913.0966097155,0.0,2203.5936960981926,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,1290.0343785600003,0.0,0.0,0.0]
Sum: 4.16847844933071e8
returns
[32068.094627519997,0.0,24632.30746272,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,4797.303895680001,3627.6241507200007,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,31467.80774592,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,1568.4884073599999,0.0,0.0,15133.236778559998,0.0,0.0,2658.69676416,0.0,0.0,0.0,0.0,0.0,0.0,0.0,3718.1009712000005,0.0,25153.710557759998,0.0,0.0,0.0,14144.19959136,0.0,0.0,0.0,867.8668243200001,0.0,0.0,6728.280273600001,0.0,0.0,0.0,0.0,898053.3564076799,0.0,0.0,1228.6749456,0.0,0.0,0.0,0.0,0.0,500.16648192,0.0,5208.07889184,0.0,0.0,0.0,0.0,0.0]
Sum: 3.6344188072741073e8
captures
All zero.
waterfromgw
[0.0,60352.63901410552,0.0,6490.891501061803,78639.43920593262,4410.4684799999995,6249.31584,40523.771519999995,7465.996800000001,4517.2502067490905,5674.875449503051,59299.37088,33610.811519999996,3470.30592,2474.83968,20268.79872,960612.7722193102,1114.627103901807,1285.8105600000001,12978.31506144,4368.99072,0.0,0.0,67603.99889095948,0.0,22149.12384,62097.95270992036,202273.20960000003,6429.0528,8733.674276018288,10300.3104,505746.8063028009,0.0,6438.381996115344,163201.15968,343859.7588052602,111461.88071117188,2875.7913599999997,24195.36,100666.52352,6777.955581965272,885421.9775600787,6152.5344000000005,9871.70688,109404.50495999999,0.0,9650.49216,42099.9264,789608.3512082761,49090.06959839999,52026.93696,170943.67488,14973.47136,8530.59264,4101.818433637578,2465.929153564444,56243.842560000005,24983.43744,951537.2582183441,7911.398058017388,63599.232,0.0,54145.65197958763,714513.0963140526,123921.72095999999,30735.02016,3000.22464,64933.33953000956,308034.84721286624,69637.07107607815,27210.60231518898,243281.58243666668,34349.071481584244,0.0,0.0,141067.1030670913,54749.38221698995,386068.0809269422,0.0,17303.63053584093,60944.91187190473,0.0,1.0425722969913599e6,283638.7488,6691.74528,521781.5521791235,3871.2575999999995,2861.96544,898.6848,13914.834449098362,0.0,16065.71904,396738.9332410432,35347.108307717004,1977.1065599999997,15554.16,40316.38272,463736.9190860961,48017.420159999994,211251.83809055996]
Sum: 5.483363159799399e8
WARNING: replacing module _mimi_implementation_Allocation
WARNING: replacing module _mimi_implementation_ReturnFlows
WARNING: replacing module _mimi_implementation_Reservoir
WARNING: replacing module _mimi_implementation_Aquifer
Loading from saved region network...
Loading from saved water network...
Loading from saved region network...
WARNING: replacing module _mimi_implementation_Agriculture
WARNING: replacing module _mimi_implementation_ReturnFlows
WARNING: replacing module _mimi_implementation_WaterDemand
WARNING: replacing module _mimi_implementation_Market
WARNING: replacing module _mimi_implementation_Transportation
WARNING: replacing module _mimi_implementation_WaterNetwork
WARNING: replacing module _mimi_implementation_Aquifer
WARNING: replacing module _mimi_implementation_Allocation
WARNING: replacing module _mimi_implementation_Reservoir
WARNING: replacing module _mimi_implementation_IndustrialDemand
WARNING: replacing module _mimi_implementation_UrbanDemand
Creating model...
WARNING: replacing module _mimi_implementation_Thermoelectric
WARNING: replacing module _mimi_implementation_Livestock
Running model...
Missing canal.09475501
Missing canal.09475501
Missing canal.09522701
Missing usgs.11230500
Missing usgs.11075720
Missing usgs.11075720
Missing usgs.11063000
Missing usgs.11063000
Missing usgs.11413320
Missing reservoir.1894
Missing canal.02248600
Missing reservoir.2696
Missing canal.02248600
Missing reservoir.2684
Missing reservoir.737
Missing usgs.03337000
Missing usgs.01396580
Missing usgs.01403535
Missing usgs.01356190
Missing usgs.01446775
Missing usgs.01432000
Missing usgs.03433640
Missing canal.08437600
Missing usgs.09277800
Missing canal.10170700
Missing reservoir.1286
Missing usgs.01659000
Missing usgs.12396900
Missing usgs.12181100
Missing canal.0208463140
Missing canal.02280500
Missing canal.02280500
Missing canal.09475501
Missing canal.09475501
Missing canal.09522701
Missing usgs.11230500
Missing usgs.11075720
Missing usgs.11075720
Missing usgs.11063000
Missing usgs.11063000
Missing usgs.11413320
Missing reservoir.1894
Missing canal.02248600
Missing reservoir.2696
Missing canal.02248600
Missing reservoir.2684
Missing reservoir.737
Missing usgs.03337000
Missing usgs.01396580
Missing usgs.01403535
Missing usgs.01356190
Missing usgs.01446775
Missing usgs.01432000
Missing usgs.03433640
Missing canal.08437600
Missing usgs.09277800
Missing canal.10170700
Missing reservoir.1286
Missing usgs.01659000
Missing usgs.12396900
Missing usgs.12181100
Missing canal.0208463140
Missing canal.02280500
Missing canal.02280500
 24.047661 seconds (4.90 M allocations: 2.239 GB, 0.99% gc time)

In [35]:
include("../src/mapping.jl")
mapdata(:Allocation, :waterallocated, "sum")


Out[35]:
RCall.RObject{RCall.VecSxp}

In [36]:
mapdata(:Allocation, :swsupply,"sum")


Out[36]:
RCall.RObject{RCall.VecSxp}

In [44]:
percentorigin = 100*sum(getdata(:Allocation, :swsupply),2)./sum(getdata(:Allocation, :waterallocated),2);
mapdata(percentorigin)


Out[44]:
RCall.RObject{RCall.VecSxp}

Above is plotted to what percentage are the counties demands met by surface water. The obtained map show values ranging from 0 to 100% with no geographic specificities. The current optimization problem works with prices by source that are national. Regional variations would help constrain the model.

Groundwater

Water abstracted from the subsurface

In [32]:
mapdata(:Allocation, :waterfromgw,"sum")


Out[32]:
RCall.RObject{RCall.VecSxp}

The rest of the water demand is provided by groundwater extraction.

Drawdown

In [33]:
mapdata(getdata(:Aquifer, :piezohead0)-getdata(:Aquifer, :piezohead)[:,numsteps])


Out[33]:
RCall.RObject{RCall.VecSxp}

Huge fluctuations are taking place in the Columbian Plateau aquifer. More investigations are needed to understand what stems from the head initialisation and what is specific to human use.

With reservoir management


In [45]:
include("../analysis/analysis_conjunctive.jl")


┌──────────────────────────────────────────────────┐
    ▄▄    ▄▄      ▄▄    ▄▄       ▄▄▄▄    ▄▄    ▄▄ 
   ████   ██      ██   ████    ▄█▀▀▀▀█   ██    ██ 
   ████   ▀█▄  ▄█▀   ████    ██▄       ██    ██ 
  ██     ██ ██ ██     ██    ▀████▄   ████████ 
  ██████   ███▀▀███   ██████        ▀██  ██    ██ 
 ▄██  █▄  ███  ███  ▄█  ██▄  █▄▄▄▄▄█▀  ██    ██ 
 ▀▀    ▀▀  ▀▀▀  ▀▀▀  ▀▀    ▀▀   ▀▀▀▀▀    ▀▀    ▀▀ 
└──────────────────────────────────────────────────┘

Welcome to AWASH, the America's Water Model, version 0.7.

Loading from saved region network...
Loading from saved water network...
WARNING: replacing module _mimi_implementation_WaterDemand
WARNING: replacing module _mimi_implementation_WaterNetwork
Optimize a model with 68238 rows, 112306 columns and 4044378 nonzeros
Coefficient statistics:
  Matrix range    [1e+00, 1e+00]
  Objective range [1e-01, 1e+03]
  Bounds range    [0e+00, 0e+00]
  RHS range       [4e-02, 7e+10]

Concurrent LP optimizer: dual simplex and barrier
Showing barrier log only...

Presolve removed 15906 rows and 17614 columns
Presolve time: 2.43s
Presolved: 52332 rows, 95130 columns, 3641576 nonzeros

Elapsed ordering time = 5s
Elapsed ordering time = 6s
Elapsed ordering time = 6s
Elapsed ordering time = 7s
Ordering time: 6.56s

Barrier performed 0 iterations in 10.13 seconds
Barrier solve interrupted - model solved by another algorithm


Solved with dual simplex
Solved in 30077 iterations and 10.42 seconds
Optimal objective  5.423470981e+06
 10.820184 seconds (475.85 k allocations: 169.625 MB, 1.11% gc time)
waterfromsupersource
All zero.
withdrawals
[76802.9856,0.0,0.0,0.0,0.0,0.0,88983.62112000001,0.0,0.0,0.0,0.0,15277.6416,4030.6336189381973,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,5.052019779748783e6,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,4410.4684799999995,311.0231652093935,15181.556279635266,95.87875231958762,0.0,0.0,0.0,0.0,0.0,0.0,0.0,7659.559679999999,0.0,10120.57344,0.0,0.0,0.0,0.0,59299.37088,0.0,0.0,0.0,33610.811519999996,0.0,2474.83968,7125.488790006251,5.046143020594966,445.20110000000005,612.1436057613168,0.0,120.20861097435898,304.3797028985507,898384.6421147387,3313.0041094436306,0.0,5.2166905563689605,0.0,0.0,1285.8105600000001,0.0,0.0,0.0,0.0,0.0,0.0,14268.34944,0.0,0.0,2826.519904938325]
Sum: 3.2678075547132557e10
returns
[32068.094627519997,0.0,0.0,3595.6793984183355,0.0,0.0,21036.628064301665,0.0,0.0,0.0,0.0,4797.303895680001,3627.6241507200007,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,31467.80774592,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,1568.4884073599999,0.0,15133.236778559998,0.0,0.0,2658.69676416,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,3718.1009712000005,0.0,12269.605177051282,0.0,12884.105380708716,0.0,14144.19959136,0.0,0.0,0.0,867.8668243200001,6728.280273600001,0.0,0.0,0.0,0.0,0.0,0.0,898053.3564076799,0.0,0.0,0.0,0.0,1228.6749456,500.16648192,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,5208.07889184,0.0]
Sum: 5.2299415366509223e8
captures
[-2.409780225310188e6,-3.3059144240279224e7,-7.62728625221848e7,-1.3607195277281508e8,-7.031338037109878e8,-3.9423028091775045e7,-4.65392004e6,-6.935115933322518e7,-1.726872e7,-3.4874287995064785e6,296.4820566024653,-1.6834688683838237e7,-5.2642347966314934e7,-7.460087039999999e6,-2.46726837e6,-7.1665188e6,-1.3434765172436144e7,-4.31718e7,-2.905686409090909e6,-1.869053806005017e7,-5.6986776e6,-1.9734559975563636e8,10586.542455598754,-2.7629951999999997e6,-2.0549584662974244e8,-3.2448337082870686e6,-2.8689272953934982e7,-8.1810561e6,-3.529914529509989e7,-128622.36880253966,-2.56008774e8,-1.552540492728709e8,-3.831124396249787e7,-5.1449733619200003e8,16208.262813631074,-1.4578868658721333e7,-5.449144596e6,-4.041141800927996e9,-5.85841326e6,-7.555065e7,-3.237885e7,-1.0599278366023194e9,-2.594452311069065e9,-2.41330362e6,-2.5083849648020964e7,-4.563076204868997e7,-1.77867816e8,-7.35548959669961e7,-5.488518772727273e8,-4.217741381750115e6,-1.0543423112938234e8,-9.040123166959064e6,-3.200870976152502e6,-1.08967317866683e8,-2.2384321520987116e6,-4.738601750160748e7,-3.043028660760233e8,-1.5438899047349534e9,-2.15859e6,-2.5039644e6,-5.612334e7,-8.63436e6,-3.9167530377744082e6,-62032.2328077786,-3.2287809963105666e6,-1.506652212121212e7,-1.1364251978229057e7,-4.864055413049853e6,-2.582997447676744e6,-3.246136817630557e6,-2.1225887831022954e8,-2.501249759800998e7,-4.391002320693581e6,-1.2872301942278983e7,-1.0503467977540039e8,-3.1465486953888167e7,-9.729506720643872e7,-1.0267435768662713e9,-4.089484575757576e7,-5.725308048664551e7,-1.713841521128982e7,-4.425655324533244e6,-1.4678412e7,-5.5044045e6,-6.697714326425909e8,-4.2617654440720044e7,-7.914752858224708e7,-7.379450415970092e8,-3.579079368393522e6,-2.0573737711903628e7,-2.138050044967761e7,-4.907744475025796e6,-3.4445647609059117e6,-1.3631719124785895e7,-18045.424605662876,-9.497796e6,-3.277843899490561e6,18.769230565542706,430.9291753546099,-3.216510802471937e8]
Sum: -3.4952740334057654e11
waterfromgw
[0.0,0.0,0.0,6490.891501061803,0.0,0.0,0.0,24935.313322835747,0.0,0.0,0.0,0.0,0.0,701.8487761244442,0.0,12693.062686973153,959224.7034056269,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,70319.16115120242,0.0,0.0,0.0,0.0,0.0,6438.381996115344,0.0,0.0,0.0,0.0,15074.856970290033,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,9247.952688001462,0.0,0.0,3756.281214690265,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,54749.38221698995,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,1980.8022269788225,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,399135.5567526561,0.0,0.0]
Sum: 5.4234709808021694e7
WARNING: replacing module _mimi_implementation_Allocation
WARNING: replacing module _mimi_implementation_ReturnFlows
WARNING: replacing module _mimi_implementation_Reservoir
WARNING: replacing module _mimi_implementation_Aquifer
Loading from saved region network...
Loading from saved water network...
Loading from saved region network...
WARNING: replacing module _mimi_implementation_Agriculture
WARNING: replacing module _mimi_implementation_ReturnFlows
WARNING: replacing module _mimi_implementation_WaterDemand
WARNING: replacing module _mimi_implementation_Market
WARNING: replacing module _mimi_implementation_Transportation
WARNING: replacing module _mimi_implementation_WaterNetwork
WARNING: replacing module _mimi_implementation_Aquifer
WARNING: replacing module _mimi_implementation_Allocation
WARNING: replacing module _mimi_implementation_Reservoir
WARNING: replacing module _mimi_implementation_IndustrialDemand
WARNING: replacing module _mimi_implementation_UrbanDemand
Creating model...
WARNING: replacing module _mimi_implementation_Thermoelectric
WARNING: replacing module _mimi_implementation_Livestock
Running model...
Missing canal.09475501
Missing canal.09475501
Missing canal.09522701
Missing usgs.11230500
Missing usgs.11075720
Missing usgs.11075720
Missing usgs.11063000
Missing usgs.11063000
Missing usgs.11413320
Missing reservoir.1894
Missing canal.02248600
Missing reservoir.2696
Missing canal.02248600
Missing reservoir.2684
Missing reservoir.737
Missing usgs.03337000
Missing usgs.01396580
Missing usgs.01403535
Missing usgs.01356190
Missing usgs.01446775
Missing usgs.01432000
Missing usgs.03433640
Missing canal.08437600
Missing usgs.09277800
Missing canal.10170700
Missing reservoir.1286
Missing usgs.01659000
Missing usgs.12396900
Missing usgs.12181100
Missing canal.0208463140
Missing canal.02280500
Missing canal.02280500
Missing canal.09475501
Missing canal.09475501
Missing canal.09522701
Missing usgs.11230500
Missing usgs.11075720
Missing usgs.11075720
Missing usgs.11063000
Missing usgs.11063000
Missing usgs.11413320
Missing reservoir.1894
Missing canal.02248600
Missing reservoir.2696
Missing canal.02248600
Missing reservoir.2684
Missing reservoir.737
Missing usgs.03337000
Missing usgs.01396580
Missing usgs.01403535
Missing usgs.01356190
Missing usgs.01446775
Missing usgs.01432000
Missing usgs.03433640
Missing canal.08437600
Missing usgs.09277800
Missing canal.10170700
Missing reservoir.1286
Missing usgs.01659000
Missing usgs.12396900
Missing usgs.12181100
Missing canal.0208463140
Missing canal.02280500
Missing canal.02280500
 34.252289 seconds (5.02 M allocations: 2.992 GB, 0.98% gc time)
Out[45]:
RCall.RObject{RCall.NilSxp}
NULL

In [46]:
include("../src/mapping.jl")
mapdata(:Allocation, :waterallocated, "sum")


Out[46]:
RCall.RObject{RCall.VecSxp}

In [47]:
mapdata(:Allocation, :swsupply,"sum")


Out[47]:
RCall.RObject{RCall.VecSxp}

In [48]:
percentorigin = 100*sum(getdata(:Allocation, :swsupply),2)./sum(getdata(:Allocation, :waterallocated),2);
mapdata(percentorigin)


Out[48]:
RCall.RObject{RCall.VecSxp}

In [49]:
mapdata(:Allocation, :waterfromgw,"sum")


Out[49]:
RCall.RObject{RCall.VecSxp}

In [50]:
mapdata(getdata(:Aquifer, :piezohead0)-getdata(:Aquifer, :piezohead)[:,numsteps])


Out[50]:
RCall.RObject{RCall.VecSxp}

In [ ]: