Skip to content

Instantly share code, notes, and snippets.

@snorfalorpagus
Created February 19, 2016 22:47
Show Gist options
  • Select an option

  • Save snorfalorpagus/eb0cdc0f6cab341391db to your computer and use it in GitHub Desktop.

Select an option

Save snorfalorpagus/eb0cdc0f6cab341391db to your computer and use it in GitHub Desktop.
JSON pywr
{
"pywr": {
"metadata": {
"title": "JSON example",
"description": "An example of how models could be stored in JSON."
},
"scenarios": {
"demand_scenario": "demand_scenario"
},
"structure": {
"nodes": {
"catchment": {
"class": "Input",
"min_flow": "catchment_flow_parameter"
},
"river": {
"class": "Link"
},
"terminator": {
"class": "Output"
},
"abstraction": {
"class": "Link",
"max_flow": 15,
"cost": 10
},
"reservoir1": {
"class": "Storage",
"initial_volume": 1000,
"max_volume": 1000,
"min_volume": 200
},
"groundwater": {
"class": "Input",
"max_flow": {
"class": "AnnualLicense",
"amount": 4000
},
"cost": 80
},
"demand1": {
"class": "Output",
"max_flow": "demand_parameter",
"cost": -100
}
},
"edges": [
["catchment", "river"],
["river", "terminator"],
["abstraction", "reservoir1", null, 0],
["reservoir1", "demand1", 0, null],
["groundwater", "demand1"]
]
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment