Google Cloud Optimization V1 Client - Class InjectedSolutionConstraint (0.2.0)

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

Solution injected in the request including information about which visits must be constrained and how they must be constrained.

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

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ routes array<Google\Cloud\Optimization\V1\ShipmentRoute>

Routes of the solution to inject. Some routes may be omitted from the original solution. The routes and skipped shipments must satisfy the basic validity assumptions listed for injected_first_solution_routes.

↳ skipped_shipments array<Google\Cloud\Optimization\V1\SkippedShipment>

Skipped shipments of the solution to inject. Some may be omitted from the original solution. See the routes field.

↳ constraint_relaxations array<Google\Cloud\Optimization\V1\InjectedSolutionConstraint\ConstraintRelaxation>

For zero or more groups of vehicles, specifies when and how much to relax constraints. If this field is empty, all non-empty vehicle routes are fully constrained.

getRoutes

Routes of the solution to inject. Some routes may be omitted from the original solution. The routes and skipped shipments must satisfy the basic validity assumptions listed for injected_first_solution_routes.

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setRoutes

Routes of the solution to inject. Some routes may be omitted from the original solution. The routes and skipped shipments must satisfy the basic validity assumptions listed for injected_first_solution_routes.

Parameter
NameDescription
var array<Google\Cloud\Optimization\V1\ShipmentRoute>
Returns
TypeDescription
$this

getSkippedShipments

Skipped shipments of the solution to inject. Some may be omitted from the original solution. See the routes field.

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setSkippedShipments

Skipped shipments of the solution to inject. Some may be omitted from the original solution. See the routes field.

Parameter
NameDescription
var array<Google\Cloud\Optimization\V1\SkippedShipment>
Returns
TypeDescription
$this

getConstraintRelaxations

For zero or more groups of vehicles, specifies when and how much to relax constraints. If this field is empty, all non-empty vehicle routes are fully constrained.

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setConstraintRelaxations

For zero or more groups of vehicles, specifies when and how much to relax constraints. If this field is empty, all non-empty vehicle routes are fully constrained.

Parameter
NameDescription
var array<Google\Cloud\Optimization\V1\InjectedSolutionConstraint\ConstraintRelaxation>
Returns
TypeDescription
$this