#[non_exhaustive]pub struct AggregatedMetrics {
pub performed_shipment_count: i32,
pub travel_duration: Option<Duration>,
pub wait_duration: Option<Duration>,
pub delay_duration: Option<Duration>,
pub break_duration: Option<Duration>,
pub visit_duration: Option<Duration>,
pub total_duration: Option<Duration>,
pub travel_distance_meters: f64,
pub max_loads: HashMap<String, VehicleLoad>,
pub costs: HashMap<String, f64>,
pub total_cost: f64,
/* private fields */
}Expand description
Aggregated metrics for ShipmentRoute (resp. for OptimizeToursResponse over all Transition and/or Visit (resp. over all ShipmentRoute) elements.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.performed_shipment_count: i32Number of shipments performed. Note that a pickup and delivery pair only counts once.
travel_duration: Option<Duration>Total travel duration for a route or a solution.
wait_duration: Option<Duration>Total wait duration for a route or a solution.
delay_duration: Option<Duration>Total delay duration for a route or a solution.
break_duration: Option<Duration>Total break duration for a route or a solution.
visit_duration: Option<Duration>Total visit duration for a route or a solution.
total_duration: Option<Duration>The total duration should be equal to the sum of all durations above.
For routes, it also corresponds to:
ShipmentRoute.vehicle_end_time
-
ShipmentRoute.vehicle_start_time
travel_distance_meters: f64Total travel distance for a route or a solution.
max_loads: HashMap<String, VehicleLoad>Maximum load achieved over the entire route (resp. solution), for each of the quantities on this route (resp. solution), computed as the maximum over all Transition.vehicle_loads (resp. ShipmentRoute.metrics.max_loads.
costs: HashMap<String, f64>Deprecated: Use ShipmentRoute.route_costs and OptimizeToursResponse.Metrics.costs instead.
total_cost: f64Deprecated: Use ShipmentRoute.route_total_cost and OptimizeToursResponse.Metrics.total_cost instead.
Implementations§
Source§impl AggregatedMetrics
impl AggregatedMetrics
pub fn new() -> Self
Sourcepub fn set_performed_shipment_count<T: Into<i32>>(self, v: T) -> Self
pub fn set_performed_shipment_count<T: Into<i32>>(self, v: T) -> Self
Sets the value of performed_shipment_count.
Sourcepub fn set_travel_duration<T>(self, v: T) -> Self
pub fn set_travel_duration<T>(self, v: T) -> Self
Sets the value of travel_duration.
Sourcepub fn set_or_clear_travel_duration<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_travel_duration<T>(self, v: Option<T>) -> Self
Sets or clears the value of travel_duration.
Sourcepub fn set_wait_duration<T>(self, v: T) -> Self
pub fn set_wait_duration<T>(self, v: T) -> Self
Sets the value of wait_duration.
Sourcepub fn set_or_clear_wait_duration<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_wait_duration<T>(self, v: Option<T>) -> Self
Sets or clears the value of wait_duration.
Sourcepub fn set_delay_duration<T>(self, v: T) -> Self
pub fn set_delay_duration<T>(self, v: T) -> Self
Sets the value of delay_duration.
Sourcepub fn set_or_clear_delay_duration<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_delay_duration<T>(self, v: Option<T>) -> Self
Sets or clears the value of delay_duration.
Sourcepub fn set_break_duration<T>(self, v: T) -> Self
pub fn set_break_duration<T>(self, v: T) -> Self
Sets the value of break_duration.
Sourcepub fn set_or_clear_break_duration<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_break_duration<T>(self, v: Option<T>) -> Self
Sets or clears the value of break_duration.
Sourcepub fn set_visit_duration<T>(self, v: T) -> Self
pub fn set_visit_duration<T>(self, v: T) -> Self
Sets the value of visit_duration.
Sourcepub fn set_or_clear_visit_duration<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_visit_duration<T>(self, v: Option<T>) -> Self
Sets or clears the value of visit_duration.
Sourcepub fn set_total_duration<T>(self, v: T) -> Self
pub fn set_total_duration<T>(self, v: T) -> Self
Sets the value of total_duration.
Sourcepub fn set_or_clear_total_duration<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_total_duration<T>(self, v: Option<T>) -> Self
Sets or clears the value of total_duration.
Sourcepub fn set_travel_distance_meters<T: Into<f64>>(self, v: T) -> Self
pub fn set_travel_distance_meters<T: Into<f64>>(self, v: T) -> Self
Sets the value of travel_distance_meters.
Sourcepub fn set_max_loads<T, K, V>(self, v: T) -> Self
pub fn set_max_loads<T, K, V>(self, v: T) -> Self
Sets the value of max_loads.
Sourcepub fn set_total_cost<T: Into<f64>>(self, v: T) -> Self
👎Deprecated
pub fn set_total_cost<T: Into<f64>>(self, v: T) -> Self
Sets the value of total_cost.
Trait Implementations§
Source§impl Clone for AggregatedMetrics
impl Clone for AggregatedMetrics
Source§fn clone(&self) -> AggregatedMetrics
fn clone(&self) -> AggregatedMetrics
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more