Google Cloud Optimization V1 Client - Class ConstraintRelaxation (1.0.0)

Reference documentation and code samples for the Google Cloud Optimization V1 Client class ConstraintRelaxation.

For a group of vehicles, specifies at what threshold(s) constraints on visits will be relaxed and to which level. Shipments listed in the skipped_shipment field are constrained to be skipped; i.e., they cannot be performed.

Generated from protobuf message google.cloud.optimization.v1.InjectedSolutionConstraint.ConstraintRelaxation

Namespace

Google \ Cloud \ Optimization \ V1 \ InjectedSolutionConstraint

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ relaxations array<Google\Cloud\Optimization\V1\InjectedSolutionConstraint\ConstraintRelaxation\Relaxation>

All the visit constraint relaxations that will apply to visits on routes with vehicles in vehicle_indices.

↳ vehicle_indices array

Specifies the vehicle indices to which the visit constraint relaxations apply. If empty, this is considered the default and the relaxations apply to all vehicles that are not specified in other constraint_relaxations. There can be at most one default, i.e., at most one constraint relaxation field is allowed empty vehicle_indices. A vehicle index can only be listed once, even within several constraint_relaxations. A vehicle index is mapped the same as ShipmentRoute.vehicle_index, if interpret_injected_solutions_using_labels is true (see fields comment).

getRelaxations

All the visit constraint relaxations that will apply to visits on routes with vehicles in vehicle_indices.

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setRelaxations

All the visit constraint relaxations that will apply to visits on routes with vehicles in vehicle_indices.

Parameter
Name Description
var array<Google\Cloud\Optimization\V1\InjectedSolutionConstraint\ConstraintRelaxation\Relaxation>
Returns
Type Description
$this

getVehicleIndices

Specifies the vehicle indices to which the visit constraint relaxations apply. If empty, this is considered the default and the relaxations apply to all vehicles that are not specified in other constraint_relaxations. There can be at most one default, i.e., at most one constraint relaxation field is allowed empty vehicle_indices. A vehicle index can only be listed once, even within several constraint_relaxations.

A vehicle index is mapped the same as ShipmentRoute.vehicle_index, if interpret_injected_solutions_using_labels is true (see fields comment).

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setVehicleIndices

Specifies the vehicle indices to which the visit constraint relaxations apply. If empty, this is considered the default and the relaxations apply to all vehicles that are not specified in other constraint_relaxations. There can be at most one default, i.e., at most one constraint relaxation field is allowed empty vehicle_indices. A vehicle index can only be listed once, even within several constraint_relaxations.

A vehicle index is mapped the same as ShipmentRoute.vehicle_index, if interpret_injected_solutions_using_labels is true (see fields comment).

Parameter
Name Description
var int[]
Returns
Type Description
$this