{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/arcnm-io/json-schema/arcnm-io-nest-savings-total-schema.json",
  "title": "NestSavingsTotal",
  "description": "The organization's total saved by nesting — the job nests it\nreleased, summed — and, apart from it, the potential: the job nests\nthat ended with a saving and are still simulations.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/arcnm-io-nesting-api-openapi.yml#/components/schemas/NestSavingsTotal",
  "properties": {
    "runs_counted": {
      "type": "integer",
      "title": "Runs Counted",
      "description": "Released job nests, each with a saving."
    },
    "runs_simulated": {
      "type": "integer",
      "title": "Runs Simulated",
      "description": "Job nests with a saving that are not released: simulations."
    },
    "money": {
      "items": {
        "$ref": "#/$defs/NestSavingsMoney"
      },
      "type": "array",
      "title": "Money",
      "description": "The released job nests' savings per currency, in currency order."
    },
    "lines_compared": {
      "type": "integer",
      "title": "Lines Compared",
      "description": "Their lines the figures cover."
    },
    "split_lines": {
      "type": "integer",
      "title": "Split Lines",
      "description": "Of those, the lines the split of the saving covers."
    },
    "rectangular_kg": {
      "type": "number",
      "title": "Rectangular Kg",
      "description": "The sheet the released lines take as rectangular blanks, in kg."
    },
    "alone_kg": {
      "type": "number",
      "title": "Alone Kg",
      "description": "The same with each part nested alone, in kg, over the lines in `split_lines`."
    },
    "nested_kg": {
      "type": "number",
      "title": "Nested Kg",
      "description": "The same nested together, in kg."
    },
    "saved_kg": {
      "type": "number",
      "title": "Saved Kg",
      "description": "`rectangular_kg` less `nested_kg`."
    },
    "saved_true_shape_kg": {
      "type": "number",
      "title": "Saved True Shape Kg",
      "description": "`rectangular_kg` less `alone_kg`, over the lines in `split_lines`."
    },
    "saved_combining_kg": {
      "type": "number",
      "title": "Saved Combining Kg",
      "description": "`alone_kg` less `nested_kg`, over the lines in `split_lines`."
    },
    "potential": {
      "$ref": "#/$defs/NestSavingsSum",
      "description": "The simulations' savings, summed the same way: what releasing them would add. Never part of the total."
    }
  },
  "type": "object",
  "required": [
    "runs_counted",
    "runs_simulated",
    "money",
    "lines_compared",
    "split_lines",
    "rectangular_kg",
    "alone_kg",
    "nested_kg",
    "saved_kg",
    "saved_true_shape_kg",
    "saved_combining_kg",
    "potential"
  ],
  "$defs": {
    "NestSavingsMoney": {
      "properties": {
        "currency": {
          "type": "string",
          "title": "Currency"
        },
        "runs": {
          "type": "integer",
          "title": "Runs",
          "description": "Job nests with amounts in this currency."
        },
        "lines_compared": {
          "type": "integer",
          "title": "Lines Compared",
          "description": "Their lines the amounts cover."
        },
        "split_lines": {
          "type": "integer",
          "title": "Split Lines",
          "description": "Of those, the lines `alone`, `saved_true_shape` and `saved_combining` cover."
        },
        "rectangular": {
          "type": "number",
          "title": "Rectangular",
          "description": "Their lines cut from rectangular blanks."
        },
        "alone": {
          "type": "number",
          "title": "Alone",
          "description": "Their lines each nested alone."
        },
        "nested": {
          "type": "number",
          "title": "Nested",
          "description": "Their lines nested together."
        },
        "saved": {
          "type": "number",
          "title": "Saved",
          "description": "`rectangular` less `nested`."
        },
        "saved_true_shape": {
          "type": "number",
          "title": "Saved True Shape",
          "description": "`rectangular` less `alone`, over the lines in `split_lines`."
        },
        "saved_combining": {
          "type": "number",
          "title": "Saved Combining",
          "description": "`alone` less `nested`, over the lines in `split_lines`."
        }
      },
      "type": "object",
      "required": [
        "currency",
        "runs",
        "lines_compared",
        "split_lines",
        "rectangular",
        "alone",
        "nested",
        "saved",
        "saved_true_shape",
        "saved_combining"
      ],
      "title": "NestSavingsMoney",
      "description": "Several job nests' savings in one currency."
    },
    "NestSavingsSum": {
      "properties": {
        "runs": {
          "type": "integer",
          "title": "Runs",
          "description": "Job nests summed, each with a saving."
        },
        "money": {
          "items": {
            "$ref": "#/$defs/NestSavingsMoney"
          },
          "type": "array",
          "title": "Money",
          "description": "The savings per currency, in currency order."
        },
        "lines_compared": {
          "type": "integer",
          "title": "Lines Compared",
          "description": "Their lines the figures cover."
        },
        "split_lines": {
          "type": "integer",
          "title": "Split Lines",
          "description": "Of those, the lines the split of the saving covers."
        },
        "rectangular_kg": {
          "type": "number",
          "title": "Rectangular Kg"
        },
        "alone_kg": {
          "type": "number",
          "title": "Alone Kg"
        },
        "nested_kg": {
          "type": "number",
          "title": "Nested Kg"
        },
        "saved_kg": {
          "type": "number",
          "title": "Saved Kg",
          "description": "`rectangular_kg` less `nested_kg`."
        },
        "saved_true_shape_kg": {
          "type": "number",
          "title": "Saved True Shape Kg",
          "description": "`rectangular_kg` less `alone_kg`, over the lines in `split_lines`."
        },
        "saved_combining_kg": {
          "type": "number",
          "title": "Saved Combining Kg",
          "description": "`alone_kg` less `nested_kg`, over the lines in `split_lines`."
        }
      },
      "type": "object",
      "required": [
        "runs",
        "money",
        "lines_compared",
        "split_lines",
        "rectangular_kg",
        "alone_kg",
        "nested_kg",
        "saved_kg",
        "saved_true_shape_kg",
        "saved_combining_kg"
      ],
      "title": "NestSavingsSum",
      "description": "Several job nests' savings summed: the money per currency, the metal\nover all."
    }
  }
}