Interface ShipmentModelOrBuilder (1.34.0)

public interface ShipmentModelOrBuilder extends MessageOrBuilder

Implements

MessageOrBuilder

Methods

getBreakRules(int index) (deprecated)

public abstract ShipmentModel.BreakRule getBreakRules(int index)

Deprecated: No longer used. Set of break rules used in the model. Each vehicle specifies the BreakRule that applies to it via the Vehicle.break_rule_indices field (which must be a singleton).

repeated .google.cloud.optimization.v1.ShipmentModel.BreakRule break_rules = 15 [deprecated = true];

Parameter
NameDescription
indexint
Returns
TypeDescription
ShipmentModel.BreakRule

getBreakRulesCount() (deprecated)

public abstract int getBreakRulesCount()

Deprecated: No longer used. Set of break rules used in the model. Each vehicle specifies the BreakRule that applies to it via the Vehicle.break_rule_indices field (which must be a singleton).

repeated .google.cloud.optimization.v1.ShipmentModel.BreakRule break_rules = 15 [deprecated = true];

Returns
TypeDescription
int

getBreakRulesList() (deprecated)

public abstract List<ShipmentModel.BreakRule> getBreakRulesList()

Deprecated: No longer used. Set of break rules used in the model. Each vehicle specifies the BreakRule that applies to it via the Vehicle.break_rule_indices field (which must be a singleton).

repeated .google.cloud.optimization.v1.ShipmentModel.BreakRule break_rules = 15 [deprecated = true];

Returns
TypeDescription
List<BreakRule>

getBreakRulesOrBuilder(int index) (deprecated)

public abstract ShipmentModel.BreakRuleOrBuilder getBreakRulesOrBuilder(int index)

Deprecated: No longer used. Set of break rules used in the model. Each vehicle specifies the BreakRule that applies to it via the Vehicle.break_rule_indices field (which must be a singleton).

repeated .google.cloud.optimization.v1.ShipmentModel.BreakRule break_rules = 15 [deprecated = true];

Parameter
NameDescription
indexint
Returns
TypeDescription
ShipmentModel.BreakRuleOrBuilder

getBreakRulesOrBuilderList() (deprecated)

public abstract List<? extends ShipmentModel.BreakRuleOrBuilder> getBreakRulesOrBuilderList()

Deprecated: No longer used. Set of break rules used in the model. Each vehicle specifies the BreakRule that applies to it via the Vehicle.break_rule_indices field (which must be a singleton).

repeated .google.cloud.optimization.v1.ShipmentModel.BreakRule break_rules = 15 [deprecated = true];

Returns
TypeDescription
List<? extends com.google.cloud.optimization.v1.ShipmentModel.BreakRuleOrBuilder>

getDurationDistanceMatrices(int index)

public abstract ShipmentModel.DurationDistanceMatrix getDurationDistanceMatrices(int index)

Specifies duration and distance matrices used in the model. If this field is empty, Google Maps or geodesic distances will be used instead, depending on the value of the use_geodesic_distances field. If it is not empty, use_geodesic_distances cannot be true and neither duration_distance_matrix_src_tags nor duration_distance_matrix_dst_tags can be empty.

Usage examples:

  • There are two locations: locA and locB.
  • 1 vehicle starting its route at locA and ending it at locA.
  • 1 pickup visit request at locB.

    ` model { vehicles { start_tags: "locA" end_tags: "locA" } shipments { pickups { tags: "locB" } } duration_distance_matrix_src_tags: "locA" duration_distance_matrix_src_tags: "locB" duration_distance_matrix_dst_tags: "locA" duration_distance_matrix_dst_tags: "locB" duration_distance_matrices { rows { # from: locA durations { seconds: 0 } meters: 0 # to: locA durations { seconds: 100 } meters: 1000 # to: locB } rows { # from: locB durations { seconds: 102 } meters: 990 # to: locA durations { seconds: 0 } meters: 0 # to: locB } } }

  • There are three locations: locA, locB and locC.

  • 1 vehicle starting its route at locA and ending it at locB, using matrix "fast".
  • 1 vehicle starting its route at locB and ending it at locB, using matrix "slow".
  • 1 vehicle starting its route at locB and ending it at locB, using matrix "fast".
  • 1 pickup visit request at locC.

    model { vehicles { start_tags: "locA" end_tags: "locB" start_tags: "fast" } vehicles { start_tags: "locB" end_tags: "locB" start_tags: "slow" } vehicles { start_tags: "locB" end_tags: "locB" start_tags: "fast" } shipments { pickups { tags: "locC" } } duration_distance_matrix_src_tags: "locA" duration_distance_matrix_src_tags: "locB" duration_distance_matrix_src_tags: "locC" duration_distance_matrix_dst_tags: "locB" duration_distance_matrix_dst_tags: "locC" duration_distance_matrices { vehicle_start_tag: "fast" rows { # from: locA durations { seconds: 1000 } meters: 2000 # to: locB durations { seconds: 600 } meters: 1000 # to: locC } rows { # from: locB durations { seconds: 0 } meters: 0 # to: locB durations { seconds: 700 } meters: 1200 # to: locC } rows { # from: locC durations { seconds: 702 } meters: 1190 # to: locB durations { seconds: 0 } meters: 0 # to: locC } } duration_distance_matrices { vehicle_start_tag: "slow" rows { # from: locA durations { seconds: 1800 } meters: 2001 # to: locB durations { seconds: 900 } meters: 1002 # to: locC } rows { # from: locB durations { seconds: 0 } meters: 0 # to: locB durations { seconds: 1000 } meters: 1202 # to: locC } rows { # from: locC durations { seconds: 1001 } meters: 1195 # to: locB durations { seconds: 0 } meters: 0 # to: locC } } } `

repeated .google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix duration_distance_matrices = 8;

Parameter
NameDescription
indexint
Returns
TypeDescription
ShipmentModel.DurationDistanceMatrix

getDurationDistanceMatricesCount()

public abstract int getDurationDistanceMatricesCount()

Specifies duration and distance matrices used in the model. If this field is empty, Google Maps or geodesic distances will be used instead, depending on the value of the use_geodesic_distances field. If it is not empty, use_geodesic_distances cannot be true and neither duration_distance_matrix_src_tags nor duration_distance_matrix_dst_tags can be empty.

Usage examples:

  • There are two locations: locA and locB.
  • 1 vehicle starting its route at locA and ending it at locA.
  • 1 pickup visit request at locB.

    ` model { vehicles { start_tags: "locA" end_tags: "locA" } shipments { pickups { tags: "locB" } } duration_distance_matrix_src_tags: "locA" duration_distance_matrix_src_tags: "locB" duration_distance_matrix_dst_tags: "locA" duration_distance_matrix_dst_tags: "locB" duration_distance_matrices { rows { # from: locA durations { seconds: 0 } meters: 0 # to: locA durations { seconds: 100 } meters: 1000 # to: locB } rows { # from: locB durations { seconds: 102 } meters: 990 # to: locA durations { seconds: 0 } meters: 0 # to: locB } } }

  • There are three locations: locA, locB and locC.

  • 1 vehicle starting its route at locA and ending it at locB, using matrix "fast".
  • 1 vehicle starting its route at locB and ending it at locB, using matrix "slow".
  • 1 vehicle starting its route at locB and ending it at locB, using matrix "fast".
  • 1 pickup visit request at locC.

    model { vehicles { start_tags: "locA" end_tags: "locB" start_tags: "fast" } vehicles { start_tags: "locB" end_tags: "locB" start_tags: "slow" } vehicles { start_tags: "locB" end_tags: "locB" start_tags: "fast" } shipments { pickups { tags: "locC" } } duration_distance_matrix_src_tags: "locA" duration_distance_matrix_src_tags: "locB" duration_distance_matrix_src_tags: "locC" duration_distance_matrix_dst_tags: "locB" duration_distance_matrix_dst_tags: "locC" duration_distance_matrices { vehicle_start_tag: "fast" rows { # from: locA durations { seconds: 1000 } meters: 2000 # to: locB durations { seconds: 600 } meters: 1000 # to: locC } rows { # from: locB durations { seconds: 0 } meters: 0 # to: locB durations { seconds: 700 } meters: 1200 # to: locC } rows { # from: locC durations { seconds: 702 } meters: 1190 # to: locB durations { seconds: 0 } meters: 0 # to: locC } } duration_distance_matrices { vehicle_start_tag: "slow" rows { # from: locA durations { seconds: 1800 } meters: 2001 # to: locB durations { seconds: 900 } meters: 1002 # to: locC } rows { # from: locB durations { seconds: 0 } meters: 0 # to: locB durations { seconds: 1000 } meters: 1202 # to: locC } rows { # from: locC durations { seconds: 1001 } meters: 1195 # to: locB durations { seconds: 0 } meters: 0 # to: locC } } } `

repeated .google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix duration_distance_matrices = 8;

Returns
TypeDescription
int

getDurationDistanceMatricesList()

public abstract List<ShipmentModel.DurationDistanceMatrix> getDurationDistanceMatricesList()

Specifies duration and distance matrices used in the model. If this field is empty, Google Maps or geodesic distances will be used instead, depending on the value of the use_geodesic_distances field. If it is not empty, use_geodesic_distances cannot be true and neither duration_distance_matrix_src_tags nor duration_distance_matrix_dst_tags can be empty.

Usage examples:

  • There are two locations: locA and locB.
  • 1 vehicle starting its route at locA and ending it at locA.
  • 1 pickup visit request at locB.

    ` model { vehicles { start_tags: "locA" end_tags: "locA" } shipments { pickups { tags: "locB" } } duration_distance_matrix_src_tags: "locA" duration_distance_matrix_src_tags: "locB" duration_distance_matrix_dst_tags: "locA" duration_distance_matrix_dst_tags: "locB" duration_distance_matrices { rows { # from: locA durations { seconds: 0 } meters: 0 # to: locA durations { seconds: 100 } meters: 1000 # to: locB } rows { # from: locB durations { seconds: 102 } meters: 990 # to: locA durations { seconds: 0 } meters: 0 # to: locB } } }

  • There are three locations: locA, locB and locC.

  • 1 vehicle starting its route at locA and ending it at locB, using matrix "fast".
  • 1 vehicle starting its route at locB and ending it at locB, using matrix "slow".
  • 1 vehicle starting its route at locB and ending it at locB, using matrix "fast".
  • 1 pickup visit request at locC.

    model { vehicles { start_tags: "locA" end_tags: "locB" start_tags: "fast" } vehicles { start_tags: "locB" end_tags: "locB" start_tags: "slow" } vehicles { start_tags: "locB" end_tags: "locB" start_tags: "fast" } shipments { pickups { tags: "locC" } } duration_distance_matrix_src_tags: "locA" duration_distance_matrix_src_tags: "locB" duration_distance_matrix_src_tags: "locC" duration_distance_matrix_dst_tags: "locB" duration_distance_matrix_dst_tags: "locC" duration_distance_matrices { vehicle_start_tag: "fast" rows { # from: locA durations { seconds: 1000 } meters: 2000 # to: locB durations { seconds: 600 } meters: 1000 # to: locC } rows { # from: locB durations { seconds: 0 } meters: 0 # to: locB durations { seconds: 700 } meters: 1200 # to: locC } rows { # from: locC durations { seconds: 702 } meters: 1190 # to: locB durations { seconds: 0 } meters: 0 # to: locC } } duration_distance_matrices { vehicle_start_tag: "slow" rows { # from: locA durations { seconds: 1800 } meters: 2001 # to: locB durations { seconds: 900 } meters: 1002 # to: locC } rows { # from: locB durations { seconds: 0 } meters: 0 # to: locB durations { seconds: 1000 } meters: 1202 # to: locC } rows { # from: locC durations { seconds: 1001 } meters: 1195 # to: locB durations { seconds: 0 } meters: 0 # to: locC } } } `

repeated .google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix duration_distance_matrices = 8;

Returns
TypeDescription
List<DurationDistanceMatrix>

getDurationDistanceMatricesOrBuilder(int index)

public abstract ShipmentModel.DurationDistanceMatrixOrBuilder getDurationDistanceMatricesOrBuilder(int index)

Specifies duration and distance matrices used in the model. If this field is empty, Google Maps or geodesic distances will be used instead, depending on the value of the use_geodesic_distances field. If it is not empty, use_geodesic_distances cannot be true and neither duration_distance_matrix_src_tags nor duration_distance_matrix_dst_tags can be empty.

Usage examples:

  • There are two locations: locA and locB.
  • 1 vehicle starting its route at locA and ending it at locA.
  • 1 pickup visit request at locB.

    ` model { vehicles { start_tags: "locA" end_tags: "locA" } shipments { pickups { tags: "locB" } } duration_distance_matrix_src_tags: "locA" duration_distance_matrix_src_tags: "locB" duration_distance_matrix_dst_tags: "locA" duration_distance_matrix_dst_tags: "locB" duration_distance_matrices { rows { # from: locA durations { seconds: 0 } meters: 0 # to: locA durations { seconds: 100 } meters: 1000 # to: locB } rows { # from: locB durations { seconds: 102 } meters: 990 # to: locA durations { seconds: 0 } meters: 0 # to: locB } } }

  • There are three locations: locA, locB and locC.

  • 1 vehicle starting its route at locA and ending it at locB, using matrix "fast".
  • 1 vehicle starting its route at locB and ending it at locB, using matrix "slow".
  • 1 vehicle starting its route at locB and ending it at locB, using matrix "fast".
  • 1 pickup visit request at locC.

    model { vehicles { start_tags: "locA" end_tags: "locB" start_tags: "fast" } vehicles { start_tags: "locB" end_tags: "locB" start_tags: "slow" } vehicles { start_tags: "locB" end_tags: "locB" start_tags: "fast" } shipments { pickups { tags: "locC" } } duration_distance_matrix_src_tags: "locA" duration_distance_matrix_src_tags: "locB" duration_distance_matrix_src_tags: "locC" duration_distance_matrix_dst_tags: "locB" duration_distance_matrix_dst_tags: "locC" duration_distance_matrices { vehicle_start_tag: "fast" rows { # from: locA durations { seconds: 1000 } meters: 2000 # to: locB durations { seconds: 600 } meters: 1000 # to: locC } rows { # from: locB durations { seconds: 0 } meters: 0 # to: locB durations { seconds: 700 } meters: 1200 # to: locC } rows { # from: locC durations { seconds: 702 } meters: 1190 # to: locB durations { seconds: 0 } meters: 0 # to: locC } } duration_distance_matrices { vehicle_start_tag: "slow" rows { # from: locA durations { seconds: 1800 } meters: 2001 # to: locB durations { seconds: 900 } meters: 1002 # to: locC } rows { # from: locB durations { seconds: 0 } meters: 0 # to: locB durations { seconds: 1000 } meters: 1202 # to: locC } rows { # from: locC durations { seconds: 1001 } meters: 1195 # to: locB durations { seconds: 0 } meters: 0 # to: locC } } } `

repeated .google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix duration_distance_matrices = 8;

Parameter
NameDescription
indexint
Returns
TypeDescription
ShipmentModel.DurationDistanceMatrixOrBuilder

getDurationDistanceMatricesOrBuilderList()

public abstract List<? extends ShipmentModel.DurationDistanceMatrixOrBuilder> getDurationDistanceMatricesOrBuilderList()

Specifies duration and distance matrices used in the model. If this field is empty, Google Maps or geodesic distances will be used instead, depending on the value of the use_geodesic_distances field. If it is not empty, use_geodesic_distances cannot be true and neither duration_distance_matrix_src_tags nor duration_distance_matrix_dst_tags can be empty.

Usage examples:

  • There are two locations: locA and locB.
  • 1 vehicle starting its route at locA and ending it at locA.
  • 1 pickup visit request at locB.

    ` model { vehicles { start_tags: "locA" end_tags: "locA" } shipments { pickups { tags: "locB" } } duration_distance_matrix_src_tags: "locA" duration_distance_matrix_src_tags: "locB" duration_distance_matrix_dst_tags: "locA" duration_distance_matrix_dst_tags: "locB" duration_distance_matrices { rows { # from: locA durations { seconds: 0 } meters: 0 # to: locA durations { seconds: 100 } meters: 1000 # to: locB } rows { # from: locB durations { seconds: 102 } meters: 990 # to: locA durations { seconds: 0 } meters: 0 # to: locB } } }

  • There are three locations: locA, locB and locC.

  • 1 vehicle starting its route at locA and ending it at locB, using matrix "fast".
  • 1 vehicle starting its route at locB and ending it at locB, using matrix "slow".
  • 1 vehicle starting its route at locB and ending it at locB, using matrix "fast".
  • 1 pickup visit request at locC.

    model { vehicles { start_tags: "locA" end_tags: "locB" start_tags: "fast" } vehicles { start_tags: "locB" end_tags: "locB" start_tags: "slow" } vehicles { start_tags: "locB" end_tags: "locB" start_tags: "fast" } shipments { pickups { tags: "locC" } } duration_distance_matrix_src_tags: "locA" duration_distance_matrix_src_tags: "locB" duration_distance_matrix_src_tags: "locC" duration_distance_matrix_dst_tags: "locB" duration_distance_matrix_dst_tags: "locC" duration_distance_matrices { vehicle_start_tag: "fast" rows { # from: locA durations { seconds: 1000 } meters: 2000 # to: locB durations { seconds: 600 } meters: 1000 # to: locC } rows { # from: locB durations { seconds: 0 } meters: 0 # to: locB durations { seconds: 700 } meters: 1200 # to: locC } rows { # from: locC durations { seconds: 702 } meters: 1190 # to: locB durations { seconds: 0 } meters: 0 # to: locC } } duration_distance_matrices { vehicle_start_tag: "slow" rows { # from: locA durations { seconds: 1800 } meters: 2001 # to: locB durations { seconds: 900 } meters: 1002 # to: locC } rows { # from: locB durations { seconds: 0 } meters: 0 # to: locB durations { seconds: 1000 } meters: 1202 # to: locC } rows { # from: locC durations { seconds: 1001 } meters: 1195 # to: locB durations { seconds: 0 } meters: 0 # to: locC } } } `

repeated .google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix duration_distance_matrices = 8;

Returns
TypeDescription
List<? extends com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrixOrBuilder>

getDurationDistanceMatrixDstTags(int index)

public abstract String getDurationDistanceMatrixDstTags(int index)

Tags defining the destinations of the duration and distance matrices; duration_distance_matrices(i).rows(j).durations(k) (resp. duration_distance_matrices(i).rows(j).meters(k)) defines the duration (resp. the distance) of the travel from visits with tag duration_distance_matrix_src_tags(j) to visits with tag duration_distance_matrix_dst_tags(k) in matrix i.

Tags correspond to VisitRequest.tags or Vehicle.start_tags. A given VisitRequest or Vehicle must match exactly one tag in this field. Note that a Vehicle's source, destination and matrix tags may be the same; similarly a VisitRequest's source and destination tags may be the same. All tags must be different and cannot be empty strings. If this field is not empty, then duration_distance_matrices must not be empty.

repeated string duration_distance_matrix_dst_tags = 10;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The durationDistanceMatrixDstTags at the given index.

getDurationDistanceMatrixDstTagsBytes(int index)

public abstract ByteString getDurationDistanceMatrixDstTagsBytes(int index)

Tags defining the destinations of the duration and distance matrices; duration_distance_matrices(i).rows(j).durations(k) (resp. duration_distance_matrices(i).rows(j).meters(k)) defines the duration (resp. the distance) of the travel from visits with tag duration_distance_matrix_src_tags(j) to visits with tag duration_distance_matrix_dst_tags(k) in matrix i.

Tags correspond to VisitRequest.tags or Vehicle.start_tags. A given VisitRequest or Vehicle must match exactly one tag in this field. Note that a Vehicle's source, destination and matrix tags may be the same; similarly a VisitRequest's source and destination tags may be the same. All tags must be different and cannot be empty strings. If this field is not empty, then duration_distance_matrices must not be empty.

repeated string duration_distance_matrix_dst_tags = 10;

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the durationDistanceMatrixDstTags at the given index.

getDurationDistanceMatrixDstTagsCount()

public abstract int getDurationDistanceMatrixDstTagsCount()

Tags defining the destinations of the duration and distance matrices; duration_distance_matrices(i).rows(j).durations(k) (resp. duration_distance_matrices(i).rows(j).meters(k)) defines the duration (resp. the distance) of the travel from visits with tag duration_distance_matrix_src_tags(j) to visits with tag duration_distance_matrix_dst_tags(k) in matrix i.

Tags correspond to VisitRequest.tags or Vehicle.start_tags. A given VisitRequest or Vehicle must match exactly one tag in this field. Note that a Vehicle's source, destination and matrix tags may be the same; similarly a VisitRequest's source and destination tags may be the same. All tags must be different and cannot be empty strings. If this field is not empty, then duration_distance_matrices must not be empty.

repeated string duration_distance_matrix_dst_tags = 10;

Returns
TypeDescription
int

The count of durationDistanceMatrixDstTags.

getDurationDistanceMatrixDstTagsList()

public abstract List<String> getDurationDistanceMatrixDstTagsList()

Tags defining the destinations of the duration and distance matrices; duration_distance_matrices(i).rows(j).durations(k) (resp. duration_distance_matrices(i).rows(j).meters(k)) defines the duration (resp. the distance) of the travel from visits with tag duration_distance_matrix_src_tags(j) to visits with tag duration_distance_matrix_dst_tags(k) in matrix i.

Tags correspond to VisitRequest.tags or Vehicle.start_tags. A given VisitRequest or Vehicle must match exactly one tag in this field. Note that a Vehicle's source, destination and matrix tags may be the same; similarly a VisitRequest's source and destination tags may be the same. All tags must be different and cannot be empty strings. If this field is not empty, then duration_distance_matrices must not be empty.

repeated string duration_distance_matrix_dst_tags = 10;

Returns
TypeDescription
List<String>

A list containing the durationDistanceMatrixDstTags.

getDurationDistanceMatrixSrcTags(int index)

public abstract String getDurationDistanceMatrixSrcTags(int index)

Tags defining the sources of the duration and distance matrices; duration_distance_matrices(i).rows(j) defines durations and distances from visits with tag duration_distance_matrix_src_tags(j) to other visits in matrix i.

Tags correspond to VisitRequest.tags or Vehicle.start_tags. A given VisitRequest or Vehicle must match exactly one tag in this field. Note that a Vehicle's source, destination and matrix tags may be the same; similarly a VisitRequest's source and destination tags may be the same. All tags must be different and cannot be empty strings. If this field is not empty, then duration_distance_matrices must not be empty.

repeated string duration_distance_matrix_src_tags = 9;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The durationDistanceMatrixSrcTags at the given index.

getDurationDistanceMatrixSrcTagsBytes(int index)

public abstract ByteString getDurationDistanceMatrixSrcTagsBytes(int index)

Tags defining the sources of the duration and distance matrices; duration_distance_matrices(i).rows(j) defines durations and distances from visits with tag duration_distance_matrix_src_tags(j) to other visits in matrix i.

Tags correspond to VisitRequest.tags or Vehicle.start_tags. A given VisitRequest or Vehicle must match exactly one tag in this field. Note that a Vehicle's source, destination and matrix tags may be the same; similarly a VisitRequest's source and destination tags may be the same. All tags must be different and cannot be empty strings. If this field is not empty, then duration_distance_matrices must not be empty.

repeated string duration_distance_matrix_src_tags = 9;

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the durationDistanceMatrixSrcTags at the given index.

getDurationDistanceMatrixSrcTagsCount()

public abstract int getDurationDistanceMatrixSrcTagsCount()

Tags defining the sources of the duration and distance matrices; duration_distance_matrices(i).rows(j) defines durations and distances from visits with tag duration_distance_matrix_src_tags(j) to other visits in matrix i.

Tags correspond to VisitRequest.tags or Vehicle.start_tags. A given VisitRequest or Vehicle must match exactly one tag in this field. Note that a Vehicle's source, destination and matrix tags may be the same; similarly a VisitRequest's source and destination tags may be the same. All tags must be different and cannot be empty strings. If this field is not empty, then duration_distance_matrices must not be empty.

repeated string duration_distance_matrix_src_tags = 9;

Returns
TypeDescription
int

The count of durationDistanceMatrixSrcTags.

getDurationDistanceMatrixSrcTagsList()

public abstract List<String> getDurationDistanceMatrixSrcTagsList()

Tags defining the sources of the duration and distance matrices; duration_distance_matrices(i).rows(j) defines durations and distances from visits with tag duration_distance_matrix_src_tags(j) to other visits in matrix i.

Tags correspond to VisitRequest.tags or Vehicle.start_tags. A given VisitRequest or Vehicle must match exactly one tag in this field. Note that a Vehicle's source, destination and matrix tags may be the same; similarly a VisitRequest's source and destination tags may be the same. All tags must be different and cannot be empty strings. If this field is not empty, then duration_distance_matrices must not be empty.

repeated string duration_distance_matrix_src_tags = 9;

Returns
TypeDescription
List<String>

A list containing the durationDistanceMatrixSrcTags.

getGlobalDurationCostPerHour()

public abstract double getGlobalDurationCostPerHour()

The "global duration" of the overall plan is the difference between the earliest effective start time and the latest effective end time of all vehicles. Users can assign a cost per hour to that quantity to try and optimize for earliest job completion, for example. This cost must be in the same unit as Shipment.penalty_cost.

double global_duration_cost_per_hour = 7;

Returns
TypeDescription
double

The globalDurationCostPerHour.

getGlobalEndTime()

public abstract Timestamp getGlobalEndTime()

If unset, 00:00:00 UTC, January 1, 1971 (i.e. seconds: 31536000, nanos: 0) is used as default.

.google.protobuf.Timestamp global_end_time = 6;

Returns
TypeDescription
Timestamp

The globalEndTime.

getGlobalEndTimeOrBuilder()

public abstract TimestampOrBuilder getGlobalEndTimeOrBuilder()

If unset, 00:00:00 UTC, January 1, 1971 (i.e. seconds: 31536000, nanos: 0) is used as default.

.google.protobuf.Timestamp global_end_time = 6;

Returns
TypeDescription
TimestampOrBuilder

getGlobalStartTime()

public abstract Timestamp getGlobalStartTime()

Global start and end time of the model: no times outside of this range can be considered valid.

The model's time span must be less than a year, i.e. the global_end_time and the global_start_time must be within 31536000 seconds of each other.

When using cost_per_*hour fields, you might want to set this window to a smaller interval to increase performance (eg. if you model a single day, you should set the global time limits to that day). If unset, 00:00:00 UTC, January 1, 1970 (i.e. seconds: 0, nanos: 0) is used as default.

.google.protobuf.Timestamp global_start_time = 5;

Returns
TypeDescription
Timestamp

The globalStartTime.

getGlobalStartTimeOrBuilder()

public abstract TimestampOrBuilder getGlobalStartTimeOrBuilder()

Global start and end time of the model: no times outside of this range can be considered valid.

The model's time span must be less than a year, i.e. the global_end_time and the global_start_time must be within 31536000 seconds of each other.

When using cost_per_*hour fields, you might want to set this window to a smaller interval to increase performance (eg. if you model a single day, you should set the global time limits to that day). If unset, 00:00:00 UTC, January 1, 1970 (i.e. seconds: 0, nanos: 0) is used as default.

.google.protobuf.Timestamp global_start_time = 5;

Returns
TypeDescription
TimestampOrBuilder

getMaxActiveVehicles()

public abstract int getMaxActiveVehicles()

Constrains the maximum number of active vehicles. A vehicle is active if its route performs at least one shipment. This can be used to limit the number of routes in the case where there are fewer drivers than vehicles and that the fleet of vehicles is heterogeneous. The optimization will then select the best subset of vehicles to use. Must be strictly positive.

optional int32 max_active_vehicles = 4;

Returns
TypeDescription
int

The maxActiveVehicles.

getPrecedenceRules(int index)

public abstract ShipmentModel.PrecedenceRule getPrecedenceRules(int index)

Set of precedence rules which must be enforced in the model.

repeated .google.cloud.optimization.v1.ShipmentModel.PrecedenceRule precedence_rules = 14;

Parameter
NameDescription
indexint
Returns
TypeDescription
ShipmentModel.PrecedenceRule

getPrecedenceRulesCount()

public abstract int getPrecedenceRulesCount()

Set of precedence rules which must be enforced in the model.

repeated .google.cloud.optimization.v1.ShipmentModel.PrecedenceRule precedence_rules = 14;

Returns
TypeDescription
int

getPrecedenceRulesList()

public abstract List<ShipmentModel.PrecedenceRule> getPrecedenceRulesList()

Set of precedence rules which must be enforced in the model.

repeated .google.cloud.optimization.v1.ShipmentModel.PrecedenceRule precedence_rules = 14;

Returns
TypeDescription
List<PrecedenceRule>

getPrecedenceRulesOrBuilder(int index)

public abstract ShipmentModel.PrecedenceRuleOrBuilder getPrecedenceRulesOrBuilder(int index)

Set of precedence rules which must be enforced in the model.

repeated .google.cloud.optimization.v1.ShipmentModel.PrecedenceRule precedence_rules = 14;

Parameter
NameDescription
indexint
Returns
TypeDescription
ShipmentModel.PrecedenceRuleOrBuilder

getPrecedenceRulesOrBuilderList()

public abstract List<? extends ShipmentModel.PrecedenceRuleOrBuilder> getPrecedenceRulesOrBuilderList()

Set of precedence rules which must be enforced in the model.

repeated .google.cloud.optimization.v1.ShipmentModel.PrecedenceRule precedence_rules = 14;

Returns
TypeDescription
List<? extends com.google.cloud.optimization.v1.ShipmentModel.PrecedenceRuleOrBuilder>

getShipmentTypeIncompatibilities(int index)

public abstract ShipmentTypeIncompatibility getShipmentTypeIncompatibilities(int index)

Sets of incompatible shipment_types (see ShipmentTypeIncompatibility).

repeated .google.cloud.optimization.v1.ShipmentTypeIncompatibility shipment_type_incompatibilities = 12;

Parameter
NameDescription
indexint
Returns
TypeDescription
ShipmentTypeIncompatibility

getShipmentTypeIncompatibilitiesCount()

public abstract int getShipmentTypeIncompatibilitiesCount()

Sets of incompatible shipment_types (see ShipmentTypeIncompatibility).

repeated .google.cloud.optimization.v1.ShipmentTypeIncompatibility shipment_type_incompatibilities = 12;

Returns
TypeDescription
int

getShipmentTypeIncompatibilitiesList()

public abstract List<ShipmentTypeIncompatibility> getShipmentTypeIncompatibilitiesList()

Sets of incompatible shipment_types (see ShipmentTypeIncompatibility).

repeated .google.cloud.optimization.v1.ShipmentTypeIncompatibility shipment_type_incompatibilities = 12;

Returns
TypeDescription
List<ShipmentTypeIncompatibility>

getShipmentTypeIncompatibilitiesOrBuilder(int index)

public abstract ShipmentTypeIncompatibilityOrBuilder getShipmentTypeIncompatibilitiesOrBuilder(int index)

Sets of incompatible shipment_types (see ShipmentTypeIncompatibility).

repeated .google.cloud.optimization.v1.ShipmentTypeIncompatibility shipment_type_incompatibilities = 12;

Parameter
NameDescription
indexint
Returns
TypeDescription
ShipmentTypeIncompatibilityOrBuilder

getShipmentTypeIncompatibilitiesOrBuilderList()

public abstract List<? extends ShipmentTypeIncompatibilityOrBuilder> getShipmentTypeIncompatibilitiesOrBuilderList()

Sets of incompatible shipment_types (see ShipmentTypeIncompatibility).

repeated .google.cloud.optimization.v1.ShipmentTypeIncompatibility shipment_type_incompatibilities = 12;

Returns
TypeDescription
List<? extends com.google.cloud.optimization.v1.ShipmentTypeIncompatibilityOrBuilder>

getShipmentTypeRequirements(int index)

public abstract ShipmentTypeRequirement getShipmentTypeRequirements(int index)

Sets of shipment_type requirements (see ShipmentTypeRequirement).

repeated .google.cloud.optimization.v1.ShipmentTypeRequirement shipment_type_requirements = 13;

Parameter
NameDescription
indexint
Returns
TypeDescription
ShipmentTypeRequirement

getShipmentTypeRequirementsCount()

public abstract int getShipmentTypeRequirementsCount()

Sets of shipment_type requirements (see ShipmentTypeRequirement).

repeated .google.cloud.optimization.v1.ShipmentTypeRequirement shipment_type_requirements = 13;

Returns
TypeDescription
int

getShipmentTypeRequirementsList()

public abstract List<ShipmentTypeRequirement> getShipmentTypeRequirementsList()

Sets of shipment_type requirements (see ShipmentTypeRequirement).

repeated .google.cloud.optimization.v1.ShipmentTypeRequirement shipment_type_requirements = 13;

Returns
TypeDescription
List<ShipmentTypeRequirement>

getShipmentTypeRequirementsOrBuilder(int index)

public abstract ShipmentTypeRequirementOrBuilder getShipmentTypeRequirementsOrBuilder(int index)

Sets of shipment_type requirements (see ShipmentTypeRequirement).

repeated .google.cloud.optimization.v1.ShipmentTypeRequirement shipment_type_requirements = 13;

Parameter
NameDescription
indexint
Returns
TypeDescription
ShipmentTypeRequirementOrBuilder

getShipmentTypeRequirementsOrBuilderList()

public abstract List<? extends ShipmentTypeRequirementOrBuilder> getShipmentTypeRequirementsOrBuilderList()

Sets of shipment_type requirements (see ShipmentTypeRequirement).

repeated .google.cloud.optimization.v1.ShipmentTypeRequirement shipment_type_requirements = 13;

Returns
TypeDescription
List<? extends com.google.cloud.optimization.v1.ShipmentTypeRequirementOrBuilder>

getShipments(int index)

public abstract Shipment getShipments(int index)

Set of shipments which must be performed in the model.

repeated .google.cloud.optimization.v1.Shipment shipments = 1;

Parameter
NameDescription
indexint
Returns
TypeDescription
Shipment

getShipmentsCount()

public abstract int getShipmentsCount()

Set of shipments which must be performed in the model.

repeated .google.cloud.optimization.v1.Shipment shipments = 1;

Returns
TypeDescription
int

getShipmentsList()

public abstract List<Shipment> getShipmentsList()

Set of shipments which must be performed in the model.

repeated .google.cloud.optimization.v1.Shipment shipments = 1;

Returns
TypeDescription
List<Shipment>

getShipmentsOrBuilder(int index)

public abstract ShipmentOrBuilder getShipmentsOrBuilder(int index)

Set of shipments which must be performed in the model.

repeated .google.cloud.optimization.v1.Shipment shipments = 1;

Parameter
NameDescription
indexint
Returns
TypeDescription
ShipmentOrBuilder

getShipmentsOrBuilderList()

public abstract List<? extends ShipmentOrBuilder> getShipmentsOrBuilderList()

Set of shipments which must be performed in the model.

repeated .google.cloud.optimization.v1.Shipment shipments = 1;

Returns
TypeDescription
List<? extends com.google.cloud.optimization.v1.ShipmentOrBuilder>

getTransitionAttributes(int index)

public abstract TransitionAttributes getTransitionAttributes(int index)

Transition attributes added to the model.

repeated .google.cloud.optimization.v1.TransitionAttributes transition_attributes = 11;

Parameter
NameDescription
indexint
Returns
TypeDescription
TransitionAttributes

getTransitionAttributesCount()

public abstract int getTransitionAttributesCount()

Transition attributes added to the model.

repeated .google.cloud.optimization.v1.TransitionAttributes transition_attributes = 11;

Returns
TypeDescription
int

getTransitionAttributesList()

public abstract List<TransitionAttributes> getTransitionAttributesList()

Transition attributes added to the model.

repeated .google.cloud.optimization.v1.TransitionAttributes transition_attributes = 11;

Returns
TypeDescription
List<TransitionAttributes>

getTransitionAttributesOrBuilder(int index)

public abstract TransitionAttributesOrBuilder getTransitionAttributesOrBuilder(int index)

Transition attributes added to the model.

repeated .google.cloud.optimization.v1.TransitionAttributes transition_attributes = 11;

Parameter
NameDescription
indexint
Returns
TypeDescription
TransitionAttributesOrBuilder

getTransitionAttributesOrBuilderList()

public abstract List<? extends TransitionAttributesOrBuilder> getTransitionAttributesOrBuilderList()

Transition attributes added to the model.

repeated .google.cloud.optimization.v1.TransitionAttributes transition_attributes = 11;

Returns
TypeDescription
List<? extends com.google.cloud.optimization.v1.TransitionAttributesOrBuilder>

getVehicles(int index)

public abstract Vehicle getVehicles(int index)

Set of vehicles which can be used to perform visits.

repeated .google.cloud.optimization.v1.Vehicle vehicles = 2;

Parameter
NameDescription
indexint
Returns
TypeDescription
Vehicle

getVehiclesCount()

public abstract int getVehiclesCount()

Set of vehicles which can be used to perform visits.

repeated .google.cloud.optimization.v1.Vehicle vehicles = 2;

Returns
TypeDescription
int

getVehiclesList()

public abstract List<Vehicle> getVehiclesList()

Set of vehicles which can be used to perform visits.

repeated .google.cloud.optimization.v1.Vehicle vehicles = 2;

Returns
TypeDescription
List<Vehicle>

getVehiclesOrBuilder(int index)

public abstract VehicleOrBuilder getVehiclesOrBuilder(int index)

Set of vehicles which can be used to perform visits.

repeated .google.cloud.optimization.v1.Vehicle vehicles = 2;

Parameter
NameDescription
indexint
Returns
TypeDescription
VehicleOrBuilder

getVehiclesOrBuilderList()

public abstract List<? extends VehicleOrBuilder> getVehiclesOrBuilderList()

Set of vehicles which can be used to perform visits.

repeated .google.cloud.optimization.v1.Vehicle vehicles = 2;

Returns
TypeDescription
List<? extends com.google.cloud.optimization.v1.VehicleOrBuilder>

hasGlobalEndTime()

public abstract boolean hasGlobalEndTime()

If unset, 00:00:00 UTC, January 1, 1971 (i.e. seconds: 31536000, nanos: 0) is used as default.

.google.protobuf.Timestamp global_end_time = 6;

Returns
TypeDescription
boolean

Whether the globalEndTime field is set.

hasGlobalStartTime()

public abstract boolean hasGlobalStartTime()

Global start and end time of the model: no times outside of this range can be considered valid.

The model's time span must be less than a year, i.e. the global_end_time and the global_start_time must be within 31536000 seconds of each other.

When using cost_per_*hour fields, you might want to set this window to a smaller interval to increase performance (eg. if you model a single day, you should set the global time limits to that day). If unset, 00:00:00 UTC, January 1, 1970 (i.e. seconds: 0, nanos: 0) is used as default.

.google.protobuf.Timestamp global_start_time = 5;

Returns
TypeDescription
boolean

Whether the globalStartTime field is set.

hasMaxActiveVehicles()

public abstract boolean hasMaxActiveVehicles()

Constrains the maximum number of active vehicles. A vehicle is active if its route performs at least one shipment. This can be used to limit the number of routes in the case where there are fewer drivers than vehicles and that the fleet of vehicles is heterogeneous. The optimization will then select the best subset of vehicles to use. Must be strictly positive.

optional int32 max_active_vehicles = 4;

Returns
TypeDescription
boolean

Whether the maxActiveVehicles field is set.