Reference documentation and code samples for the Google Cloud Optimization V1 Client class Visit.
A visit performed during a route. This visit corresponds to a pickup or a
delivery of a Shipment
.
Generated from protobuf message google.cloud.optimization.v1.ShipmentRoute.Visit
Namespace
Google \ Cloud \ Optimization \ V1 \ ShipmentRouteMethods
__construct
Constructor.
data
array
Optional. Data for populating the Message object.
↳ shipment_index
↳ is_pickup
bool
If true the visit corresponds to a pickup of a Shipment
. Otherwise, it corresponds to a delivery.
↳ visit_request_index
int
Index of VisitRequest
in either the pickup or delivery field of the Shipment
(see is_pickup
).
↳ start_time
Google\Protobuf\Timestamp
Time at which the visit starts. Note that the vehicle may arrive earlier than this at the visit location. Times are consistent with the ShipmentModel
.
↳ load_demands
array| Google\Protobuf\Internal\MapField
Total visit load demand as the sum of the shipment and the visit request load_demands
. The values are negative if the visit is a delivery. Demands are reported for the same types as the Transition.loads
(see this field).
↳ detour
Google\Protobuf\Duration
Extra detour time due to the shipments visited on the route before the visit and to the potential waiting time induced by time windows. If the visit is a delivery, the detour is computed from the corresponding pickup visit and is equal to: start_time(delivery) - start_time(pickup) - (duration(pickup) + travel duration from the pickup location to the delivery location).
Otherwise, it is computed from the vehicle start_location
and is equal to: start_time - vehicle_start_time - travel duration from the vehicle's `start_location` to the visit.
↳ shipment_label
string
Copy of the corresponding Shipment.label
, if specified in the Shipment
.
↳ visit_label
↳ arrival_loads
array< Google\Cloud\Optimization\V1\CapacityQuantity
>
Deprecated: Use Transition.vehicle_loads
instead. Vehicle loads upon arrival at the visit location, for each type specified in Vehicle.capacities
, start_load_intervals
, end_load_intervals
or demands
. Exception: we omit loads for quantity types unconstrained by intervals and that don't have any non-zero demand on the route.
↳ delay_before_start
Google\Cloud\Optimization\V1\ShipmentRoute\Delay
Deprecated: Use ShipmentRoute.Transition.delay_duration instead. Delay occurring before the visit starts.
↳ demands
getShipmentIndex
Index of the shipments
field in the source ShipmentModel
.
int
setShipmentIndex
Index of the shipments
field in the source ShipmentModel
.
var
int
$this
getIsPickup
If true the visit corresponds to a pickup of a Shipment
. Otherwise, it
corresponds to a delivery.
bool
setIsPickup
If true the visit corresponds to a pickup of a Shipment
. Otherwise, it
corresponds to a delivery.
var
bool
$this
getVisitRequestIndex
Index of VisitRequest
in either the pickup or delivery field of the Shipment
(see is_pickup
).
int
setVisitRequestIndex
Index of VisitRequest
in either the pickup or delivery field of the Shipment
(see is_pickup
).
var
int
$this
getStartTime
Time at which the visit starts. Note that the vehicle may arrive earlier
than this at the visit location. Times are consistent with the ShipmentModel
.
hasStartTime
clearStartTime
setStartTime
Time at which the visit starts. Note that the vehicle may arrive earlier
than this at the visit location. Times are consistent with the ShipmentModel
.
$this
getLoadDemands
Total visit load demand as the sum of the shipment and the visit request load_demands
. The values are negative if the visit is a delivery.
Demands are reported for the same types as the Transition.loads (see this field).
setLoadDemands
Total visit load demand as the sum of the shipment and the visit request load_demands
. The values are negative if the visit is a delivery.
Demands are reported for the same types as the Transition.loads (see this field).
$this
getDetour
Extra detour time due to the shipments visited on the route before the visit and to the potential waiting time induced by time windows.
If the visit is a delivery, the detour is computed from the corresponding pickup visit and is equal to:
start_time(delivery) - start_time(pickup)
- (duration(pickup) + travel duration from the pickup location
to the delivery location).
Otherwise, it is computed from the vehicle start_location
and is equal
to:
start_time - vehicle_start_time - travel duration from
the vehicle's `start_location` to the visit.
hasDetour
clearDetour
setDetour
Extra detour time due to the shipments visited on the route before the visit and to the potential waiting time induced by time windows.
If the visit is a delivery, the detour is computed from the corresponding pickup visit and is equal to:
start_time(delivery) - start_time(pickup)
- (duration(pickup) + travel duration from the pickup location
to the delivery location).
Otherwise, it is computed from the vehicle start_location
and is equal
to:
start_time - vehicle_start_time - travel duration from
the vehicle's `start_location` to the visit.
$this
getShipmentLabel
Copy of the corresponding Shipment.label
, if specified in the Shipment
.
string
setShipmentLabel
Copy of the corresponding Shipment.label
, if specified in the Shipment
.
var
string
$this
getVisitLabel
Copy of the corresponding VisitRequest.label
,
if specified in the VisitRequest
.
string
setVisitLabel
Copy of the corresponding VisitRequest.label
,
if specified in the VisitRequest
.
var
string
$this
getArrivalLoads
Deprecated: Use Transition.vehicle_loads
instead. Vehicle loads upon arrival at the visit location, for each type
specified in Vehicle.capacities
, start_load_intervals
, end_load_intervals
or demands
.
Exception: we omit loads for quantity types unconstrained by intervals and that don't have any non-zero demand on the route.
setArrivalLoads
Deprecated: Use Transition.vehicle_loads
instead. Vehicle loads upon arrival at the visit location, for each type
specified in Vehicle.capacities
, start_load_intervals
, end_load_intervals
or demands
.
Exception: we omit loads for quantity types unconstrained by intervals and that don't have any non-zero demand on the route.
var
array< Google\Cloud\Optimization\V1\CapacityQuantity
>
$this
getDelayBeforeStart
Deprecated: Use ShipmentRoute.Transition.delay_duration instead. Delay occurring before the visit starts.
Google\Cloud\Optimization\V1\ShipmentRoute\Delay
|null
hasDelayBeforeStart
clearDelayBeforeStart
setDelayBeforeStart
Deprecated: Use ShipmentRoute.Transition.delay_duration instead. Delay occurring before the visit starts.
var
Google\Cloud\Optimization\V1\ShipmentRoute\Delay
$this
getDemands
Deprecated: Use Visit.load_demands instead.
setDemands
Deprecated: Use Visit.load_demands instead.
var
array< Google\Cloud\Optimization\V1\CapacityQuantity
>
$this