You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 36 Next »

Summary

The Bayesian Network adaptor (BNA) sets up a Bayesian network based decision support system (DSS) for coastal hazards and impacts in hotspot areas, according to the framework developed in task 3.3 of the RISC-Kit project (www.risckit.eu). 

The BN adaptor is an executable that uses

  1. .nc files of storm simulations
  2. .txt files indicating receptor locations 
  3. .json files specifying the structure of the BN
  4. a .json file specifying the vulnerability relationships for the hotspot area

to create

  1. a .dsl file that can be opened with the Bayesian network software GeNIe (dslpitt.org)

System Requirements

The BNA has been developed in c++. 

Windows

Currently the BNA for windows consists of an executable and a number of dll's. Moreover, it depends on

Linux (tba)

Linux users have to compile the source code. 

Configuration

Directory Structure

The BNA 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/
    • BNA.exe & related .dll's
  • output/
  • trainingData/
  • workDir/
    • info.json
    • BCnodes.json
    • Rnodes.json
    • Hnodes.json
    • Cnodes.json
    • Mnodes.json
    • <receptor1.txt>
    • <receptor2.txt>
    • vulnerabilies.json
    • shapefiles/
      • areas.shp & related GIS files

The folders inputoutput and trainingData remain empty. They are accessed by the BNA and the general adaptor (GA).

Overview on Data Process

The data process described in this section takes place after every single simulation with the model train. 

First, the GA writes the (near-shore) process model output (e.g. XBeach, Telemac) as

    1. hazardbc_<measure>_<bin>.nc
    2. hazard.nc

to Config/ModuleDataSetFiles.zip/BN_<hotspotname>/input. The first file should contain the max. value (scalar) of the relevant forcing variables, such as water level or significant wave height. <measure>_<bin> is an addition to the file name that only has to be used when the simulation includes a type I measure, i.e. measures affect the hazard pathway and require a different setup of the hydrodynamic model, such as beach nourishments, dikes etc. The second file contains the gridded maximum values of the relevant hazard variables, such as inundation depth, flow velocity or erosion. 

Subsequently, the GA calls the BNA.  

The BNA  

    1. copies the two files from input to trainingData/<yyyymmdd>_<measure>_<bin>
    2. reads all files in model and trainingData 
    3. creates output/<hotspotname>.dsl
    4. creates new directories output/webviewer/<scenario_X> for all combinations of hazard boundary conditions (forcing) that can be obtained from the BN including the folllowing files
      • <varname1>.json
      • <varname2>.json
      • ...
      • areas.shp & related GIS files

The user can open <hotspotname>.dne with a Bayesian network software. Note that input (and consequently trainingData) can be empty for the BNA to run. In this case <hotspotname>.dne represents the structure of the decision support system, but does not contain any quantitative information. 

Finally, the files in webviewer have to be copied/moved manually to a shared ftp (details will follow), where they can be picked up by the webviewer for display.

Input and Output Files

This section describes the formats of files that need to be placed in model and workDir by the user before the BNA 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 BNA to output.

NETCDF files

(to be added soon)

JSON files

JSON files can be created with any text editor. They are built on two structures: (1) a collection of name/value pairs and (2) an ordered list of values. Details can be found at http://json.org/

JSON files are read from workDir and written to output by the BNA. The files in workDir are manually created by the user; see examples below

which yield this BN structure (not filled with data yet!) .

CSV files

Link to tutorial on making the CSV files Creating a <receptor>.csv file

Shape files

(to be added soon)

DNE files

(to be added soon)

General Adaptor Run Example Configuration

(to be added soon)

 

  • No labels