Zusammenfassung
A base class for a network attribute custom evaluator.
Diskussion
This class is used as the base class when creating a custom evaluator class (class MyCustEval(arcpy._na.AttributeEvaluator):).
The attribute_name property is the attribute that the custom evaluator will apply to and is required. If an attribute by that name is not found, the custom evaluator will not be attached to the network dataset.
A list of specific source feature class names that the custom evaluator will apply to is optional. If the specific_sources argument is not provided, the custom evaluator will apply to all sources.
The attribute, networkQuery, and attached properties are set after the custom evaluator is associated with a specific network dataset.
Syntax
AttributeEvaluator (attribute_name, {specific_sources})
Parameter | Erläuterung | Datentyp |
attribute_name | The name of the network attribute. | String |
specific_sources | A list of network source names. The source names can be of type string or none. (Der Standardwert ist None) | List |
Eigenschaften
Eigenschaft | Erläuterung | Datentyp |
attached (Schreibgeschützt) | Indicates whether the evaluator is attached to a network. | Boolean |
attribute (Schreibgeschützt) | The network attribute that the custom evaluator applies to. | Attribute |
attributeName (Schreibgeschützt) | The network attribute name that the custom evaluator applies to. | String |
networkQuery (Schreibgeschützt) | The network query object for the network that the attribute evaluator is attached to. | NetworkQuery |
sourceNames (Schreibgeschützt) | The list of network source names that the custom evaluator applies to. The list is comprised of string types. | String |
Methodenübersicht
Methode | Erläuterung |
attach (network_query) | Indicates whether the custom evaluator will be applied to the network, such as checking whether the required attributes exist. This method is invoked when a custom evaluator is attached to the network dataset. Hinweis:The method may be invoked multiple times depending on the number of threads accessing the network. |
refresh () | Manages the state of a custom evaluator object. The method can be used to refresh an evaluator's state, such as re-reading specific resources or refreshing object-specific caches. This method is automatically invoked before each solve is run. |
edgeValue (edge) | The final evaluated attribute value for an edge. Custom logic can be applied in this method to determine the final attribute value. The method is invoked at the end of the solver's evaluation of the edge. |
edgeValueAtTime (edge, time, time_usage) | The final evaluated attribute value for an edge when time is used. Custom logic can be applied in this method to determine the final attribute value. The method is invoked at the end of the solver's evaluation of the edge when time has been used (for evaluators that support time). |
junctionValue (junction) | The final evaluated attribute value for a junction. Custom logic can be applied in this method to determine the final attribute value. This method is invoked at the end of the solver's evaluation of the junction. |
junctionValueAtTime (junction, time, time_usage) | The final evaluated attribute value for a junction when time is used. Custom logic can be applied in this method to determine the final attribute value. The method is invoked at the end of the solver's evaluation of the junction when time has been used (for evaluators that support time). |
turnValue (turn) | The final evaluated attribute value for a turn. Custom logic can be applied in this method to determine the final attribute value. The method is invoked at the end of the solver's evaluation of the turn. |
turnValueAtTime (turn, time, time_usage) | The final evaluated attribute value for a turn when time is used. Custom logic can be applied in this method to determine the final attribute value. The method is invoked at the end of the solver's evaluation of the turn when time has been used (for evaluators that support time). |
Methoden
attach (network_query)
Parameter | Erläuterung | Datentyp |
network_query | The network query instance for the current network dataset. | NetworkQuery |
Datentyp | Erläuterung |
Boolean | True, if the network has the specified attribute. |
refresh ()
edgeValue (edge)
Parameter | Erläuterung | Datentyp |
edge | The edge being evaluated. | Edge |
Datentyp | Erläuterung |
Object | The attribute value. This can be an integer, a float or, a boolean. |
edgeValueAtTime (edge, time, time_usage)
Parameter | Erläuterung | Datentyp |
edge | The edge being evaluated. | Edge |
time | The time the edge will be encountered along the route. | DateTime |
time_usage | The time usage type. | NetworkTimeUsage |
Datentyp | Erläuterung |
Object | The attribute value. This can be an integer, a float or, a boolean value. |
junctionValue (junction)
Parameter | Erläuterung | Datentyp |
junction | The junction being evaluated. | Junction |
Datentyp | Erläuterung |
Object | The attribute value. This can be an integer, a float, or a boolean value. |
junctionValueAtTime (junction, time, time_usage)
Parameter | Erläuterung | Datentyp |
junction | The junction being evaluated. | Junction |
time | The time the junction will be encountered along the route. | DateTime |
time_usage | The time usage type. | NetworkTimeUsage |
Datentyp | Erläuterung |
Object | The attribute value. This can be an integer, a float, or a boolean value. |
turnValue (turn)
Parameter | Erläuterung | Datentyp |
turn | The turn being evaluated. | Turn |
Datentyp | Erläuterung |
Object | The attribute value. This can be an integer, a float, or a boolean value. |
turnValueAtTime (turn, time, time_usage)
Parameter | Erläuterung | Datentyp |
turn | The turn being evaluated. | Turn |
time | The time the turn will be encountered along the route. | DateTime |
time_usage | The time usage type. | NetworkTimeUsage |
Datentyp | Erläuterung |
Object | The attribute value. This can be an integer, a float, or a boolean value. |