Time Window Routing

The POST Time Window Routing operation allows user to optimize the stops sequence.

Request URL

POST https://pcmiler.alk.com/apis/rest/v1.0/Service.svc/route/optimize?region={region}&dataset={dataset}

Request Element

The operation takes a JSON format data in the POST body.

Element Definition Required
The POST Body Object contains Settings and Route System Object.
Y
region The data region in which the stops in the sequence are located. Valid values are NA, EU, OC and SA.
N
dataset The regional dataset. Possible value: Current (default), PCM_EU, PCM_OC, PCM_SA, PCM_AF, PCM_AS, PCM_ME, PCM_GT, PCM_WW and PCM_NA.
N

Settings

Element Description Data Type Value/Example
Method Specifies if the process is to optimize the sequence or optimize an already optimized sequence based on the estimated time of arrival.
Optional and defaults to optimization of the sequence.
Enum 1 - Optimize
2 - ETA
TimeFormat The format of the time in time windows specified per stop.
Optional and defaults to the 24-hour format.
Enum 1 - Hour24
2 - Minutes
3 - Hour12
MaxClusterCount The maximum number of clusters of stops allowed to be generated.
Optional and defaults to 40 clusters.
Integer
MinClusterCount The minimum number of clusters of stops allowed to be generated.
Optional and defaults to 30 clusters.
Integer
MaxAirTravelTimeForCluster The maximum air travel time in seconds that any two stops can be apart from each other and still be allowed to be clustered together.
It also determines the maximum air travel time in seconds that is allowed for traveling between all stops in a cluster.
Optional and defaults to 180 seconds.
Integer
MinAirTravelTimeForCluster The minimum air travel time in seconds that is allowed for traveling between all stops in a cluster.
Optional and defaults to 6 seconds.
Integer
MaxAirTravelDistanceForCluster The maximum air travel distance that is allowed for traveling between all stops in a cluster.
Optional and defaults to 100 miles.
Double
MaxAirTravelDistanceFromDepot The maximum air travel distance that is allowed for traveling between any stop and the start and end depots.
Optional and defaults to 200 miles.
Double
MaxGridsForMatrixCalculation The maximum number of grid expansions allowed when building a time/distance matrix for sequences and clusters.
Optional and defaults to 60.
Integer
GeocodingDistanceThreshold How far off a stop is allowed to be from the original or Geocoded latitude and longitude once snapped to a grid link.
Optional and defaults to 0.497097 miles (800 meters).
Double
GeocodingDistanceThreshold How far off a stop is allowed to be from the original or Geocoded latitude and longitude once snapped to a grid link.
Optional and defaults to 0.497097 miles (800 meters).
Use kilometers by setting time window sequence's Route.Options.DistanceUnits.
Double
GeocodingConfidenceThreshold A confidence level as to how certain a Geocode search for stops are.
Optional and defaults to 2 (good confidence).
Integer 1 - Exact
2 - Good
3 - Uncertain
4 - Fail
MaxWaitTime The maximum time in seconds a driver is allowed to wait at a stop.
Optional and defaults to 1800 seconds.
Integer
MaxBreakWaitTime The maximum time in seconds a driver is allowed to wait at a break stop.
Optional and defaults to 7200 seconds.
Integer
MaxServiceTimeToClusterStops The maximum total wait time in seconds allowed for stops in a cluster.
Optional and defaults to 2400 seconds.
Integer
MaxServiceTimeToClusterLevel0Stops The maximum amount of combined service time. The stops at service level 0 (pre-10AM stops) inside a cluster are allowed to have.
Optional and defaults to 600 seconds.
Integer
MaxServiceTimeToClusterLevel1Stops The maximum amount of combined service time. The stops at service level 1 (pre-noon stops) inside a cluster are allowed to have.
Optional and defaults to 600 seconds.
Integer
MaxTravelTimeToBreakCluster The maximum total travel time in seconds a cluster can reach before being forced to break smaller clusters.
Optional and defaults to 300 seconds.
Integer
AvgTravelTimeToBreakCluster The travel time in seconds that is used for breaking a cluster into smaller clusters if the travel time between any two stops in that cluster exceeds it.
Optional and defaults to 180 seconds.
Integer
AvgTravelTimeRatioToBreakCluster The ratio of stops over the average time to break a cluster to the stops under the average time.
Optional and defaults to 3.
Integer
MaxTimeBeforeLateInBlockTime The max time in seconds into a stop's blocked time window the driver arrives at the stop before it is considered late.
Optional and defaults to 900 seconds.
Integer
UTurnCost The cost of making a U-turn regardless of vehicle type.
This value doesn't actually match any particular cost or unit of measurement used elsewhere. In theory, 1,000 is roughly 1 mile.
Optional and defaults to a value assigned by vehicle type.
Integer
PrioritizePremiumStops Pick a sequence with fewer stops with pre-noon and pre-six PM time windows that are late instead of favoring shorter ETAs or total distance.
Optional and defaults to true.
Boolean
GeocodingUseLocationPlusAddress Geocode stops using latitude, longitude, and an address (if an address is provided) instead of finding the nearest grid link.
Optional and defaults to false.
Boolean
AllowGeocodeMultiMatch Whether or not it's okay that a Geocode search returns more than one match for a stop.
Optional and defaults to true.
Boolean
RemoveStopIfTimeWindowBeforeStartTime Whether or not a stop should be removed if its time window occurs before the start depot's start time.
Optional and defaults to true.
Boolean
ClusterWithUniqueIDOnly When "true", after the algorithm tries to cluster based on the unique cluster ID, the algorithm stops trying to cluster anymore.
Optional and defaults to false.
Boolean

Route

Element Description Data Type Value/Example
Name Name of the trip String
Options Route Options Object.
Stops A list of stops that include time window restrictions in which they must be reached.
It consists of Location Object and TimeWindow Object.
The minimum required number of stops is 3.
The maximum required number of stops is 200.

Route Options

Element Description Data Type Value/Example
VehicleType The type of the vehicle driving the route.
Optional and defaults to default vehicle type 0.
Enum 0 - Truck
1 - LightTruck
2 - Auto
RoutingType The type of routing algorithm to use.
Optional and defaults to 0.
Enum 0 - Practical
1 - Shortest
2 - Fastest
HighwayOnly Indicates whether to use highways.
Optional and defaults to false.
Boolean
FuelRoute Whether or not a fuel optimized route is desired.
Optional and defaults to false.
This parameter is ignored by time window optimization. If "true" is passed, it is set to "false" and a warning is returned in the response header.
Boolean
UseAvoidsAndFavors Whether or not to use avoids and favors.
Optional and defaults to false.
This parameter is a remnant of legacy code and is only useable by legacy customers. On top of that, time window optimization ignores this parameter. If "true" is passed, it is set to "false" and a warning is returned in the response header.
Boolean
ClassOverrides Represents a route class override to a special network.
Optional and defaults to 0.
Boolean 0 - None
1 - FiftyThreeFoot
2 - NationalNetwork
3 - FiftyThreeFoot, NationalNetwork
DistanceUnits Represents miles or kilometers.
Optional and defaults to 0.
Boolean 0 - Miles
1 - Kilometers
TollDiscourage Whether or not tolls should be discouraged on the route.
Optional and defaults to false.
Boolean
BordersOpen Wether or not borders are open for travel.
Optional and defaults to false.
Boolean
OverrideRestrict Whether or not to override truck restrictions.
Optional and defaults to false.
If this property is set to "true", then it is set to false and a warning is returned in the response header. This affects link costs in PCMiler and allows differences between it and CoPilot.
Boolean
HazMatType Defines transported hazardous material type.
Optionalsand defaults to 0.
Enum 0 - None
1 - General
2 - Caustic
3 - Explosives
4 - Flammable
5 - Inhalants
6 - Radioactive
RouteOptimization The method by which to optimize the route stops.
Optional and defaults to 0.
If any value other than "None" is provided, then it is set to 0 and a warning is returned in the response header. Time window optimization requires the start and end depot to be fixed so this value is at ends with the process.
Boolean 0 - None
1 - Thruall
2 - DestinationFixed
TruckCfg TruckConfig object. Configures truck size and statistics.
Optional.
Units Specifies whether English or metric units describe vehicle dimensions.
Optional and defaults to 0.
Enum 0 - English
1 - Metric
Height Represents the height of the truck in feet and inches, or meters depending upon the units.
Maximum value is 13'6" or 4.1148 meters.
Optional and defaults to "13'6\"" in all regions except Europe, which is "12'6\"".
String
Length Represents the length of the truck in feet or meters, depending upon the units.
Maximum value is 53' or 16.1544 meters.
Optional and defaults to "48'" in all regions except Europe, which is "54'1\"".
String
Width Represents the width of the truck in inches or meters, depending upon units.
This value can be 96" and below, 102" and above or 98".
Optional and defaults to "96\"" for all regions.
String
Weight Represents the weight of the truck in pounds or kilos, depending upon units.
Acceptable values can be up to 132,000 pounds or 59,874 kilos.
Optional and defaults to "80000".
String
Axles The number of axles on the truck.
Acceptable values are 2 through 14.
Optional and defaults to 5.
Integer
LCV Indicates whether the truck is a multi-trailer or longer combination vehicle.
This is used for calculation of toll costs, and only for North American region.
Optional and defaults to false.
Boolean
HubRouting Whether or not to enable hub routing.
Optional and defaults to false.
Boolean
AFSetIDs This represents a collection of set IDs to use with avoid/favors.
Like "UseAvoidsAndFavors" this is only useable by legacy customers and is ignored by time window optimization. If a list is provided, it is emptied, is ignored and a warning is returned in the response header.
List of integers
ElevLimit Represents elevation limit when generating a route.
Elevation units can be either meters or feet determined by "DistanceUnits". Miles=feet, Kilometers=meters
Limit will be ignored if: 1.Routing is deemed impractical with the limit. 2.A stop is located at an elevation higher than the limit.
Optional and defaults to 0.
Unsigned Integer
FerryDiscourage Whether or not to avoid ferries while routing.
Optional and defaults to 0.
Boolean
HoSOptions This is an object used to define a driver's service times and rule sets.
Optional and defaults to null.
This object is at ends with the entire time window optimization process and should not be defined. However, an warning will only be thrown if "Enabled" is set to "true" and then the object will be set to null.
HoSScheduleType object
Enabled Whether or not to use the defined "HoSScheduleType" object.
Optional and defaults to false.
If this is "true", an warning will be returned and the parent "HoSScheduleType" object will be set to null.
Boolean
SideOfStreetAdherence How strict to be in order to avoid the destination being on the opposite side of the street.
Optional and defaults to 0.
Enum 0 - Off
1 - Minimal
2 - Moderate
3 - Average
4 - Strict
5 - Adhere
6 - StronglyAdhere
GovernorSpeedLimit Maximum average road speed to use in route calculations that overrides all other road speeds when they are above this value.
Valid value is between 1 and 100 mph.
Optional and default is 0.
Integer

Location

For a valid Location, one of the following must be defined. See details in Sample JSON Request.

  • Address object. It consists of StreetAddress, City, State, County, Country, SPLC and zip.
  • Coords object. It consists of Lat and Lon.

It is also valid to have both defined. As long as one of the above conditions are met, it doesn't matter what else in "Location" is undefined or partially defined. If neither of the requirements are met, an error is returned for each invalid stop.

TimeWindow

Element Description Data Type Value/Example
TimeWindow The window of time in which a stop must be reached.
It contains a string StartTime and string EndTime.
SecondTimeWindow It represents a second time window in which the stop can be reached.
It contains a string StartTime and string EndTime.
A single stop cannot have this and BlockTimeWindow defined at the same time.
BlockTimeWindow The window of time in which a stop cannot be reached within a time window.
It contains a string StartTime and string EndTime.
A single stop cannot have this and SecondTimeWindow defined at the same time.
StartTime The stop can only be reached on or after this time.
EndTime The stop can only be reached on or before this time.
WaitTime The period of time in which the driver will be at this stop in seconds. Integer
IsBreak Whether or not this stop is actually where the driver takes a break. In this case, the time window represents how long the break is.
Optional and defaults to false.
A single stop cannot be a static stop and a break stop at the same time.
Boolean
IsStatic Whether or not this stop is not to change its position in the sequence when an optimized sequence is calculated. Static stops can only appear at the beginning and the end of a sequence.
Optional and defaults to false.
A single stop cannot be a static stop and a break stop at the same time.
Boolean
UniqueClusterID This coerces the algorithm to cluster stops together based on these IDs. It never uses only the unique cluster ID by itself and clusters can still break apart during sequencing. However, stops with the same unique cluster ID are more likely to be sequenced together in the end result.
Optional and defaults to an empty string.
Set ClusterWithUniqueIDOnly to "true" in order to prioritize clustering by the unique cluster ID more than normal.
String

Sample JSON Post Body

{
   "Settings":{
      "Method":1,
      "TimeFormat":1,
      "MaxClusterCount":40,
      "MinClusterCount":30,
      "MaxAirTravelTimeForCluster":180,
      "MinAirTravelTimeForCluster":6,
      "MaxAirTravelDistanceForCluster":100.0,
      "MaxAirTravelDistanceFromDepot":200.0,
      "MaxGridsForMatrixCalculation":60,
      "GeocodingDistanceThreshold":0.497097,
      "GeocodingConfidenceThreshold":2,
      "MaxWaitTime":1800,
      "MaxBreakWaitTime":7200,
      "MaxServiceTimeToClusterStops":2400,
      "MaxServiceTimeToClusterLevel0Stops":600,
      "MaxServiceTimeToClusterLevel1Stops":600,
      "MaxTravelTimeToBreakCluster":300,
      "AvgTravelTimeToBreakCluster":180,
      "AvgTravelTimeRatioToBreakCluster":3,
      "MaxTimeBeforeLateInBlockTime":900,
      "UTurnCost":-2,
      "PrioritizePremiumStops":true,
      "GeocodingUseLocationPlusAddress":false,
      "AllowGeocodeMultiMatch":true,
      "RemoveStopIfTimeWindowBeforeStartTime":true,
      "UniqueClusterStrictness":0      // trunk only
   },
   "Route":{
      "Name":"",
      "Options":{
         "VehicleType":0,
         "RoutingType":0,
         "HighwayOnly":false,
         "FuelRoute":false,
         "UseAvoidsAndFavors":false,
         "ClassOverrides":0,
         "DistanceUnits":0,
         "TollDiscourage":false,
         "BordersOpen":true,
         "OverrideRestrict":false,
         "HazMatType":0,
         "RouteOptimization":0,
         "TruckCfg":{
            "Units":0,
            "Height":"13'6\"",
            "Length":"48'",
            "Width":"96\"",
            "Weight":"80000",
            "Axles":5,
            "LCV":false
         },
         "HubRouting":false,
         "AFSetIDs":[
         ],
         "ElevLimit":0,
         "FerryDiscourage":false,
         "HoSOptions":{
            "Enabled":false,
            "RemainingDriveTimeUntilBreak":0.0,
            "RemainingDriveTime":0.0,
            "RemainingOnDutyTime":0.0,
            "HoSRuleType":0,
            "RemainingCycleDutyTime":0.0
         },
         "SideOfStreetAdherence":0,
         "GovernorSpeedLimit":0,
         "CustomRoadSpeeds":[
            {
               "RoadCategory":1,
               "Speed":0
            }
         ]
      },
      "Stops":[
         {
            "Location":{
               "Address":{
                  "StreetAddress":"",
                  "City":"",
                  "State":"",
                  "Zip":"",
                  "County":"",
                  "Country":"",
                  "SPLC":"",
                  "CountryPostalFilter":0,
                  "AbbreviationFormat":0
               },
               "Coords":{
                  "Lat":"0.000000",
                  "Lon":"0.000000"
               },
               "Region":4,
               "Label":"",
               "PlaceName":""
            },
            "TimeWindow":{
               "StartTime":"00:00",
               "EndTime":"11:59"
            },
            "SecondTimeWindow":{
               "StartTime":"00:00",
               "EndTime":"11:59"
            },
            "BlockTimeWindow":{
               "StartTime":"00:00",
               "EndTime":"11:59"
            },
            "WaitTime":0,
            "IsBreak":false,
            "IsStatic":false,
            "UniqueClusterID":""            // trunk only
         }
      ]
   }
}
                

Sample Response

 {
   "TotalETA":"00:00",
   "TotalDistance":"0.00",
   "Stops":[
      {
         "Location":{
            "Address":null,
            "Coords":{
               "Lat":"0.000000",
               "Lon":"0.000000"
            },
            "Region":4,
            "Label":"",
            "PlaceName":""
         },
         "OriginalPosition":0,
         "ETA":"00:00",
         "Distance":"0.00",
         "TimeWindowMet":false,
         "SlackTime":0
      }
   ],
   "RemovedStops":[
      {
         "Location":{
            "Address":{
               "StreetAddress":"",
               "City":"",
               "State":"",
               "Zip":"",
               "County":"",
               "Country":"",
               "SPLC":"",
               "CountryPostalFilter":0,
               "AbbreviationFormat":0,
               "CountryAbbreviation": "US"
            },
            "Coords":{
               "Lat":"0.000000",
               "Lon":"0.000000"
            },
            "Region":4,
            "Label":"",
            "PlaceName":""
         },
         "OriginalPosition":0,
         "Error":""
      }
   ]
}
                

Errors and Warnings

Validation

Any errors or warnings that occur here happen when validating the incoming request JSON. Errors will cause a failure but warnings will allow the request to continue and be returned in the response header. Time window routing shares the same validations as other requests for requests, route options and stop locations. The following are unique to time window routing:

Warnings

  1. Settings property not provided. Using default values.
    • Occurs when no Settings property provided.

  2. Method property not found in Settings. The value will be set to 1.
    • Occurs when Settings is provided but Method is not.

  3. TimeFormat property not found in 'Settings'. The value will be set to 1.
    • Occurs when Settings is provided but TimeFormat is not.

  4. RouteOptions property not found in Route. Using default values.
    • Occurs when Options is not provided in Route.

  5. Fuel optimization requested, but time window routing cannot use FuelOptions. This property will be ignored.
    • Occurs when FuelRoute is provided and set to true in RouteOptions.

  6. Fastest routing type uses historical data. RoutingType will be changed to 0.
    • Occurs when RoutingType is provided and set to 2 in RouteOptions.

  7. Time window routing cannot use RouteOptimization property. It requires its start and end depots to be fixed.
    • Occurs when RouteOptimization is provided and set to any value other than 0 in RouteOptions.

  8. Time window routing cannot use HoSOptions property. Work time and schedule is implied by the optimized sequence's results. Use break stops to mark breaks for the driver in the sequence.
    • Occurs when HoSOptions is provided and "Enabled" is set to true in RouteOptions.

  9. Time window routing cannot use OverrideRestrict property. It impacts OverrideRestrictthe sequence.
    • Occurs when OverrideRestrict is provided and set to true in RouteOptions.

  10. Stop #0: is a starting depot and does not need a valid EndTime value. Just provide the same value as StartTime.
    • Occurs when the first stop in Stops list is provided an EndTime with a different value than its StartTime.

  11. Stop #[index]: is a ending depot and does not need a valid time window StartTime. Any value over 0 will be ignored.
    • Occurs when the last stop in Stops list is given a StartTime with a value other than midnight.

  12. Stop #[index]: is a ending depot and does not need a valid time window EndTime. Any value over 0 will be ignored.
    • Occurs when the last stop in Stops list is given a EndTime with a value other than midnight.

  13. Stop #[index]: is a depot and can never be a break stop. Explicitly marking IsBreak false is unnecessary.
    • Occurs when either the first or last stop in Stops list has IsBreak set to false.

  14. Stop #[index]: is a depot and is static by default. Explicitly marking IsStatic true is unnecessary.
    • Occurs when either the first or last stop in Stops list has "IsStatic" set to true.

  15. Stop #[index]: is a depot and does not need to wait. Any WaitTime above 0 will be ignored.
    • Either the first or last stop in Stops list has WaitTime provided with a value greater than 0.

  16. Stop #[index]: SPLC provided but cannot be used by time window routing. This property will be ignored.
    • Stop's Location property has SPLC provided with a valid StreetAddress, City, State/Country and Zip.

  17. Stop #[index]: SPLC provided but time window routing requires StreetAddress, City, State/Country It cannot use this property.
    • Stop's Location property has SPLC provided with a valid StreetAddress, City, State/Country and Zip.

  18. Stop #[index]: Location property must have either valid address (complete with StreetAddress, City, State/Country) or valid latitude and longitude coordinates in order to be geocoded successfully.
    • Stop's Location property does not have valid Coords or StreetAddress, City, State/Country and Zip.
    • This is only a warning because the stop will be removed with a geocode error.

Errors

  1. Unlicensed for time window routing
    • Request is sent but the user isn't licensed to use time window routing.

  2. Request body sequence must be supplied and contain a route with more than 3 stops.
    • Request sent with no TimeWindowSequence provided.
    • Request sent with no Route provided.
    • Request sent with no Stops provided.
    • Request sent with fewer stops in Stops list than minimum number of stops allowed.

  3. Maximum number of stops allowed for time window routing is 200.
    • Request sent with more stops in Stops list than maximum number of stops allowed.

  4. Stop #[index]: is null.
    • Can only occur if a Stop is provided with no information.

  5. Stop #[index]: unable to read time window StartTime
    • Inavlid StartTime in last stop in Stops list.

  6. Stop #[index]: unable to read time window EndTime.
    • Invalid EndTime in last stop in Stops list.

  7. Stop #[index]: TimeWindow must be supplied.
    • Stop missing TimeWindow property.

  8. Stop #[index]: TimeWindow StartTime and EndTime must be supplied
    • Stop has TimeWindow without supplying StartTime and EndTime.

  9. Stop #[index]: TimeWindow StartTime does not match the sequence's time format [time format].
    • Time window supplied StartTime that is not in the correct format for Settings property's TimeFormat.

  10. Stop #[index]: TimeWindow EndTime does not match the sequence's time format [time format].
    • Time window supplied EndTime that is not in the correct format for Settings property's TimeFormat.

  11. Stop #[index]: is a depot and cannot be a break stop.
    • Either the first or last stop in Stops list has IsBreak set to true.

  12. Stop #[index]: has block time window defined but is a break stop.
    • Stop has BlockTimeWindow defined and IsBreak set to true.

  13. Stop #[index]: has second time window defined but is a break stop.
    • Stop has SecondTimeWindow defined and IsBreak set to true.

  14. Stop #[index]: is a depot and is static by default. It has to be static but it is not required to mark it as static.
    • Either the first or last stop in Stops list has IsStatic set to false.

  15. Stop #[index]: is a depot and cannot have a blocked time window.
    • Either the first or last stop in Stops list has BlockTimeWindow provided.

  16. Stop #[index]: BlockTimeWindow StartTime and EndTime must be supplied.
    • Stop has BlockTimeWindow without supplying StartTime and EndTime.

  17. Stop #[index]: BlockTimeWindow StartTime does not match the sequence's time format [time format].
    • Blocked time window supplied StartTime that is not in the correct format for Settings property's TimeFormat.

  18. Stop #[index]: BlockTimeWindow EndTime does not match the sequence's time format [time format].
    • Blocked time window supplied EndTime that is not in the correct format for Settings property's TimeFormat.

  19. Stop #[index]: is a depot and cannot have a second time window.
    • Either the first or last stop in Stops list has SecondTimeWindow provided.

  20. Stop #[index]: SecondTimeWindow StartTime and EndTime must be supplied
    • Stop has SecondTimeWindow without supplying StartTime and EndTime

  21. Stop #[index]: SecondTimeWindow StartTime does not match the sequence's time format [time format].
    • Second time window supplied StartTime that is not in the correct format for Settings property's TimeFormat.

  22. Stop #[index]: SecondTimeWindow EndTime does not match the sequence's time format [time format].
    • Second time window supplied EndTime that is not in the correct format for Settings property's TimeFormat.

  23. Stop #[index]: you can either provide SecondTimeWindow or BlockTimeWindow but not both.
    • Stop has both BlockTimeWindow and SecondTimeWindow provided.

  24. Stop #[index]: cannot be static and a break stop at the same time.
    • Stop has both IsBreak and IsStatic set to true.

  25. Stop #[index]: WaitTime must be supplied.
    • Stop does not have WaitTime property.

  26. Stop #[index]: has invalid WaitTime.
    • Stop has WaitTime less than 0 or a value greater than the highest possible integer value (currently 2,147,483,647).

  27. Stop #[index]: must provide Location property for a time window stop.
    • Stop does not have Location property.

Optmization

These errors also cause the response to fail, like validation, only they occur during the actual optimization logic.

    Null optimizer results.
    • Occurs if the results returned from core code are empty.
    • Sanity check that can only happen if the build properties are not set properly during compilation or something goes horribly wrong with CLI unmanaged to managed code conversions.

  1. Unable to get stop results.
    • Occurs if the stop list returned from core code is empty.
    • Sanity check that can only happen if something goes horribly wrong with CLI unmanaged to managed code conversions.

  2. Optimization API uninitialized.
    • Sanity check that can only happen if the core code API cannot initialize due to incorrect build properties, lack of memory or other indeterminate internal errors.

  3. Unable to make an optimizer to run process.
    • Sanity check that can only happen if the core code API cannot initialize due to a lack of memory or other indeterminate internal errors.

  4. Stop options did not match stops.
    • Sanity check that can only happen if there was an error in the CLI managed to unmanaged conversions.

  5. Date or OverrideRestrict route options invalid.
    • Sanity check that can only happen if Date somehow gets set to a value other than PCMiler's default (0) by being exposed to time window routing or if validation fails to properly set OverrideRestrict

  6. Depot(s) non-geocodable.
    • Either the first or last stop in Stops list or both were not able to be geocoded, even with a valid Location property.

  7. Depot(s) too far away from other stops.
    • Either the first or last stop in Stops list or both are farther away from all other stops than the distance defined by MaxAirTravelDistanceFromDepot.

  8. An unknown error occurred.
    • Sanity check that can only happen if an internal error occurred that did not throw an exception or cause a crash.

Stops

  1. Geocode
    • Stop was not able to be geocoded, even with a valid Location property.

  2. Over Max Distance from Other Stops
    • Stop is too far away from all other stops

  3. Invalid Stop Time Window
    • Stop has TimeWindow StartTime greater than EndTime.
    • Stop has TimeWindow EndTime less than the first stop in Stops list's TimeWindow StartTime if RemoveStopIfTimeWindowBeforeStartTime is set to true.

  4. Invalid Stop Wait Time
    • Stop has WaitTime less than 0 or a value greater than the value defined by MaxWaitTime.

  5. Invalid Break Stop Wait Time
    • Stop has WaitTime less than 0 or a value greater than the value defined by MaxBreakWaitTime and has IsBreak set to true.
  6. Invalid Static Stop Placement
    • Stop has IsStatic set to true but is not placed at the beginning or end of the sequence.
  7. Unable to insert break stop into sequence
    • Stop has IsBreak set to true but was not able to be inserted into the final optimized sequence.
    • This is not actually an error, as it can only happen because the final stop in Stops list was reached before the the break stop's StartTime.

  8. Unknown
    • Sanity check that can only happen if a stop was mistakenly added to the RemovedStops list without actually having an error.