I m using ArcGIS 10.4.1 and Network Analyst extension, in the network dataset properties-> Attributes. I created an attribute called PromoteStops1, next in Script Evaluators, I used the following script to force VRP solver to travel entire streets segments. (The basic idea is that if a street has deliveries you it better not to leave that street until there are no more deliveries). The deliveries have service time so this script works as follows;
restricted = False a = Turn.Angle If a >= 45 Then If fromEdge.AttributeValueByName("ServiceTim")= 0.5 And toEdge.AttributeValueByName("ServiceTim") = 0.5 Then restricted = True End If End If
(ServiceTim is the field name in road's shapefile attributes table).
When I try to solve the VRP I get the following message;
Error: The evaluator failed to return a value. [Attribute: PromoteStops1,
Source: FT_Attica_Roads_Final_Clip1_Spa, OID = 4002, EID = 3406]
Error: Network element evaluator error. [Script Control Error -2147352319]
Is there anything wrong with the variable names?