Tutorial 2 - Adding a new component


Scope of this tutorial

This tutorial is going to walk through adding a new component to represent Aquaculture. Aquaculture represents about 7% of total water demand (USGS 2010). The USGS splits out aquaculture in its 5-year reports, but since aquaculture water use is determined by a combination of production and evaporation, we can model future changes.

The hope is that this will provide a basis for understanding how to add new demands in general, and other kinds components as well.

Starting a git branch

The first step to making a new component is always starting a new branch of the code. Branches allow parallel lines of work to be managed, and then incorporated together when they are ready.


In [18]:
run(`git checkout -b aquacomp`)


M	configs/standard-1year.yml
M	configs/standard.yml
A	prepare/netcdf2csv.jl
M	src/lib/datastore-netcdf.jl
M	src/lib/datastore-nonetcdf.jl
M	src/optimize-surface.jl
M	src/optimize.jl
D	src/tools/netcdf2csv.jl
Switched to a new branch 'aquacomp'

In [17]:
`git status`


Out[17]:
`git status`

Components of a component

Most components have a similar structure, as follows:

  1. A comment block describing the component.
  2. Loading required modules.
  3. The component definition.
  4. The simulation timestep function.
  5. The initialization function.
  6. The optimization gradients.

After that is done, we need to do some things outside of the individual component.

  • Create a documentation notebook, showing validation and example results.
  • Create an automated "unit test", testing proper functionality.
  • Connect the component to other components in the simulation and optimization.

We will consider each of these in order.

Commenting the script

Make sure to use both normal comments, which start with #, and docstrings. Here is the comment at the top of the file.


In [1]:
# The Freshwater Aquaculture component.
#
# It uses aquaculture production data as a baseline, which is then allowed to change with temperature and production.

Required modules

The only module that we always need is Mimi. We also need to read data (DataFrames and lib/datastore).


In [2]:
using DataFrames
using Mimi
include("lib/datastore.jl")


LoadError: could not open file /Users/jrising/research/water/model/operational-problem/docs/lib/datastore.jl
while loading In[2], in expression starting on line 3

 in include at /Applications/Julia-0.4.0.app/Contents/Resources/julia/lib/julia/sys.dylib
 in include_from_node1 at /Applications/Julia-0.4.0.app/Contents/Resources/julia/lib/julia/sys.dylib

Component definition

The component definition starts with an @defcomp line and ends with end. In between are three parts:

  1. Indexes, which define the dimensions that are used by parameters and components.
  2. Parameters, which are the inputs to the component.
  3. Variables, which are the outputs.

In [3]:
@defcomp Aquaculture begin
    regions = Index()

    # The basic pattern of aquaculture (could vary in time)
    demand_baseline = Parameter(index=[regions, time], unit="1000 m^3")

    # The effect of production on demand
    production_baseline = Parameter(index=[time], unit="MT") # 299,396 in 2010
    production = Parameter(index=[time], unit="MT")

    # Demand combining the two effects
    demand = Variable(index=[regions, time], unit="1000 m^3")
end


Out[3]:
Aquaculture

Simulation timestep function

The run_timestep specifies how variables can be computed from parameters in each timestep.


In [4]:
function run_timestep(c::Aquaculture, tt::Int)
    v, p, d = getvpd(c)

    # Scale with production
    v.demand[:, tt] = (p.production[tt] / p.production_baseline[tt]) * p.demand_baseline[:, tt]
end


Out[4]:
run_timestep (generic function with 3 methods)

Initialization function

The initialization function is not strictly a part of the Mimi framework, but I find it useful. It creates the component, by adding it to the model and filling in all the parameters.


In [5]:
function initaquaculture(m::Model)
    aquaculture = addcomponent(m, Aquaculture);

    scaling = config["timestep"] / 12.

    # Baseline from USGS
    aquaculture[:demand_baseline] = repeat(convert(Vector{Float64}, readtable(datapath("aquaculture/usgsextract.csv"))[:AQ_WFrTo]) * scaling, outer=[1, m.indices_counts[:time]])

    # Production data from Fisheries of the United States
    production = readtable(datapath("aquaculture/production.csv"))

    aquaculture[:production_baseline] = repeat(production[production[:year] .== 2010, :production] * scaling, outer=[numsteps])
    aquaculture[:production] = repeat(production[production[:year] .>= 2010, :production] * scaling, inner=[round(Int64, 1. / scaling)])

    aquaculture
end


Out[5]:
initaquaculture (generic function with 1 method)

Up to this point, these are all values that go into the component file itself. Now let's switch to the unit test file, as we try it out. We make a new file test/test_Aquaculture.jl.

Here's what the test_Aquaculture.jl file looks like:


In [7]:
# Load the component
#include("../src/SimpleAquaculture.jl")
include("../src/lib/datastore.jl")
include("../src/lib/readconfig.jl")

# Set up the model
counties = convert(Vector{Float64}, readtable(datapath("aquaculture/usgsextract.csv"))[:,:FIPS])

config = readconfig("../configs/single.yml")
numsteps = 1
numcounties = length(counties)

m = Model()
setindex(m, :time, [1]) # Single period
setindex(m, :regions, counties)

# Add the component
initaquaculture(m)

# Run the model
run(m)

# Check that it matches 2010
demand_baseline = repeat(convert(Vector{Float64}, readtable(datapath("aquaculture/usgsextract.csv"))[:AQ_WFrTo]), outer=[1, m.indices_counts[:time]])
println(m[:Aquaculture, :demand] - demand_baseline)


1.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.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.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.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.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.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.0
 0.0
 0.0
 0.0
 0.0
 0.0
 0.0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 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
 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
 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
 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
 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
 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
 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]

Now we need to embed this into the rest of the model. If you look in model.jl, there are a sequence of include lines for each component, and then init lines. The order of the init lines matters, because this is that order that components will be computed, and each component needs its dependent components to already have been computed.

However, the only imput to this component is the level of production, which is set by the optimization or simulation information.


In [9]:
include("../src/model2.jl")


Loading from saved region network...
WARNING: imported binding for edges overwritten in module Main
Loading from saved water network...
Loading from saved region network...
Creating model...
Out[9]:
Mimi.VariableReference(Mimi.Model(Dict(:regions=>3109,:crops=>9,:time=>1,:edges=>18561,:canals=>21598,:aquifers=>3108,:gauges=>22559,:reservoirs=>2671),Dict(:regions=>Any["01001","01003","01005","01007","01009","01011","01013","01015","01017","01019"  …  "56027","56029","56031","56033","56035","56037","56039","56041","56043","56045"],:crops=>Any["alfalfa","otherhay","Barley","Barley.Winter","Maize","Sorghum","Soybeans","Wheat","Wheat.Winter"],:time=>Any[24106],:edges=>Any[1,2,3,4,5,6,7,8,9,10  …  18552,18553,18554,18555,18556,18557,18558,18559,18560,18561],:canals=>Any[1,2,3,4,5,6,7,8,9,10  …  21589,21590,21591,21592,21593,21594,21595,21596,21597,21598],:aquifers=>Any[1,2,3,4,5,6,7,8,9,10  …  3099,3100,3101,3102,3103,3104,3105,3106,3107,3108],:gauges=>Any["usgs.02456000","junction.13805-dn","junction.11142-up","usgs.03488000","usgs.12113347","junction.13981-up","junction.12762-up","usgs.0214627970","usgs.01396800","usgs.05532000"  …  "reservoir.1656","usgs.02374950","usgs.02110701","reservoir.2121","usgs.14313200","usgs.06312500","usgs.07329500","usgs.13118700","junction.9255-up","junction.18031-up"],:reservoirs=>Any[1,2,3,4,5,6,7,8,9,10  …  2662,2663,2664,2665,2666,2667,2668,2669,2670,2671]),DataStructures.OrderedDict{Symbol,Mimi.ComponentState}(:Thermoelectric=>ComponentState,:Livestock=>ComponentState,:Agriculture=>ComponentState,:WaterDemand=>ComponentState,:Allocation=>ComponentState,:ReturnFlows=>ComponentState,:Aquifer=>ComponentState,:Reservoir=>ComponentState,:WaterNetwork=>ComponentState,:Transportation=>ComponentState,:Market=>ComponentState,:IndustrialDemand=>ComponentState,:UrbanDemand=>ComponentState),Set(UTF8String["WaterDemandurbanuse","Allocationwithdrawals","Marketproduced","Allocationreturns","Agriculturedeficit_coeff","Reservoirinflows","Thermoelectricdemand","Reservoirstoragecapacitymin","Allocationcostfromsw","Aquiferwithdrawal"  …  "Marketregionexports","Marketdomestic_prices","Marketinternationalsales","Allocationcostfromsupersource","UrbanDemanddomesticdemand","UrbanDemandcommercialdemand","Transportationcost_edge","IndustrialDemandminingwaterdemand","Agriculturewater_demand","WaterDemandtotalirrigation"]),Dict{Symbol,Mimi.Parameter}(:miningwaterdemand=>Mimi.CertainArrayParameter(3109x1 Array{Float64,2}:
   14.9833 
   24.2    
   21.8917 
   41.4833 
   13.825  
    6.91667
    0.0    
   11.525  
    0.0    
    1.15   
    1.15   
    0.0    
   40.3333 
    ⋮      
  106.008  
  155.558  
    0.0    
   69.1333 
   13.825  
   11.525  
   73.7417 
 3456.83   
   18.4333 
   21.8917 
   40.3333 
    2.30833),:recharge=>Mimi.CertainArrayParameter(3109x1 Array{Float64,2}:
 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),:totalirrigation=>Mimi.CertainArrayParameter(3109x1 Array{Float64,2}:
 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),:storagecapacitymin=>Mimi.CertainArrayParameter([2.89841e5,3.6248e5,270009.0,2.85321e5,2.50727e5,3.33652e5,267298.0,1.87476e5,2.40842e5,3.75036e5  …  3.97346e5,3.45333e5,3.19302e5,2.93403e5,3.70769e5,289336.0,3.06562e5,2.64949e5,2.75896e5,3.08412e5]),:costfromsupersource=>Mimi.CertainScalarParameter(Set(Tuple{Mimi.ComponentState,Symbol}[(ComponentState,:costfromsupersource)]),100000.0),:water_demand=>Mimi.CertainArrayParameter([1639.61100235402,1639.61100235402,1180.60761343329,1180.60761343329,1475.96435526564,1136.4914374721,1375.99595071683,684.8361981980679,684.8361981980679]),:captures=>Mimi.CertainArrayParameter(2671x1 Array{Float64,2}:
 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),:logirrigatedyield=>Mimi.CertainArrayParameter(3109x9x1 Array{Float64,3}:
[:, :, 1] =
 -Inf         1.47016   -Inf        …  -Inf     3.54694  3.75659  3.75514
 -Inf         1.02648   -Inf           -Inf     3.42608  3.94333  3.96342
 -Inf         1.75034   -Inf           -Inf     3.48831  3.67414  3.6796 
 -Inf         1.35474   -Inf           -Inf     3.68896  3.77739  3.65787
 -Inf         1.39667   -Inf           -Inf     3.79821  3.97719  3.91855
 -Inf         1.19478   -Inf        …  -Inf     3.35167  3.47313  3.49492
 -Inf         1.47722   -Inf           -Inf     3.39444  3.7782   3.7951 
 -Inf         1.53143   -Inf           -Inf     3.92056  3.86605  3.87627
 -Inf         1.41439   -Inf           -Inf     3.86157  3.69799  3.71521
 -Inf         1.61479   -Inf           -Inf     3.66669  4.00187  4.02072
 -Inf         1.592     -Inf        …  -Inf     3.75209  3.59136  3.55933
 -Inf         1.5386    -Inf           -Inf     3.77276  2.85038  3.46366
 -Inf         1.78499   -Inf           -Inf     3.55267  3.52832  3.49007
    ⋮                               ⋱     ⋮                              
    0.56746   0.601507     4.60517     -Inf  -Inf        3.76226  3.76145
    1.78777   1.437        4.60517     -Inf  -Inf        3.64008  3.55029
    1.11985   0.965542     4.60517     -Inf  -Inf        3.61226  3.59651
    0.962604  0.925874     4.60517  …  -Inf  -Inf        4.60517  4.60517
    0.589563  0.740624     4.60517     -Inf  -Inf        3.24757  3.27579
    1.08221   1.06437      4.60517     -Inf  -Inf        3.74349  3.66942
    0.424393  0.392971     4.44058     -Inf  -Inf        4.60517  4.60517
    1.15407   1.16426      4.54875     -Inf  -Inf        3.897    3.91378
    1.08786   1.12384      4.60517  …  -Inf  -Inf        4.03777  4.05705
    1.30867   1.31792      4.60517     -Inf  -Inf        4.60517  4.60517
    0.804506  0.792592     4.60517     -Inf  -Inf        4.60517  4.60517
    1.15341   0.853673     4.56516     -Inf  -Inf        3.70406  3.64238),:aquiferconnexion=>Mimi.CertainArrayParameter(3109x3109 Array{Float64,2}:
 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  0.0  0.0
 0.0  0.0  0.0  0.0  0.0  1.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.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  1.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.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.0  0.0
 0.0  0.0  0.0  0.0  0.0  0.0  0.0  1.0     0.0  0.0  0.0  0.0  0.0  0.0  0.0
 1.0  0.0  0.0  1.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  1.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  1.0  1.0  1.0  1.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  1.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  1.0
 0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  …  0.0  0.0  0.0  1.0  0.0  1.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.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  1.0  1.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  1.0  0.0  0.0  1.0  0.0  0.0
 0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  …  0.0  1.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  1.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.0  0.0  0.0  0.0  0.0  0.0  0.0),:produced=>Mimi.CertainArrayParameter(3109x9x1 Array{Float64,3}:
[:, :, 1] =
 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  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  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  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  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  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  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  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  0.0),:inflows=>Mimi.CertainArrayParameter(2671x1 Array{Float64,2}:
      5.41816e5
      5.4486e5 
      5.26181e5
      4.32844e5
      3.81682e5
      4.71299e5
      3.645e5  
      4.53611e5
      3.70879e5
 615606.0      
      3.83809e5
      6.03757e5
      4.19201e5
      ⋮        
      5.27611e5
      5.53504e5
      5.29533e5
      4.77487e5
      4.35853e5
      5.15744e5
      5.26343e5
      5.69011e5
      5.35517e5
      4.69453e5
      4.69227e5
      3.15192e5),:evaporation=>Mimi.CertainArrayParameter(2671x1 Array{Float64,2}:
 0.01
 0.01
 0.01
 0.01
 0.01
 0.01
 0.01
 0.01
 0.01
 0.01
 0.01
 0.01
 0.01
 ⋮   
 0.01
 0.01
 0.01
 0.01
 0.01
 0.01
 0.01
 0.01
 0.01
 0.01
 0.01
 0.01),:withdrawals=>Mimi.CertainArrayParameter(21598x1 Array{Float64,2}:
 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),:storage0=>Mimi.CertainArrayParameter([2.17381e6,2.7186e6,2.02507e6,2.1399e6,1.88045e6,2.50239e6,2.00473e6,1.40607e6,1.80631e6,2.81277e6  …  2.98009e6,2.59e6,2.39476e6,2.20053e6,2.78077e6,2.17002e6,2.29922e6,1.98712e6,2.06922e6,2.31309e6]),:lateralconductivity=>Mimi.CertainArrayParameter(3109x3109 Array{Float64,2}:
   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     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    100.32   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       0.0    
   0.0      0.0      0.0    0.0     0.0     0.0       0.0       0.0    
 168.075    0.0      0.0   44.3985  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    620.866    0.0    0.0     0.0     0.0       0.0       0.0    
   ⋮                                     ⋱                             
   0.0      0.0      0.0    0.0     0.0     1.20653   0.0       0.0    
   0.0      0.0      0.0    0.0     0.0     0.0       0.382317  0.0    
   0.0      0.0      0.0    0.0     0.0     0.0       0.0       1.61164
   0.0      0.0      0.0    0.0     0.0  …  0.0       0.167123  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    0.0     0.0     0.545008  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      0.0    0.0     0.0     0.0       0.0       0.0    ),:returns=>Mimi.CertainArrayParameter(21598x1 Array{Float64,2}:
 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),:international_prices=>Mimi.CertainArrayParameter(3109x9 Array{Float64,2}:
 0.0232489  0.0232489  1.30763  …  2.22123  4.75618  2.58375  2.33373
 0.0232489  0.0232489  1.30763     2.22123  4.75618  2.58375  2.33373
 0.0232489  0.0232489  1.30763     2.22123  4.75618  2.58375  2.33373
 0.0232489  0.0232489  1.30763     2.22123  4.75618  2.58375  2.33373
 0.0232489  0.0232489  1.30763     2.22123  4.75618  2.58375  2.33373
 0.0232489  0.0232489  1.30763  …  2.22123  4.75618  2.58375  2.33373
 0.0232489  0.0232489  1.30763     2.22123  4.75618  2.58375  2.33373
 0.0232489  0.0232489  1.30763     2.22123  4.75618  2.58375  2.33373
 0.0232489  0.0232489  1.30763     2.22123  4.75618  2.58375  2.33373
 0.0232489  0.0232489  1.30763     2.22123  4.75618  2.58375  2.33373
 0.0232489  0.0232489  1.30763  …  2.22123  4.75618  2.58375  2.33373
 0.0232489  0.0232489  1.30763     2.22123  4.75618  2.58375  2.33373
 0.0232489  0.0232489  1.30763     2.22123  4.75618  2.58375  2.33373
 ⋮                              ⋱  ⋮                                 
 0.0232489  0.0232489  1.30763     2.22123  4.75618  2.58375  2.33373
 0.0232489  0.0232489  1.30763     2.22123  4.75618  2.58375  2.33373
 0.0232489  0.0232489  1.30763     2.22123  4.75618  2.58375  2.33373
 0.0232489  0.0232489  1.30763  …  2.22123  4.75618  2.58375  2.33373
 0.0232489  0.0232489  1.30763     2.22123  4.75618  2.58375  2.33373
 0.0232489  0.0232489  1.30763     2.22123  4.75618  2.58375  2.33373
 0.0232489  0.0232489  1.30763     2.22123  4.75618  2.58375  2.33373
 0.0232489  0.0232489  1.30763     2.22123  4.75618  2.58375  2.33373
 0.0232489  0.0232489  1.30763  …  2.22123  4.75618  2.58375  2.33373
 0.0232489  0.0232489  1.30763     2.22123  4.75618  2.58375  2.33373
 0.0232489  0.0232489  1.30763     2.22123  4.75618  2.58375  2.33373
 0.0232489  0.0232489  1.30763     2.22123  4.75618  2.58375  2.33373),:rainfedareas=>Mimi.CertainArrayParameter(3109x9x1 Array{Float64,3}:
[:, :, 1] =
    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     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     2643.0        0.0       0.0  …  0.0  466.198    0.0     416.827 
    0.0     3457.23       0.0       0.0     0.0    0.0      0.0       0.0   
    0.0        0.0        0.0       0.0     0.0  945.751    0.0     269.116 
   57.0607  3188.52       0.0       0.0     0.0    0.0      0.0      82.1513
   10.1172     0.0        0.0       0.0     0.0    0.0      0.0    2437.42  
    0.0        0.0        0.0       0.0  …  0.0    0.0      0.0       0.0   
    0.0     1381.6        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   
    ⋮                                    ⋱  ⋮                               
 5406.6     2505.01    1139.19      0.0     0.0    0.0      0.0       0.0   
  808.967    802.088      0.0       0.0     0.0    0.0      0.0       0.0   
 1256.95    1150.52       0.0       0.0     0.0    0.0      0.0       0.0   
  719.127    927.136    259.404     0.0  …  0.0    0.0      0.0       0.0   
 2242.77     629.691      0.0       0.0     0.0    0.0      0.0       0.0   
 3867.58    3337.04       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   
 1813.8      751.097      0.404686  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   
  362.194     40.8733     0.0       0.0     0.0    0.0      0.0       0.0   
 4755.06    1879.77       0.0       0.0     0.0    0.0    242.812    54.6326),:piezohead0=>Mimi.CertainArrayParameter([70.8958,70.8958,70.8958,70.8958,70.8958,70.8958,70.8958,70.8958,70.8958,70.8958  …  32.9918,70.8958,34.439,70.8958,70.8958,70.8958,70.8958,70.8958,70.8958,70.8958]),:commercialdemand=>Mimi.CertainArrayParameter(3109x1 Array{Float64,2}:
 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),:storagecoef=>Mimi.CertainArrayParameter([0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1  …  0.0691382,0.1,0.0755149,0.1,0.1,0.1,0.1,0.1,0.1,0.1]),:elevation=>Mimi.CertainArrayParameter([88.45,47.275,67.1,68.32,265.35,138.775,135.725,172.325,227.225,179.645  …  1525.0,1521.95,1414.59,1209.02,2188.38,2056.01,2073.39,2067.9,1238.61,1300.83]),:costfromsw=>Mimi.CertainArrayParameter(3109x1 Array{Float64,2}:
 369.029
 397.678
 339.772
 304.793
 321.66 
 314.176
 365.389
 329.508
 320.018
 442.321
 323.793
 347.46 
 402.148
   ⋮    
 382.491
 380.3  
 358.034
 362.527
 332.95 
 385.696
 352.881
 375.002
 380.702
 317.539
 333.935
 327.78 ),:waterfromsupersource=>Mimi.CertainArrayParameter(3109x1 Array{Float64,2}:
 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),:added=>Mimi.CertainArrayParameter(22619x1 Array{Float64,2}:
  967.02  
 1471.54  
 1344.33  
  521.162 
 2025.89  
 1004.45  
 1121.29  
   49.0551
   27.9891
  320.511 
   10.1662
   53.7024
   33.6556
    ⋮     
    0.0   
    0.0   
    0.0   
    0.0   
    0.0   
    0.0   
    0.0   
    0.0   
    0.0   
    0.0   
  996.933 
  699.246 ),:watertotaldemand=>Mimi.CertainArrayParameter(3109x1 Array{Float64,2}:
 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),:irrigatedareas=>Mimi.CertainArrayParameter(3109x9x1 Array{Float64,3}:
[:, :, 1] =
     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       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         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       2.42812     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     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
     ⋮                                            ⋮                     
 12397.6    9522.67     1719.11    0.0     0.0    0.0  0.0    0.0    0.0
  7449.86   1470.63        0.0     0.0     0.0    0.0  0.0    0.0    0.0
  4042.41    896.784       0.0     0.0   276.401  0.0  0.0    0.0    0.0
 12138.6    2594.85     7043.96    0.0  1384.43   0.0  0.0    0.0    0.0
  9184.75   5955.36        0.0     0.0     0.0    0.0  0.0    0.0    0.0
 10785.3    4031.89       16.9968  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
  5413.08   3397.74       91.459   0.0     0.0    0.0  0.0    0.0    0.0
   777.402  1589.61        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
  4744.94    607.029    4113.23    0.0   422.492  0.0  0.0  127.476  0.0
  1403.86    185.346       0.0     0.0     0.0    0.0  0.0    0.0    0.0),:industrywaterdemand=>Mimi.CertainArrayParameter(3109x1 Array{Float64,2}:
 4727.79   
    0.0    
  182.058  
    0.0    
    0.0    
    0.0    
   34.5667 
  111.767  
    0.0    
    0.0    
   40.3333 
 4696.68   
 2329.9    
    ⋮      
    5.75833
   27.6583 
    0.0    
  146.342  
    8.06667
    8.06667
    0.0    
  298.442  
    5.75833
   18.4333 
    4.60833
   23.0417 ),:returned=>Mimi.CertainArrayParameter(22559x1 Array{Float64,2}:
 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),:precipitation=>Mimi.CertainArrayParameter(3109x1 Array{Float64,2}:
 1655.23 
 2100.44 
 1568.05 
 1932.65 
 1503.72 
 1687.27 
 1815.19 
 1629.58 
 1786.33 
 1614.56 
 1822.31 
 1535.13 
 1656.98 
    ⋮    
  438.065
  366.45 
  445.993
  557.524
  491.249
  462.057
  406.124
  234.964
  848.404
  374.395
  296.851
  398.779),:livestockuse=>Mimi.CertainArrayParameter(3109x1 Array{Float64,2}:
 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),:regionimports=>Mimi.CertainArrayParameter(3109x9x1 Array{Float64,3}:
[:, :, 1] =
 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  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  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  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  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  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  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  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  0.0),:deltatime=>Mimi.CertainScalarParameter(Set(Tuple{Mimi.ComponentState,Symbol}[(ComponentState,:deltatime)]),12.0),:domesticuse=>Mimi.CertainArrayParameter(3109x1 Array{Float64,2}:
 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),:imported=>Mimi.CertainArrayParameter(18561x9x1 Array{Float64,3}:
[:, :, 1] =
 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  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  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  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  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  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  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  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  0.0),:costfromgw=>Mimi.CertainArrayParameter(3109x1 Array{Float64,2}:
 100.0
 100.0
 100.0
 100.0
 100.0
 100.0
 100.0
 100.0
 100.0
 100.0
 100.0
 100.0
 100.0
   ⋮  
 100.0
 100.0
 100.0
 100.0
 100.0
 100.0
 100.0
 100.0
 100.0
 100.0
 100.0
 100.0),:areaaquif=>Mimi.CertainArrayParameter([1.56537e8,5.25073e8,2.34271e8,1.62178e8,1.68513e8,1.61911e8,2.01471e8,1.58583e8,1.56205e8,1.55395e8  …  6.80642e8,1.80456e9,5.46713e8,6.54514e8,1.27835e9,2.71719e9,1.09203e9,5.40681e8,5.80859e8,6.21605e8]),:domesticdemand=>Mimi.CertainArrayParameter(3109x1 Array{Float64,2}:
  586.508
 2646.78 
  478.192
  563.467
  445.967
  265.025
  311.117
 2684.8  
  496.633
  402.142
  563.467
  156.708
  362.967
    ⋮    
  447.083
 1252.52 
   76.05 
  364.117
  142.883
  551.942
  262.717
 1139.6  
  600.333
  498.933
  177.45 
  191.275),:demand=>Mimi.CertainArrayParameter(3109x1 Array{Float64,2}:
  17.2833 
  40.3333 
  43.7833 
   8.06667
 112.925  
  16.1333 
  46.0917 
  36.875  
  20.7417 
  32.2667 
  20.7417 
  10.3667 
   9.21667
   ⋮      
  59.9167 
  80.6583 
  66.8333 
  82.9667 
 141.733  
  97.9417 
  72.5917 
  28.8083 
  10.3667 
  66.8333 
  55.3083 
  61.0667 ),:industrialuse=>Mimi.CertainArrayParameter(3109x1 Array{Float64,2}:
 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),:depthaquif=>Mimi.CertainArrayParameter([50.0,50.0,50.0,50.0,50.0,50.0,50.0,50.0,50.0,50.0  …  65.9836,50.0,68.8779,50.0,50.0,50.0,50.0,50.0,50.0,50.0]),:internationalsales=>Mimi.CertainArrayParameter(3109x9x1 Array{Float64,3}:
[:, :, 1] =
 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  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  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  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  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  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  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  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  0.0),:regionexports=>Mimi.CertainArrayParameter(3109x9x1 Array{Float64,3}:
[:, :, 1] =
 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  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  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  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  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  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  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  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  0.0),:removed=>Mimi.CertainArrayParameter(22559x1 Array{Float64,2}:
 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),:waterfromreservoir=>Mimi.CertainArrayParameter(3109x1 Array{Float64,2}:
 43113.5
     0.0
    83.0
     0.0
 72137.1
    27.7
     0.0
  3456.8
  5959.6
  1327.4
  2530.4
 56360.1
 29203.3
     ⋮  
  1244.4
  5116.1
     0.0
  4770.4
    69.2
  6678.6
  1839.0
 14338.9
   235.1
  5531.0
    69.1
   138.3),:urbanuse=>Mimi.CertainArrayParameter(3109x1 Array{Float64,2}:
 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),:domestic_prices=>Mimi.CertainArrayParameter(3109x9 Array{Float64,2}:
 0.0464978  0.0464978  2.61525  2.61525  …  4.44246  9.51236  5.1675  4.66746
 0.0464978  0.0464978  2.61525  2.61525     4.44246  9.51236  5.1675  4.66746
 0.0464978  0.0464978  2.61525  2.61525     4.44246  9.51236  5.1675  4.66746
 0.0464978  0.0464978  2.61525  2.61525     4.44246  9.51236  5.1675  4.66746
 0.0464978  0.0464978  2.61525  2.61525     4.44246  9.51236  5.1675  4.66746
 0.0464978  0.0464978  2.61525  2.61525  …  4.44246  9.51236  5.1675  4.66746
 0.0464978  0.0464978  2.61525  2.61525     4.44246  9.51236  5.1675  4.66746
 0.0464978  0.0464978  2.61525  2.61525     4.44246  9.51236  5.1675  4.66746
 0.0464978  0.0464978  2.61525  2.61525     4.44246  9.51236  5.1675  4.66746
 0.0464978  0.0464978  2.61525  2.61525     4.44246  9.51236  5.1675  4.66746
 0.0464978  0.0464978  2.61525  2.61525  …  4.44246  9.51236  5.1675  4.66746
 0.0464978  0.0464978  2.61525  2.61525     4.44246  9.51236  5.1675  4.66746
 0.0464978  0.0464978  2.61525  2.61525     4.44246  9.51236  5.1675  4.66746
 ⋮                                       ⋱  ⋮                                
 0.0464978  0.0464978  2.61525  2.61525     4.44246  9.51236  5.1675  4.66746
 0.0464978  0.0464978  2.61525  2.61525     4.44246  9.51236  5.1675  4.66746
 0.0464978  0.0464978  2.61525  2.61525     4.44246  9.51236  5.1675  4.66746
 0.0464978  0.0464978  2.61525  2.61525  …  4.44246  9.51236  5.1675  4.66746
 0.0464978  0.0464978  2.61525  2.61525     4.44246  9.51236  5.1675  4.66746
 0.0464978  0.0464978  2.61525  2.61525     4.44246  9.51236  5.1675  4.66746
 0.0464978  0.0464978  2.61525  2.61525     4.44246  9.51236  5.1675  4.66746
 0.0464978  0.0464978  2.61525  2.61525     4.44246  9.51236  5.1675  4.66746
 0.0464978  0.0464978  2.61525  2.61525  …  4.44246  9.51236  5.1675  4.66746
 0.0464978  0.0464978  2.61525  2.61525     4.44246  9.51236  5.1675  4.66746
 0.0464978  0.0464978  2.61525  2.61525     4.44246  9.51236  5.1675  4.66746
 0.0464978  0.0464978  2.61525  2.61525     4.44246  9.51236  5.1675  4.66746),:withdrawal=>Mimi.CertainArrayParameter(3109x1 Array{Float64,2}:
 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),:storagecapacitymax=>Mimi.CertainArrayParameter([2.89841e6,3.6248e6,2.70009e6,2.85321e6,2.50727e6,3.33652e6,2.67298e6,1.87476e6,2.40842e6,3.75036e6  …  3.97346e6,3.45333e6,3.19302e6,2.93403e6,3.70769e6,2.89336e6,3.06562e6,2.64949e6,2.75896e6,3.08412e6]),:thermoelectricuse=>Mimi.CertainArrayParameter(3109x1 Array{Float64,2}:
 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),:waterfromgw=>Mimi.CertainArrayParameter(3109x1 Array{Float64,2}:
 20837.7
 32051.7
  8102.8
  7259.4
  3539.8
  3235.6
  4148.2
 30240.3
     0.0
  3512.1
  4729.0
  1880.5
  3595.1
     ⋮  
  5461.7
 12112.7
   912.6
  2184.7
  1908.1
   179.7
  2198.5
 44399.4
  7259.3
   940.3
  2599.5
  2461.3),:cost_edge=>Mimi.CertainArrayParameter(18561x1 Array{Float64,2}:
 0.76
 0.76
 0.76
 0.76
 0.76
 0.76
 0.76
 0.76
 0.76
 0.76
 0.76
 0.76
 0.76
 ⋮   
 0.76
 0.76
 0.76
 0.76
 0.76
 0.76
 0.76
 0.76
 0.76
 0.76
 0.76
 0.76),:deficit_coeff=>Mimi.CertainArrayParameter(3109x9 Array{Float64,2}:
  0.0       -0.577553   0.0       …  -0.500502  -0.136903  -0.148853
  0.0       -0.576791   0.0          -0.499266  -0.136578  -0.148495
  0.0       -0.577494   0.0          -0.500363  -0.136614  -0.148548
  0.0       -0.577227   0.0          -0.500285  -0.136795  -0.148846
  0.0       -0.577059   0.0          -0.500509  -0.137109  -0.148934
  0.0       -0.577334   0.0       …  -0.50025   -0.136916  -0.148856
  0.0       -0.577237   0.0          -0.500215  -0.137217  -0.14913 
  0.0       -0.577364   0.0          -0.500789  -0.136227  -0.148305
  0.0       -0.577302   0.0          -0.500385  -0.136704  -0.14872 
  0.0       -0.577723   0.0          -0.500428  -0.137071  -0.148955
  0.0       -0.577454   0.0       …  -0.50068   -0.137463  -0.14953 
  0.0       -0.577675   0.0          -0.500401  -0.137242  -0.149131
  0.0       -0.577742   0.0          -0.499666  -0.136655  -0.148702
  ⋮                               ⋱                                 
 -0.55605   -0.577056  -0.452926      0.0       -0.137486  -0.149295
 -0.556284  -0.577232  -0.451217      0.0       -0.137957  -0.149638
 -0.556413  -0.577341  -0.451129      0.0       -0.137393  -0.149182
 -0.556071  -0.577055  -0.449313  …   0.0       -0.138424  -0.149815
 -0.556006  -0.577124  -0.451096      0.0       -0.136799  -0.148746
 -0.556191  -0.577184  -0.451532      0.0       -0.137697  -0.14927 
 -0.55615   -0.577128  -0.449935      0.0       -0.13727   -0.149057
 -0.556191  -0.577189  -0.449786      0.0       -0.137326  -0.148974
 -0.556199  -0.577209  -0.45017   …   0.0       -0.137256  -0.149223
 -0.556307  -0.577304  -0.451632      0.0       -0.138253  -0.149707
 -0.556072  -0.577078  -0.449667      0.0       -0.137746  -0.148933
 -0.556325  -0.57727   -0.452945      0.0       -0.138409  -0.149752)),Float64),:Transportation,:regionexports)

In [ ]:

Now let's consider optimization. Like agriculture, aquaculture production can go into the producer-viewed objective function.