PyVIN Representing ’s Water System with an Open Source Model: PyVIN

Mustafa Dogan Center for Watershed Sciences, UC Davis CWEMF 2017

March 22, 2017 CWEMF 2017 | [email protected] 1 Goals

data transparency version control documentation collaboration run speed

March 22, 2017 CWEMF 2017 | [email protected] 2 CALVIN HOBBES Database

Ø ~1250 nodes Ø ~600 conveyance links Ø 49 surface Ø 38 groundwater reservoirs Ø 88% of CA’s irrigated acreage Ø 92% of CA’s urban population

https://cwn.casil.ucdavis.edu

March 22, 2017 CWEMF 2017 | [email protected] 3 HOBBES Database

Ø Online Database Classical Approach Ø Version Control 1 model Ø Data Visualization Ø Documentation Ø Collaboration HOBBES 2 data 2 data 1 data

2 model 3 model model CALVIN PyVIN Other Models

March 22, 2017 CWEMF 2017 | [email protected] 4 Modeling Environment

Ø Pyomo is a Python-based, open-source optimization modeling language Ø Algebraic language similar to GAMS, AMPL

Ø Easy to install: ”conda install -c cachemeorg pyomo” Ø User defined solvers: • CPLEX1 • GUROBI1 • CBC2 • GLPK2

(1 free for academic purposes only, 2 open source) http://www.pyomo.org/documentation

March 22, 2017 CWEMF 2017 | [email protected] 5 CALVIN v.1 PyVIN v.2 Large-scale hydroeconomic model Optimize water allocation to agricultural and urban users Minimize statewide water scarcity and operating costs HEC-PRM and VBA based Pyomo and Python based Less flexible More flexible (limited to HEC-PRM) (full LP) Solver runtime: ~16 hr Solver runtime: ~1 min (depending on initial solution) (depending on solver) Requires 32 bit Windows PC Any computer

California's Water Infrastructure HEC-DSS database Network Configuration Open for CALVIN source: data and source code

DA 39 DA 400 DA 41 DA 46 TUOLOMNE CHERRY CREEK, RIVER ELEANOR CREEK

Hetch Hetchy Res O'Shaughnessy STANISLAUS SRSR-- DA 17 NFORKYUBAN. FORK YUBA DA 67 DA 68 DA 22 HTH RIVER Lake Lloyd/Lake Eleanor DA 42 RIVER DA 43 DA 44 & SR- SR-LL- CR1 ENR 45 M&SFORKSM & S FORKS DA 29 unnel YUBA RIVER BEAR RIVER & N. & M. FORKS MONO BASIN New Bullards AMERICAN RIVER Bar GREENHORN New SR- CREEK Melones Tunne Canyon BUL Reservoir SR- NML Lower Cherry Creek SRSR-- Aqueduct MERCEDC CR2 C27 C44 RIVER D17 FRESNO Grant Lake Deliveries to Urban Areas DA 32 C35 in DA70 but outside D670 RIVER IilImperial CVPM7 SRSR- Mono Lake FEATHER Englebright S. FORK Lake McClure GNT SR-ML Dam RIVER Lake AMERICAN SAN JOAQUIN SR- ENG RIVER Local Inflow RIVER COLORADO SR-SR CHOWCHILLA C134 C141 C142 C143 Mexico SR- UPPER OWENS RIVER CR3 Smartville CFWtCamp Far West DNP New Don RIVER Tulloch Reservoir Local Inflow RIVER DEER CREEK Reservoir Pedro SR- DA 25 DA 27 SR-TUL Reservoir MCR Lake Crowley / Long Valley SR- CALAVERAS SR- C88 Hensley Lake Reservoir COLORADO RIVER C77 C28 CFW CRW FRENCH DRY RIVER Hidden Dam AQUEDUCT A508: Palo Verde Folsom Lake Millerton Lake KAWEAH TULE CREEK MOKELUMNE Friant Dam LlIflLocal Inflow SRSR-HIDHID KINGS RIVER RIVER RIVER Local Inflow SR- RIVER Eastman Lake ALL-AMERICAN CANAL A512: Bard WD C29 FOL D16 Buchanan Dam Owens Valley 1 Accretion: Upper New Hogan La Grange Dam D642 Power Plants COSUMNES Lake Merced River SR-SR- SR-SR- MIL C33 SRSR-- BUC Pine Flat Iron Pumping SRSR- ADliiAg Deliveries tto D662 KERN U508: Blythe ORO C83 RIVER NHG Goodwin Reservoir Plant DA67 Reservoir D653 Canal (Int & Ext) a FRIANT-KERN CANAL Losses Lake RIVER Depletion: Upper Merced Canal Lake Kaweah DRY CREEK Pardee Reservoir D643 Canal Success River Losses Terminus Dam Marysville Wheatland SR-SR- Losses SR-SR SR-SR DA 3 C308 MADERA CANAL SR- DA 14 PAR PNF SCC GS65 DA 70 U305: CVPM 12 North Side & Main Canals TRM (Int & Ext) C23 KELLY RIDGE GW-SW Accretion: D653 Depletion: Accretion : D645 C72 U201: Yuba Interaction b GW-CH Stanislaus River Stanislaus River Tuolumne below La D663 Lake Isabella (Int & Ext) Little Johns Lake Natoma DA 59 Camanche Grange Dam C49 C76 C688 LONG VALLEY TO U507: Coachella C37 Reservoir C40 Creek D632 SR- ISB C116 Nimbus Dam D605 HAIWEE Valley GS65 (Int & Ext) SR- Ripon D672 GW-12 C25 SW-GW Eagle Pumping Plant C31 D37 CMN D622 U401: City of Accretion: Interaction Depletion: C51 Accretion: Tule Folsom South Canal GW-11 Accretion: Lower Fresno Kings River Accretion: C57 Local Inflow D9 C173 C107 C39 Tuolumne River D646 C89 River SR-SR- Merced River Kaweah River below La Grange D634 TAB Mokelumne River Aqueduct Dam C117 Thermalito GW-18 GW-CH Fore/Afterbay C38 D606 DA69 Depletion: Lower Merced C80 C32 D647 GW-16 Projected GS66 River GW-OW C158 GS66 GW-12 Gain in SWSW-GW-GW D624 GW-05GW-05 D85 GW-SW GWGW-17-17 Interaction BUTTE & LITTLE A202A202: CVPM 0 055 ItInteraction ti GWGW-1111 D664 C311 CHICO CREEKS C43 U202: CVPM 05 Depletion: U405: CVPM 18 COACHELLA C105 GW-13 C119 Julian Hinds (Int & Ext) DA69 GW-07 Kaweah River (Int & Ext) Pumping Plant CANAL Projected D98 GW-08 U302: CVPM 11 A302: CVPM 11 A305: CVPM 12 D649 GW-18 A507: Coachella Gain out Local (Int & Ext) Canal GW-HFGW-HF Valley D64 GW-16 Gray Lodge Inflow C41 Losses Intake Dam GW- C147 C149 GW-05 A306: CVPM 13 C62 OW Owens Lake PAYNES & U306: CVPM 13 GW-17 Depletion: Owens River (dry) RED BANK ANTELOPE, MILL A403: CVPM 17 C56 C58 SEVEN MILE BIG CHICO (Int & Ext) Tule River Restoration CREEK & DEER CREEKS Canal Owens Lake A500: Owens C120 CREEKS CREEK GW-07 U210: Stockton (Int C53 Losses COW & BATTLE CREEKS C307 Valley Dust Mitigation &Ext)& Ext) D675 HETCH HETCHY GWGW-1313 A405: CVPM 18 GW-01 D43a GW-08 SR-0L AQUEDUCT Canal C136 C145 C157 A207: CVPM 08 Losses D42 U204: Sacramento A401: CVPM 16 U101: Redding (Int SUTTER BYPASS (Int & Ext) Local Inflow Local Inflow & Ext) Sutter NWR D61B All American DA58 Projected Depletion: Kings U403: CVPM 17 Eastside Bypass Chowchilla Bypass Pixley Refuge GWGW-IM-IM Power Plant Gain in River (I(Int t & EExt) t) C64 DA 69 D692 C47 C48 D609 GS60 SW-GW A204: CVPM 07 AQUEDUCT Mud Slough WHITEWATER NEW RIVER, ALAMO Interaction DA10 D517 DA 59 U407: CVPM 20 GW-20 C689 C146 C148 GS61 SW-GW DA15 Projectedj GS63 Mendota Pool SR-LA RIVER RIVER GW-01GW-01 Projected U207: CVPM 08 Sand Sloughg (Int & Ext) SR-SSSR-SS Interaction Gain out GW-SWGW-SW Local Inflow Moulton (Int & Ext) Accretion: Kern Wadsworth Gain out Weir e D616 D676 D612 D689 D683 D699 D697 D695 D694 D691 D619 D732 D731 D608 eirs Interaction River Pumping Plant Salton Sea Weirs Vernalis INLAND FEEDER PROJECT

TisdaleWe Newman Keswick Red Bluff Crescent Weir U510: El Centro

Colusa & Mou & Colusa Accretion: South Reservoir Depletion: C65 Owens Valley 2 (Int() & Ext) Fork Kings River Diamond Valley LAKE SHASTA SR- Hood South Fork Power Plants D5 D73 C2 D74 C5 C87 D76a D77 D75 C1 C4 C69 D76b N13 D66a D66 N14 D30 D31 D61 C301 D43 C8 C104 D44 ISOLATED FACILITY GW-IM C67 C7 C42 Accretion: Depletion: Reservoir SHA C54 KingsKi RiRiver GWGW-2020 C151 INFLOWO Fresno Slough Kern River U410: Bakersfield A502: Antelope N5 SR- Ord Ferry DMV D503 Local Inflow James Bypass/Fresno Slough/N. Fork Kings River (Int & Ext) Valley Shasta GW-10 C97 GW-AV Lake Mendota Refuges C52 C59 GLENN-COLUSAGLENN-COLUSA C10 U409: CVPM 21 GW-MJGW-MJ ir

r Conduit GW-15GW-15 CANAL GS63 r Delta Cross Depletion: Fresno (Int & Ext) A510: Imperial GS60 COTTONWOOD SW-GW Channel Slough Valley DA15 LAA GW-SW CREEK Interaction D511 D513 GW-21 C122 N2 N4 Wadsworth GS61 Projected Gain GW-04 Overflow Interaction YOLO BYPASS A404A: CVPM 15A Power Plant C152 A101: CVPM 01 GW-SWGW-SW in Evaporation A407: CVPM 20 D521 N10 acramento Weir acramento FreemontFreeWeir C138 ank Diversionsank ng Creek Power Co Power Creek ng CORNING CANAL Interaction GWGW-1010 Ponds Sacra U104: CVPM 04 A104: CVPM 04 GW- Spring C Spring DA10 (Int & Ext) A303: CVPM 10 U303: CVPM 10 AV EASTSIDE PIPELINE Projected (Int & Ext) GW-15 C313 C306 C18 C20 D55 Gain in Mojave GW-MJGW-MJ GW- N6 SR- D Bank Right & Left Basin Pipeline CLEAR CREEK GWGW-04-04 U404U404: CVPM 15 21 U502U502: Antelope A t l U505: Mojave WHI DA58 D515 D522 D613 (Int & Ext) Valley (Int & Ext) VALVERDE TUNNEL Projected MiscLeft Knights Landing LOCAL SUPPLY Ridge Cut Rio Vista (Int & Ext) Gain out C313 U203: CVPM 06 Whiskeytown GW-09 EAST HIGHLINE, CENTRAL MAIN A102: CVPM 02 DA 15 (Int & Ext) Lake C74 AND WESTSIDE CANALS nel A409B: CVPM 21B Creek D507 GWGW-1414 Aqueduct

Tunnel COLUSA NORTH BAY A404B: CVPM 15B Losses

Clear Creek Clear AQUEDUCT BASIN DRAIN A408A: CVPM 19A A408B: CVPM 19B LAKEVIEW PIPELINE A409A: CVPM 21A Devil Canyon GW-06 GW- N7 Mojave Local Inflow GW-19 LOCAL SUPPLY Pearblossom C304 C305 C15a C15 U205: NapaNapa-- D523 A402A: CVPM 14A KRN Power Plant Power Plant Pumping Plant TEHAMATEHAMA-COLUSACOLUSA Solano A103A: CVPM CANAL GW-09 N3 03A A203: CVPM 06 GW-14 Tulare Lake D876 C131 D881 C30 D862 C103 D865 D868 D870 C124 D871 D872 C129 C13 N11 A206: CVPM 09 C98 B SR- SR- SAN DIEGO CANAL Aqueduct Losses SR-TLSR-TL SLW PRR DA 58 CAACAA-DMC-DMC DELTA MENDOTA CANAL A402B: CVPM 14B Alamo Colusa NWR GW-06 C73 INTERTIE N9 A409C: CVPM 21C Edmonston Power Plant GW-SBV Sacramento / C85 GW-19 C12 Delevan NWR DA12 San Luis NWR Pumping Plant Projected U402: CVPM 14 OSO Pumping Winters,, Moore & West (Int & Ext) Chrisman Plant N1 C11 Gain out THE DELTA Clifton Court Aqueduct LOCAL SUPPLY Adams Canals Pumping Aqueduct GW-MWDGW-MWD al al D863 Losses TRINITY SRSR- Trinity River Forebay D701 D703 rtie Plant Losses D94 D710 D712 D722 SRSR- CLE Minimum Flows N12 D862 A103B: CVPM U408: CVPM 19 BLVB A RIVER C314 Old River GW-02 03B U206: CVPM 09 D525 D550 C309 D59 (Int & Ext) GW-03 D723 Buena Vista (Int & Ext) D884 Lake Skinner Clair Engle Lake Capay Diversion C16 Tracy Pumping Lake U103: CVPM 03 Putah South O'Neill O'Neill GWGW-- s Valley Canal Canal Valley s U102: CVPM 02 ough Intertie rn River D861 (Int & Ext) DDam PlPlant t PiPumping Power SBV (Int & Ext) Canal Kern Refuge EAST BRANCH Lake Mathews SR- Plant Plant Kern R Wheeler Ridge Bethany U506: San SKN

C19 C21 Cross Va D860 Pumping Plant WEST BRANCH AQUEDUCT

Rock Slough Rock Reservoir Berbardino LEWISTON LAKE GW- SR- AQUEDUCT (Int,(, Ext & Ind) ) MHW INFLOW GW-GW- MWD 02 Contra Costa D743 D744 C92 D745 D747 D749 D750 D751 C75 D845 D850 D851 D853 C95 D752 D855 D859 GWGW-03-03 D800 D801 D803 D804 D814 D816 D742 D743 D744 Aqueduct a a Aqueduct D885 U504: Central MWD Pumping Plant Harvey Banks Losses Desalination DA 55 Pumping Plant Losses Desalination (Int, Ext & Ind) Buena Vista DA 65 Dos Amigos Pumping Las Perillas Pumping Plant DA 10 DA 12 Plant Pumping Plant Gianelli U509: E&W MWD South Bay Pumping Gianelli Aqueduct Aqueduct Aqueduct Aqueduct Warne Power Plant Power (I(Int, t EExt t & IInd) d) Plant Pumping Losses Losses Losses Losses Plant CONTRA COSTA Plant Aqueduct C70 C310 Aqueduct Losses Aqueduct CANAL Losses Losses Badger Hill C9 Los Vaqueros Pumping Plant C86 DA 24 local CU Marsh Creek Reservoir Pyramid Lake C155 SR- GW-EW C153 C154 Mallard Walnut LVQ San Luis SR- C150 DA 16 local CU Slough Creek SR- Reservoir PYM SNL D847 C78 SR- D509 D528 C71 A501: Ventura THOMES & BLB SRSR- Aqueduct Black Butte Lake BER Pacheco Tunnel D886 ELDER CREEKS SR-CLK- SANTA CLARA LOCAL GW-VC Losses Clear INV Coastal Aqueduct Lake Berryessa C161 D891 INFLOW D848 Deliveries to LOCAL SUPPLY Lake/Indian Monticello Dam HAYWARD INTERTIE COASTAL AQUEDUCT Valleyy Castaic WA Reservoir Desalination Castaic Power Plant GWGW-EWEW C201 Del Valle Pumping Plant D714 Central Coast Ag STONY U208: Contra D849 Costa DA 5 CREEK DA 11 CACHE PUTAH SAN DIEGO PIPELINES NO. 1, 2, 4,4, 6 A509: E&W MWD SOUTH BAY CREEK U406: SBSB-SLO-SLO C106 LOCAL SUPPLY (Treated Water) DA 16 CREEK DA 24 D892 GWGW-VCVC AQUEDUCT SR- (Int & Ext) C323 SR- SCAGG Aqueduct DLV D887 Losses Chabot, Upper San Lake Del LEGEND March 22, 2017 Leandro, CWEMFValle 2017 | [email protected] 6 San Pablo, Briones, LOCAL SUPPLY Lafayette Reservoirs C315 C156 C79 SAN DIEGO PIPELINES NO. 5 and 3 SR- (Untreated Water) GW-SD Desalination SR- Nodes Types EBMUD CAS Links Types Possible future facilities Required Delta AGDEMAND AREA URBANDEMAND AREA D541 OfOutflow D896 U501: Ventura D888 Schematic developers Desalination (Int & Ext) α=N/A, $ α=UBC, $ Flow to a sink Calaveras, Lower WTP capacity LOCAL SUPPLY C11 Canal capacity WTP## Junction (non(non-storage)-storage) node Desalination Crystal Springs, Treatment cost Distribution Cost SW u/s San Andreas & San α=UBC,UBC $ Return flow from a EconomicEconomic-EngineeringEngineering OptimizationOptimization of California's Crystal Springs U304: Santa Clara α, $ Pumping Marion W. Jenkins Julien J. Harou D897 Antonio Reservoirs LOCAL SUPPLY D889 GW-SD Bypass Tunnel Valley α, $ A < 1 Conveyance HGP## capacity demand area Pumping plant HGP## Conveyance Capacity Pumping cost Surplus Delta U209: EBMUD (Int, Ext & Ind) Pumping Capacity HSU### SW u/s Pumping plant Kenneth W. Kirbyy Brian J. Van Lienden (Int,(, Ext & Ind) ) Pumpingpg Cost Loss Distribution Cost Aggregation U511: San Diego Futureutu e Water ate SuppSupply: y CCALVIN model ode scschematic e at c Outflow U## Node U503: Castaic Lake (Int, Ext & Ind) Desalination Flow in a natural channel Aggregation (Int & Ext) Manuel AA. Pulido Brad DD. Newlin A### A511A511: SSanDi Diego Node GW Aqueduct α=UBT, $=TD SR- ## Power plant Sarah E. Null Target Delivery Flow in an artificial channel Surface water reservoir node Jay R. Lund, Professor of Civil and Environmental Engineering Matthew D. Davis Losses SFAGG α=UBT, $=TD α=UBT, $=TD Target Delivery Target Delivery Shortage Penalty GW-SCGW-SC Shortage Shortage Randall Ritzema Mark Leu A > 1 N8 Richard E. Howitt, Professor of Agriculture and Resource Economics Ag Reuse Penalty Penalty Flow in a potential/proposed Desalination GW# HGR## artificial channel University of California, Davis Guilherme Marques ElEleanor S. S Bartolomeo B t l # HP## Surface water reservoir (storage) node INT## SR- Josue Medellin-Azuara Karandev Singh U301: San HU### SHA http://cee.engr.ucdavis.edu/CALVINp //cee e g ucda s edu/C Francisco PUC A<1 Artificial recharge flow α=UBC, $ Exterior IND## (Int, Ext & Ind) WWTP capacity Mustafa S. Dogan α=UBT,UBT $$=TDTD α=UBT=UBT, $$=TD=TD UbUrban EXT## Andrew JJ. Draper for potable use Target Delivery Target Delivery Use Return A<1 Treatment Cost LOCAL SUPPLY Flow from GW node to Shortage Penalty Shortage Penalty Flow Interior Urban contact: [email protected] or [email protected] GW- Stacy K. Tanaka Use Return a demand node SCV A<1 Ground water reservoir (storage) node Flow GW-GW March 2015 Industrial Urban 01 Use Return Flow HGR## HNP## Inflow to model DltiADepletion Area (DA) A<1 % GW ### S Return ### G Sutter NWR Wetland node Flow α=UBC,UBC, $ A<1 WWTP capacity % SW SW d/s for nonnon-potablepotable use Return HSD### Treatment Cost Flow A102: CVPM02 Agricultural demand node WWP## $ $ Treatment Cost Treatment Cost SW d/s for discharge into for discharge into GW basin SW source U102: CVPM 02 (Int & Ext Urban demand node HOBBES Matrix Creator Calvin (2014) Calvin (2015) Calvin Calvin (2015) Calvin

Calvin (2015) Data Matrix (PyVIN input) Time-series hydrograph Demand Curves Calvin (2015) Calvin

+ ($/Vol) Price p * Calvin (2015) Q (volume) Q* (objective) Calvin (2015) Calvin (2015) Calvin (2015)

Calvin (2015)

March 22, 2017 CWEMF 2017 | [email protected] 7 PyVIN Model Structure

1 Linear Programming Model with Gains & Losses where objective minimize � = � � Z: total cost X: flow on the arc � = � � + � c: unit cost (or penalty) mass balance b: external flow 3 Freely Available Solvers a: amplitude • CPLEX upper bound � ≤ � l: lower bound u: upper bound • CBC lower bound � ≥ � • GUROBI • GLPK

2 Abstract Model in Pyomo User installed and defined solvers No dependency on any solver Model PyVIN Structure Data

Separate data and model structure

March 22, 2017 CWEMF 2017 | [email protected] 8 PyVIN Run Process

• Input Data HOBBES • Network matrix

• Model Run Pyomo • Specify data file and solver

• Postprocess Results Python • Analyze results stored in *.csv files

• Data Visualization HOBBES • Time-series plots & animation

March 22, 2017 CWEMF 2017 | [email protected] 9 PyVIN Input Output

• water deliveries • surface and • cost of shortage to users groundwater to users and storage WTP for additional water

flow.csv storage.csv shortage pyvin.py cost.csv

• shadow prices • benefits of of capacity environmental expansion flows

dual - dual - lower upper bound.csv bound.csv data.dat

March 22, 2017 CWEMF 2017 | [email protected] 10 Solver Time

glpk Ø Runs are Y=(9.83E-10)X2.19551 performed on UC cbc Davis College of Y=(5.59E-09)X1.83019 open source Engineering’s gurobi Y=(3.77E-08)X1.52444 HPC1 (High cplex 1.41141 Performance ~35K Y=(7.84E-08)X

Computer) (second)time ~3M Ø cbc, cplex and ~1.4M gurobi are run in parallel, and glpk is run in serial number of decision variables

March 22, 2017 CWEMF 2017 | [email protected] 11 Total Runtime Pyomo Pyomo builds Solver finds a writes the model solution results glpk Y=(2.88E-08)X1.96947 cbc Ø Differences get Y=(3.11E-05)X1.27684 bigger as model gurobi Y=(4.13E-04)X1.02861 size increases ~35K cplex Ø cplex and Y=(3.46E-04)X1.03667 gurobi have ~3M ~1.4M similar total runtime (second)time

# of decision output file size (json) variables 35,827 ~7.5 MB 1,430,915 ~300 MB 2,933,335 ~602 MB number of decision variables

March 22, 2017 CWEMF 2017 | [email protected] 12 Solver Result Comparison Solver Accuracy 100.0000000 model size 99.9999999 99.9999998 ~35K Ø Objective value 99.9999997 gurobi

99.9999996 cplex glpk normalized to glpk cbc

(%) 99.9999995 results Ø results slightly 100.0000000 cbc 99.9999999 glpk lower 99.9999998 ~1.4M Ø Overall consistent 99.9999997 gurobi

99.9999996 cplex glpk solver results cbc 99.9999995

100.0000000 99.9999999 Normalized to 99.9999998 ~3M 99.9999997

99.9999996 cplex gurobi glpk cbc 99.9999995 solvers March 22, 2017 CWEMF 2017 | [email protected] 13 CALVIN to PyVIN

• Similar results but faster runtime Monthly Avg. Storage Avg. Monthly (16 hours vs. 1 minute)

• Easy-to-understand model: only ~20 lines of code (solver takes care of the rest)

March 22, 2017 CWEMF 2017 | [email protected] 14 Preliminary Results Monthly Change in Overall Storage (MAF) ΔGroundwater Urban Delivery Urban

Oct-1921 Sep-2003 Groundwater Monthly Avg. Delivery (TAF/m) Delivery Avg. Monthly water Agricultural Delivery Agricultural Surface water Surface ΔSurface Upper Lower San Joaquin Tulare Basin Southern Sacramento Sacramento & South Bay California & Delta Oct-1921 Sep-2003

March 22, 2017 CWEMF 2017 | [email protected] 15 Data Visualization Ø Animation tool Ø Inflow, flow, storage, evaporation

Ø Graph flow and storage results Ø Select time-period

March 22, 2017 CWEMF 2017 | [email protected] 16 Limitations & Improvements

ØPerfect foresight ØRun year-by-year to prevent perfect hydrologic foresight ØGroundwater representation ØImplement SGMA constraints on groundwater basins ØWater rights ØRepresent water rights in system operations

March 22, 2017 CWEMF 2017 | [email protected] 17 Conclusions

ØFree and ØVersion control ØOnline ØCommunication ØFast, state-of- publicly and tracking documents, between the-art solvers; available data changes via theses, journal modelers & cplex, gurobi and model GitHub papers models and cbc

data transparency version control documentation collaboration run speed

March 22, 2017 CWEMF 2017 | [email protected] 18 Useful links PyVIN

• CALVIN: https://calvin.ucdavis.edu/node • HOBBES: https://hobbes.ucdavis.edu/node & https://cwn.casil.ucdavis.edu • PyVIN: https://github.com/msdogan/pyvin • Network data: https://github.com/ucd-cws/calvin-network-data • Network tools: https://github.com/ucd-cws/calvin-network-tools

Developers: Mustafa Dogan, Max Fefer, Ellie White, Jon Herman, Justin Merz Quinn Hart, Josue Medellin-Azuara and Jay Lund contact: [email protected]

March 22, 2017 CWEMF 2017 | [email protected] 19