- Base deterministica: Money, id tipizzati, DMath, XxHash64, calendario - 12 file dati con schemi, validatore di schema interno, validazione semantica e hash dei dati; viaferrea-tools validate-data - Generatore di mappa (rilievo, mare, priority-flood, fiumi, laghi, copertura, giacimenti, città, hub, industrie) e viaferrea-tools genmap - Economia: città, industrie, hub, mercato con componente mondiale, prezzi locali, tariffe, lavoro in sede e a piedi, trasporto locale, registro a partita doppia, prestiti, rating, difficoltà - Salvataggi Brotli con rimappatura per id e hash di stato giornaliero - viaferrea-tools simulate con KPI CSV; 45 test verdi; ADR 0002-0006 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0191R7vXgtbAvSV4V8tj8uzL
322 lines
6.6 KiB
JSON
322 lines
6.6 KiB
JSON
{
|
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
"title": "Manutenzione dei treni (maintenance.json)",
|
|
"type": "object",
|
|
"properties": {
|
|
"$schema": {
|
|
"type": "string"
|
|
},
|
|
"version": {
|
|
"type": "integer",
|
|
"minimum": 1
|
|
},
|
|
"components": {
|
|
"type": "object",
|
|
"properties": {
|
|
"locomotive": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "string",
|
|
"pattern": "^[a-z][a-z0-9_]*$"
|
|
},
|
|
"name_it": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
},
|
|
"failureWeight": {
|
|
"type": "number",
|
|
"minimum": 0,
|
|
"maximum": 1
|
|
},
|
|
"wearPer100Km": {
|
|
"type": "number",
|
|
"minimum": 0,
|
|
"maximum": 10
|
|
}
|
|
},
|
|
"required": [
|
|
"id",
|
|
"name_it",
|
|
"failureWeight",
|
|
"wearPer100Km"
|
|
],
|
|
"additionalProperties": false
|
|
},
|
|
"minItems": 1
|
|
},
|
|
"car": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "string",
|
|
"pattern": "^[a-z][a-z0-9_]*$"
|
|
},
|
|
"name_it": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
},
|
|
"failureWeight": {
|
|
"type": "number",
|
|
"minimum": 0,
|
|
"maximum": 1
|
|
},
|
|
"wearPer100Km": {
|
|
"type": "number",
|
|
"minimum": 0,
|
|
"maximum": 10
|
|
}
|
|
},
|
|
"required": [
|
|
"id",
|
|
"name_it",
|
|
"failureWeight",
|
|
"wearPer100Km"
|
|
],
|
|
"additionalProperties": false
|
|
},
|
|
"minItems": 1
|
|
}
|
|
},
|
|
"required": [
|
|
"locomotive",
|
|
"car"
|
|
],
|
|
"additionalProperties": false
|
|
},
|
|
"wear": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": [
|
|
"number",
|
|
"integer",
|
|
"boolean",
|
|
"array",
|
|
"object",
|
|
"string"
|
|
]
|
|
}
|
|
},
|
|
"failure": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": [
|
|
"number",
|
|
"integer",
|
|
"boolean",
|
|
"array",
|
|
"object",
|
|
"string"
|
|
]
|
|
}
|
|
},
|
|
"effects": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": [
|
|
"number",
|
|
"integer",
|
|
"boolean",
|
|
"array",
|
|
"object",
|
|
"string"
|
|
]
|
|
}
|
|
},
|
|
"interventions": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "string",
|
|
"pattern": "^[a-z][a-z0-9_]*$"
|
|
},
|
|
"name_it": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
},
|
|
"days": {
|
|
"type": "integer",
|
|
"minimum": 1
|
|
},
|
|
"costShare": {
|
|
"type": "number",
|
|
"minimum": 0,
|
|
"maximum": 2
|
|
},
|
|
"spareParts": {
|
|
"type": "integer",
|
|
"minimum": 0
|
|
},
|
|
"effect": {
|
|
"type": "string",
|
|
"enum": [
|
|
"inspection",
|
|
"service",
|
|
"overhaul",
|
|
"repair",
|
|
"replace"
|
|
]
|
|
},
|
|
"restoreTo": {
|
|
"type": "number",
|
|
"minimum": 0,
|
|
"maximum": 100
|
|
}
|
|
},
|
|
"required": [
|
|
"id",
|
|
"name_it",
|
|
"days",
|
|
"costShare",
|
|
"spareParts",
|
|
"effect"
|
|
],
|
|
"additionalProperties": false
|
|
},
|
|
"minItems": 6
|
|
},
|
|
"inspection": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": [
|
|
"number",
|
|
"integer",
|
|
"boolean",
|
|
"array",
|
|
"object",
|
|
"string"
|
|
]
|
|
}
|
|
},
|
|
"service": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": [
|
|
"number",
|
|
"integer",
|
|
"boolean",
|
|
"array",
|
|
"object",
|
|
"string"
|
|
]
|
|
}
|
|
},
|
|
"overhaul": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": [
|
|
"number",
|
|
"integer",
|
|
"boolean",
|
|
"array",
|
|
"object",
|
|
"string"
|
|
]
|
|
}
|
|
},
|
|
"depots": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": [
|
|
"number",
|
|
"integer",
|
|
"boolean",
|
|
"array",
|
|
"object",
|
|
"string"
|
|
]
|
|
}
|
|
},
|
|
"policies": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "string",
|
|
"enum": [
|
|
"economy",
|
|
"standard",
|
|
"thorough"
|
|
]
|
|
},
|
|
"name_it": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
},
|
|
"intervalFactor": {
|
|
"type": "number",
|
|
"minimum": 0.1
|
|
},
|
|
"effectFactor": {
|
|
"type": "number",
|
|
"minimum": 0.1
|
|
},
|
|
"costFactor": {
|
|
"type": "number",
|
|
"minimum": 0.1
|
|
}
|
|
},
|
|
"required": [
|
|
"id",
|
|
"name_it",
|
|
"intervalFactor",
|
|
"effectFactor",
|
|
"costFactor"
|
|
],
|
|
"additionalProperties": false
|
|
},
|
|
"minItems": 3,
|
|
"maxItems": 3
|
|
},
|
|
"intervals": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": [
|
|
"number",
|
|
"integer",
|
|
"boolean",
|
|
"array",
|
|
"object",
|
|
"string"
|
|
]
|
|
}
|
|
},
|
|
"planner": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": [
|
|
"number",
|
|
"integer",
|
|
"boolean",
|
|
"array",
|
|
"object",
|
|
"string"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"required": [
|
|
"version",
|
|
"components",
|
|
"wear",
|
|
"failure",
|
|
"effects",
|
|
"interventions",
|
|
"inspection",
|
|
"service",
|
|
"overhaul",
|
|
"depots",
|
|
"policies",
|
|
"intervals",
|
|
"planner"
|
|
],
|
|
"additionalProperties": false
|
|
}
|