{
  "$defs": {
    "Convergence": {
      "additionalProperties": false,
      "properties": {
        "coarse": {
          "title": "Coarse",
          "type": "number"
        },
        "fine": {
          "title": "Fine",
          "type": "number"
        },
        "relative_change": {
          "title": "Relative Change",
          "type": "number"
        },
        "within": {
          "title": "Within",
          "type": "boolean"
        }
      },
      "required": [
        "coarse",
        "fine",
        "relative_change",
        "within"
      ],
      "title": "Convergence",
      "type": "object"
    },
    "OutputSpread": {
      "additionalProperties": false,
      "properties": {
        "maximum": {
          "title": "Maximum",
          "type": "number"
        },
        "mean": {
          "title": "Mean",
          "type": "number"
        },
        "minimum": {
          "title": "Minimum",
          "type": "number"
        },
        "n": {
          "title": "N",
          "type": "integer"
        },
        "p05": {
          "title": "P05",
          "type": "number"
        },
        "p50": {
          "title": "P50",
          "type": "number"
        },
        "p95": {
          "title": "P95",
          "type": "number"
        },
        "std": {
          "title": "Std",
          "type": "number"
        }
      },
      "required": [
        "n",
        "mean",
        "std",
        "minimum",
        "p05",
        "p50",
        "p95",
        "maximum"
      ],
      "title": "OutputSpread",
      "type": "object"
    },
    "RequirementOdds": {
      "additionalProperties": false,
      "properties": {
        "high": {
          "title": "High",
          "type": "number"
        },
        "holds": {
          "title": "Holds",
          "type": "integer"
        },
        "low": {
          "title": "Low",
          "type": "number"
        },
        "of": {
          "title": "Of",
          "type": "integer"
        },
        "probability": {
          "title": "Probability",
          "type": "number"
        }
      },
      "required": [
        "holds",
        "of",
        "probability",
        "low",
        "high"
      ],
      "title": "RequirementOdds",
      "type": "object"
    },
    "Sensitivity": {
      "additionalProperties": false,
      "properties": {
        "first_order": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "First Order"
        },
        "mu_star": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Mu Star"
        },
        "sigma": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Sigma"
        },
        "total": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Total"
        }
      },
      "title": "Sensitivity",
      "type": "object"
    }
  },
  "$id": "mokili.study-run/1",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "description": "What a study found. Written by Mokili.",
  "properties": {
    "assumptions": {
      "default": [],
      "items": {
        "type": "string"
      },
      "title": "Assumptions",
      "type": "array"
    },
    "convergence": {
      "additionalProperties": {
        "$ref": "#/$defs/Convergence"
      },
      "default": {},
      "title": "Convergence",
      "type": "object"
    },
    "created_at": {
      "title": "Created At",
      "type": "string"
    },
    "failed": {
      "default": 0,
      "title": "Failed",
      "type": "integer"
    },
    "method": {
      "title": "Method",
      "type": "string"
    },
    "outputs": {
      "additionalProperties": {
        "$ref": "#/$defs/OutputSpread"
      },
      "default": {},
      "title": "Outputs",
      "type": "object"
    },
    "requirements": {
      "additionalProperties": {
        "$ref": "#/$defs/RequirementOdds"
      },
      "default": {},
      "title": "Requirements",
      "type": "object"
    },
    "runs": {
      "items": {
        "pattern": "^sha256:[0-9a-f]{64}$",
        "type": "string"
      },
      "title": "Runs",
      "type": "array"
    },
    "samples": {
      "description": "The parameter values of each run, in the order of runs",
      "items": {
        "additionalProperties": {
          "type": "number"
        },
        "type": "object"
      },
      "title": "Samples",
      "type": "array"
    },
    "schema": {
      "const": "mokili.study-run/1",
      "title": "Schema",
      "type": "string"
    },
    "sensitivity": {
      "additionalProperties": {
        "additionalProperties": {
          "$ref": "#/$defs/Sensitivity"
        },
        "type": "object"
      },
      "default": {},
      "title": "Sensitivity",
      "type": "object"
    },
    "study": {
      "pattern": "^sha256:[0-9a-f]{64}$",
      "title": "Study",
      "type": "string"
    }
  },
  "required": [
    "schema",
    "created_at",
    "study",
    "runs",
    "samples",
    "method"
  ],
  "title": "StudyRun",
  "type": "object"
}
