Skip to content

Commit

Permalink
Added lossfactor set options to settings files (#162)
Browse files Browse the repository at this point in the history
* Add lossfactor to analyses settings

* Add pla_loss_factors_set to model settings
  • Loading branch information
sambles committed Nov 28, 2024
1 parent 6c2cddd commit ff75f5e
Show file tree
Hide file tree
Showing 2 changed files with 90 additions and 4 deletions.
10 changes: 8 additions & 2 deletions ods_tools/data/analysis_settings_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,12 @@
"description": "Identifier for the vulnerability files that are used for output calculations.",
"default": 1
},
"pla_loss_factors_set": {
"type": "string",
"title": "Lossfactor set file ID.",
"description": "Identifier for the Lossfactor file used for PLA (Post Loss amplification).",
"default": 1
},
"correlation_settings": {
"type": "array",
"title": "Correlation Settings",
Expand Down Expand Up @@ -466,7 +472,7 @@
}
},
"additionalProperties": false
},
},
"gul_output": {
"type": "boolean",
"title": "Produce GUL output",
Expand Down Expand Up @@ -501,7 +507,7 @@
"description": "Specified which outputs should be generated for which summary sets, for reinsurance net losses.",
"$ref": "#/definitions/output_summaries"
},
"ri_inuring_priorities": {
"ri_inuring_priorities": {
"type": "array",
"minItems": 1,
"items": {
Expand Down
84 changes: 82 additions & 2 deletions ods_tools/data/model_settings_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -431,12 +431,12 @@
},
"default":{
"type":"string",
"title":"Default footprint set",
"title":"Default vulnerability set",
"description":"Initial setting for vulnerability set"
},
"options":{
"type":"array",
"title":"Selection options for footprint",
"title":"Selection options for vulnerability files",
"description":"Array of possible vulnerability sets",
"items":{
"type":"object",
Expand All @@ -462,6 +462,86 @@
"description":"Long description (optional)"
}
},
"required":[
"id",
"desc"
]
}
}
},
"required":[
"name",
"desc",
"default",
"options"
]
},
"pla_loss_factors_set":{
"title":"PLA lossfactor set selector",
"description":"The 'id' field from options is used as a file suffix, e.g. lossfactors_<id>.bin, lossfactors_<id>.csv, lossfactors_<id>.parquet",
"type":"object",
"uniqueItems":false,
"additionalProperties": false,
"properties":{
"name":{
"type":"string",
"title":"UI Option",
"description":"UI name for selection",
"minLength":1
},
"desc":{
"type":"string",
"title":"Short description",
"description":"UI description for selection"
},
"used_for":{
"type":"string",
"title":"Where the setting is applied",
"description":"Set if this parameter is ONLY used at input 'generation' or for output 'losses'",
"enum":[
"all",
"generation",
"losses"
]
},
"tooltip":{
"type":"string",
"title":"UI tooltip",
"description":"Long description (optional)"
},
"default":{
"type":"string",
"title":"Default lossfactors set",
"description":"Initial setting for lossfactors set"
},
"options":{
"type":"array",
"title":"Selection options for lossfactors",
"description":"Array of possible lossfactors sets",
"items":{
"type":"object",
"title":"Selection option element",
"description":"Lossfactors set options",
"additionalProperties":false,
"properties":{
"id":{
"type":"string",
"title":"lossfactors set suffix",
"description":"String value used to select a lossfactors set",
"minLength":1
},
"desc":{
"type":"string",
"title":"lossfactors set description",
"description":"UI description for selection",
"minLength":1
},
"tooltip":{
"type":"string",
"title":"UI tooltip",
"description":"Long description (optional)"
}
},
"required":[
"id",
"desc"
Expand Down

0 comments on commit ff75f5e

Please sign in to comment.