Package google.research.middlemileoptimization.v1

Index

MiddleMileOptimization

Service to manage a logistics network and route shipments inside. This protocol is stateless (messages are independent), although the service behind it is highly stateful (receiving a message may drastically change replies for many methods, like routing a shipment may change the routing of other shipments).

CommitPath

rpc CommitPath(CommitPathRequest) returns (Path)

Commits the path of a shipment, indicating that it cannot be changed in the future, even by the user, save for force majeure/act of God indicated by the MakeVehicleUnavailable, MakeHubUnavailable, MakeLineUnavailable methods. This method is not used to tag a particular revision of a path.

CreateHub

rpc CreateHub(CreateHubRequest) returns (Hub)

Creates a Hub.

CreateLine

rpc CreateLine(CreateLineRequest) returns (Line)

Creates a Line.

CreateLineRotation

rpc CreateLineRotation(CreateLineRotationRequest) returns (LineRotation)

Creates a LineRotation.

CreateNetwork

rpc CreateNetwork(CreateNetworkRequest) returns (Network)

Creates a Network.

CreateVehicle

rpc CreateVehicle(CreateVehicleRequest) returns (Vehicle)

Creates a Vehicle.

DeleteHub

rpc DeleteHub(DeleteHubRequest) returns (Empty)

Deletes a Hub.

DeleteLine

rpc DeleteLine(DeleteLineRequest) returns (Empty)

Deletes a Line.

DeleteLineRotation

rpc DeleteLineRotation(DeleteLineRotationRequest) returns (Empty)

Deletes a LineRotation.

DeleteNetwork

rpc DeleteNetwork(DeleteNetworkRequest) returns (Empty)

Deletes a Network.

DeleteShipment

rpc DeleteShipment(DeleteShipmentRequest) returns (Empty)

Deletes a Shipment.

DeleteVehicle

rpc DeleteVehicle(DeleteVehicleRequest) returns (Empty)

Deletes a Vehicle.

GetHub

rpc GetHub(GetHubRequest) returns (Hub)

Gets the details of a Hub.

GetLine

rpc GetLine(GetLineRequest) returns (Line)

Gets the details of a Line.

GetLineRotation

rpc GetLineRotation(GetLineRotationRequest) returns (LineRotation)

Gets the details of a LineRotation.

GetNetwork

rpc GetNetwork(GetNetworkRequest) returns (Network)

Gets the details of a Network.

GetShipment

rpc GetShipment(GetShipmentRequest) returns (Shipment)

Gets the details of a Shipment.

GetVehicle

rpc GetVehicle(GetVehicleRequest) returns (Vehicle)

Gets the details of a Vehicle.

ListHubs

rpc ListHubs(ListHubsRequest) returns (ListHubsResponse)

Lists the Hubs.

ListLineRotations

rpc ListLineRotations(ListLineRotationsRequest) returns (ListLineRotationsResponse)

Lists the LineRotations.

ListLines

rpc ListLines(ListLinesRequest) returns (ListLinesResponse)

Lists the Lines.

ListNetworks

rpc ListNetworks(ListNetworksRequest) returns (ListNetworksResponse)

Lists the Network.

ListPaths

rpc ListPaths(ListPathsRequest) returns (ListPathsResponse)

Returns all the paths that are currently available. This method is idempotent and has no side effect.

ListShipments

rpc ListShipments(ListShipmentsRequest) returns (ListShipmentsResponse)

Lists the Shipments.

ListVehicles

rpc ListVehicles(ListVehiclesRequest) returns (ListVehiclesResponse)

Lists the Vehicles.

MakeHubAvailable

rpc MakeHubAvailable(MakeHubAvailableRequest) returns (MakeHubAvailableResponse)

Makes a hub available.

MakeHubUnavailable

rpc MakeHubUnavailable(MakeHubUnavailableRequest) returns (MakeHubUnavailableResponse)

Makes a hub unavailable.

MakeLineAvailable

rpc MakeLineAvailable(MakeLineAvailableRequest) returns (MakeLineAvailableResponse)

Makes a line available.

MakeLineUnavailable

rpc MakeLineUnavailable(MakeLineUnavailableRequest) returns (MakeLineUnavailableResponse)

Makes a line unavailable.

MakeVehicleAvailable

rpc MakeVehicleAvailable(MakeVehicleAvailableRequest) returns (MakeVehicleAvailableResponse)

Makes a vehicle available.

MakeVehicleUnavailable

rpc MakeVehicleUnavailable(MakeVehicleUnavailableRequest) returns (MakeVehicleUnavailableResponse)

Makes a vehicle unavailable.

RouteShipment

rpc RouteShipment(RouteShipmentRequest) returns (RouteShipmentResponse)

Route a new shipment. Akin to creation, this operation implies a state change.

UpdateHub

rpc UpdateHub(UpdateHubRequest) returns (Hub)

Updates a Hub.

UpdateLine

rpc UpdateLine(UpdateLineRequest) returns (Line)

Updates a Line.

UpdateLineRotation

rpc UpdateLineRotation(UpdateLineRotationRequest) returns (LineRotation)

Updates a LineRotation.

UpdateNetwork

rpc UpdateNetwork(UpdateNetworkRequest) returns (Network)

Updates a Network.

UpdatePath

rpc UpdatePath(UpdatePathRequest) returns (Path)

Changes the path of a shipment: instead of using the service-computed one, the state will contain the one set by the user through this call.

UpdateVehicle

rpc UpdateVehicle(UpdateVehicleRequest) returns (Vehicle)

Updates a Vehicle.

AnnotatedPathSegment

Represents a part of a path with more redundant information that can be computed based on the contained PathSegment and the Network. These messages are typically returned by the API server.

Fields
segment

PathSegment

Required. Segment being annotated.

arrival_time

DateTime

Output only. Arrival time of this segment.

departure_time

DateTime

Output only. Departure time of this segment.

is_committed

bool

Output only. Whether the API customer has decided to commit this part of the path.

segment_cost_constant

double

Output only. Constant cost for this segment.

segment_cost_due_to_vehicle

map<string, double>

Output only. One entry per dimension.

segment_cost_due_to_departure

double

Output only. Cost due to the line rotation: departure.

segment_cost_due_to_arrival

double

Output only. Cost due to the line rotation: arrival.

CommitPathRequest

The request message for CommitPath method.

Fields
name

string

Required. The name of the shipment whose path must be committed. Format: "networks/{network}/shipments/{shipment}"

Union field path_to_commit. The path or parts of the path that should be committed. path_to_commit can be only one of the following:
complete_shipment_path

PathToCommit

The segments of a path from a source to a destination.

segments

IncompletePathToCommit

A subset of the segments of a path from a source to a destination.

IncompletePathToCommit

Part of path being committed, i.e. some segments between the source and the destination.

Fields
segments[]

PathSegment

Required. A subset of the segments of a path from a source to a destination.

PathToCommit

Full path being committed, from source to destination.

Fields
segments[]

PathSegment

Required. Segments must be in order, from a source to a destination.

CreateHubRequest

The request message for CreateHub method.

Fields
parent

string

Required. The parent resource where this hub will be created. Format: "networks/{network}"

hub_id

string

Required. Identifier of the hub to create.

hub

Hub

Required. The hub to create.

CreateLineRequest

The request message for CreateLine method.

Fields
parent

string

Required. The parent resource where this line will be created. Format: "networks/{network}"

line_id

string

Required. Identifier of the line to create.

line

Line

Required. The line to create.

CreateLineRotationRequest

The request message for CreateLineRotation method.

Fields
parent

string

Required. The parent resource where this line rotation will be created. Format: "networks/{network}/lines/{line}"

line_rotation_id

string

Required. Identifier of the line rotation to create.

line_rotation

LineRotation

Required. The line rotation to create.

CreateNetworkRequest

The request message for CreateNetwork method.

Fields
network_id

string

Required. Identifier of the network to create.

network

Network

Required. The network to create.

CreateVehicleRequest

The request message for CreateVehicle method.

Fields
parent

string

Required. The parent resource where this vehicle will be created. Format: "networks/{network}"

vehicle_id

string

Required. Identifier of the vehicle to create.

vehicle

Vehicle

Required. The vehicle to create.

CrossDockingCapacity

Overall cross-docking capacity for a hub.

Fields
capacity_per_hour[]

ValueDimension

Optional. Cross-docking capacity for each dimension.

CrossDockingTime

Overall cross-docking time for a hub.

Fields
time_constant

Duration

Optional. Constant time for a cross-docking operation.

time

SeparableNDFunction

Optional. Separability is a simplifying assumption.

DateTimeRange

Range of times between two DateTime. For a pointwise date time, use start == end.

google/type/interval.proto serves a similar purpose, but with physical time (we only care about civil time).

Fields
first_date

DateTime

Start of the range.

last_date

DateTime

End of the range

DeleteHubRequest

The request message for DeleteHub method.

Fields
name

string

Required. The name of the hub to delete. Format: "networks/{network}/hubs/{hub}"

DeleteLineRequest

The request message for DeleteLine method.

Fields
name

string

Required. The name of the line to delete. Format: "networks/{network}/lines/{line}"

force

bool

Optional. If set to true, delete the children resources.

DeleteLineRotationRequest

The request message for DeleteLineRotation method.

Fields
name

string

Required. The name of the line rotation to delete. Format: "networks/{network}/lines/{line}/rotations/{rotation}"

DeleteNetworkRequest

The request message for DeleteNetwork method.

Fields
name

string

Required. The name of the network to delete. Format: "networks/{network}"

force

bool

Optional. If set to true, delete the children resources.

DeleteShipmentRequest

The request message for DeleteShipment method.

Fields
name

string

Required. The name of the shipment to delete. Format: "networks/{network}/shipments/{shipment}"

DeleteVehicleRequest

The request message for DeleteVehicle method.

Fields
name

string

Required. The name of the vehicle to delete. Format: "networks/{network}/vehicles/{vehicle}"

DistanceMatrixEntry

Distance between a source hub and a destination hub.

Fields
source_hub

string

Required. Source hub.

destination_hub

string

Required. Destination hub.

weights[]

ValueDimension

Required. Distance between the hubs, measured in several dimensions.

EarlinessTardiness

Cost functions due to a shipment arriving/departing sooner or later than required (soft constraints).

Fields
maximum_earliness

Duration

Optional. Maximum allowable earliness. Useful only with costs.

maximum_tardiness

Duration

Optional. Maximum allowable tardiness. Useful only with costs.

earliness_cost

Function1D

Optional. Cost of earliness. Unset iff no cost for earliness.

tardiness_cost

Function1D

Optional. Cost of tardiness. Unset iff no cost for tardiness.

Function1D

Function of one argument.

Fields
Union field function. The unity of the argument of the function is supposed to be: - if a weight: kg - if a time: min - if a number of pallets: 1 function can be only one of the following:
constant

double

The function is a constant.

pwl

PieceWiseAffineFunction

The function is piecewise linear.

GeneratedLineAndRotation

One rotation of a line that is generated by this API and not the API customer. It is inherently less constrained, and could use any vehicle (unless the API customer decides otherwise in subsequent calls).

Fields
arrival_times

map<string, DateTime>

Output only. Map between hub IDs and times. This map is supposed to have the same keys (minus the source hub, with no arrival time).

departure_times

map<string, DateTime>

Output only. Map between hub IDs and times. This map is supposed to have the same keys (minus the destination hub, with no departure time).

GetHubRequest

The request message for GetHub method.

Fields
name

string

Required. The name of the hub to retrieve. Format: "networks/{network}/hubs/{hub}"

GetLineRequest

The request message for GetLine method.

Fields
name

string

Required. The name of the network to retrieve. Format: "networks/{network}/lines/{line}"

GetLineRotationRequest

The request message for GetLineRotation method.

Fields
name

string

Required. The name of the line rotation to retrieve. Format: "networks/{network}/lines/{line}/rotations/{rotation}"

GetNetworkRequest

The request message for GetNetwork method.

Fields
name

string

Required. The name of the network to retrieve. Format: "networks/{network}"

GetShipmentRequest

The request message for GetShipment method.

Fields
name

string

Required. The name of the shipment to retrieve. Format: "networks/{network}/shipments/{shipment}"

GetVehicleRequest

The request message for GetVehicle method.

Fields
name

string

Required. The name of the vehicle to retrieve. Format: "networks/{network}/vehicles/{vehicle}"

Hub

Shipments must be brought from one hub to another one.

Fields
name

string

Identifier. Cannot be updated.

position

LatLng

Optional. Position to compute real-world paths.

opening_times[]

DateTimeRange

Required. Opening times. For now, use a very rough representation: one entry each time the hub opens (if its workers have a lunch break and no one works at that time, there will be two entries for that day).

cross_docking_capacity

CrossDockingCapacity

Optional. Capacity of the complete hub.

cross_docking_time

CrossDockingTime

Optional. Time to perform one cross-docking operation (per vehicle).

IntegerRange

Range of integers.

Fields
start_value

int32

Interval open if unset.

end_value

int32

Interval open if unset.

Line

A line that is being operated at a given frequency.

Fields
name

string

Identifier. Cannot be updated.

hub_ids[]

string

Required. List of hubs that this line calls at, in the order vehicles stop at them.

LineRotation

A vehicle starts operating this line at a particular time.

Fields
name

string

Identifier. Cannot be updated.

arrival_times

map<string, DateTimeRange>

Optional. Range where departure is allowed without cost (i.e., if not pointwise, the actual arrival times are decided by the system). This map is supposed to have the same keys (minus the source hub, with no arrival time).

departure_times

map<string, DateTimeRange>

Optional. Range where arrival is allowed without cost (i.e., if not pointwise, the actual departure times are decided by the system). This map is supposed to have the same keys (minus the destination hub, with no departure time).

departure_earliness_tardiness_costs

map<string, EarlinessTardiness>

Optional. Earliness/tardiness costs and bounds for departure. This maps is supposed to have the same keys (minus the destination hub, with no departure time).

arrival_earliness_tardiness_costs

map<string, EarlinessTardiness>

Optional. Earliness/tardiness costs and bounds for arrival. This maps is supposed to have the same keys (minus the source hub, with no arrival time).

vehicles[]

string

Optional. List of vehicles that could be doing this line rotation (i.e. allow list). If number_vehicles reduces to one value corresponding to the number of vehicles, all those vehicles will be assigned to the line rotation. If no vehicles, all are considered to be available.

fixed_price

PricingStrategy

Optional. Cost of having any vehicle doing this line, regardless of vehicle (driver, maintenance, etc.).

maximum_number_vehicles

IntegerRange

Optional. Maximum number of vehicles that can be assigned to this rotation. If unset: no limit in terms of vehicles for this rotation. Otherwise, upper bound on the number of vehicles that can be allocated to this rotation (among the allow list vehicle_ids). In particular, a value of 0 disables this rotation (no vehicles allowed).

ListHubsRequest

The request message for ListHubs method.

Fields
parent

string

Required. The parent, which owns this collection of hubs. Format: "networks/{network}"

page_size

int32

Optional. The maximum number of hubs to return. The service may return fewer than this value. If unspecified, at most 50 hubs will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.

page_token

string

Optional. A page token, received from a previous ListHubs call. Provide this to retrieve the subsequent page.

When paginating, all other parameters provided to ListHubs must match the call that provided the page token.

ListHubsResponse

The response message for ListHubs method.

Fields
hubs[]

Hub

The hubs from the specified network.

next_page_token

string

A token, which can be sent as page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.

ListLineRotationsRequest

The request message for ListLineRotations method.

Fields
parent

string

Required. The parent, which owns this collection of line rotations. Format: "networks/{network}/lines/{line}"

page_size

int32

Optional. The maximum number of line rotations to return. The service may return fewer than this value. If unspecified, at most 50 LineRotations will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.

page_token

string

Optional. A page token, received from a previous ListLineRotations call. Provide this to retrieve the subsequent page.

When paginating, all other parameters provided to ListLineRotations must match the call that provided the page token.

ListLineRotationsResponse

The response message for ListLineRotations method.

Fields
line_rotations[]

LineRotation

The line rotations from the specified network and line.

next_page_token

string

A token, which can be sent as page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.

ListLinesRequest

The request message for ListLines method.

Fields
parent

string

Required. The parent, which owns this collection of lines. Format: "networks/{network}"

page_size

int32

Optional. The maximum number of lines to return. The service may return fewer than this value. If unspecified, at most 50 lines will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.

page_token

string

Optional. A page token, received from a previous ListLines call. Provide this to retrieve the subsequent page.

When paginating, all other parameters provided to ListLines must match the call that provided the page token.

ListLinesResponse

The response message for ListLines method.

Fields
lines[]

Line

The lines from the specified network.

next_page_token

string

A token, which can be sent as page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.

ListNetworksRequest

The request message for ListNetworks method.

Fields
page_size

int32

Optional. The maximum number of networks to return. The service may return fewer than this value. If unspecified, at most 50 networks will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.

page_token

string

Optional. A page token, received from a previous ListNetworks call. Provide this to retrieve the subsequent page.

When paginating, all other parameters provided to ListNetworks must match the call that provided the page token.

ListNetworksResponse

The response message for ListNetworks method.

Fields
networks[]

Network

The list of networks.

next_page_token

string

A token, which can be sent as page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.

ListPathsRequest

The request message for ListPaths method.

Fields
parent

string

Required. The name of the network for which paths must be sent. Format: "networks/{network}"

page_size

int32

Optional. The maximum number of networks to return. The service may return fewer than this value. If unspecified, at most 50 networks will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.

page_token

string

Optional. A page token, received from a previous ListNetworks call. Provide this to retrieve the subsequent page.

When paginating, all other parameters provided to ListNetworks must match the call that provided the page token.

ListPathsResponse

The response message for ListPaths method.

Fields
paths[]

Path

The list of paths.

next_page_token

string

A token, which can be sent as page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.

ListShipmentsRequest

The request message for ListShipments method.

Fields
parent

string

Required. The parent, which owns this collection of shipments. Format: "networks/{network}"

page_size

int32

Optional. The maximum number of shipments to return. The service may return fewer than this value. If unspecified, at most 50 shipments will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.

page_token

string

Optional. A page token, received from a previous ListShipments call. Provide this to retrieve the subsequent page.

When paginating, all other parameters provided to ListShipments must match the call that provided the page token.

ListShipmentsResponse

The response message for ListShipments method.

Fields
shipments[]

Shipment

The shipments from the specified network.

next_page_token

string

A token, which can be sent as page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.

ListVehiclesRequest

The request message for ListVehicles method.

Fields
parent

string

Required. The parent, which owns this collection of vehicles. Format: "networks/{network}"

page_size

int32

Optional. The maximum number of vehicles to return. The service may return fewer than this value. If unspecified, at most 50 vehicles will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.

page_token

string

Optional. A page token, received from a previous ListVehicles call. Provide this to retrieve the subsequent page.

When paginating, all other parameters provided to ListVehicles must match the call that provided the page token.

ListVehiclesResponse

The response message for ListVehicles method.

Fields
vehicles[]

Vehicle

The vehicles from the specified network.

next_page_token

string

A token, which can be sent as page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.

MakeHubAvailableRequest

The request message for MakeHubAvailable method.

Fields
name

string

Required. The name of the hub to make available. Format: "networks/{network}/hubs/{hub}"

availability_starts[]

DateTime

Required. The periods where availability will start. They must be points in time in the future. If this field is absent, availability starts when the message is received.

MakeHubAvailableResponse

The response message for MakeHubAvailable method.

Fields
name

string

The name of the hub whose unavailability was updated. Format: "networks/{network}/hubs/{hub}"

path[]

Path

The paths that were updated.

MakeHubUnavailableRequest

The request message for MakeHubUnavailable method.

Fields
name

string

Required. The name of the hub to make unavailable. Format: "networks/{network}/hubs/{hub}"

unavailability_starts[]

DateTime

Required. The periods where unavailability will start. They must be points in time in the future. If this field is absent, unavailability starts when the message is received.

MakeHubUnavailableResponse

The response message for MakeHubUnavailable method.

Fields
name

string

The name of the hub whose unavailability was updated. Format: "networks/{network}/hubs/{hub}"

path[]

Path

The paths that were updated.

MakeLineAvailableRequest

The request message for MakeHubAvailable method.

Fields
name

string

Required. The name of the line to make available. Format: "networks/{network}/lines/{line}"

availability_starts[]

DateTime

Required. The periods where availability will start. They must be points in time in the future. If this field is absent, availability starts when the message is received.

MakeLineAvailableResponse

The response message for MakeLineAvailable method.

Fields
name

string

The name of the line whose unavailability was updated. Format: "networks/{network}/lines/{line}"

path[]

Path

The paths that were updated.

MakeLineUnavailableRequest

The request message for MakeLineUnavailable method.

Fields
name

string

Required. The name of the line to make unavailable. Format: "networks/{network}/lines/{line}"

unavailability_starts[]

DateTime

Required. The periods where unavailability will start. They must be points in time in the future. If this field is absent, unavailability starts when the message is received.

MakeLineUnavailableResponse

The response message for MakeLineUnavailable method.

Fields
name

string

The name of the line whose unavailability was updated. Format: "networks/{network}/lines/{line}"

path[]

Path

The paths that were updated.

MakeVehicleAvailableRequest

The request message for MakeVehicleAvailable method.

Fields
name

string

Required. The name of the vehicle to make available. Format: "networks/{network}/vehicle/{vehicle}"

availability_starts[]

DateTime

Required. The periods where availability will start. They must be points in time in the future. If this field is absent, availability starts when the message is received.

MakeVehicleAvailableResponse

The response message for MakeVehicleAvailable method.

Fields
name

string

The name of the vehicle whose availability was updated. Format: "networks/{network}/vehicles/{vehicle}"

path[]

Path

The paths that were updated.

MakeVehicleUnavailableRequest

The request message for MakeVehicleUnavailable method.

Fields
name

string

Required. The name of the vehicle to make unavailable. Format: "networks/{network}/vehicles/{vehicle}"

unavailability_starts[]

DateTime

Required. The periods where unavailability will start. They must be points in time in the future. If this field is absent, unavailability starts when the message is received.

MakeVehicleUnavailableResponse

The response message for MakeVehicleUnavailable method.

Fields
name

string

The name of the vehicle whose unavailability was updated. Format: "networks/{network}/vehicles/{vehicle}"

path[]

Path

The paths that were updated.

Network

Describes the full existing network that can be used. A given API customer might have several networks (e.g., the main network and a possible future modification to evaluate).

Fields
name

string

Identifier. Cannot be updated.

dimensions[]

ValueDimension

Distance, weight, pallets, etc., plus scaling (to map floats to integers).

pricing

PricingStrategy

Optional. Price to be paid by the sender for shipping a shipment that does not require a dedicated line.

currency_code

string

Optional. Single monetary unit used throughout the network. A given API customer can have several different units for different networks; a network is only allowed to have one monetary unit. The unit must be encoded in ISO 4217.

time_step

Duration

Optional. Time discretization. Decisions are output with this precision in time. Internally, state is kept with this precision.

distance_matrix[]

DistanceMatrixEntry

Optional. Distance matrix (represented a list of weighted directed edges).

Path

Path for a shipment within the network.

Fields
shipment

string

Required. Shipment whose path is being described.

segments[]

AnnotatedPathSegment

Required. Segments of the path.

departure_time

DateTime

Output only. Actual departure time of the shipment.

arrival_time

DateTime

Output only. Actual arrival time of the shipment.

incurred_penalties

double

Output only. Penalties due to soft constraints not respected.

cost_constant

double

Output only. Constant cost for this shipment.

cost

map<string, double>

Output only. Cost by components.

PathSegment

Represents a part of a path, either sent by the API customer to the API server (e.g., state change) or by the API server to the API customer (e.g., routing a shipment).

Fields
source_hub

string

Required. Source of the segment.

destination_hub

string

Required. Destination of the segment.

line

string

Required. Line being followed for this segment.

line_rotation

string

Required. Rotation being followed for this segment.

vehicle

string

Required. Vehicle followed by this segment.

PieceWiseAffineFunction

Piecewise-linear function, limited to one argument. Design similar to https://github.com/google/or-tools/blob/stable/ortools/util/piecewise_linear_function.h

Fields
segments[]

PieceWiseAffineSegment

Linear segments of the function.

PieceWiseAffineSegment

One segment of a piecewise-linear function.

Fields
start_x

double

Beginning of the segment: x.

start_y

double

Beginning of the segment: y.

end_x

double

End of the segment: x.

end_y

double

End of the segment: y.

PricingStrategy

A pricing strategy.

Fields
Union field pricing_strategy. A pricing strategy. pricing_strategy can be only one of the following:
separable

SeparableNDFunction

The pricing strategy is a separable function of several variables.

RouteShipmentRequest

The request message for RouteShipment method.

Fields
parent

string

Required. The parent, the network within which the shipment must be routed. Format: "networks/{network}"

shipment

Shipment

Required. The shipment to route.

RouteShipmentResponse

The response message for RouteShipment method.

Fields
shipment

Shipment

The shipment that was just created.

paths[]

Path

The paths that were changed due to routing the shipment. This field includes at least one entry, the path for the shipment that had to be routed. It may contain more paths for other shipments, reflecting internal state changes.

lines[]

GeneratedLineAndRotation

The line rotations that were created while routing the shipment. It may be empty or contain rotations for other shipments, reflecting internal state changes.

SeparableNDFunction

Function of N arguments expressed as a sum of functions of one argument.

Fields
components

map<string, Function1D>

Components of the function, with one entry per argument/dimension.

constant_price

double

Constant part of the function.

Shipment

Shipment to perform.

Fields
name

string

Identifier. Cannot be updated.

source_hub

string

Required. Hub at which the shipment is made available.

destination_hub

string

Required. Hub to which the shipment must be delivered.

departure_time

DateTime

Required. Departure time.

arrival_time

DateTimeRange

Required. Expected arrival time (i.e. soft constraint).

arrival_earliness_tardiness_cost

EarlinessTardiness

Optional. SLAs indicate that this time may be exceeded with some penalty. (If later than the maximum, the package is no more useful.) The penalty is given by a function of the delay (in minutes).

size[]

ValueDimension

Optional. Used with vehicle and hub capacities.

revenue

double

Optional. Revenue from this package (only used to compute the reward), i.e. price paid by the paying party. If unset, revenue is computed by the system (depending on whether a new line is generated for this shipment or not).

UpdateHubRequest

The request message for UpdateHub method.

Fields
hub

Hub

Required. The hub to update.

The hub's name field is used to identify the hub to update. Format: "networks/{network}/hubs/{hub}"

update_mask

FieldMask

Optional. The list of fields to update.

UpdateLineRequest

The request message for UpdateLine method.

Fields
line

Line

Required. The line to update.

The line's name field is used to identify the line to update. Format: "networks/{network}/lines/{line}"

update_mask

FieldMask

Optional. The list of fields to update.

UpdateLineRotationRequest

The request message for UpdateLineRotation method.

Fields
line_rotation

LineRotation

Required. The network to update.

The rotation's name field is used to identify the rotation to update. Format: "networks/{network}/lines/{line}/rotations/{rotation}"

update_mask

FieldMask

Optional. The list of fields to update.

UpdateNetworkRequest

The request message for UpdateNetwork method.

Fields
network

Network

Required. The network to update.

The network's name field is used to identify the network to update. Format: "networks/{network}"

update_mask

FieldMask

Optional. The list of fields to update.

UpdatePathRequest

The request message for UpdatePath method.

Fields
path

Path

Required. The new path for the shipment.

UpdateVehicleRequest

The request message for UpdateVehicle method.

Fields
vehicle

Vehicle

Required. The vehicle to update.

The vehicle's name field is used to identify the vehicle to update. Format: "networks/{network}/vehicles/{vehicle}"

update_mask

FieldMask

Optional. The list of fields to update.

ValueDimension

A value along one predefined dimension. The field value must be set to the corresponding type of the dimension.

Fields
value

int64

Optional. Value.

dimension

string

Required. Dimension.

Vehicle

No name, it is stored as a map key within the Network.

Fields
name

string

Identifier. Cannot be updated.

capacities[]

ValueDimension

Optional. Vehicle characteristics.

cost

PricingStrategy

Required. Cost for using the vehicle. These are functions of one argument: the distance the vehicle travels, the weight the vehicle transports, the number of pallets the vehicle transports. These functions account for maintenance, fuel, and handling costs. These cost may include an upfront cost (paid once the vehicle is used, mostly useful for subcontracting).

pricing

PricingStrategy

Optional. Price to be paid by the paying party, only if the vehicle is being used in a generated line (i.e. not part of the input network).

allowed_for_generated_lines

bool

Required. Whether this vehicle can be used for generated lines. If set to false, the vehicle will be limited to predefined lines where it is allowed.

vehicle_position_constraints[]

VehiclePositionConstraint

Optional. Forced positions for the current vehicle, along with times. For instance, use entries to model the fact that a vehicle that starts or ends at a given hub.

VehiclePositionConstraint

Constraint on the position of a vehicle.

Fields
time

DateTime

Time of the constraint.

hub_id

string

Hub of the constraint.