Skip to content

Instantly share code, notes, and snippets.

@vidaaudrey
Created October 16, 2024 22:28
Show Gist options
  • Save vidaaudrey/a376f983eee594e471bf0b42925715f5 to your computer and use it in GitHub Desktop.
Save vidaaudrey/a376f983eee594e471bf0b42925715f5 to your computer and use it in GitHub Desktop.
{
"type": "object",
"properties": {
"topic": {
"type": "string"
},
"type": {
"type": "string",
"const": "CostDebugTopicData"
},
"metadata": {
"type": "object",
"properties": {
"costNames": {
"type": "array",
"items": {
"type": "string"
}
},
"branchIds": {
"type": "array",
"items": {
"type": "number",
"exclusiveMinimum": 0
}
},
"branchColors": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"costColors": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"mlSolutionBranchId": {
"$ref": "#/definitions/costDebugTopicDataSchema/properties/metadata/properties/branchIds/items"
},
"ncsSolutionBranchId": {
"$ref": "#/definitions/costDebugTopicDataSchema/properties/metadata/properties/branchIds/items"
},
"zeroCostNames": {
"type": "array",
"items": {
"type": "string"
}
},
"nonZeroCostNames": {
"type": "array",
"items": {
"type": "string"
}
},
"zeroBranchIds": {
"type": "array",
"items": {
"$ref": "#/definitions/costDebugTopicDataSchema/properties/metadata/properties/branchIds/items"
}
},
"nonZeroBranchIds": {
"type": "array",
"items": {
"$ref": "#/definitions/costDebugTopicDataSchema/properties/metadata/properties/branchIds/items"
}
}
},
"required": [
"costNames",
"branchIds",
"branchColors",
"costColors",
"mlSolutionBranchId",
"ncsSolutionBranchId",
"zeroCostNames",
"nonZeroCostNames",
"zeroBranchIds",
"nonZeroBranchIds"
],
"additionalProperties": false
},
"header": {
"type": "object",
"properties": {
"sec": {
"type": "number",
"default": 0
},
"nsec": {
"type": "number",
"default": 0
}
},
"additionalProperties": false
},
"data": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"metadata": {
"type": "object",
"additionalProperties": {}
},
"branchId": {
"$ref": "#/definitions/costDebugTopicDataSchema/properties/metadata/properties/branchIds/items"
},
"costName": {
"type": "string"
},
"cost": {
"type": "number",
"minimum": -1000,
"maximum": 1000
},
"costBucket": {
"type": [
"string",
"null"
]
},
"timeStep": {
"type": "integer",
"minimum": -1,
"maximum": 18
},
"costType": {
"type": "string",
"enum": [
"raw_costs",
"sr_penalty_costs",
"sr_branch_raw_costs",
"sr_branch_bucket_indicators",
"sr_penalty_cost_penalty_diffs",
"sr_penalty_cost_cumulative_penalty_diffs"
],
"default": "raw_costs"
}
},
"required": [
"metadata",
"branchId",
"costName",
"cost",
"costBucket",
"timeStep"
],
"additionalProperties": false
}
}
},
"required": [
"items"
],
"additionalProperties": false
}
},
"required": [
"topic",
"type",
"metadata",
"header",
"data"
],
"additionalProperties": false
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment