Zusammenfassung
An object containing the results of a last mile delivery analysis that can be used to access outputs and solver messages.
Diskussion
Instances of this class cannot be created directly. Instead, they are returned by the solve method of the LastMileDelivery class.
Learn more about how to use the result object to access and work with the analysis outputs
Eigenschaften
Eigenschaft | Erläuterung | Datentyp |
isPartialSolution (Schreibgeschützt) | Returns True if the solver produced a partial solution, meaning that not all inputs were included in the results. This can occur if one of the inputs is unlocated and the solver class's ignoreInvalidLocations property is set to True. | Boolean |
solveSucceeded (Schreibgeschützt) | Returns True if the solve was successful. | Boolean |
spatialReference (Schreibgeschützt) | Returns the spatial reference of the output features. For example, feature classes created using the export method and geometry objects retrieved from the searchCursor method will have this spatial reference. The spatialReference value is typically the spatial reference of the network dataset or service used in the analysis. | SpatialReference |
Methodenübersicht
Methode | Erläuterung |
count (output_type) | Returns the number of rows for an output type. |
export (output_type, output_features) | Exports the analysis results to a feature class or table. The output features will be created in the spatial reference of the network dataset used for the analysis. If the arcpy.env.outputCoordinateSystem environment is set, the output features will be created with the specified coordinate system instead. |
extent ({output_type}) | Returns the extent of the analysis output. The method returns a RuntimeError exception if the analysis solve failed. |
fieldNames (output_type) | Returns a list of field names supported by a specified output type. |
saveAsLayerFile (file_name) | Saves the analysis result and settings to a layer package. The layer package can be opened in ArcGIS Pro as a record of the analysis settings or to visualize the results. The method returns a RuntimeError exception if the allowSaveLayerFile property on the solver object is set to False. |
saveRouteData (file_name) | Save the outputs from the analysis to a .zip file. The .zip file can be used to share the routes from the analysis as route layer items in ArcGIS Online or ArcGIS Enterprise using the Share As Route Layers tool. Ein Routen-Layer-Element kann in verschiedenen Anwendungen verwendet werden, z. B. in ArcGIS Navigator, um eine Routenführung für Außendienstmitarbeiter bereitzustellen, oder im Bereich Wegbeschreibung in Map Viewer Classic, wo die im Routen-Layer enthaltene Route weiter angepasst werden kann. Mit ArcGIS Pro können Sie einen Routenanalyse-Layer aus einem Routen-Layer erstellen. The output features will be created in the spatial reference of the network dataset used for analysis. If the arcpy.env.outputCoordinateSystem environment has been set, the output will be created in that spatial reference instead. If the solve fails, saveRouteData returns a RuntimeError exception. The method returns a RuntimeError exception if the allowSaveRouteData property on the solver object is set to False. |
searchCursor (output_type, field_names, {where_clause}) | Establishes a search cursor on the specified output type. This cursor can be used to read rows directly from the output. |
solverMessages (severity) | Get error, warning, and informational messages returned by the solver. |
Methoden
count (output_type)
Parameter | Erläuterung | Datentyp |
output_type | The type of output features to count. Set this parameter using the LastMileDeliveryOutputDataType enumeration. | Object |
Datentyp | Erläuterung |
Integer | The number of rows. |
export (output_type, output_features)
Parameter | Erläuterung | Datentyp |
output_type | The type of output to export. Set this parameter using the LastMileDeliveryOutputDataType enumeration. | Object |
output_features | The catalog path to the output feature class or table that will contain the exported features. | String |
extent ({output_type})
Parameter | Erläuterung | Datentyp |
output_type | The type of output features for which to get the extent. Set this parameter using the LastMileDeliveryOutputDataType enumeration. If you do not specify a value, or you specify a value of None, the extent for the combined analysis outputs is returned. | Object |
Datentyp | Erläuterung |
Extent | An arcpy.Extent object indicating the extent of the designated output type. |
fieldNames (output_type)
Parameter | Erläuterung | Datentyp |
output_type | The type of output for which to return a list of field names. Set this parameter using the LastMileDeliveryOutputDataType enumeration. | Object |
Datentyp | Erläuterung |
String | A list of field names supported by the specified output type. |
saveAsLayerFile (file_name)
Parameter | Erläuterung | Datentyp |
file_name | The catalog path of the output layer package (.lpkx file). Hinweis:Layer files with an .lyr extension are not supported for last mile delivery analyses. | String |
saveRouteData (file_name)
Parameter | Erläuterung | Datentyp |
file_name | The full path of the output .zip file. | String |
searchCursor (output_type, field_names, {where_clause})
Parameter | Erläuterung | Datentyp |
output_type | The type of output that will be read. Set this parameter using the LastMileDeliveryOutputDataType enumeration. | Object |
field_names [field_names,...] | A list of field names of the output type whose values will be returned by the cursor. You can get the names of the fields that are supported by an output type using the fieldNames method. See descriptions of the fields included in each output type In addition to regular fields, you can also access the geometry of the output using one of the following geometry tokens:
The SHAPE@XY and SHAPE@XYZ tokens are only supported for point-based output types. The x-, y-, and z-values returned when using the SHAPE@XY and SHAPE@XYZ tokens are in the spatial reference reported by the solver result object's spatialReference property, and this is typically the same as the spatial reference of the network data source used for the analysis. | String |
where_clause | Ein optionaler Ausdruck zur Begrenzung der zurückgegebenen Datensätze. Weitere Informationen zu WHERE-Klauseln und SQL-Anweisungen finden Sie unter SQL-Referenz für in ArcGIS verwendete Abfrageausdrücke. (Der Standardwert ist None) | String |
Datentyp | Erläuterung |
Object | A SolverResultSearchCursor object that reads rows from the output. |
solverMessages (severity)
Parameter | Erläuterung | Datentyp |
severity | The type of messages to be returned. The parameter should be specified using the MessageSeverity enumeration. | Object |
Datentyp | Erläuterung |
List | The messages are returned as a list of lists. The inner list contains two values; the first is a number representing the message code, and the second value is the message text. An example of a list of messages returned from a failed origin destination cost matrix analysis. |