Files
Rail_Enterprise/data/schema/maintenance.schema.json
Alby96andClaude Opus 5.5 f7c286bf1d F6: ere e obsolescenza dei veicoli
La tecnologia avanzava solo come filtro d'acquisto: nessuna notizia del
cambio d'era, nessun modello «superato», due formule diverse per valore di
libro e rivendita e nessun modo di sostituire i veicoli di un treno. Ora
rinnovare la flotta è una scelta con costi e benefici visibili.

- vehicles.json: successore per modello (validato: stessa categoria,
  introdotto dopo) e parametri di obsolescenza; Obsolescence, senza stato,
  ricava produzione, superato, successore consigliato, curva del valore
  (gradino all'arrivo del successore, poi ammortamento più rapido) e
  fattore di manutenzione: una sola fonte per patrimonio, SellVehicle,
  rinnovo e quadri.
- Rinnovo come intervento «renewal» di maintenance.json prenotato con
  ScheduleService: in officina i veicoli superati si vendono e il
  successore prende il loro posto. Nessun comando nuovo.
- EraSystem: il 1° gennaio la notizia dell'era e delle novità dell'anno
  lette dai dati, annotata nella Cronaca, una volta sola anche attraverso
  un salvataggio.
- Nessuno stato nuovo, quindi il salvataggio resta alla versione 7.
- IA: modelli dei progetti aggiornati quando escono di produzione e
  rinnovo mensile con una regola in ai.json.
- Protocollo: DetailKind.Fleet (10) e FleetReport (136); client: catalogo
  senza i fuori produzione e con i superati segnati, rivendita, Vendi e
  Rinnova nel pannello Treni, sezione «Rinnovo della flotta» in Officine.
- ADR 0020, STATE, ARCHITECTURE e PROTOCOL aggiornati; ErasTests (11).
  Accettazione F4 e F5 invariate.

Refs #41.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 13:56:33 +01:00

323 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",
"renew"
]
},
"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
}