{
    "metadata": {
        "title": "A simple model using the river Thames",
        "description": "This model uses river Thames inflows. However it does not represent the Thames Water system or use any data from TWUL.",
        "minimum_version": "0.4"
    },
    "timestepper": {
        "start": "2100-01-01",
        "end": "2200-01-01",
        "timestep": 7
    },
    "scenarios": [
        {
            "name": "demand",
            "size": 5
        }
    ],
    "nodes": [
        {
            "name": "catchment1",
            "type": "catchment",
            "flow": "flow"
        },
        {
            "name": "river1",
            "type": "link"
        },
        {
            "name": "mrf1",
            "type": "rivergauge",
            "mrf": 0.6,
            "mrf_cost": -1000
        },
        {
            "name": "term1",
            "type": "output"
        },
        {
            "name": "reservoir1",
            "type": "storage",
            "max_volume": 200,
            "initial_volume": 200,
            "cost": -10
        },
        {
            "name": "abs1",
            "type": "link",
            "max_flow": 3.5
        },
        {
            "name": "demand1",
            "type": "output",
            "max_flow": "demand_max_flow",
            "cost": -500
        }
    ],
    "edges": [
        ["catchment1", "river1"],
        ["river1", "mrf1"],
        ["mrf1", "term1"],
        ["river1", "abs1"],
        ["abs1", "reservoir1"],
        ["reservoir1", "demand1"]
    ],
    "parameters": {
        "flow_factor": {
            "name": "flow_factor",
            "type": "constant",
            "value": 0.0864
        },
        "flow_cumecs": {
              "type": "dataframe",
              "url": "../data/thames_stochastic_flow.gz",
              "column": "flow",
              "index_col": "Date",
              "parse_dates": true
        },
        "flow": {
            "type": "aggregated",
            "agg_func": "product",
            "parameters": ["flow_cumecs", "flow_factor"]
        },
        "demand_baseline": {
            "type": "constant",
            "values": 1.7
        },
        "demand_profile": {
            "type": "monthlyprofile",
            "values": [0.9, 0.9, 0.9, 0.9, 1.2, 1.2, 1.2, 1.2, 0.9, 0.9, 0.9, 0.9]
        },
        "demand_max_flow": {
            "type": "aggregated",
            "agg_func": "product",
            "parameters": [
                "demand_baseline",
                "demand_profile",
                "demand_saving_factor",
                "demand_growth_factor"
            ]
        },
        "level1": {
            "type": "constant",
            "values": 0.8
        },
        "level2": {
            "type": "constant",
            "values": 0.5
        },
        "demand_saving_level" : {
            "type": "controlcurveindex",
            "storage_node": "reservoir1",
            "control_curves": [
                "level1",
                "level2"
            ]
        },
        "demand_saving_factor" : {
            "type": "indexedarray",
            "index_parameter": "demand_saving_level",
            "params": [
                {
                    "type": "constant",
                    "values": 1.0
                },
                {
                    "type": "monthlyprofile",
                    "values": [0.95, 0.95, 0.95, 0.95, 0.90, 0.90, 0.90, 0.90, 0.95, 0.95, 0.95, 0.95]
                },
                {
                    "type": "monthlyprofile",
                    "values": [0.8, 0.8, 0.8, 0.8, 0.75, 0.75, 0.75, 0.75, 0.8, 0.8, 0.8, 0.8]
                }
            ]
        },
        "demand_growth_factor": {
            "type": "constantscenario",
            "scenario": "demand",
            "values" : [0.75, 0.9, 1.0, 1.1, 1.25]

        }
    }
}
