PyVIN Representing California’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 reservoirs Ø 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 ConfigurationOpen 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 Dam STANISLAUS SRSR-- DA 17 NFORKYUBAN.