{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "name": "verslomatika-roi-model",
  "version": "1.1.0-codex-review",
  "description": "Automatizavimo ekonominio atsiperkamumo matematinis modelis ir jautrumo formulės",
  "variables": {
    "N": {
      "label": "Mėnesinis operacijų skaičius",
      "unit": "vnt./mėn.",
      "type": "number",
      "min": 0
    },
    "T_min": {
      "label": "Vienos operacijos trukmė rankiniu būdu",
      "unit": "min.",
      "type": "number",
      "min": 0
    },
    "W": {
      "label": "Darbuotojo valandinis įkainis su mokesčiais",
      "unit": "EUR/val.",
      "type": "number",
      "min": 0
    },
    "S_diegimas": {
      "label": "Vienkartinės diegimo ir integracijos sąnaudos",
      "unit": "EUR",
      "type": "number",
      "min": 0
    },
    "S_prieziura": {
      "label": "Mėnesinės priežiūros ir palaikymo sąnaudos",
      "unit": "EUR/mėn.",
      "type": "number",
      "min": 0
    },
    "S_zetonai": {
      "label": "Modelio žetonų savikaina vienai operacijai",
      "unit": "EUR/vnt.",
      "type": "number",
      "default": 0.05,
      "min": 0
    },
    "E_proc": {
      "label": "Išimčių dalis, reikalaujanti žmogaus peržiūros",
      "unit": "%",
      "type": "number",
      "default": 10,
      "min": 0,
      "max": 100
    }
  },
  "formulas": {
    "manual_hours_per_month": "(N * T_min) / 60",
    "manual_cost_per_month": "manual_hours_per_month * W",
    "manual_cost_annual": "manual_cost_per_month * 12",
    "human_review_cost_per_month": "((N * (E_proc / 100) * (T_min * 0.5)) / 60) * W",
    "automated_cost_per_month": "S_prieziura + (N * S_zetonai) + human_review_cost_per_month",
    "automated_cost_annual_first_year": "S_diegimas + (automated_cost_per_month * 12)",
    "monthly_savings": "manual_cost_per_month - automated_cost_per_month",
    "payback_period_months": "monthly_savings > 0 ? S_diegimas / monthly_savings : null",
    "annual_net_savings_year_1": "manual_cost_annual - automated_cost_annual_first_year",
    "annual_net_savings_subsequent_years": "manual_cost_annual - (automated_cost_per_month * 12)"
  },
  "scenarios": [
    {
      "id": "scenario_profitable",
      "title": "Atsiperkantis procesas: Sąskaitų apdorojimas (400 vnt./mėn.)",
      "inputs": {
        "N": 400,
        "T_min": 8,
        "W": 18,
        "S_diegimas": 1500,
        "S_prieziura": 120,
        "S_zetonai": 0.05,
        "E_proc": 8
      },
      "expectedOutputs": {
        "manual_hours_per_month": 53.33,
        "manual_cost_per_month": 960.0,
        "human_review_cost_per_month": 38.4,
        "automated_cost_per_month": 178.4,
        "monthly_savings": 781.6,
        "payback_period_months": 1.9191,
        "annual_net_savings_year_1": 7879.2,
        "is_profitable": true
      }
    },
    {
      "id": "scenario_unprofitable",
      "title": "Neatsiperkantis procesas: Reta užduotis (15 vnt./mėn.)",
      "inputs": {
        "N": 15,
        "T_min": 5,
        "W": 15,
        "S_diegimas": 1000,
        "S_prieziura": 100,
        "S_zetonai": 0.05,
        "E_proc": 10
      },
      "expectedOutputs": {
        "manual_hours_per_month": 1.25,
        "manual_cost_per_month": 18.75,
        "human_review_cost_per_month": 0.9375,
        "automated_cost_per_month": 101.6875,
        "monthly_savings": -82.9375,
        "payback_period_months": null,
        "annual_net_savings_year_1": -1995.25,
        "is_profitable": false
      }
    }
  ],
  "exampleStatus": "Synthetic scenarios. Not a Verslomatika offer, measured saving or operational tool.",
  "calculationPolicy": {
    "precision": "Use full precision during calculation, display money to two decimal places.",
    "noPositiveSavings": "payback_period_months is null when monthly_savings <= 0.",
    "reviewAssumption": "Each exception needs half of the original manual processing time; this is a scenario assumption, not a general benchmark.",
    "scope": "Non-exception cases are assumed fully automated. Other retained manual work, third-party fees and VAT treatment must be added before a real decision."
  }
}
