Reference documentation and code samples for the Cloud Optimization V1 API class Google::Cloud::Optimization::V1::ShipmentModel::DurationDistanceMatrix.
Specifies a duration and distance matrix from visit and vehicle start
locations to visit and vehicle end locations.
(::String) — Tag defining to which vehicles this duration and distance matrix applies.
If empty, this applies to all vehicles, and there can only be a single
matrix.
Each vehicle start must match exactly one matrix, i.e. exactly one of
their start_tags field must match the vehicle_start_tag of a matrix
(and of that matrix only).
All matrices must have a different vehicle_start_tag.
#vehicle_start_tag=
defvehicle_start_tag=(value)->::String
Parameter
value (::String) — Tag defining to which vehicles this duration and distance matrix applies.
If empty, this applies to all vehicles, and there can only be a single
matrix.
Each vehicle start must match exactly one matrix, i.e. exactly one of
their start_tags field must match the vehicle_start_tag of a matrix
(and of that matrix only).
All matrices must have a different vehicle_start_tag.
Returns
(::String) — Tag defining to which vehicles this duration and distance matrix applies.
If empty, this applies to all vehicles, and there can only be a single
matrix.
Each vehicle start must match exactly one matrix, i.e. exactly one of
their start_tags field must match the vehicle_start_tag of a matrix
(and of that matrix only).
All matrices must have a different vehicle_start_tag.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-09 UTC."],[],[],null,["# Cloud Optimization V1 API - Class Google::Cloud::Optimization::V1::ShipmentModel::DurationDistanceMatrix (v0.12.0)\n\nVersion latestkeyboard_arrow_down\n\n- [0.12.0 (latest)](/ruby/docs/reference/google-cloud-optimization-v1/latest/Google-Cloud-Optimization-V1-ShipmentModel-DurationDistanceMatrix)\n- [0.11.1](/ruby/docs/reference/google-cloud-optimization-v1/0.11.1/Google-Cloud-Optimization-V1-ShipmentModel-DurationDistanceMatrix)\n- [0.10.0](/ruby/docs/reference/google-cloud-optimization-v1/0.10.0/Google-Cloud-Optimization-V1-ShipmentModel-DurationDistanceMatrix)\n- [0.9.2](/ruby/docs/reference/google-cloud-optimization-v1/0.9.2/Google-Cloud-Optimization-V1-ShipmentModel-DurationDistanceMatrix)\n- [0.8.2](/ruby/docs/reference/google-cloud-optimization-v1/0.8.2/Google-Cloud-Optimization-V1-ShipmentModel-DurationDistanceMatrix)\n- [0.7.0](/ruby/docs/reference/google-cloud-optimization-v1/0.7.0/Google-Cloud-Optimization-V1-ShipmentModel-DurationDistanceMatrix)\n- [0.6.0](/ruby/docs/reference/google-cloud-optimization-v1/0.6.0/Google-Cloud-Optimization-V1-ShipmentModel-DurationDistanceMatrix)\n- [0.5.0](/ruby/docs/reference/google-cloud-optimization-v1/0.5.0/Google-Cloud-Optimization-V1-ShipmentModel-DurationDistanceMatrix)\n- [0.4.1](/ruby/docs/reference/google-cloud-optimization-v1/0.4.1/Google-Cloud-Optimization-V1-ShipmentModel-DurationDistanceMatrix)\n- [0.3.0](/ruby/docs/reference/google-cloud-optimization-v1/0.3.0/Google-Cloud-Optimization-V1-ShipmentModel-DurationDistanceMatrix)\n- [0.2.1](/ruby/docs/reference/google-cloud-optimization-v1/0.2.1/Google-Cloud-Optimization-V1-ShipmentModel-DurationDistanceMatrix)\n- [0.1.1](/ruby/docs/reference/google-cloud-optimization-v1/0.1.1/Google-Cloud-Optimization-V1-ShipmentModel-DurationDistanceMatrix) \nReference documentation and code samples for the Cloud Optimization V1 API class Google::Cloud::Optimization::V1::ShipmentModel::DurationDistanceMatrix.\n\nSpecifies a duration and distance matrix from visit and vehicle start\nlocations to visit and vehicle end locations. \n\nInherits\n--------\n\n- Object \n\nExtended By\n-----------\n\n- Google::Protobuf::MessageExts::ClassMethods \n\nIncludes\n--------\n\n- Google::Protobuf::MessageExts\n\nMethods\n-------\n\n### #rows\n\n def rows() -\u003e ::Array\u003c::Google::Cloud::Optimization::V1::ShipmentModel::DurationDistanceMatrix::Row\u003e\n\n**Returns**\n\n- (::Array\\\u003c[::Google::Cloud::Optimization::V1::ShipmentModel::DurationDistanceMatrix::Row](./Google-Cloud-Optimization-V1-ShipmentModel-DurationDistanceMatrix-Row)\\\u003e) --- Specifies the rows of the duration and distance matrix. It must have as many elements as [ShipmentModel.duration_distance_matrix_src_tags](/ruby/docs/reference/google-cloud-optimization-v1/latest/Google-Cloud-Optimization-V1-ShipmentModel#Google__Cloud__Optimization__V1__ShipmentModel_duration_distance_matrix_src_tags_instance_ \"Google::Cloud::Optimization::V1::ShipmentModel#duration_distance_matrix_src_tags (method)\").\n\n### #rows=\n\n def rows=(value) -\u003e ::Array\u003c::Google::Cloud::Optimization::V1::ShipmentModel::DurationDistanceMatrix::Row\u003e\n\n**Parameter**\n\n- **value** (::Array\\\u003c[::Google::Cloud::Optimization::V1::ShipmentModel::DurationDistanceMatrix::Row](./Google-Cloud-Optimization-V1-ShipmentModel-DurationDistanceMatrix-Row)\\\u003e) --- Specifies the rows of the duration and distance matrix. It must have as many elements as [ShipmentModel.duration_distance_matrix_src_tags](/ruby/docs/reference/google-cloud-optimization-v1/latest/Google-Cloud-Optimization-V1-ShipmentModel#Google__Cloud__Optimization__V1__ShipmentModel_duration_distance_matrix_src_tags_instance_ \"Google::Cloud::Optimization::V1::ShipmentModel#duration_distance_matrix_src_tags (method)\"). \n**Returns**\n\n- (::Array\\\u003c[::Google::Cloud::Optimization::V1::ShipmentModel::DurationDistanceMatrix::Row](./Google-Cloud-Optimization-V1-ShipmentModel-DurationDistanceMatrix-Row)\\\u003e) --- Specifies the rows of the duration and distance matrix. It must have as many elements as [ShipmentModel.duration_distance_matrix_src_tags](/ruby/docs/reference/google-cloud-optimization-v1/latest/Google-Cloud-Optimization-V1-ShipmentModel#Google__Cloud__Optimization__V1__ShipmentModel_duration_distance_matrix_src_tags_instance_ \"Google::Cloud::Optimization::V1::ShipmentModel#duration_distance_matrix_src_tags (method)\").\n\n### #vehicle_start_tag\n\n def vehicle_start_tag() -\u003e ::String\n\n**Returns**\n\n- (::String) --- Tag defining to which vehicles this duration and distance matrix applies. If empty, this applies to all vehicles, and there can only be a single matrix.\n\n Each vehicle start must match exactly one matrix, i.e. exactly one of\n their `start_tags` field must match the `vehicle_start_tag` of a matrix\n (and of that matrix only).\n\n All matrices must have a different `vehicle_start_tag`.\n\n### #vehicle_start_tag=\n\n def vehicle_start_tag=(value) -\u003e ::String\n\n**Parameter**\n\n- **value** (::String) --- Tag defining to which vehicles this duration and distance matrix applies. If empty, this applies to all vehicles, and there can only be a single matrix.\n\n\n Each vehicle start must match exactly one matrix, i.e. exactly one of\n their `start_tags` field must match the `vehicle_start_tag` of a matrix\n (and of that matrix only).\n\nAll matrices must have a different `vehicle_start_tag`. \n**Returns**\n\n- (::String) --- Tag defining to which vehicles this duration and distance matrix applies. If empty, this applies to all vehicles, and there can only be a single matrix.\n\n Each vehicle start must match exactly one matrix, i.e. exactly one of\n their `start_tags` field must match the `vehicle_start_tag` of a matrix\n (and of that matrix only).\n\n All matrices must have a different `vehicle_start_tag`."]]