Managing routes capacities and specialties with nonlinear pickup quantities

889
2
05-13-2011 05:15 AM
denismatarangas
New Contributor
Hi, I have to plan routes for paratransits, with and without wheelchairs. I would like to set the capacities of routes according to a non-linear rule:

0 wheelchair = 12 places remaining (without wheelchair)
1 wheelchair = 11 places remaining
2 wheelchairs = 11 places remaining
3 wheelchairs = 9 places remaining
4 wheelchairs = 6 places remaining
...

Is there a way to load a pattern, that would manage specialties and capacities according to a nonlinear rule?

Thank you
Tags (2)
0 Kudos
2 Replies
NaAn
by
Occasional Contributor
Hi,

You will need the two-dimension capacity in routes: one for regular seats and the other one for wheel chairs. There is no need to introduce specialty for wheel chair. The following python code can help you to load the capacities into routes. Just open the layer in ArcMap and type in the following code in the python window (make sure to modify the layer name "MyVRPLayer" and route name "route 1, route 2, ..." accordingly).

routeCapacity = {'route 1': '12 0', 'route 2': '11 1', 'route 3': '11 2', 'route 4':'9 3', 'route 5': '6 4' }
rows = arcpy.UpdateCursor("MyVRPLayer\Routes")
for row in rows:
    row.Capacities = routeCapacity[row.Name]
    rows.updateRow(row)
del row
del rows


Hope this answers your question.

Thanks.

Anna
0 Kudos
denismatarangas
New Contributor
Thank you!
0 Kudos