#[non_exhaustive]pub struct OptimizeToursResponse {
pub routes: Vec<ShipmentRoute>,
pub request_label: String,
pub skipped_shipments: Vec<SkippedShipment>,
pub validation_errors: Vec<OptimizeToursValidationError>,
pub metrics: Option<Metrics>,
pub total_cost: f64,
/* private fields */
}Expand description
Response after solving a tour optimization problem containing the routes followed by each vehicle, the shipments which have been skipped and the overall cost of the solution.
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.routes: Vec<ShipmentRoute>Routes computed for each vehicle; the i-th route corresponds to the i-th vehicle in the model.
request_label: StringCopy of the OptimizeToursRequest.label, if a label was specified in the request.
skipped_shipments: Vec<SkippedShipment>The list of all shipments skipped.
validation_errors: Vec<OptimizeToursValidationError>List of all the validation errors that we were able to detect independently. See the “MULTIPLE ERRORS” explanation for the OptimizeToursValidationError message.
metrics: Option<Metrics>Duration, distance and usage metrics for this solution.
total_cost: f64Deprecated: Use Metrics.total_cost instead. Total cost of the solution. This takes into account all costs: costs per per hour and travel hour, fixed vehicle costs, unperformed shipment penalty costs, global duration cost, etc.
Implementations§
Source§impl OptimizeToursResponse
impl OptimizeToursResponse
pub fn new() -> Self
Sourcepub fn set_routes<T, V>(self, v: T) -> Self
pub fn set_routes<T, V>(self, v: T) -> Self
Sets the value of routes.
Sourcepub fn set_request_label<T: Into<String>>(self, v: T) -> Self
pub fn set_request_label<T: Into<String>>(self, v: T) -> Self
Sets the value of request_label.
Sourcepub fn set_skipped_shipments<T, V>(self, v: T) -> Self
pub fn set_skipped_shipments<T, V>(self, v: T) -> Self
Sets the value of skipped_shipments.
Sourcepub fn set_validation_errors<T, V>(self, v: T) -> Self
pub fn set_validation_errors<T, V>(self, v: T) -> Self
Sets the value of validation_errors.
Sourcepub fn set_metrics<T>(self, v: T) -> Self
pub fn set_metrics<T>(self, v: T) -> Self
Sets the value of metrics.
Sourcepub fn set_or_clear_metrics<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_metrics<T>(self, v: Option<T>) -> Self
Sets or clears the value of metrics.
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 OptimizeToursResponse
impl Clone for OptimizeToursResponse
Source§fn clone(&self) -> OptimizeToursResponse
fn clone(&self) -> OptimizeToursResponse
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more