Limits |
Top Previous Next |
These functions makes it possible to calculate routes, while taking certain limitations for the links into account. 2 types are available:
For both types, a link value of 0 means no limitations at all.
Use SetLimit to define a value for the route about to be calculated.
Example with maximum height expressed as decimeters:
rwcalc1.SetLimit(1,0) // no limit (default) cost1 = rwcalc1.Route(node1,node2)
rwcalc1.SetLimit(1,40) // 40 dm = 4.0 meter cost2 = rwcalc1.Route(node1,node2)
rwcalc1.SetLimit(1,42) // 42 dm = 4.2 meter cost3 = rwcalc1.Route(node1,node2)
With the proper sample data, this will result in 3 different routes. The first route is the shortest, the second is longer and the last one is the longest (most restrictive limitation).
|