oasislmf.computation.generate.losses¶
Classes¶
Prepare the loss generation directory |
|
Runs a single analysis event chunk |
|
Runs the output reports generation on a set of event chunks |
|
Runs the GenerateLosses workflow as a single bash script (Default for the MDK) |
|
"Abstract" Class for all Computation Step (ExposurePreAnalysis, GulCalc, ...) |
|
Generates dummy model and Oasis GUL input files + optionally the IL/FM |
Module Contents¶
- class oasislmf.computation.generate.losses.GenerateLossesDir(**kwargs)[source]¶
Bases:
GenerateLossesBase
Prepare the loss generation directory
converts input csv files to ktools binary types
links model data to the static directory to the run locations
Validates and updates the analysis_settings.json
Stores the analysis_settings.json in the output directory
- Returns:
(dict) Updated analysis_settings
- class oasislmf.computation.generate.losses.GenerateLossesPartial(**kwargs)[source]¶
Bases:
GenerateLossesDir
Runs a single analysis event chunk
- class oasislmf.computation.generate.losses.GenerateLossesOutput(**kwargs)[source]¶
Bases:
GenerateLossesDir
Runs the output reports generation on a set of event chunks
- class oasislmf.computation.generate.losses.GenerateLosses(**kwargs)[source]¶
Bases:
GenerateLossesDir
Runs the GenerateLosses workflow as a single bash script (Default for the MDK)
Generates losses using the installed ktools framework given Oasis files, model analysis settings JSON file, model data and model package data.
The command line arguments can be supplied in the configuration file (
oasislmf.json
by default or specified with the--config
flag). Runoasislmf config --help
for more information.The script creates a time-stamped folder in the model run directory and sets that as the new model run directory, copies the analysis settings JSON file into the run directory and creates the following folder structure
|-- analysis_settings.json |-- fifo |-- input |-- RI_1 |-- output |-- ri_layers.json |-- run_ktools.sh |-- static `-- work
Depending on the OS type the model data is symlinked (Linux, Darwin) or copied (Cygwin, Windows) into the
static
subfolder. The input files are kept in theinput
subfolder and the losses are generated as CSV files in theoutput
subfolder.
- class oasislmf.computation.generate.losses.GenerateLossesDeterministic(**kwargs)[source]¶
Bases:
oasislmf.computation.base.ComputationStep
“Abstract” Class for all Computation Step (ExposurePreAnalysis, GulCalc, …) initialise the object with all specified param un step_param and sub- ComputationStep provide a generic interface to get the all those parameter definitions (get_params)
the Run method must be implemented and contain le business execution logic.