Reference documentation and code samples for the Google Cloud Optimization V1 Client class PrecedenceRule.
A precedence rule between two events (each event is the pickup or the
delivery of a shipment): the "second" event has to start at least offset_duration
after "first" has started.
Several precedences can refer to the same (or related) events, e.g., "pickup of B happens after delivery of A" and "pickup of C happens after pickup of B". Furthermore, precedences only apply when both shipments are performed and are otherwise ignored.
Generated from protobuf message google.cloud.optimization.v1.ShipmentModel.PrecedenceRule
Namespace
Google \ Cloud \ Optimization \ V1 \ ShipmentModelMethods
__construct
Constructor.
data
array
Optional. Data for populating the Message object.
↳ first_index
int
Shipment index of the "first" event. This field must be specified.
↳ first_is_delivery
bool
Indicates if the "first" event is a delivery.
↳ second_index
int
Shipment index of the "second" event. This field must be specified.
↳ second_is_delivery
bool
Indicates if the "second" event is a delivery.
↳ offset_duration
getFirstIndex
Shipment index of the "first" event. This field must be specified.
int
hasFirstIndex
clearFirstIndex
setFirstIndex
Shipment index of the "first" event. This field must be specified.
var
int
$this
getFirstIsDelivery
Indicates if the "first" event is a delivery.
bool
setFirstIsDelivery
Indicates if the "first" event is a delivery.
var
bool
$this
getSecondIndex
Shipment index of the "second" event. This field must be specified.
int
hasSecondIndex
clearSecondIndex
setSecondIndex
Shipment index of the "second" event. This field must be specified.
var
int
$this
getSecondIsDelivery
Indicates if the "second" event is a delivery.
bool
setSecondIsDelivery
Indicates if the "second" event is a delivery.
var
bool
$this
getOffsetDuration
The offset between the "first" and "second" event. It can be negative.
hasOffsetDuration
clearOffsetDuration
setOffsetDuration
The offset between the "first" and "second" event. It can be negative.
$this