{
 "format": "stockflow-1",
 "id": "lib-ice-cream-sunburn",
 "name": "Ice cream and sunburn",
 "notes": "Plot Ice_Creams_per_Day and Sunburns_per_Week: they rise and fall together. Someone looking only at those numbers might think ice cream causes sunburn. In the model there is no arrow between them at all: both are caused by sunshine. Two things that move together do not prove that one causes the other. Look at the map for the hidden common cause. Try: more sun cream reduces sunburn but does not change ice cream sales. Time unit: months (one year).",
 "sim": {
  "start": 0,
  "stop": 12,
  "dt": 0.25,
  "unit": "months"
 },
 "elements": [
  {
   "id": "i1",
   "type": "aux",
   "name": "Sunshine",
   "eq": "MAX(0, 6 + 5*SIN(2*3.14159*(TIME - 3)/12) + NORMAL(0, Weather_Luck, 7))",
   "x": 360,
   "y": 120,
   "units": "hours/day",
   "doc": "Hours of sunshine per day: more in summer, plus good or bad luck with the weather."
  },
  {
   "id": "i2",
   "type": "aux",
   "name": "Weather_Luck",
   "eq": "1.5",
   "x": 160,
   "y": 60,
   "units": "hours/day",
   "doc": "How much the weather varies from one week to the next.",
   "slider": {
    "min": 0,
    "max": 4,
    "step": 0.1,
    "kind": "assumption"
   }
  },
  {
   "id": "i3",
   "type": "aux",
   "name": "Ice_Creams_per_Day",
   "eq": "50 + 40*Sunshine",
   "x": 160,
   "y": 340,
   "units": "ice creams/day",
   "doc": "Ice creams sold by a kiosk. Sunshine brings people to the beach."
  },
  {
   "id": "i4",
   "type": "aux",
   "name": "Sunburns_per_Week",
   "eq": "Sunshine*Sunshine*0.3*(1 - Sun_Cream_Use)",
   "x": 560,
   "y": 340,
   "units": "cases/week",
   "doc": "Sunburn cases at the doctor. Only sunshine causes them; sun cream protects."
  },
  {
   "id": "i5",
   "type": "aux",
   "name": "Sun_Cream_Use",
   "eq": "0.4",
   "x": 760,
   "y": 200,
   "units": "fraction",
   "doc": "Share of people who use sun cream properly.",
   "slider": {
    "min": 0,
    "max": 1,
    "step": 0.05,
    "kind": "decision"
   }
  },
  {
   "id": "i6",
   "type": "stock",
   "name": "Ice_Creams_Sold",
   "eq": "0",
   "x": 160,
   "y": 560,
   "units": "ice creams",
   "doc": "All ice creams sold since January.",
   "nonneg": true
  },
  {
   "id": "i7",
   "type": "flow",
   "name": "Selling",
   "eq": "Ice_Creams_per_Day*30",
   "from": null,
   "to": "i6",
   "fx": 40,
   "fy": 560,
   "units": "ice creams/month",
   "doc": "Ice creams sold per month.",
   "biflow": false
  }
 ],
 "plots": [
  "i3",
  "i4",
  "i1"
 ],
 "summary": {
  "kpis": [
   {
    "name": "Ice_Creams_Sold",
    "agg": "final",
    "label": "Ice creams sold in the year",
    "better": "high",
    "format": "num"
   },
   {
    "name": "Sunburns_per_Week",
    "agg": "max",
    "label": "Worst week for sunburn",
    "better": "low",
    "format": "num"
   }
  ]
 }
}