This tutorial describes the integration of XPRafts and the commercial programs used. For example, ODBC compliant databases such as Microsoft Access, Microsoft Excel, ESRI Arc View, and MapInfo. The process allows data that already exist in Asset Management Systems and Geographic Information Systems (GIS) to be directly linked to the software for use in the development of the simulation model. While this process is an extremely efficient method of transferring data between the GIS and model, it may be further automated by the creation of scripts within the respective GIS packages to produce seamless integration of the software and GIS.
In this tutorial, you will learn the following:
Setting up the Model
First, you need to set up the blank model and then link with the external database.
- Click Blank Job in the File > New menu. Alternatively, press Ctrl + N on your keyboard.
- Type in the model name as Tutorial 5, and then click Save.
Now you have a blank model to link with the external database.
Linking with External Database
- From the File menu, select the option Import External Databases.
- Click Select File.
- Browse for the file Model_Data.mdb in the Tutorial 5 folder, and then double-click the file to open.
You can see that there is another file, Model_Data.xls, which contains the same data as Model_Data.mdb. You may also select this excel file instead of the *.mdb file.
In the Tables drop down list, select Node Data.
The data are displayed including Node Names, X Coordinates, Y Coordinates, Total Area of the catchment draining to the node, % Impervious Area,Catchment Slope, and Roughness.
Click Setup Mappings in the Import External Data dialog to open Variable Mappings. You will map the variables in the database against the variables in the XPRafts database. For example, Catchment Roughness in the external database will be mapped against Catchment Manning’s n in the XPRafts database.
Select Node under Object Type & Mandatory Data. Now, you will map the Mandatory Data which are the essential data required to create node entities. The Mandatory Data are Node Names and Positions. Use the drop down button and select Node Name for Node, X Co-ordinate for X Pos, and Y Co-ordinate for Y Pos.
Under Fields in the Variable Mappings dialog, click and highlight Total Area (Ha) and then click Insert Mapping.
Select Total Area under Subcatchment in the Node Variables dialog and then click OK. Now you can see that Total Area (Ha) in the external Database is mapped against the Total Area in Subcatchment in XPRafts.
Note that successfully performing the steps above will change the red question mark (?) in Fields (in the Variable Mappings dialog) to a green tick mark.
Repeat the steps to map all variables as shown in the table below.
Node Name Node Total Area (Ha) Total Area Impervious % Percentage Impervious Catchment Roughness Catchment Mannings ‘n’ Catchment Slope (%) Vectored slope
Click OK after completion of the mapping. Click Import in the next dialog.
You can see that 11 nodes have been imported from the external database. Click OK.
- Similarly, you need to prepare the mapping for each of the link variables. Select the Link Data table as shown below:
Click Setup Mappings. Select Link under Object Type & Mandatory Data and complete the mappings as shown below.
Link Name Link U/S Node US Node D/S Node DS Node Hydrograph Lag Hydrograph Lag (min)
Click OK and Import .
Click Save & Exit in the Import External Data dialog.
- Click the Fit Network To View icon
Importing Global Data
This procedure provides steps on how to import the global data bases for the model.
- Go to File, and select Import Data.
Select GlobalData.xpx and then click Open.
Double-click any node and click Subcatchment Data, and then click FIRST Subcatchment.
Select Initial/Continuing under Rainfall Losses Pervious and click the grey box next to it.
Select rural and click Select to return to the Subcatchment Data dialog.
Click the Copy iconin the Subcatchment Data dialog, and then click the Initial/Continuing box with rural selected, a pop-up window will tell you what has been copied. Click OK to return the network window.
In the main network window, highlight all nodes using the Select all nodes tool.
Go to Edit in the main menu and then select Paste Data. XPRafts notifies you how many objects and database records have been pasted. Click OK.
- Go to Configuration in the main menu and then select Job Control.
- Click Global to open Stacked Storms dialog, and select the first storm (10yr10min) under the Use Storm? column. Select 10yr10min and then click Edit to open the Storm Data dialog.
- Select IFD Calculation and click the grey box below it. Under IFD Coefficients, select Canberra from the database imported from the *.xpx file. Click Select.
- In the main network window, click the Solve icon to simulate the model and see the results.