{
  "name": "Control de Represa Hidráulica",
  "author": "Cátedra Dinámica Industrial UADE - Ing. Nahuel Romera",
  "description": "Modelo de control de nivel en represa hidroeléctrica protegiendo contra arrastre de sedimentos.",
  "timeSettings": {
    "startTime": 0,
    "stopTime": 50,
    "timeStep": 0.5,
    "method": "RK4"
  },
  "nodes": [
    { "key": "cloud1", "type": "cloud", "x": 60, "y": 160 },
    { "key": "stock1", "type": "stock", "label": "aguaRepresa", "initVal": 45000, "isNN": true, "x": 260, "y": 160 },
    { "key": "valve1", "type": "valve", "label": "caudalRioAfluente", "equation": "350", "isNN": true, "x": 160, "y": 160 },
    
    { "key": "cloud2", "type": "cloud", "x": 580, "y": 160 },
    { "key": "valve2", "type": "valve", "label": "caudalDescargaCompuerta", "equation": "aperturaCompuerta * factorConductancia", "isNN": true, "x": 420, "y": 160 },

    { "key": "aux1", "type": "variable", "label": "controlNivelMinimo", "equation": "Math.max(0, (volumenMinimo - aguaRepresa) / 5000)", "x": 260, "y": 280 },
    { "key": "param1", "type": "variable", "label": "volumenMinimo", "equation": "20000", "x": 140, "y": 280 },
    
    { "key": "aux2", "type": "variable", "label": "aperturaCompuerta", "equation": "Math.max(0.05, Math.min(1.0, 0.8 - controlNivelMinimo))", "x": 420, "y": 280 },
    { "key": "param2", "type": "variable", "label": "factorConductancia", "equation": "450", "x": 520, "y": 280 }
  ],
  "links": [
    { "from": "cloud1", "to": "stock1", "type": "flow", "labelKey": "caudalRioAfluente" },
    { "from": "stock1", "to": "cloud2", "type": "flow", "labelKey": "caudalDescargaCompuerta" },
    { "from": "stock1", "to": "aux1", "type": "influence" },
    { "from": "param1", "to": "aux1", "type": "influence" },
    { "from": "aux1", "to": "aux2", "type": "influence" },
    { "from": "aux2", "to": "valve2", "type": "influence" },
    { "from": "param2", "to": "valve2", "type": "influence" }
  ]
}
