Lab5 of Geo520, Spring 2005

TA : Julie Hwang

Lab 5. Working with Networks I

Objectives

The objectives of this lab are to introduce the link-node representation of a network, and to work with networks in TransCAD.

 

Link-Node representation of Networks

A network can be represented as a set of nodes and links. A simple network can be stored in the relational database as shown below with links and nodes table. Note the links table stores topology (direction of links shown in the field From and To) too.

A network includes attributes that indicate the cost of travel using each link (eg. length, travel time). The cost information is used for routing.


Practice #1: Create a network

In this practice, you will be creating networks from the selection set in the line layer. The network file you will be creating saves the information necessary to find a shortest path. That is, creating a network is a preliminary task of finding the best route.

______ Open the geographic file NES_HWY.CDF in the Tutorial folder.

______ Show a hidden node layer by choosing the Map Layer button  on the toolbar – use the Show Layer button in the Layers dialog box.

______ Make Highway an active layer. Choose the Select by Circle button  on the toolbox. Click at Boston area (located roughly in the upper right), then type in 30 in the Enter Selection Radius textbox.

______ Choose the Selection Toolbox  on the toolbar to display the Selection toolbox for the active layer.

______ Click the Zoom to Selection button in Selection toolbox.

Zoom to selection button

 

______ Make sure Highway is an active layer. Choose Networks/Paths-Create… to display the create Network dialog box. (If the menu is not shown, choose Networks/Paths in the Procedures)

Choose features of a line layer

 

Choose the cost field

 

 

Choose other cost fields

 
______ Choose Selection from the Create links from drop-down list, and choose [Travel Time] from the Optional Fields-Other Link Fields scrolling list. Click OK to display the Save Network As dialog box.

 

______ Type “mynet” as the file name (in your home directory) and click Save. TransCAD creates the network on the selection set of links and displays the network file name on the status bar at the bottom of your screen. Now you are ready for finding the shortest path.


Practice #2: Find a shortest path

______ Make sure that Highway is an active layer.

______ Choose Networks/Paths-Shortest Path or click the Routing Toolbox button  on the toolbar.

______ Click the Add Stop button , then click on the map at any node (origin) and on other node (destination) within the selection area of Highway layer..

______ Click the Find the Best Route button . TransCAD calculates and displays the shortest distance and displays a message window with the total distance. Click OK to continue.

______ Click the Clear All Stops and Route button .

______ You can add any number of stops in sequence. You can find the route that minimizes other costs by choosing [Travel Time] from the Minimize drop-down list.

______ Choose File-Close All.


Practice #3: Solve multiple shortest paths

Practice #2 shows how to create a single path through a sequence of stops. In practice #3, you will be creating multiple paths between a set of origins and destinations.

______ Open the geographic files FL_HWY.CDF and STATES.CDF in one map from the Tutorial folder.

______ Create a network from entire features of the Highway layer. You should include LENGTH as the cost field and TIME as optional cost fields.

______ Show a hidden layer named Highway Xsection, then make this layer an active layer.

______ Choose the Selection Toolbox  to display the Highway Xsection Selection Toolbox.

______ Click  button to create the new selection (which will be named Selection:1 by default).

______ Click  to change the selection settings. Rename the Selection:1 to Origin by clicking the Rename button while choosing the Selection:1. Change the symbol of this selection by clicking the Style button (e.g. big green triangle). Make the status of Highway Xsection layer invisible by clicking the Status button while choosing the layer.

______ Make sure the drop-down list shows Origin in the Highway Xsection Selection Toolbox. You’re going to add five nodes to this selection set. To do this, click the Select by Pointing  button on the toolbox. Click at any five nodes while holding Shift-key. Make sure the number of records is five as shown in the Selection Toolbox.

______ Similarly, create the selection set named Destination and add five other nodes to the selection set.

______ Label the node with ID by clicking the Automatic Label  button on the toolbar. The resulting map should look like this. (The ID doesn’t have to be the same as below)

______ Choose Networks/Paths-Multiple Paths…

______ Choose TIME from the Minimize drop-down list, choose Origin from the From drop-down list, choose Destination from the To drop-down list, and select Matrix file under Store Results.

______ Save the matrix file in your home directory. TransCAD will show the travel time between origin and destination in the matrix format. Of course, you now know how to read the matrix.

______ Close all.


Practice #4: Set global turn penalties

So far we have been working on rather fictitious cases – for instance, we didn’t assume any delay cost incurred by turn or transfer. There are two ways of setting turn penalties in TransCAD: One is to apply penalty rules to all links (Practice #4), and the other is to apply penalty rules to specific links (Practice #5).

______ Open the map TRANS.MAP in the Tutorial folder.

______ Make sure that Streets is shown in a layer drop-down list.

______ Verify that MANHAT.NET is the active network. How do you verify this? Look at the status bar on the bottom right.

______ Choose Networks/Paths-Settings to display the Network Settings dialog box.

______ Click the Turn Penalties radio button on the bottom right.

______ Click the Turn Penalties tab to display the Turn Penalties page.

______ Check the Prohibit checkboxes next to Right and U-Turn. Click OK. TransCAD disables right turns and U-turns in the network.

 

 

Choose global turn penalties

 

 

 

 

 

 

Choose the file for specific turn penalties (which will be discussed in the Practice #5)

 

______ Choose Networks/Paths-Shortest Path or click  to display the Shortest Path toolbox.

______ Click , then click on the map at the point labeled HERE and on the point labeled THERE.

______ Click . TransCAD generates the shortest path between HERE and THERE with no right turns or U-turns, based on distance traveled, and displays the path on the screen.

______ Close all.


Practice #5 Set turn penalties interactively using the turn penalty editor

______ Open the map TURN_P.MAP in the Tutorial folder. TransCAD displays a map with locations marked for a store and its customer. The shortest path between the store and the customer is highlighted. You are using a large truck for deliveries, and need to take into account the delays involved with making certain turn movements.

______ Create a network from all features of Streets layer with the cost of LENGTH and TIME, and save the network in your home directory. Make sure the network is activated.

______ Find the shortest path from the store to the customer such that TIME is minimized. Write down the travel time reported in the message box (this is the travel time without turn penalties). Clear all stops and routes. Close the Shortest Path Toolbox.

______ Choose Networks/Paths-Turn Penalties Toolbox to display the Penalty Dataview dialog box.

______ Choose New Table and click OK to display the Store Table in dialog box.

______ Type “mypenalty” as the file name and click Save. TransCAD displays the Turn Penalty toolbox.

______ Click  in the Turn Penalty toolbox. Click on Link #1, then click on Link #2. TransCAD highlights the two links. Type “5” in the Penalty text box in the Turn Penalty toolbox. This represents a 5 minute penalty incurred to make the turn from Link#1 to Link #2.

______ Click  to apply this turn penalty to the network.

______ Find the best path between the store and the customer by travel time (you have to choose TIME for Minimize drop-down list). How long would it take? How is the best path different from the previous one? It turns out the truck would make a left turn and then make a U-turn because it’s quicker than make a right turn in the intersection with such a turn penalty. Clear all stops and routes

______ This time, suppose U-turn is prohibited anywhere in this network. In the Shortest Path toolbox, click  to display the Network Settings dialog box. You may have noticed that Turn is checked under Options – Penalties, which is automatically done when you click the  button in the Turn Penalty toolbox.

______ Click the Turn Penalties tab to display the Turn Penalties page.

______ Check Prohibit U-Turn under Global.

______ Find the best path by travel time. How long would it take? How has the path been changed under both turn penalties (U-turn prohibition and 5 minutes penalty in the intersection)?

______ Close all.


Assignments (due at the beginning of next lab):

Use the geographic files NES_HWY and NES_PLC in the Tutorial folder.

Traveler’s route map

Suppose you’re planning to take a road trip to major cities in New England. You decide to visit cities where its population is over 100,000. Your trip begins from the westernmost city* and ends at Boston. Create a route map such that travel time can be minimized. The map should show (a) the location and name of the cities you’re traveling to, (b) the fastest route along cities, and (c) total travel time.

Webmaster’s travel time matrix

Suppose you’re the webmaster working in a travel agency. Your boss asks you to post the information such as how long it takes from city A to city B in New England.

(1) Matrix with no turn penalty

Create a matrix that shows the travel time between major cities (with the same criteria as above). According to the matrix, approximately how long will it take to travel from the westernmost city right to Boston? **

(2) Matrix with turn penalties

While traveling around this region, you found out there are 15 minutes (0.25 hour) delay when making a left turn at all regions. Also you heard from TV that there is a 30 minutes (0.5 hour) delay when making a turn from link ID 40421 to 40486 and from link ID 40852 to 41458 (which is located near Boston). Create a matrix that shows the travel time between major cities under those conditions***. According to the matrix, approximately how long will it take to travel from the westernmost city right to Boston?***

Submit two layouts such that one includes a traveler’s route map, and the other includes two travel time matrices with answers.

* Among cities with population > 100,000

** The travel time in your group may not be exactly the same as the result of other groups because you click nodes near cities which may not necessarily closest nodes to cities.

*** Global and specific turn penalties should be applied as a simultaneous case.