Violated Constraints codes?

2932
2
Jump to solution
02-17-2012 12:42 PM
Highlighted
New Contributor
Hello,

We've been working with the network analyst to perform a VRP (vehicle routing problem).  We have been modifying and adding to the VRP .net sample found at:
http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#/Sample_Vehicle_routing_...

When the problem attempts to solve, we are being presented with a warning message stating "Some orders could not be routed due to violated constraints."  Examining the VRP data we have found either 37 or 61 in the ViolatedConstraints field when this occurs.  At this point we have been unable to find any reference to what these numbers mean.  Can someone point us in the right direction here?

Thanks.
Tags (2)
Reply
0 Kudos
1 Solution

Accepted Solutions
Highlighted
Occasional Contributor III
The various violated contraints can be found here:

http://help.arcgis.com/en/sdk/10.0/arcobjects_net/componenthelp/index.html#/esriNAViolatedConstraint...

You need to do some bitwise arithmetic to figure out which combination of constraints are violated.  In your case, you have 37 or 61.

For 37 (000000000100101):

esriNAViolationHardTimeWindow - 32
esriNAViolationMaxTotalTime - 4
esriNAViolationMaxOrderCount - 1

For 61 (000000000111101):

esriNAViolationHardTimeWindow - 32
esriNAViolationMaxTotalDistance - 16
esriNAViolationMaxTotalTravelTime - 8
esriNAViolationMaxTotalTime - 4
esriNAViolationMaxOrderCount - 1

View solution in original post

Reply
0 Kudos
2 Replies
Highlighted
Occasional Contributor III
The various violated contraints can be found here:

http://help.arcgis.com/en/sdk/10.0/arcobjects_net/componenthelp/index.html#/esriNAViolatedConstraint...

You need to do some bitwise arithmetic to figure out which combination of constraints are violated.  In your case, you have 37 or 61.

For 37 (000000000100101):

esriNAViolationHardTimeWindow - 32
esriNAViolationMaxTotalTime - 4
esriNAViolationMaxOrderCount - 1

For 61 (000000000111101):

esriNAViolationHardTimeWindow - 32
esriNAViolationMaxTotalDistance - 16
esriNAViolationMaxTotalTravelTime - 8
esriNAViolationMaxTotalTime - 4
esriNAViolationMaxOrderCount - 1

View solution in original post

Reply
0 Kudos
Highlighted
New Contributor
Thanks Patrick.  I couldn't find that page for the life of me and my searches didn't seem to bring that page back.
That will definitely help us with the small issues we've encountered.
Reply
0 Kudos