Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Linux users have to compile the source code (courtesy to Mirko who provided the source code and configuration file).

Downloads

Windows

Linux

(to be added by Mirko)

 

Framework in a Nutshell

 

Configuration

This section contains the details on configuration in FEWS or outside FEWS.

Directory Structure

The BN Adaptor works with relative paths to read and write data. Initially, users have to create (manually) a directory Risckit/Modules/Genie/<case_study_name>/ which contains:

Configuration

This section contains the details on configuration in FEWS or outside FEWS.

Directory Structure

The BN Adaptor works with relative paths to read and write data. Initially, users have to create (manually) a directory Risckit/Modules/Genie/<case_study_name>/ which contains:

  • input/
  • model/
    • BN Adaptor.exe & related .dll's
  • output/
  • trainingData/
  • workDir/
    • info.json
    • BCnodes.json
    • Rnodes.json
    • Hnodes.json
    • Cnodes.json
    • Mnodes.json
    • <receptor>.txt
    • vulnerabilities.
  • input/
  • model/
    • BN Adaptor.exe & related .dll's
  • output/
  • trainingData/
  • workDir/
    • info.json
    • BCnodes.json
    • Rnodes.json
    • Hnodes.json
    • Cnodes.json
    • Mnodes.json
    • <receptor>.txt
    • vulnerabilities.json
    • shapefiles/
      • areas.shp & related GIS files

...

Working outside FEWS is conceptually the same as working inside FEWS. The difference is that the tasks of the GA have to be executable manually. The user will run the "100 simulations" of task 5.3. with the hazard transformation model only and collect all model outputs. A matlab script similar to this one insert link to matlab script here (from Haris) can be used to transform those outputs to hazardbc.nc and hazard.nc files of the right format and to save them in separate directories in trainingData/. The the BN Adaptor.exe can be run and will create output/BN<hotspotname>.dsl.

Input and Output

...

File Formats

This section describes the formats of files that need to be placed in model and workDir by the user before the BN Adaptor is run and that are written to input and trainingData by the GA and its batch file. Note that the user develops his/her own GA and has to ensure that it writes files of the correct format to input and trainingData. It also describes the files that are written by the BN Adaptor to output.

...

Example from the demoBN are ResBuildings.txt and People.txt. (To create People.txt it has been assumed that there are two people in each building and that they can be found at this location at any time.) Note that there are duplicates of receptorID, because individual receptors may be effected by multiple surrounding grid points. For a step by step explanation of creating this file, see the page Tutorial: Creating a <receptor>.txt file. The approach can be slightly modified to obtain a txt file for a "latent receptor", i.e. a buffer zone around a receptor, which is computationally treated as a receptor, but not explicitly represented as such in the BN. See Tutorial: Creating a <receptor>.txt for a latent receptor

Shape files

(to be expanded in April)

latent receptor

Shape files

(to be expanded in April)

The shape files are not required for the BN Adaptor, but are relevant for the webviewer. They are the shapefiles that have been used to create the <receptor>.txt files and should eventually be stored in the directory shapefiles/.

Testing Input Files & Trouble Shooting

Before running the the BN Adaptor the correct format of all input files should be verified. Deviations from the prescribed format will cause the BN Adaptor to crash, with or without useful error message. To aid with verification 

  • code_for_receptor_txt_files.m should be used to ensure the right file format for <receptor>.txt files and to check that the gridIDs passed on to the BN Adaptor indeed correspond to the right locations
  • BN_input_check.py should be used to check the format of the JSON files

If the BN Adaptor crashes despite the checks,

 

Downloads

Windows

Linux

(to be added by Mirko)The shape files are not required for the BN Adaptor, but are relevant for the webviewer. They are the shapefiles that have been used to create the <receptor>.txt files and should eventually be stored in the directory shapefiles/.

Examples

Bayesian DSS Examples

...

...

Using GeNIe

Creating a clear layout

...