- 1.52.0 (latest)
- 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
public static final class ShipmentModel.BreakRule.FrequencyConstraint extends GeneratedMessageV3 implements ShipmentModel.BreakRule.FrequencyConstraintOrBuilder
One may further constrain the frequency and duration of the breaks
specified above, by enforcing a minimum break frequency, such as
"There must be a break of at least 1 hour every 12 hours". Assuming that
this can be interpreted as "Within any sliding time window of 12h, there
must be at least one break of at least one hour", that example would
translate to the following FrequencyConstraint
:
<code><code>
{
min_break_duration { seconds: 3600 } # 1 hour.
max_inter_break_duration { seconds: 39600 } # 11 hours (12 - 1 = 11).
}
</code></code><code>
The timing and duration of the breaks in the solution will respect all
such constraints, in addition to the time windows and minimum durations
already specified in the </code>BreakRequest<code>.
A </code>FrequencyConstraint<code> may in practice apply to non-consecutive breaks.
For example, the following schedule honors the "1h every 12h" example:
</code><code><code>
04:00 vehicle start
.. performing travel and visits ..
09:00 1 hour break
10:00 end of the break
.. performing travel and visits ..
12:00 20-min lunch break
12:20 end of the break
.. performing travel and visits ..
21:00 1 hour break
22:00 end of the break
.. performing travel and visits ..
23:59 vehicle end
</code></code>
Protobuf type
google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint
Inheritance
Object > AbstractMessageLite<MessageType,BuilderType> > AbstractMessage > GeneratedMessageV3 > ShipmentModel.BreakRule.FrequencyConstraintStatic Fields
MAX_INTER_BREAK_DURATION_FIELD_NUMBER
public static final int MAX_INTER_BREAK_DURATION_FIELD_NUMBER
Type | Description |
int |
MIN_BREAK_DURATION_FIELD_NUMBER
public static final int MIN_BREAK_DURATION_FIELD_NUMBER
Type | Description |
int |
Static Methods
getDefaultInstance()
public static ShipmentModel.BreakRule.FrequencyConstraint getDefaultInstance()
Type | Description |
ShipmentModel.BreakRule.FrequencyConstraint |
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Type | Description |
Descriptor |
newBuilder()
public static ShipmentModel.BreakRule.FrequencyConstraint.Builder newBuilder()
Type | Description |
ShipmentModel.BreakRule.FrequencyConstraint.Builder |
newBuilder(ShipmentModel.BreakRule.FrequencyConstraint prototype)
public static ShipmentModel.BreakRule.FrequencyConstraint.Builder newBuilder(ShipmentModel.BreakRule.FrequencyConstraint prototype)
Name | Description |
prototype | ShipmentModel.BreakRule.FrequencyConstraint |
Type | Description |
ShipmentModel.BreakRule.FrequencyConstraint.Builder |
parseDelimitedFrom(InputStream input)
public static ShipmentModel.BreakRule.FrequencyConstraint parseDelimitedFrom(InputStream input)
Name | Description |
input | InputStream |
Type | Description |
ShipmentModel.BreakRule.FrequencyConstraint |
Type | Description |
IOException |
parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
public static ShipmentModel.BreakRule.FrequencyConstraint parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Name | Description |
input | InputStream |
extensionRegistry | ExtensionRegistryLite |
Type | Description |
ShipmentModel.BreakRule.FrequencyConstraint |
Type | Description |
IOException |
parseFrom(byte[] data)
public static ShipmentModel.BreakRule.FrequencyConstraint parseFrom(byte[] data)
Name | Description |
data | byte[] |
Type | Description |
ShipmentModel.BreakRule.FrequencyConstraint |
Type | Description |
InvalidProtocolBufferException |
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static ShipmentModel.BreakRule.FrequencyConstraint parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Name | Description |
data | byte[] |
extensionRegistry | ExtensionRegistryLite |
Type | Description |
ShipmentModel.BreakRule.FrequencyConstraint |
Type | Description |
InvalidProtocolBufferException |
parseFrom(ByteString data)
public static ShipmentModel.BreakRule.FrequencyConstraint parseFrom(ByteString data)
Name | Description |
data | ByteString |
Type | Description |
ShipmentModel.BreakRule.FrequencyConstraint |
Type | Description |
InvalidProtocolBufferException |
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static ShipmentModel.BreakRule.FrequencyConstraint parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Name | Description |
data | ByteString |
extensionRegistry | ExtensionRegistryLite |
Type | Description |
ShipmentModel.BreakRule.FrequencyConstraint |
Type | Description |
InvalidProtocolBufferException |
parseFrom(CodedInputStream input)
public static ShipmentModel.BreakRule.FrequencyConstraint parseFrom(CodedInputStream input)
Name | Description |
input | CodedInputStream |
Type | Description |
ShipmentModel.BreakRule.FrequencyConstraint |
Type | Description |
IOException |
parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public static ShipmentModel.BreakRule.FrequencyConstraint parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Name | Description |
input | CodedInputStream |
extensionRegistry | ExtensionRegistryLite |
Type | Description |
ShipmentModel.BreakRule.FrequencyConstraint |
Type | Description |
IOException |
parseFrom(InputStream input)
public static ShipmentModel.BreakRule.FrequencyConstraint parseFrom(InputStream input)
Name | Description |
input | InputStream |
Type | Description |
ShipmentModel.BreakRule.FrequencyConstraint |
Type | Description |
IOException |
parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
public static ShipmentModel.BreakRule.FrequencyConstraint parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Name | Description |
input | InputStream |
extensionRegistry | ExtensionRegistryLite |
Type | Description |
ShipmentModel.BreakRule.FrequencyConstraint |
Type | Description |
IOException |
parseFrom(ByteBuffer data)
public static ShipmentModel.BreakRule.FrequencyConstraint parseFrom(ByteBuffer data)
Name | Description |
data | ByteBuffer |
Type | Description |
ShipmentModel.BreakRule.FrequencyConstraint |
Type | Description |
InvalidProtocolBufferException |
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static ShipmentModel.BreakRule.FrequencyConstraint parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Name | Description |
data | ByteBuffer |
extensionRegistry | ExtensionRegistryLite |
Type | Description |
ShipmentModel.BreakRule.FrequencyConstraint |
Type | Description |
InvalidProtocolBufferException |
parser()
public static Parser<ShipmentModel.BreakRule.FrequencyConstraint> parser()
Type | Description |
Parser<FrequencyConstraint> |
Methods
equals(Object obj)
public boolean equals(Object obj)
Name | Description |
obj | Object |
Type | Description |
boolean |
getDefaultInstanceForType()
public ShipmentModel.BreakRule.FrequencyConstraint getDefaultInstanceForType()
Type | Description |
ShipmentModel.BreakRule.FrequencyConstraint |
getMaxInterBreakDuration()
public Duration getMaxInterBreakDuration()
Required. Maximum allowed span of any interval of time in the route that does not
include at least partially a break of duration >=
min_break_duration
. Must be positive.
.google.protobuf.Duration max_inter_break_duration = 2 [(.google.api.field_behavior) = REQUIRED];
Type | Description |
Duration | The maxInterBreakDuration. |
getMaxInterBreakDurationOrBuilder()
public DurationOrBuilder getMaxInterBreakDurationOrBuilder()
Required. Maximum allowed span of any interval of time in the route that does not
include at least partially a break of duration >=
min_break_duration
. Must be positive.
.google.protobuf.Duration max_inter_break_duration = 2 [(.google.api.field_behavior) = REQUIRED];
Type | Description |
DurationOrBuilder |
getMinBreakDuration()
public Duration getMinBreakDuration()
Required. Minimum break duration for this constraint. Nonnegative.
See description of FrequencyConstraint
.
.google.protobuf.Duration min_break_duration = 1 [(.google.api.field_behavior) = REQUIRED];
Type | Description |
Duration | The minBreakDuration. |
getMinBreakDurationOrBuilder()
public DurationOrBuilder getMinBreakDurationOrBuilder()
Required. Minimum break duration for this constraint. Nonnegative.
See description of FrequencyConstraint
.
.google.protobuf.Duration min_break_duration = 1 [(.google.api.field_behavior) = REQUIRED];
Type | Description |
DurationOrBuilder |
getParserForType()
public Parser<ShipmentModel.BreakRule.FrequencyConstraint> getParserForType()
Type | Description |
Parser<FrequencyConstraint> |
getSerializedSize()
public int getSerializedSize()
Type | Description |
int |
getUnknownFields()
public final UnknownFieldSet getUnknownFields()
Type | Description |
UnknownFieldSet |
hasMaxInterBreakDuration()
public boolean hasMaxInterBreakDuration()
Required. Maximum allowed span of any interval of time in the route that does not
include at least partially a break of duration >=
min_break_duration
. Must be positive.
.google.protobuf.Duration max_inter_break_duration = 2 [(.google.api.field_behavior) = REQUIRED];
Type | Description |
boolean | Whether the maxInterBreakDuration field is set. |
hasMinBreakDuration()
public boolean hasMinBreakDuration()
Required. Minimum break duration for this constraint. Nonnegative.
See description of FrequencyConstraint
.
.google.protobuf.Duration min_break_duration = 1 [(.google.api.field_behavior) = REQUIRED];
Type | Description |
boolean | Whether the minBreakDuration field is set. |
hashCode()
public int hashCode()
Type | Description |
int |
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Type | Description |
FieldAccessorTable |
isInitialized()
public final boolean isInitialized()
Type | Description |
boolean |
newBuilderForType()
public ShipmentModel.BreakRule.FrequencyConstraint.Builder newBuilderForType()
Type | Description |
ShipmentModel.BreakRule.FrequencyConstraint.Builder |
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected ShipmentModel.BreakRule.FrequencyConstraint.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Name | Description |
parent | BuilderParent |
Type | Description |
ShipmentModel.BreakRule.FrequencyConstraint.Builder |
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Name | Description |
unused | UnusedPrivateParameter |
Type | Description |
Object |
toBuilder()
public ShipmentModel.BreakRule.FrequencyConstraint.Builder toBuilder()
Type | Description |
ShipmentModel.BreakRule.FrequencyConstraint.Builder |
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)
Name | Description |
output | CodedOutputStream |
Type | Description |
IOException |