{scrollbar} |
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
to create
The BNA has been developed in c++.
Currently the BNA for windows consists of an executable and a number of dll's. Moreover, it depends on
Linux users have to compile the source code.
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:
The folders input, output and trainingData remain empty. They are accessed by the BNA and the general adaptor (GA).
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.
(to be added soon)
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 following sections describe the files in workDir, which have to be manually created and placed there by the user. Example files are provided as well.
info.json contains four fields:
The structure files contain the variable definitions (including the links between them) for the Bayesian network. Variables of the same category are defined in the same file. Because there are five categories, i.e. boundary condition (BC), receptor (R), hazard (H), impact (C) and measure (M), there are five structure files. The data format is JSON (http://www.json.org/). A JSON object is an unordered set of name/value pairs. Each variable is defined by a name/value pair. The name is a dummy name, consisting of the category and an index, e.g. BC1 (boundary condition 1) or H1_R1 (hazard 1 for receptor 1). The paired values are JSON objects with at least five name/value pairs on their own:
This is illustrated in the following examples, which yield this (INSERT LINK HERE) BN structure.
(to be added soon)
The text files provide information on the receptors' spatial distribution across the case study site. For each <receptor> variable defined in Rnodes.json there must be a corresponding <receptor>.txt file containing three columns of data (in this order): areaID, receptorID and gridpointID. Important: The data must be sorted such that receptorID is increasing! An example is given here: ResBuildings.txt. Note that there are duplicates of buildingID, because individual buildings may be effected by multiple surrounding grid points. For a step by step explanation of creating this file, see the page Creating a <receptor>.txt file.
(to be added soon)
(to be added soon)