Upload 2 files
Browse files- Scenario_example.png +3 -0
- scenario_graph.schema.json +138 -0
Scenario_example.png
ADDED
|
Git LFS Details
|
scenario_graph.schema.json
ADDED
|
@@ -0,0 +1,138 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
| 3 |
+
"$id": "https://example.org/scenario-graph.schema.json",
|
| 4 |
+
"title": "Automotive Scenario Graph",
|
| 5 |
+
"description": "Template for scenario graphs compatible with scenario_graph_reference.json.",
|
| 6 |
+
"type": "object",
|
| 7 |
+
"required": ["nodes", "relationships", "style"],
|
| 8 |
+
"additionalProperties": false,
|
| 9 |
+
"properties": {
|
| 10 |
+
"nodes": {
|
| 11 |
+
"type": "array",
|
| 12 |
+
"description": "Scenario events, effects, regions, and scenario containers.",
|
| 13 |
+
"items": { "$ref": "#/$defs/node" }
|
| 14 |
+
},
|
| 15 |
+
"relationships": {
|
| 16 |
+
"type": "array",
|
| 17 |
+
"description": "Directed connections between nodes.",
|
| 18 |
+
"items": { "$ref": "#/$defs/relationship" }
|
| 19 |
+
},
|
| 20 |
+
"style": {
|
| 21 |
+
"$ref": "#/$defs/style",
|
| 22 |
+
"description": "Default visual style for the graph."
|
| 23 |
+
}
|
| 24 |
+
},
|
| 25 |
+
"$defs": {
|
| 26 |
+
"value": {
|
| 27 |
+
"type": ["string", "number", "boolean", "null"]
|
| 28 |
+
},
|
| 29 |
+
"position": {
|
| 30 |
+
"type": "object",
|
| 31 |
+
"required": ["x", "y"],
|
| 32 |
+
"additionalProperties": false,
|
| 33 |
+
"properties": {
|
| 34 |
+
"x": { "type": "number" },
|
| 35 |
+
"y": { "type": "number" }
|
| 36 |
+
}
|
| 37 |
+
},
|
| 38 |
+
"style": {
|
| 39 |
+
"type": "object",
|
| 40 |
+
"additionalProperties": { "$ref": "#/$defs/value" },
|
| 41 |
+
"examples": [
|
| 42 |
+
{
|
| 43 |
+
"node-color": "#479CD5",
|
| 44 |
+
"border-color": "#000000",
|
| 45 |
+
"caption-color": "#ffffff"
|
| 46 |
+
}
|
| 47 |
+
]
|
| 48 |
+
},
|
| 49 |
+
"node": {
|
| 50 |
+
"type": "object",
|
| 51 |
+
"required": ["id", "position", "caption", "labels", "properties", "style"],
|
| 52 |
+
"additionalProperties": false,
|
| 53 |
+
"properties": {
|
| 54 |
+
"id": {
|
| 55 |
+
"type": "string",
|
| 56 |
+
"pattern": "^n[0-9]+$",
|
| 57 |
+
"description": "Unique node identifier, for example n1."
|
| 58 |
+
},
|
| 59 |
+
"position": { "$ref": "#/$defs/position" },
|
| 60 |
+
"caption": {
|
| 61 |
+
"type": "string",
|
| 62 |
+
"minLength": 1,
|
| 63 |
+
"description": "Human-readable event or effect name."
|
| 64 |
+
},
|
| 65 |
+
"labels": {
|
| 66 |
+
"type": "array",
|
| 67 |
+
"minItems": 1,
|
| 68 |
+
"uniqueItems": true,
|
| 69 |
+
"items": {
|
| 70 |
+
"type": "string",
|
| 71 |
+
"enum": [
|
| 72 |
+
"Scenario",
|
| 73 |
+
"Region-Split",
|
| 74 |
+
"Certain Event",
|
| 75 |
+
"Uncertain Event",
|
| 76 |
+
"Less Certain Event",
|
| 77 |
+
"Relevant Event",
|
| 78 |
+
"Less Relevant Event",
|
| 79 |
+
"Effect"
|
| 80 |
+
]
|
| 81 |
+
}
|
| 82 |
+
},
|
| 83 |
+
"properties": {
|
| 84 |
+
"type": "object",
|
| 85 |
+
"additionalProperties": { "$ref": "#/$defs/value" },
|
| 86 |
+
"examples": [
|
| 87 |
+
{
|
| 88 |
+
"START": "2025",
|
| 89 |
+
"END": "2029",
|
| 90 |
+
"t": "2025-02-28",
|
| 91 |
+
"BEV-SHARE": "-2"
|
| 92 |
+
}
|
| 93 |
+
]
|
| 94 |
+
},
|
| 95 |
+
"style": {
|
| 96 |
+
"$ref": "#/$defs/style",
|
| 97 |
+
"description": "Node-level visual overrides."
|
| 98 |
+
}
|
| 99 |
+
}
|
| 100 |
+
},
|
| 101 |
+
"relationship": {
|
| 102 |
+
"type": "object",
|
| 103 |
+
"required": ["id", "fromId", "toId", "type", "properties", "style"],
|
| 104 |
+
"additionalProperties": false,
|
| 105 |
+
"properties": {
|
| 106 |
+
"id": {
|
| 107 |
+
"type": "string",
|
| 108 |
+
"pattern": "^n[0-9]+$",
|
| 109 |
+
"description": "Unique relationship identifier, for example n0."
|
| 110 |
+
},
|
| 111 |
+
"fromId": {
|
| 112 |
+
"type": "string",
|
| 113 |
+
"pattern": "^n[0-9]+$",
|
| 114 |
+
"description": "Source node ID."
|
| 115 |
+
},
|
| 116 |
+
"toId": {
|
| 117 |
+
"type": "string",
|
| 118 |
+
"pattern": "^n[0-9]+$",
|
| 119 |
+
"description": "Target node ID."
|
| 120 |
+
},
|
| 121 |
+
"type": {
|
| 122 |
+
"type": "string",
|
| 123 |
+
"enum": ["isPriorTo", "hasEvent", "hasEventg", "hasSMPEffect", "isIn"],
|
| 124 |
+
"description": "Relationship type found in the reference graph."
|
| 125 |
+
},
|
| 126 |
+
"properties": {
|
| 127 |
+
"type": "object",
|
| 128 |
+
"additionalProperties": { "$ref": "#/$defs/value" },
|
| 129 |
+
"description": "Optional relationship attributes, commonly date keys mapped to a strength value."
|
| 130 |
+
},
|
| 131 |
+
"style": {
|
| 132 |
+
"$ref": "#/$defs/style",
|
| 133 |
+
"description": "Relationship-level visual overrides."
|
| 134 |
+
}
|
| 135 |
+
}
|
| 136 |
+
}
|
| 137 |
+
}
|
| 138 |
+
}
|