{
  "$defs": {
    "RawBus": {
      "additionalProperties": false,
      "description": "Intermediate type for a single bus entry.",
      "properties": {
        "deficit_segments": {
          "description": "Optional entity-level deficit segment overrides.\nWhen absent, the global defaults from `penalties.json` are used.",
          "items": {
            "$ref": "#/$defs/RawDeficitSegment"
          },
          "type": [
            "array",
            "null"
          ]
        },
        "id": {
          "description": "Bus identifier. Must be unique within the file.",
          "format": "int32",
          "type": "integer"
        },
        "name": {
          "description": "Human-readable bus name.",
          "type": "string"
        }
      },
      "required": [
        "id",
        "name"
      ],
      "type": "object"
    },
    "RawDeficitSegment": {
      "additionalProperties": false,
      "description": "Intermediate type for a single deficit segment entry.",
      "properties": {
        "cost": {
          "description": "Cost per `MWh` of deficit in this segment [$/`MWh`].",
          "format": "double",
          "type": "number"
        },
        "depth_mw": {
          "description": "MW depth of this segment. `null` means unbounded (last segment only).",
          "format": "double",
          "type": [
            "number",
            "null"
          ]
        }
      },
      "required": [
        "cost"
      ],
      "type": "object"
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "description": "Top-level intermediate type for `buses.json` (serde only, not re-exported).",
  "properties": {
    "$schema": {
      "description": "`$schema` field — informational, not validated.",
      "type": [
        "string",
        "null"
      ]
    },
    "buses": {
      "description": "Array of bus entries.",
      "items": {
        "$ref": "#/$defs/RawBus"
      },
      "type": "array"
    }
  },
  "required": [
    "buses"
  ],
  "title": "RawBusFile",
  "type": "object"
}