REST Resource: networks.vehicles
Stay organized with collections
Save and categorize content based on your preferences.
Resource: Vehicle
No name, it is stored as a map key within the Network.
Fields |
name |
string
Identifier. Cannot be updated.
|
capacities[] |
object (ValueDimension )
Optional. Vehicle characteristics.
|
cost |
object (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 |
object (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).
|
allowedForGeneratedLines |
boolean
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.
|
vehiclePositionConstraints[] |
object (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.
JSON representation |
{
"time": {
object (DateTime )
},
"hubId": string
} |
Fields |
time |
object (DateTime )
Time of the constraint.
|
hubId |
string
Hub of the constraint.
|
Methods |
|
Creates a Vehicle. |
|
Deletes a Vehicle. |
|
Gets the details of a Vehicle. |
|
Lists the Vehicles. |
|
Makes a vehicle available. |
|
Makes a vehicle unavailable. |
|
Updates a Vehicle. |
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-01-14 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-01-14 UTC."],[[["\u003cp\u003eVehicles are fundamental resources within the network, defined by their name, capacities, cost, pricing, and allowed usage.\u003c/p\u003e\n"],["\u003cp\u003eVehicle costs encompass maintenance, fuel, and handling, possibly including upfront costs for subcontracting.\u003c/p\u003e\n"],["\u003cp\u003eVehicles can have constraints on their positions, such as starting or ending at specific hubs at certain times.\u003c/p\u003e\n"],["\u003cp\u003eAPI methods enable managing vehicles including creation, deletion, retrieval, listing, and updating their availability.\u003c/p\u003e\n"]]],["Vehicles, stored as map keys in the Network, are defined by several attributes: a unique `name`, optional `capacities`, required `cost`, optional `pricing`, a boolean `allowedForGeneratedLines`, and optional `vehiclePositionConstraints`. These constraints specify a `time` and `hubId`. Vehicles can be created, deleted, retrieved, listed, marked as available or unavailable, and updated through dedicated methods. Cost includes factors like distance, weight, and upfront payments. Pricing applies to generated lines.\n"],null,["# REST Resource: networks.vehicles\n\nResource: Vehicle\n-----------------\n\nNo name, it is stored as a map key within the Network.\n\n| JSON representation |\n|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"name\": string, \"capacities\": [ { object (/optimization/middlemileoptimization/reference/rest/v1/ValueDimension) } ], \"cost\": { object (/optimization/middlemileoptimization/reference/rest/v1/PricingStrategy) }, \"pricing\": { object (/optimization/middlemileoptimization/reference/rest/v1/PricingStrategy) }, \"allowedForGeneratedLines\": boolean, \"vehiclePositionConstraints\": [ { object (/optimization/middlemileoptimization/reference/rest/v1/networks.vehicles#VehiclePositionConstraint) } ] } ``` |\n\n| Fields ||\n|------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `name` | `string` Identifier. Cannot be updated. |\n| `capacities[]` | `object (`[ValueDimension](/optimization/middlemileoptimization/reference/rest/v1/ValueDimension)`)` Optional. Vehicle characteristics. |\n| `cost` | `object (`[PricingStrategy](/optimization/middlemileoptimization/reference/rest/v1/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). |\n| `pricing` | `object (`[PricingStrategy](/optimization/middlemileoptimization/reference/rest/v1/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). |\n| `allowed``For``Generated``Lines` | `boolean` 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. |\n| `vehicle``Position``Constraints[]` | `object (`[VehiclePositionConstraint](/optimization/middlemileoptimization/reference/rest/v1/networks.vehicles#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. |\n\nVehiclePositionConstraint\n-------------------------\n\nConstraint on the position of a vehicle.\n\n| JSON representation |\n|-------------------------------------------------------------------------------------------------------------------|\n| ``` { \"time\": { object (/optimization/middlemileoptimization/reference/rest/v1/DateTime) }, \"hubId\": string } ``` |\n\n| Fields ||\n|-----------|------------------------------------------------------------------------------------------------------------------|\n| `time` | `object (`[DateTime](/optimization/middlemileoptimization/reference/rest/v1/DateTime)`)` Time of the constraint. |\n| `hub``Id` | `string` Hub of the constraint. |\n\n| Methods ------- ||\n|-----------------------------------------------------------------------------------------------------------------|--------------------------------|\n| ### [create](/optimization/middlemileoptimization/reference/rest/v1/networks.vehicles/create) | Creates a Vehicle. |\n| ### [delete](/optimization/middlemileoptimization/reference/rest/v1/networks.vehicles/delete) | Deletes a Vehicle. |\n| ### [get](/optimization/middlemileoptimization/reference/rest/v1/networks.vehicles/get) | Gets the details of a Vehicle. |\n| ### [list](/optimization/middlemileoptimization/reference/rest/v1/networks.vehicles/list) | Lists the Vehicles. |\n| ### [makeAvailable](/optimization/middlemileoptimization/reference/rest/v1/networks.vehicles/makeAvailable) | Makes a vehicle available. |\n| ### [makeUnavailable](/optimization/middlemileoptimization/reference/rest/v1/networks.vehicles/makeUnavailable) | Makes a vehicle unavailable. |\n| ### [patch](/optimization/middlemileoptimization/reference/rest/v1/networks.vehicles/patch) | Updates a Vehicle. |"]]