CALCULATING TRAVEL COST
Travel cost is the average cost of traveling along a link. By default this is distance, i.e. the length of the link. However, you can define your own cost units, using for example the average time in minutes that it takes to traverse the link based on average speed along the link, or cost units expressed as fuel consumption, or any other cost units.
The easiest approach is to use average travel time. For this you need to know the speed limit for each link and then you must calculate the time it takes to traverse each link.
Take a look at the attribute table for the road theme. Notice a field called Road code. In this case the values 1 through 4 correspond to freeway, major road, residential road, and minor residential road. A detailed scrutiny reveals some inconsistency in the coding, but we disregard that in this exercise. Somewhat simplified we can assume that the average speed is, say, 50, 35, 25 and 15 mph for the above types of road codes. Based on this and the information in the Length field, we can calculate the average time it takes to traverse each link:
Make the road theme active and open the attribute table,
Theme > Table
Make the table editable:
Make the table active,
Table > Start Editing
Edit > Add Field, Call the field mph > OK
Edit > Add Field, Call the field minutes > OK
For more information on how to name the cost field, see Help. You may use hours, seconds or any other accepted name.
Use the Query Builder to select the links with the same Road Code values:
Make the table active,
Table > Query

Double-click Road_code, then click =, then double-click the desired value, click New Set
With the desired records now selected, Click the mph field in the attribute table (top of the column) to select it, then
Field > Calculate

Enter the chosen speed limit, click OK.
Repeat this process for the other road codes until all links have a speed limit.
Clear selected records, Edit > Select None.
Click the minutes field (top of column),
Field > Calculate
Enter the appropriate formula for converting line length and speed limit to travel time for a link > OK

Table > Stop Editing
You can now perform network analysis with travel time as cost units. You can set this in the Properties menu when solving Find Best Route or Find Nearest Facility or Find Service Area. However, you still need to set directions and turns, as well as match adresses.
