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.

  1. Click Blank Job in the File > New menu. Alternatively, press Ctrl + N on your keyboard.
  2. 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

  1. From the File menu, select the option Import External Databases.


  2. Click Select File.


  3.  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.


  4. 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


  5.  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.


  6. 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.

  7. Under Fields in the Variable Mappings dialog, click and highlight Total Area (Ha) and then click Insert Mapping.

  8. 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 NameNode
    Total Area (Ha)Total Area
    Impervious %Percentage Impervious
    Catchment RoughnessCatchment Mannings ‘n’
    Catchment Slope (%)Vectored slope
  9. 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.
     

  10. Similarly, you need to  prepare the mapping for each of the link variables. Select the Link Data table as shown below:


  11.  Click Setup Mappings. Select Link under Object Type & Mandatory Data and complete the mappings as shown below.

    Link NameLink
    U/S NodeUS Node
    D/S NodeDS Node
    Hydrograph LagHydrograph Lag (min)
  12. Click OK and Import .


  13. Click Save & Exit in the Import External Data dialog.

  14. Click the Fit Network To View icon . You can now see that the network has been imported from the external database. You can verify the data by opening the nodes and links.

Importing Global Data

This procedure provides steps on how to import the global data bases for the model.

  1. Go to File, and select Import Data.


  2. Select GlobalData.xpx and then click Open.


  3. Double-click any node and click Subcatchment Data, and then click FIRST Subcatchment.

  4. Select Initial/Continuing under Rainfall Losses Pervious and click the grey box next to it.


  5. Select rural and click Select to return to the Subcatchment Data dialog. 


  6.  Click the Copy icon in 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.


  7. In the main network window, highlight all nodes using the Select all nodes tool.

  8. 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

  9. Go to Configuration in the main menu and then select Job Control
  10. 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. 


  11. 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.


  12. In the main network window, click the Solve icon to simulate the model and see the results.