{
 "format": "stockflow-1",
 "id": "lib-wolves-rivers",
 "name": "How wolves can change rivers",
 "notes": "A simplified version of a famous story from Yellowstone National Park (USA). Without wolves, deer stand by the river and eat every young tree, and the riverbanks wash away. When wolves return, there are fewer deer, and the deer avoid the open riverbanks. Young trees grow, their roots hold the soil, and the river changes. Scientists still debate how strong the effect really was in Yellowstone, but the model shows how something far away in a food chain can influence something you would never connect with it. Try: release no wolves, or only 10. Time unit: years.",
 "sim": {
  "start": 0,
  "stop": 40,
  "dt": 0.125,
  "unit": "years"
 },
 "elements": [
  {
   "id": "w1",
   "type": "stock",
   "name": "Wolves",
   "eq": "0",
   "x": 220,
   "y": 160,
   "units": "wolves",
   "doc": "Wolves in the valley.",
   "nonneg": true
  },
  {
   "id": "w2",
   "type": "stock",
   "name": "Deer",
   "eq": "4000",
   "x": 220,
   "y": 440,
   "units": "deer",
   "doc": "Deer (elk) in the valley.",
   "nonneg": true
  },
  {
   "id": "w3",
   "type": "stock",
   "name": "Riverside_Trees",
   "eq": "300",
   "x": 640,
   "y": 440,
   "units": "hectares",
   "doc": "Young trees and bushes along the river.",
   "nonneg": true
  },
  {
   "id": "w4",
   "type": "stock",
   "name": "Stable_Riverbank",
   "eq": "40",
   "x": 1000,
   "y": 440,
   "units": "% of riverbank",
   "doc": "Share of the riverbank held together by roots.",
   "nonneg": true
  },
  {
   "id": "w5",
   "type": "flow",
   "name": "Wolves_Released",
   "eq": "PULSE(Wolves_Released_Number, Release_Year)",
   "from": null,
   "to": "w1",
   "fx": 40,
   "fy": 100,
   "units": "wolves/year",
   "doc": "Wolves brought back to the valley in one year.",
   "biflow": false
  },
  {
   "id": "w6",
   "type": "flow",
   "name": "Wolf_Births",
   "eq": "Wolves*0.3*MAX(0, 1 - Wolves/(Deer/Deer_per_Wolf))",
   "from": null,
   "to": "w1",
   "fx": 40,
   "fy": 220,
   "units": "wolves/year",
   "doc": "Wolf pups. Fewer when there are not enough deer to feed the pack.",
   "biflow": false
  },
  {
   "id": "w7",
   "type": "flow",
   "name": "Wolf_Deaths",
   "eq": "Wolves*0.1",
   "from": "w1",
   "to": null,
   "tx": 420,
   "ty": 160,
   "units": "wolves/year",
   "doc": "Wolves dying each year.",
   "biflow": false
  },
  {
   "id": "w8",
   "type": "flow",
   "name": "Deer_Births",
   "eq": "Deer*0.25*MAX(0, 1 - Deer/6000)",
   "from": null,
   "to": "w2",
   "fx": 40,
   "fy": 440,
   "units": "deer/year",
   "doc": "Deer calves; fewer when the valley is crowded.",
   "biflow": false
  },
  {
   "id": "w9",
   "type": "flow",
   "name": "Deer_Eaten",
   "eq": "Wolves*Deer_per_Wolf_Eaten*Deer/(Deer + 1000)",
   "from": "w2",
   "to": null,
   "tx": 420,
   "ty": 580,
   "units": "deer/year",
   "doc": "Deer caught by wolves. When deer are scarce, wolves find fewer.",
   "biflow": false
  },
  {
   "id": "w10",
   "type": "flow",
   "name": "Tree_Growth",
   "eq": "Riverside_Trees*0.3*MAX(0, 1 - Riverside_Trees/2000)",
   "from": null,
   "to": "w3",
   "fx": 640,
   "fy": 260,
   "units": "hectares/year",
   "doc": "Young trees spreading along the river.",
   "biflow": false
  },
  {
   "id": "w11",
   "type": "flow",
   "name": "Browsing",
   "eq": "Deer*Browsing_per_Deer*Fear_Factor*Riverside_Trees/2000",
   "from": "w3",
   "to": null,
   "tx": 840,
   "ty": 600,
   "units": "hectares/year",
   "doc": "Young trees eaten by deer standing at the river.",
   "biflow": false
  },
  {
   "id": "w12",
   "type": "flow",
   "name": "Bank_Change",
   "eq": "(Riverside_Trees/2000*100 - Stable_Riverbank)/Root_Time",
   "from": null,
   "to": "w4",
   "fx": 1000,
   "fy": 260,
   "units": "% per year",
   "doc": "Riverbanks become stable where tree roots hold the soil, and wash away where they do not.",
   "biflow": true
  },
  {
   "id": "w13",
   "type": "aux",
   "name": "Fear_Factor",
   "eq": "1/(1 + Wolves/Wolves_to_Halve_Grazing)",
   "x": 440,
   "y": 330,
   "units": "index",
   "doc": "Deer avoid open riverbanks when wolves are around, so they eat fewer young trees there (1 = no fear)."
  },
  {
   "id": "w14",
   "type": "aux",
   "name": "Wolves_Released_Number",
   "eq": "30",
   "x": 40,
   "y": 40,
   "units": "wolves",
   "doc": "How many wolves are brought back.",
   "slider": {
    "min": 0,
    "max": 80,
    "step": 5,
    "kind": "decision"
   }
  },
  {
   "id": "w15",
   "type": "aux",
   "name": "Release_Year",
   "eq": "5",
   "x": 220,
   "y": 40,
   "units": "year",
   "doc": "When the wolves are brought back."
  },
  {
   "id": "w16",
   "type": "aux",
   "name": "Deer_per_Wolf",
   "eq": "25",
   "x": 420,
   "y": 40,
   "units": "deer",
   "doc": "Deer needed to feed one wolf for a year."
  },
  {
   "id": "w17",
   "type": "aux",
   "name": "Deer_per_Wolf_Eaten",
   "eq": "10",
   "x": 420,
   "y": 660,
   "units": "deer/wolf/year",
   "doc": "Deer each wolf eats per year.",
   "slider": {
    "min": 5,
    "max": 30,
    "step": 1,
    "kind": "assumption"
   }
  },
  {
   "id": "w18",
   "type": "aux",
   "name": "Browsing_per_Deer",
   "eq": "0.2",
   "x": 640,
   "y": 660,
   "units": "hectares/deer/year",
   "doc": "Young trees one deer eats at the river per year without fear.",
   "slider": {
    "min": 0.05,
    "max": 0.5,
    "step": 0.01,
    "kind": "assumption"
   }
  },
  {
   "id": "w19",
   "type": "aux",
   "name": "Wolves_to_Halve_Grazing",
   "eq": "20",
   "x": 440,
   "y": 230,
   "units": "wolves",
   "doc": "Number of wolves that makes deer graze half as much at the river.",
   "slider": {
    "min": 5,
    "max": 100,
    "step": 5,
    "kind": "assumption"
   }
  },
  {
   "id": "w20",
   "type": "aux",
   "name": "Root_Time",
   "eq": "5",
   "x": 1000,
   "y": 600,
   "units": "years",
   "doc": "How long roots take to stabilise a riverbank."
  }
 ],
 "plots": [
  "w1",
  "w2",
  "w3",
  "w4"
 ],
 "summary": {
  "kpis": [
   {
    "name": "Stable_Riverbank",
    "agg": "final",
    "label": "Stable riverbank at the end",
    "better": "high",
    "format": "num"
   },
   {
    "name": "Deer",
    "agg": "final",
    "label": "Deer at the end",
    "better": "high",
    "format": "num"
   }
  ]
 },
 "scenarios": [
  {
   "id": "ws1",
   "name": "Bring wolves back",
   "values": {
    "Wolves_Released_Number": 30
   }
  },
  {
   "id": "ws2",
   "name": "No wolves",
   "values": {
    "Wolves_Released_Number": 0
   }
  }
 ]
}