Class ShipmentModel (1.53.0)
Stay organized with collections
Save and categorize content based on your preferences.
- 1.76.0 (latest)
- 1.74.0
- 1.73.0
- 1.72.0
- 1.71.0
- 1.70.0
- 1.68.0
- 1.66.0
- 1.65.0
- 1.62.0
- 1.61.0
- 1.60.0
- 1.58.0
- 1.57.0
- 1.56.0
- 1.55.0
- 1.54.0
- 1.53.0
- 1.52.0
- 1.51.0
- 1.50.0
- 1.49.0
- 1.47.0
- 1.46.0
- 1.45.0
- 1.44.0
- 1.43.0
- 1.42.0
- 1.41.0
- 1.40.0
- 1.39.0
- 1.38.0
- 1.37.0
- 1.35.0
- 1.34.0
- 1.33.0
- 1.32.0
- 1.31.0
- 1.30.0
- 1.29.0
- 1.28.0
- 1.27.0
- 1.26.0
- 1.25.0
- 1.22.0
- 1.21.0
- 1.20.0
- 1.19.0
- 1.18.0
- 1.17.0
- 1.16.0
- 1.15.0
- 1.14.0
- 1.13.0
- 1.12.0
- 1.11.0
- 1.10.0
- 1.9.0
- 1.7.0
- 1.6.0
- 1.5.0
- 1.4.0
- 1.3.0
- 1.2.0
- 1.1.14
- 0.1.2
publicfinalclass ShipmentModelextendsGeneratedMessageV3implementsShipmentModelOrBuilderA shipment model contains a set of shipments which must be performed by a set of vehicles, while minimizing the overall cost, which is the sum of:
- the cost of routing the vehicles (sum of cost per total time, cost per travel time, and fixed cost over all vehicles).
- the unperformed shipment penalties.
- the cost of the global duration of the shipments
Protobuf type google.cloud.optimization.v1.ShipmentModel
Inheritance
Object > AbstractMessageLite<MessageType,BuilderType> > AbstractMessage > GeneratedMessageV3 > ShipmentModelImplements
ShipmentModelOrBuilderInherited Members
Static Fields
BREAK_RULES_FIELD_NUMBER
publicstaticfinalintBREAK_RULES_FIELD_NUMBER| Field Value | |
|---|---|
| Type | Description |
int |
|
DURATION_DISTANCE_MATRICES_FIELD_NUMBER
publicstaticfinalintDURATION_DISTANCE_MATRICES_FIELD_NUMBER| Field Value | |
|---|---|
| Type | Description |
int |
|
DURATION_DISTANCE_MATRIX_DST_TAGS_FIELD_NUMBER
publicstaticfinalintDURATION_DISTANCE_MATRIX_DST_TAGS_FIELD_NUMBER| Field Value | |
|---|---|
| Type | Description |
int |
|
DURATION_DISTANCE_MATRIX_SRC_TAGS_FIELD_NUMBER
publicstaticfinalintDURATION_DISTANCE_MATRIX_SRC_TAGS_FIELD_NUMBER| Field Value | |
|---|---|
| Type | Description |
int |
|
GLOBAL_DURATION_COST_PER_HOUR_FIELD_NUMBER
publicstaticfinalintGLOBAL_DURATION_COST_PER_HOUR_FIELD_NUMBER| Field Value | |
|---|---|
| Type | Description |
int |
|
GLOBAL_END_TIME_FIELD_NUMBER
publicstaticfinalintGLOBAL_END_TIME_FIELD_NUMBER| Field Value | |
|---|---|
| Type | Description |
int |
|
GLOBAL_START_TIME_FIELD_NUMBER
publicstaticfinalintGLOBAL_START_TIME_FIELD_NUMBER| Field Value | |
|---|---|
| Type | Description |
int |
|
MAX_ACTIVE_VEHICLES_FIELD_NUMBER
publicstaticfinalintMAX_ACTIVE_VEHICLES_FIELD_NUMBER| Field Value | |
|---|---|
| Type | Description |
int |
|
PRECEDENCE_RULES_FIELD_NUMBER
publicstaticfinalintPRECEDENCE_RULES_FIELD_NUMBER| Field Value | |
|---|---|
| Type | Description |
int |
|
SHIPMENTS_FIELD_NUMBER
publicstaticfinalintSHIPMENTS_FIELD_NUMBER| Field Value | |
|---|---|
| Type | Description |
int |
|
SHIPMENT_TYPE_INCOMPATIBILITIES_FIELD_NUMBER
publicstaticfinalintSHIPMENT_TYPE_INCOMPATIBILITIES_FIELD_NUMBER| Field Value | |
|---|---|
| Type | Description |
int |
|
SHIPMENT_TYPE_REQUIREMENTS_FIELD_NUMBER
publicstaticfinalintSHIPMENT_TYPE_REQUIREMENTS_FIELD_NUMBER| Field Value | |
|---|---|
| Type | Description |
int |
|
TRANSITION_ATTRIBUTES_FIELD_NUMBER
publicstaticfinalintTRANSITION_ATTRIBUTES_FIELD_NUMBER| Field Value | |
|---|---|
| Type | Description |
int |
|
VEHICLES_FIELD_NUMBER
publicstaticfinalintVEHICLES_FIELD_NUMBER| Field Value | |
|---|---|
| Type | Description |
int |
|
Static Methods
getDefaultInstance()
publicstaticShipmentModelgetDefaultInstance()| Returns | |
|---|---|
| Type | Description |
ShipmentModel |
|
getDescriptor()
publicstaticfinalDescriptors.DescriptorgetDescriptor()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
newBuilder()
publicstaticShipmentModel.BuildernewBuilder()| Returns | |
|---|---|
| Type | Description |
ShipmentModel.Builder |
|
newBuilder(ShipmentModel prototype)
publicstaticShipmentModel.BuildernewBuilder(ShipmentModelprototype)| Parameter | |
|---|---|
| Name | Description |
prototype |
ShipmentModel |
| Returns | |
|---|---|
| Type | Description |
ShipmentModel.Builder |
|
parseDelimitedFrom(InputStream input)
publicstaticShipmentModelparseDelimitedFrom(InputStreaminput)| Parameter | |
|---|---|
| Name | Description |
input |
InputStream |
| Returns | |
|---|---|
| Type | Description |
ShipmentModel |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
publicstaticShipmentModelparseDelimitedFrom(InputStreaminput,ExtensionRegistryLiteextensionRegistry)| Parameters | |
|---|---|
| Name | Description |
input |
InputStream |
extensionRegistry |
ExtensionRegistryLite |
| Returns | |
|---|---|
| Type | Description |
ShipmentModel |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
parseFrom(byte[] data)
publicstaticShipmentModelparseFrom(byte[]data)| Parameter | |
|---|---|
| Name | Description |
data |
byte[] |
| Returns | |
|---|---|
| Type | Description |
ShipmentModel |
|
| Exceptions | |
|---|---|
| Type | Description |
InvalidProtocolBufferException |
|
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
publicstaticShipmentModelparseFrom(byte[]data,ExtensionRegistryLiteextensionRegistry)| Parameters | |
|---|---|
| Name | Description |
data |
byte[] |
extensionRegistry |
ExtensionRegistryLite |
| Returns | |
|---|---|
| Type | Description |
ShipmentModel |
|
| Exceptions | |
|---|---|
| Type | Description |
InvalidProtocolBufferException |
|
parseFrom(ByteString data)
publicstaticShipmentModelparseFrom(ByteStringdata)| Parameter | |
|---|---|
| Name | Description |
data |
ByteString |
| Returns | |
|---|---|
| Type | Description |
ShipmentModel |
|
| Exceptions | |
|---|---|
| Type | Description |
InvalidProtocolBufferException |
|
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
publicstaticShipmentModelparseFrom(ByteStringdata,ExtensionRegistryLiteextensionRegistry)| Parameters | |
|---|---|
| Name | Description |
data |
ByteString |
extensionRegistry |
ExtensionRegistryLite |
| Returns | |
|---|---|
| Type | Description |
ShipmentModel |
|
| Exceptions | |
|---|---|
| Type | Description |
InvalidProtocolBufferException |
|
parseFrom(CodedInputStream input)
publicstaticShipmentModelparseFrom(CodedInputStreaminput)| Parameter | |
|---|---|
| Name | Description |
input |
CodedInputStream |
| Returns | |
|---|---|
| Type | Description |
ShipmentModel |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
publicstaticShipmentModelparseFrom(CodedInputStreaminput,ExtensionRegistryLiteextensionRegistry)| Parameters | |
|---|---|
| Name | Description |
input |
CodedInputStream |
extensionRegistry |
ExtensionRegistryLite |
| Returns | |
|---|---|
| Type | Description |
ShipmentModel |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
parseFrom(InputStream input)
publicstaticShipmentModelparseFrom(InputStreaminput)| Parameter | |
|---|---|
| Name | Description |
input |
InputStream |
| Returns | |
|---|---|
| Type | Description |
ShipmentModel |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
publicstaticShipmentModelparseFrom(InputStreaminput,ExtensionRegistryLiteextensionRegistry)| Parameters | |
|---|---|
| Name | Description |
input |
InputStream |
extensionRegistry |
ExtensionRegistryLite |
| Returns | |
|---|---|
| Type | Description |
ShipmentModel |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
parseFrom(ByteBuffer data)
publicstaticShipmentModelparseFrom(ByteBufferdata)| Parameter | |
|---|---|
| Name | Description |
data |
ByteBuffer |
| Returns | |
|---|---|
| Type | Description |
ShipmentModel |
|
| Exceptions | |
|---|---|
| Type | Description |
InvalidProtocolBufferException |
|
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
publicstaticShipmentModelparseFrom(ByteBufferdata,ExtensionRegistryLiteextensionRegistry)| Parameters | |
|---|---|
| Name | Description |
data |
ByteBuffer |
extensionRegistry |
ExtensionRegistryLite |
| Returns | |
|---|---|
| Type | Description |
ShipmentModel |
|
| Exceptions | |
|---|---|
| Type | Description |
InvalidProtocolBufferException |
|
parser()
publicstaticParser<ShipmentModel>parser()| Returns | |
|---|---|
| Type | Description |
Parser<ShipmentModel> |
|
Methods
equals(Object obj)
publicbooleanequals(Objectobj)| Parameter | |
|---|---|
| Name | Description |
obj |
Object |
| Returns | |
|---|---|
| Type | Description |
boolean |
|
getBreakRules(int index) (deprecated)
publicShipmentModel.BreakRulegetBreakRules(intindex) 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 | |
|---|---|
| Name | Description |
index |
int |
| Returns | |
|---|---|
| Type | Description |
ShipmentModel.BreakRule |
|
getBreakRulesCount() (deprecated)
publicintgetBreakRulesCount() 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 | |
|---|---|
| Type | Description |
int |
|
getBreakRulesList() (deprecated)
publicList<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 | |
|---|---|
| Type | Description |
List<BreakRule> |
|
getBreakRulesOrBuilder(int index) (deprecated)
publicShipmentModel.BreakRuleOrBuildergetBreakRulesOrBuilder(intindex) 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 | |
|---|---|
| Name | Description |
index |
int |
| Returns | |
|---|---|
| Type | Description |
ShipmentModel.BreakRuleOrBuilder |
|
getBreakRulesOrBuilderList() (deprecated)
publicList<?extendsShipmentModel.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 | |
|---|---|
| Type | Description |
List<? extends com.google.cloud.optimization.v1.ShipmentModel.BreakRuleOrBuilder> |
|
getDefaultInstanceForType()
publicShipmentModelgetDefaultInstanceForType()| Returns | |
|---|---|
| Type | Description |
ShipmentModel |
|
getDurationDistanceMatrices(int index)
publicShipmentModel.DurationDistanceMatrixgetDurationDistanceMatrices(intindex) 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 | |
|---|---|
| Name | Description |
index |
int |
| Returns | |
|---|---|
| Type | Description |
ShipmentModel.DurationDistanceMatrix |
|
getDurationDistanceMatricesCount()
publicintgetDurationDistanceMatricesCount() 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 | |
|---|---|
| Type | Description |
int |
|
getDurationDistanceMatricesList()
publicList<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 | |
|---|---|
| Type | Description |
List<DurationDistanceMatrix> |
|
getDurationDistanceMatricesOrBuilder(int index)
publicShipmentModel.DurationDistanceMatrixOrBuildergetDurationDistanceMatricesOrBuilder(intindex) 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 | |
|---|---|
| Name | Description |
index |
int |
| Returns | |
|---|---|
| Type | Description |
ShipmentModel.DurationDistanceMatrixOrBuilder |
|
getDurationDistanceMatricesOrBuilderList()
publicList<?extendsShipmentModel.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 | |
|---|---|
| Type | Description |
List<? extends com.google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrixOrBuilder> |
|
getDurationDistanceMatrixDstTags(int index)
publicStringgetDurationDistanceMatrixDstTags(intindex) 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 | |
|---|---|
| Name | Description |
index |
int The index of the element to return. |
| Returns | |
|---|---|
| Type | Description |
String |
The durationDistanceMatrixDstTags at the given index. |
getDurationDistanceMatrixDstTagsBytes(int index)
publicByteStringgetDurationDistanceMatrixDstTagsBytes(intindex) 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 | |
|---|---|
| Name | Description |
index |
int The index of the value to return. |
| Returns | |
|---|---|
| Type | Description |
ByteString |
The bytes of the durationDistanceMatrixDstTags at the given index. |
getDurationDistanceMatrixDstTagsCount()
publicintgetDurationDistanceMatrixDstTagsCount() 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 | |
|---|---|
| Type | Description |
int |
The count of durationDistanceMatrixDstTags. |
getDurationDistanceMatrixDstTagsList()
publicProtocolStringListgetDurationDistanceMatrixDstTagsList() 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 | |
|---|---|
| Type | Description |
ProtocolStringList |
A list containing the durationDistanceMatrixDstTags. |
getDurationDistanceMatrixSrcTags(int index)
publicStringgetDurationDistanceMatrixSrcTags(intindex) 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 | |
|---|---|
| Name | Description |
index |
int The index of the element to return. |
| Returns | |
|---|---|
| Type | Description |
String |
The durationDistanceMatrixSrcTags at the given index. |
getDurationDistanceMatrixSrcTagsBytes(int index)
publicByteStringgetDurationDistanceMatrixSrcTagsBytes(intindex) 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 | |
|---|---|
| Name | Description |
index |
int The index of the value to return. |
| Returns | |
|---|---|
| Type | Description |
ByteString |
The bytes of the durationDistanceMatrixSrcTags at the given index. |
getDurationDistanceMatrixSrcTagsCount()
publicintgetDurationDistanceMatrixSrcTagsCount() 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 | |
|---|---|
| Type | Description |
int |
The count of durationDistanceMatrixSrcTags. |
getDurationDistanceMatrixSrcTagsList()
publicProtocolStringListgetDurationDistanceMatrixSrcTagsList() 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 | |
|---|---|
| Type | Description |
ProtocolStringList |
A list containing the durationDistanceMatrixSrcTags. |
getGlobalDurationCostPerHour()
publicdoublegetGlobalDurationCostPerHour()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 | |
|---|---|
| Type | Description |
double |
The globalDurationCostPerHour. |
getGlobalEndTime()
publicTimestampgetGlobalEndTime()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 | |
|---|---|
| Type | Description |
Timestamp |
The globalEndTime. |
getGlobalEndTimeOrBuilder()
publicTimestampOrBuildergetGlobalEndTimeOrBuilder()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 | |
|---|---|
| Type | Description |
TimestampOrBuilder |
|
getGlobalStartTime()
publicTimestampgetGlobalStartTime()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 | |
|---|---|
| Type | Description |
Timestamp |
The globalStartTime. |
getGlobalStartTimeOrBuilder()
publicTimestampOrBuildergetGlobalStartTimeOrBuilder()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 | |
|---|---|
| Type | Description |
TimestampOrBuilder |
|
getMaxActiveVehicles()
publicintgetMaxActiveVehicles()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 | |
|---|---|
| Type | Description |
int |
The maxActiveVehicles. |
getParserForType()
publicParser<ShipmentModel>getParserForType()| Returns | |
|---|---|
| Type | Description |
Parser<ShipmentModel> |
|
getPrecedenceRules(int index)
publicShipmentModel.PrecedenceRulegetPrecedenceRules(intindex)Set of precedence rules which must be enforced in the model.
repeated .google.cloud.optimization.v1.ShipmentModel.PrecedenceRule precedence_rules = 14;
| Parameter | |
|---|---|
| Name | Description |
index |
int |
| Returns | |
|---|---|
| Type | Description |
ShipmentModel.PrecedenceRule |
|
getPrecedenceRulesCount()
publicintgetPrecedenceRulesCount()Set of precedence rules which must be enforced in the model.
repeated .google.cloud.optimization.v1.ShipmentModel.PrecedenceRule precedence_rules = 14;
| Returns | |
|---|---|
| Type | Description |
int |
|
getPrecedenceRulesList()
publicList<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 | |
|---|---|
| Type | Description |
List<PrecedenceRule> |
|
getPrecedenceRulesOrBuilder(int index)
publicShipmentModel.PrecedenceRuleOrBuildergetPrecedenceRulesOrBuilder(intindex)Set of precedence rules which must be enforced in the model.
repeated .google.cloud.optimization.v1.ShipmentModel.PrecedenceRule precedence_rules = 14;
| Parameter | |
|---|---|
| Name | Description |
index |
int |
| Returns | |
|---|---|
| Type | Description |
ShipmentModel.PrecedenceRuleOrBuilder |
|
getPrecedenceRulesOrBuilderList()
publicList<?extendsShipmentModel.PrecedenceRuleOrBuilder>getPrecedenceRulesOrBuilderList()Set of precedence rules which must be enforced in the model.
repeated .google.cloud.optimization.v1.ShipmentModel.PrecedenceRule precedence_rules = 14;
| Returns | |
|---|---|
| Type | Description |
List<? extends com.google.cloud.optimization.v1.ShipmentModel.PrecedenceRuleOrBuilder> |
|
getSerializedSize()
publicintgetSerializedSize()| Returns | |
|---|---|
| Type | Description |
int |
|
getShipmentTypeIncompatibilities(int index)
publicShipmentTypeIncompatibilitygetShipmentTypeIncompatibilities(intindex) Sets of incompatible shipment_types (see ShipmentTypeIncompatibility).
repeated .google.cloud.optimization.v1.ShipmentTypeIncompatibility shipment_type_incompatibilities = 12;
| Parameter | |
|---|---|
| Name | Description |
index |
int |
| Returns | |
|---|---|
| Type | Description |
ShipmentTypeIncompatibility |
|
getShipmentTypeIncompatibilitiesCount()
publicintgetShipmentTypeIncompatibilitiesCount() Sets of incompatible shipment_types (see ShipmentTypeIncompatibility).
repeated .google.cloud.optimization.v1.ShipmentTypeIncompatibility shipment_type_incompatibilities = 12;
| Returns | |
|---|---|
| Type | Description |
int |
|
getShipmentTypeIncompatibilitiesList()
publicList<ShipmentTypeIncompatibility>getShipmentTypeIncompatibilitiesList() Sets of incompatible shipment_types (see ShipmentTypeIncompatibility).
repeated .google.cloud.optimization.v1.ShipmentTypeIncompatibility shipment_type_incompatibilities = 12;
| Returns | |
|---|---|
| Type | Description |
List<ShipmentTypeIncompatibility> |
|
getShipmentTypeIncompatibilitiesOrBuilder(int index)
publicShipmentTypeIncompatibilityOrBuildergetShipmentTypeIncompatibilitiesOrBuilder(intindex) Sets of incompatible shipment_types (see ShipmentTypeIncompatibility).
repeated .google.cloud.optimization.v1.ShipmentTypeIncompatibility shipment_type_incompatibilities = 12;
| Parameter | |
|---|---|
| Name | Description |
index |
int |
| Returns | |
|---|---|
| Type | Description |
ShipmentTypeIncompatibilityOrBuilder |
|
getShipmentTypeIncompatibilitiesOrBuilderList()
publicList<?extendsShipmentTypeIncompatibilityOrBuilder>getShipmentTypeIncompatibilitiesOrBuilderList() Sets of incompatible shipment_types (see ShipmentTypeIncompatibility).
repeated .google.cloud.optimization.v1.ShipmentTypeIncompatibility shipment_type_incompatibilities = 12;
| Returns | |
|---|---|
| Type | Description |
List<? extends com.google.cloud.optimization.v1.ShipmentTypeIncompatibilityOrBuilder> |
|
getShipmentTypeRequirements(int index)
publicShipmentTypeRequirementgetShipmentTypeRequirements(intindex) Sets of shipment_type requirements (see ShipmentTypeRequirement).
repeated .google.cloud.optimization.v1.ShipmentTypeRequirement shipment_type_requirements = 13;
| Parameter | |
|---|---|
| Name | Description |
index |
int |
| Returns | |
|---|---|
| Type | Description |
ShipmentTypeRequirement |
|
getShipmentTypeRequirementsCount()
publicintgetShipmentTypeRequirementsCount() Sets of shipment_type requirements (see ShipmentTypeRequirement).
repeated .google.cloud.optimization.v1.ShipmentTypeRequirement shipment_type_requirements = 13;
| Returns | |
|---|---|
| Type | Description |
int |
|
getShipmentTypeRequirementsList()
publicList<ShipmentTypeRequirement>getShipmentTypeRequirementsList() Sets of shipment_type requirements (see ShipmentTypeRequirement).
repeated .google.cloud.optimization.v1.ShipmentTypeRequirement shipment_type_requirements = 13;
| Returns | |
|---|---|
| Type | Description |
List<ShipmentTypeRequirement> |
|
getShipmentTypeRequirementsOrBuilder(int index)
publicShipmentTypeRequirementOrBuildergetShipmentTypeRequirementsOrBuilder(intindex) Sets of shipment_type requirements (see ShipmentTypeRequirement).
repeated .google.cloud.optimization.v1.ShipmentTypeRequirement shipment_type_requirements = 13;
| Parameter | |
|---|---|
| Name | Description |
index |
int |
| Returns | |
|---|---|
| Type | Description |
ShipmentTypeRequirementOrBuilder |
|
getShipmentTypeRequirementsOrBuilderList()
publicList<?extendsShipmentTypeRequirementOrBuilder>getShipmentTypeRequirementsOrBuilderList() Sets of shipment_type requirements (see ShipmentTypeRequirement).
repeated .google.cloud.optimization.v1.ShipmentTypeRequirement shipment_type_requirements = 13;
| Returns | |
|---|---|
| Type | Description |
List<? extends com.google.cloud.optimization.v1.ShipmentTypeRequirementOrBuilder> |
|
getShipments(int index)
publicShipmentgetShipments(intindex)Set of shipments which must be performed in the model.
repeated .google.cloud.optimization.v1.Shipment shipments = 1;
| Parameter | |
|---|---|
| Name | Description |
index |
int |
| Returns | |
|---|---|
| Type | Description |
Shipment |
|
getShipmentsCount()
publicintgetShipmentsCount()Set of shipments which must be performed in the model.
repeated .google.cloud.optimization.v1.Shipment shipments = 1;
| Returns | |
|---|---|
| Type | Description |
int |
|
getShipmentsList()
publicList<Shipment>getShipmentsList()Set of shipments which must be performed in the model.
repeated .google.cloud.optimization.v1.Shipment shipments = 1;
| Returns | |
|---|---|
| Type | Description |
List<Shipment> |
|
getShipmentsOrBuilder(int index)
publicShipmentOrBuildergetShipmentsOrBuilder(intindex)Set of shipments which must be performed in the model.
repeated .google.cloud.optimization.v1.Shipment shipments = 1;
| Parameter | |
|---|---|
| Name | Description |
index |
int |
| Returns | |
|---|---|
| Type | Description |
ShipmentOrBuilder |
|
getShipmentsOrBuilderList()
publicList<?extendsShipmentOrBuilder>getShipmentsOrBuilderList()Set of shipments which must be performed in the model.
repeated .google.cloud.optimization.v1.Shipment shipments = 1;
| Returns | |
|---|---|
| Type | Description |
List<? extends com.google.cloud.optimization.v1.ShipmentOrBuilder> |
|
getTransitionAttributes(int index)
publicTransitionAttributesgetTransitionAttributes(intindex)Transition attributes added to the model.
repeated .google.cloud.optimization.v1.TransitionAttributes transition_attributes = 11;
| Parameter | |
|---|---|
| Name | Description |
index |
int |
| Returns | |
|---|---|
| Type | Description |
TransitionAttributes |
|
getTransitionAttributesCount()
publicintgetTransitionAttributesCount()Transition attributes added to the model.
repeated .google.cloud.optimization.v1.TransitionAttributes transition_attributes = 11;
| Returns | |
|---|---|
| Type | Description |
int |
|
getTransitionAttributesList()
publicList<TransitionAttributes>getTransitionAttributesList()Transition attributes added to the model.
repeated .google.cloud.optimization.v1.TransitionAttributes transition_attributes = 11;
| Returns | |
|---|---|
| Type | Description |
List<TransitionAttributes> |
|
getTransitionAttributesOrBuilder(int index)
publicTransitionAttributesOrBuildergetTransitionAttributesOrBuilder(intindex)Transition attributes added to the model.
repeated .google.cloud.optimization.v1.TransitionAttributes transition_attributes = 11;
| Parameter | |
|---|---|
| Name | Description |
index |
int |
| Returns | |
|---|---|
| Type | Description |
TransitionAttributesOrBuilder |
|
getTransitionAttributesOrBuilderList()
publicList<?extendsTransitionAttributesOrBuilder>getTransitionAttributesOrBuilderList()Transition attributes added to the model.
repeated .google.cloud.optimization.v1.TransitionAttributes transition_attributes = 11;
| Returns | |
|---|---|
| Type | Description |
List<? extends com.google.cloud.optimization.v1.TransitionAttributesOrBuilder> |
|
getVehicles(int index)
publicVehiclegetVehicles(intindex)Set of vehicles which can be used to perform visits.
repeated .google.cloud.optimization.v1.Vehicle vehicles = 2;
| Parameter | |
|---|---|
| Name | Description |
index |
int |
| Returns | |
|---|---|
| Type | Description |
Vehicle |
|
getVehiclesCount()
publicintgetVehiclesCount()Set of vehicles which can be used to perform visits.
repeated .google.cloud.optimization.v1.Vehicle vehicles = 2;
| Returns | |
|---|---|
| Type | Description |
int |
|
getVehiclesList()
publicList<Vehicle>getVehiclesList()Set of vehicles which can be used to perform visits.
repeated .google.cloud.optimization.v1.Vehicle vehicles = 2;
| Returns | |
|---|---|
| Type | Description |
List<Vehicle> |
|
getVehiclesOrBuilder(int index)
publicVehicleOrBuildergetVehiclesOrBuilder(intindex)Set of vehicles which can be used to perform visits.
repeated .google.cloud.optimization.v1.Vehicle vehicles = 2;
| Parameter | |
|---|---|
| Name | Description |
index |
int |
| Returns | |
|---|---|
| Type | Description |
VehicleOrBuilder |
|
getVehiclesOrBuilderList()
publicList<?extendsVehicleOrBuilder>getVehiclesOrBuilderList()Set of vehicles which can be used to perform visits.
repeated .google.cloud.optimization.v1.Vehicle vehicles = 2;
| Returns | |
|---|---|
| Type | Description |
List<? extends com.google.cloud.optimization.v1.VehicleOrBuilder> |
|
hasGlobalEndTime()
publicbooleanhasGlobalEndTime()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 | |
|---|---|
| Type | Description |
boolean |
Whether the globalEndTime field is set. |
hasGlobalStartTime()
publicbooleanhasGlobalStartTime()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 | |
|---|---|
| Type | Description |
boolean |
Whether the globalStartTime field is set. |
hasMaxActiveVehicles()
publicbooleanhasMaxActiveVehicles()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 | |
|---|---|
| Type | Description |
boolean |
Whether the maxActiveVehicles field is set. |
hashCode()
publicinthashCode()| Returns | |
|---|---|
| Type | Description |
int |
|
internalGetFieldAccessorTable()
protectedGeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()| Returns | |
|---|---|
| Type | Description |
FieldAccessorTable |
|
isInitialized()
publicfinalbooleanisInitialized()| Returns | |
|---|---|
| Type | Description |
boolean |
|
newBuilderForType()
publicShipmentModel.BuildernewBuilderForType()| Returns | |
|---|---|
| Type | Description |
ShipmentModel.Builder |
|
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protectedShipmentModel.BuildernewBuilderForType(GeneratedMessageV3.BuilderParentparent)| Parameter | |
|---|---|
| Name | Description |
parent |
BuilderParent |
| Returns | |
|---|---|
| Type | Description |
ShipmentModel.Builder |
|
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protectedObjectnewInstance(GeneratedMessageV3.UnusedPrivateParameterunused)| Parameter | |
|---|---|
| Name | Description |
unused |
UnusedPrivateParameter |
| Returns | |
|---|---|
| Type | Description |
Object |
|
toBuilder()
publicShipmentModel.BuildertoBuilder()| Returns | |
|---|---|
| Type | Description |
ShipmentModel.Builder |
|
writeTo(CodedOutputStream output)
publicvoidwriteTo(CodedOutputStreamoutput)| Parameter | |
|---|---|
| Name | Description |
output |
CodedOutputStream |
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|