Class: Google::Cloud::Optimization::V1::Vehicle
- Inherits:
-
Object
- Object
- Google::Cloud::Optimization::V1::Vehicle
- Extended by:
- Protobuf::MessageExts::ClassMethods
- Includes:
- Protobuf::MessageExts
- Defined in:
- proto_docs/google/cloud/optimization/v1/fleet_routing.rb
Overview
Models a vehicle in a shipment problem. Solving a shipment problem will
build a route starting from start_location
and ending at end_location
for this vehicle. A route is a sequence of visits (see ShipmentRoute
).
Defined Under Namespace
Modules: TravelMode, UnloadingPolicy Classes: DurationLimit, ExtraVisitDurationForVisitTypeEntry, LoadLimit, LoadLimitsEntry
Instance Attribute Summary collapse
-
#break_rule ⇒ ::Google::Cloud::Optimization::V1::BreakRule
Describes the break schedule to be enforced on this vehicle.
-
#break_rule_indices ⇒ ::Array<::Integer>
deprecated
Deprecated.
This field is deprecated and may be removed in the next major version update.
-
#capacities ⇒ ::Array<::Google::Cloud::Optimization::V1::CapacityQuantity>
deprecated
Deprecated.
This field is deprecated and may be removed in the next major version update.
-
#cost_per_hour ⇒ ::Float
Vehicle costs: all costs add up and must be in the same unit as Shipment.penalty_cost.
-
#cost_per_kilometer ⇒ ::Float
Cost per kilometer of the vehicle route.
-
#cost_per_traveled_hour ⇒ ::Float
Cost per traveled hour of the vehicle route.
-
#end_load_intervals ⇒ ::Array<::Google::Cloud::Optimization::V1::CapacityQuantityInterval>
deprecated
Deprecated.
This field is deprecated and may be removed in the next major version update.
-
#end_location ⇒ ::Google::Type::LatLng
Geographic location where the vehicle ends after it has completed its last
VisitRequest
. -
#end_tags ⇒ ::Array<::String>
Specifies tags attached to the end of the vehicle's route.
-
#end_time_windows ⇒ ::Array<::Google::Cloud::Optimization::V1::TimeWindow>
Time windows during which the vehicle may arrive at its end location.
-
#end_waypoint ⇒ ::Google::Cloud::Optimization::V1::Waypoint
Waypoint representing a geographic location where the vehicle ends after it has completed its last
VisitRequest
. -
#extra_visit_duration_for_visit_type ⇒ ::Google::Protobuf::Map{::String => ::Google::Protobuf::Duration}
Specifies a map from visit_types strings to durations.
-
#fixed_cost ⇒ ::Float
Fixed cost applied if this vehicle is used to handle a shipment.
-
#ignore ⇒ ::Boolean
If true,
used_if_route_is_empty
must be false, and this vehicle will remain unused. -
#label ⇒ ::String
Specifies a label for this vehicle.
-
#load_limits ⇒ ::Google::Protobuf::Map{::String => ::Google::Cloud::Optimization::V1::Vehicle::LoadLimit}
Capacities of the vehicle (weight, volume, # of pallets for example).
-
#route_distance_limit ⇒ ::Google::Cloud::Optimization::V1::DistanceLimit
Limit applied to the total distance of the vehicle's route.
-
#route_duration_limit ⇒ ::Google::Cloud::Optimization::V1::Vehicle::DurationLimit
Limit applied to the total duration of the vehicle's route.
-
#route_modifiers ⇒ ::Google::Cloud::Optimization::V1::RouteModifiers
Optional.
-
#start_load_intervals ⇒ ::Array<::Google::Cloud::Optimization::V1::CapacityQuantityInterval>
deprecated
Deprecated.
This field is deprecated and may be removed in the next major version update.
-
#start_location ⇒ ::Google::Type::LatLng
Geographic location where the vehicle starts before picking up any shipments.
-
#start_tags ⇒ ::Array<::String>
Specifies tags attached to the start of the vehicle's route.
-
#start_time_windows ⇒ ::Array<::Google::Cloud::Optimization::V1::TimeWindow>
Time windows during which the vehicle may depart its start location.
-
#start_waypoint ⇒ ::Google::Cloud::Optimization::V1::Waypoint
Waypoint representing a geographic location where the vehicle starts before picking up any shipments.
-
#travel_duration_limit ⇒ ::Google::Cloud::Optimization::V1::Vehicle::DurationLimit
Limit applied to the travel duration of the vehicle's route.
-
#travel_duration_multiple ⇒ ::Float
Specifies a multiplicative factor that can be used to increase or decrease travel times of this vehicle.
-
#travel_mode ⇒ ::Google::Cloud::Optimization::V1::Vehicle::TravelMode
The travel mode which affects the roads usable by the vehicle and its speed.
-
#unloading_policy ⇒ ::Google::Cloud::Optimization::V1::Vehicle::UnloadingPolicy
Unloading policy enforced on the vehicle.
-
#used_if_route_is_empty ⇒ ::Boolean
This field only applies to vehicles when their route does not serve any shipments.
Instance Attribute Details
#break_rule ⇒ ::Google::Cloud::Optimization::V1::BreakRule
Returns Describes the break schedule to be enforced on this vehicle. If empty, no breaks will be scheduled for this vehicle.
1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 |
# File 'proto_docs/google/cloud/optimization/v1/fleet_routing.rb', line 1371 class Vehicle include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Defines a load limit applying to a vehicle, e.g. "this truck may only # carry up to 3500 kg". See # {::Google::Cloud::Optimization::V1::Vehicle#load_limits load_limits}. # @!attribute [rw] max_load # @return [::Integer] # The maximum acceptable amount of load. # @!attribute [rw] soft_max_load # @return [::Integer] # A soft limit of the load. See # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit#cost_per_unit_above_soft_max cost_per_unit_above_soft_max}. # @!attribute [rw] cost_per_unit_above_soft_max # @return [::Float] # If the load ever exceeds # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit#soft_max_load soft_max_load} # along this vehicle's route, the following cost penalty applies (only once # per vehicle): (load - # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit#soft_max_load soft_max_load}) # * {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit#cost_per_unit_above_soft_max cost_per_unit_above_soft_max}. All costs # add up and must be in the same unit as # {::Google::Cloud::Optimization::V1::Shipment#penalty_cost Shipment.penalty_cost}. # @!attribute [rw] start_load_interval # @return [::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval] # The acceptable load interval of the vehicle at the start of the route. # @!attribute [rw] end_load_interval # @return [::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval] # The acceptable load interval of the vehicle at the end of the route. class LoadLimit include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Interval of acceptable load amounts. # @!attribute [rw] min # @return [::Integer] # A minimum acceptable load. Must be ≥ 0. # If they're both specified, # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval#min min} must # be ≤ # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval#max max}. # @!attribute [rw] max # @return [::Integer] # A maximum acceptable load. Must be ≥ 0. If unspecified, the maximum # load is unrestricted by this message. # If they're both specified, # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval#min min} must # be ≤ # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval#max max}. class Interval include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # A limit defining a maximum duration of the route of a vehicle. It can be # either hard or soft. # # When a soft limit field is defined, both the soft max threshold and its # associated cost must be defined together. # @!attribute [rw] max_duration # @return [::Google::Protobuf::Duration] # A hard limit constraining the duration to be at most max_duration. # @!attribute [rw] soft_max_duration # @return [::Google::Protobuf::Duration] # A soft limit not enforcing a maximum duration limit, but when violated # makes the route incur a cost. This cost adds up to other costs defined in # the model, with the same unit. # # If defined, `soft_max_duration` must be nonnegative. If max_duration is # also defined, `soft_max_duration` must be less than max_duration. # @!attribute [rw] cost_per_hour_after_soft_max # @return [::Float] # Cost per hour incurred if the `soft_max_duration` threshold is violated. # The additional cost is 0 if the duration is under the threshold, # otherwise the cost depends on the duration as follows: # ``` # cost_per_hour_after_soft_max * (duration - soft_max_duration) # ``` # The cost must be nonnegative. # @!attribute [rw] quadratic_soft_max_duration # @return [::Google::Protobuf::Duration] # A soft limit not enforcing a maximum duration limit, but when violated # makes the route incur a cost, quadratic in the duration. This cost adds # up to other costs defined in the model, with the same unit. # # If defined, `quadratic_soft_max_duration` must be nonnegative. If # `max_duration` is also defined, `quadratic_soft_max_duration` must be # less than `max_duration`, and the difference must be no larger than one # day: # # `max_duration - quadratic_soft_max_duration <= 86400 seconds` # @!attribute [rw] cost_per_square_hour_after_quadratic_soft_max # @return [::Float] # Cost per square hour incurred if the # `quadratic_soft_max_duration` threshold is violated. # # The additional cost is 0 if the duration is under the threshold, # otherwise the cost depends on the duration as follows: # # ``` # cost_per_square_hour_after_quadratic_soft_max * # (duration - quadratic_soft_max_duration)^2 # ``` # # The cost must be nonnegative. class DurationLimit include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Cloud::Optimization::V1::Vehicle::LoadLimit] class LoadLimitsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Protobuf::Duration] class ExtraVisitDurationForVisitTypeEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Travel modes which can be used by vehicles. # # These should be a subset of the Google Maps Platform Routes Preferred API # travel modes, see: # https://developers.google.com/maps/documentation/routes_preferred/reference/rest/Shared.Types/RouteTravelMode. module TravelMode # Unspecified travel mode, equivalent to `DRIVING`. TRAVEL_MODE_UNSPECIFIED = 0 # Travel mode corresponding to driving directions (car, ...). DRIVING = 1 # Travel mode corresponding to walking directions. WALKING = 2 end # Policy on how a vehicle can be unloaded. Applies only to shipments having # both a pickup and a delivery. # # Other shipments are free to occur anywhere on the route independent of # `unloading_policy`. module UnloadingPolicy # Unspecified unloading policy; deliveries must just occur after their # corresponding pickups. UNLOADING_POLICY_UNSPECIFIED = 0 # Deliveries must occur in reverse order of pickups LAST_IN_FIRST_OUT = 1 # Deliveries must occur in the same order as pickups FIRST_IN_FIRST_OUT = 2 end end |
#break_rule_indices ⇒ ::Array<::Integer>
This field is deprecated and may be removed in the next major version update.
Returns Deprecated: No longer used.
Indices in the break_rule
field in the source
ShipmentModel. They
correspond to break rules enforced on the vehicle.
As of 2018/03, at most one rule index per vehicle can be specified.
1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 |
# File 'proto_docs/google/cloud/optimization/v1/fleet_routing.rb', line 1371 class Vehicle include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Defines a load limit applying to a vehicle, e.g. "this truck may only # carry up to 3500 kg". See # {::Google::Cloud::Optimization::V1::Vehicle#load_limits load_limits}. # @!attribute [rw] max_load # @return [::Integer] # The maximum acceptable amount of load. # @!attribute [rw] soft_max_load # @return [::Integer] # A soft limit of the load. See # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit#cost_per_unit_above_soft_max cost_per_unit_above_soft_max}. # @!attribute [rw] cost_per_unit_above_soft_max # @return [::Float] # If the load ever exceeds # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit#soft_max_load soft_max_load} # along this vehicle's route, the following cost penalty applies (only once # per vehicle): (load - # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit#soft_max_load soft_max_load}) # * {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit#cost_per_unit_above_soft_max cost_per_unit_above_soft_max}. All costs # add up and must be in the same unit as # {::Google::Cloud::Optimization::V1::Shipment#penalty_cost Shipment.penalty_cost}. # @!attribute [rw] start_load_interval # @return [::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval] # The acceptable load interval of the vehicle at the start of the route. # @!attribute [rw] end_load_interval # @return [::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval] # The acceptable load interval of the vehicle at the end of the route. class LoadLimit include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Interval of acceptable load amounts. # @!attribute [rw] min # @return [::Integer] # A minimum acceptable load. Must be ≥ 0. # If they're both specified, # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval#min min} must # be ≤ # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval#max max}. # @!attribute [rw] max # @return [::Integer] # A maximum acceptable load. Must be ≥ 0. If unspecified, the maximum # load is unrestricted by this message. # If they're both specified, # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval#min min} must # be ≤ # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval#max max}. class Interval include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # A limit defining a maximum duration of the route of a vehicle. It can be # either hard or soft. # # When a soft limit field is defined, both the soft max threshold and its # associated cost must be defined together. # @!attribute [rw] max_duration # @return [::Google::Protobuf::Duration] # A hard limit constraining the duration to be at most max_duration. # @!attribute [rw] soft_max_duration # @return [::Google::Protobuf::Duration] # A soft limit not enforcing a maximum duration limit, but when violated # makes the route incur a cost. This cost adds up to other costs defined in # the model, with the same unit. # # If defined, `soft_max_duration` must be nonnegative. If max_duration is # also defined, `soft_max_duration` must be less than max_duration. # @!attribute [rw] cost_per_hour_after_soft_max # @return [::Float] # Cost per hour incurred if the `soft_max_duration` threshold is violated. # The additional cost is 0 if the duration is under the threshold, # otherwise the cost depends on the duration as follows: # ``` # cost_per_hour_after_soft_max * (duration - soft_max_duration) # ``` # The cost must be nonnegative. # @!attribute [rw] quadratic_soft_max_duration # @return [::Google::Protobuf::Duration] # A soft limit not enforcing a maximum duration limit, but when violated # makes the route incur a cost, quadratic in the duration. This cost adds # up to other costs defined in the model, with the same unit. # # If defined, `quadratic_soft_max_duration` must be nonnegative. If # `max_duration` is also defined, `quadratic_soft_max_duration` must be # less than `max_duration`, and the difference must be no larger than one # day: # # `max_duration - quadratic_soft_max_duration <= 86400 seconds` # @!attribute [rw] cost_per_square_hour_after_quadratic_soft_max # @return [::Float] # Cost per square hour incurred if the # `quadratic_soft_max_duration` threshold is violated. # # The additional cost is 0 if the duration is under the threshold, # otherwise the cost depends on the duration as follows: # # ``` # cost_per_square_hour_after_quadratic_soft_max * # (duration - quadratic_soft_max_duration)^2 # ``` # # The cost must be nonnegative. class DurationLimit include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Cloud::Optimization::V1::Vehicle::LoadLimit] class LoadLimitsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Protobuf::Duration] class ExtraVisitDurationForVisitTypeEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Travel modes which can be used by vehicles. # # These should be a subset of the Google Maps Platform Routes Preferred API # travel modes, see: # https://developers.google.com/maps/documentation/routes_preferred/reference/rest/Shared.Types/RouteTravelMode. module TravelMode # Unspecified travel mode, equivalent to `DRIVING`. TRAVEL_MODE_UNSPECIFIED = 0 # Travel mode corresponding to driving directions (car, ...). DRIVING = 1 # Travel mode corresponding to walking directions. WALKING = 2 end # Policy on how a vehicle can be unloaded. Applies only to shipments having # both a pickup and a delivery. # # Other shipments are free to occur anywhere on the route independent of # `unloading_policy`. module UnloadingPolicy # Unspecified unloading policy; deliveries must just occur after their # corresponding pickups. UNLOADING_POLICY_UNSPECIFIED = 0 # Deliveries must occur in reverse order of pickups LAST_IN_FIRST_OUT = 1 # Deliveries must occur in the same order as pickups FIRST_IN_FIRST_OUT = 2 end end |
#capacities ⇒ ::Array<::Google::Cloud::Optimization::V1::CapacityQuantity>
This field is deprecated and may be removed in the next major version update.
Returns Deprecated: Use Vehicle.load_limits instead.
1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 |
# File 'proto_docs/google/cloud/optimization/v1/fleet_routing.rb', line 1371 class Vehicle include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Defines a load limit applying to a vehicle, e.g. "this truck may only # carry up to 3500 kg". See # {::Google::Cloud::Optimization::V1::Vehicle#load_limits load_limits}. # @!attribute [rw] max_load # @return [::Integer] # The maximum acceptable amount of load. # @!attribute [rw] soft_max_load # @return [::Integer] # A soft limit of the load. See # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit#cost_per_unit_above_soft_max cost_per_unit_above_soft_max}. # @!attribute [rw] cost_per_unit_above_soft_max # @return [::Float] # If the load ever exceeds # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit#soft_max_load soft_max_load} # along this vehicle's route, the following cost penalty applies (only once # per vehicle): (load - # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit#soft_max_load soft_max_load}) # * {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit#cost_per_unit_above_soft_max cost_per_unit_above_soft_max}. All costs # add up and must be in the same unit as # {::Google::Cloud::Optimization::V1::Shipment#penalty_cost Shipment.penalty_cost}. # @!attribute [rw] start_load_interval # @return [::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval] # The acceptable load interval of the vehicle at the start of the route. # @!attribute [rw] end_load_interval # @return [::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval] # The acceptable load interval of the vehicle at the end of the route. class LoadLimit include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Interval of acceptable load amounts. # @!attribute [rw] min # @return [::Integer] # A minimum acceptable load. Must be ≥ 0. # If they're both specified, # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval#min min} must # be ≤ # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval#max max}. # @!attribute [rw] max # @return [::Integer] # A maximum acceptable load. Must be ≥ 0. If unspecified, the maximum # load is unrestricted by this message. # If they're both specified, # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval#min min} must # be ≤ # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval#max max}. class Interval include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # A limit defining a maximum duration of the route of a vehicle. It can be # either hard or soft. # # When a soft limit field is defined, both the soft max threshold and its # associated cost must be defined together. # @!attribute [rw] max_duration # @return [::Google::Protobuf::Duration] # A hard limit constraining the duration to be at most max_duration. # @!attribute [rw] soft_max_duration # @return [::Google::Protobuf::Duration] # A soft limit not enforcing a maximum duration limit, but when violated # makes the route incur a cost. This cost adds up to other costs defined in # the model, with the same unit. # # If defined, `soft_max_duration` must be nonnegative. If max_duration is # also defined, `soft_max_duration` must be less than max_duration. # @!attribute [rw] cost_per_hour_after_soft_max # @return [::Float] # Cost per hour incurred if the `soft_max_duration` threshold is violated. # The additional cost is 0 if the duration is under the threshold, # otherwise the cost depends on the duration as follows: # ``` # cost_per_hour_after_soft_max * (duration - soft_max_duration) # ``` # The cost must be nonnegative. # @!attribute [rw] quadratic_soft_max_duration # @return [::Google::Protobuf::Duration] # A soft limit not enforcing a maximum duration limit, but when violated # makes the route incur a cost, quadratic in the duration. This cost adds # up to other costs defined in the model, with the same unit. # # If defined, `quadratic_soft_max_duration` must be nonnegative. If # `max_duration` is also defined, `quadratic_soft_max_duration` must be # less than `max_duration`, and the difference must be no larger than one # day: # # `max_duration - quadratic_soft_max_duration <= 86400 seconds` # @!attribute [rw] cost_per_square_hour_after_quadratic_soft_max # @return [::Float] # Cost per square hour incurred if the # `quadratic_soft_max_duration` threshold is violated. # # The additional cost is 0 if the duration is under the threshold, # otherwise the cost depends on the duration as follows: # # ``` # cost_per_square_hour_after_quadratic_soft_max * # (duration - quadratic_soft_max_duration)^2 # ``` # # The cost must be nonnegative. class DurationLimit include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Cloud::Optimization::V1::Vehicle::LoadLimit] class LoadLimitsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Protobuf::Duration] class ExtraVisitDurationForVisitTypeEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Travel modes which can be used by vehicles. # # These should be a subset of the Google Maps Platform Routes Preferred API # travel modes, see: # https://developers.google.com/maps/documentation/routes_preferred/reference/rest/Shared.Types/RouteTravelMode. module TravelMode # Unspecified travel mode, equivalent to `DRIVING`. TRAVEL_MODE_UNSPECIFIED = 0 # Travel mode corresponding to driving directions (car, ...). DRIVING = 1 # Travel mode corresponding to walking directions. WALKING = 2 end # Policy on how a vehicle can be unloaded. Applies only to shipments having # both a pickup and a delivery. # # Other shipments are free to occur anywhere on the route independent of # `unloading_policy`. module UnloadingPolicy # Unspecified unloading policy; deliveries must just occur after their # corresponding pickups. UNLOADING_POLICY_UNSPECIFIED = 0 # Deliveries must occur in reverse order of pickups LAST_IN_FIRST_OUT = 1 # Deliveries must occur in the same order as pickups FIRST_IN_FIRST_OUT = 2 end end |
#cost_per_hour ⇒ ::Float
Returns Vehicle costs: all costs add up and must be in the same unit as Shipment.penalty_cost.
Cost per hour of the vehicle route. This cost is applied to the total time
taken by the route, and includes travel time, waiting time, and visit time.
Using cost_per_hour
instead of just cost_per_traveled_hour
may result
in additional latency.
1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 |
# File 'proto_docs/google/cloud/optimization/v1/fleet_routing.rb', line 1371 class Vehicle include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Defines a load limit applying to a vehicle, e.g. "this truck may only # carry up to 3500 kg". See # {::Google::Cloud::Optimization::V1::Vehicle#load_limits load_limits}. # @!attribute [rw] max_load # @return [::Integer] # The maximum acceptable amount of load. # @!attribute [rw] soft_max_load # @return [::Integer] # A soft limit of the load. See # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit#cost_per_unit_above_soft_max cost_per_unit_above_soft_max}. # @!attribute [rw] cost_per_unit_above_soft_max # @return [::Float] # If the load ever exceeds # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit#soft_max_load soft_max_load} # along this vehicle's route, the following cost penalty applies (only once # per vehicle): (load - # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit#soft_max_load soft_max_load}) # * {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit#cost_per_unit_above_soft_max cost_per_unit_above_soft_max}. All costs # add up and must be in the same unit as # {::Google::Cloud::Optimization::V1::Shipment#penalty_cost Shipment.penalty_cost}. # @!attribute [rw] start_load_interval # @return [::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval] # The acceptable load interval of the vehicle at the start of the route. # @!attribute [rw] end_load_interval # @return [::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval] # The acceptable load interval of the vehicle at the end of the route. class LoadLimit include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Interval of acceptable load amounts. # @!attribute [rw] min # @return [::Integer] # A minimum acceptable load. Must be ≥ 0. # If they're both specified, # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval#min min} must # be ≤ # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval#max max}. # @!attribute [rw] max # @return [::Integer] # A maximum acceptable load. Must be ≥ 0. If unspecified, the maximum # load is unrestricted by this message. # If they're both specified, # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval#min min} must # be ≤ # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval#max max}. class Interval include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # A limit defining a maximum duration of the route of a vehicle. It can be # either hard or soft. # # When a soft limit field is defined, both the soft max threshold and its # associated cost must be defined together. # @!attribute [rw] max_duration # @return [::Google::Protobuf::Duration] # A hard limit constraining the duration to be at most max_duration. # @!attribute [rw] soft_max_duration # @return [::Google::Protobuf::Duration] # A soft limit not enforcing a maximum duration limit, but when violated # makes the route incur a cost. This cost adds up to other costs defined in # the model, with the same unit. # # If defined, `soft_max_duration` must be nonnegative. If max_duration is # also defined, `soft_max_duration` must be less than max_duration. # @!attribute [rw] cost_per_hour_after_soft_max # @return [::Float] # Cost per hour incurred if the `soft_max_duration` threshold is violated. # The additional cost is 0 if the duration is under the threshold, # otherwise the cost depends on the duration as follows: # ``` # cost_per_hour_after_soft_max * (duration - soft_max_duration) # ``` # The cost must be nonnegative. # @!attribute [rw] quadratic_soft_max_duration # @return [::Google::Protobuf::Duration] # A soft limit not enforcing a maximum duration limit, but when violated # makes the route incur a cost, quadratic in the duration. This cost adds # up to other costs defined in the model, with the same unit. # # If defined, `quadratic_soft_max_duration` must be nonnegative. If # `max_duration` is also defined, `quadratic_soft_max_duration` must be # less than `max_duration`, and the difference must be no larger than one # day: # # `max_duration - quadratic_soft_max_duration <= 86400 seconds` # @!attribute [rw] cost_per_square_hour_after_quadratic_soft_max # @return [::Float] # Cost per square hour incurred if the # `quadratic_soft_max_duration` threshold is violated. # # The additional cost is 0 if the duration is under the threshold, # otherwise the cost depends on the duration as follows: # # ``` # cost_per_square_hour_after_quadratic_soft_max * # (duration - quadratic_soft_max_duration)^2 # ``` # # The cost must be nonnegative. class DurationLimit include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Cloud::Optimization::V1::Vehicle::LoadLimit] class LoadLimitsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Protobuf::Duration] class ExtraVisitDurationForVisitTypeEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Travel modes which can be used by vehicles. # # These should be a subset of the Google Maps Platform Routes Preferred API # travel modes, see: # https://developers.google.com/maps/documentation/routes_preferred/reference/rest/Shared.Types/RouteTravelMode. module TravelMode # Unspecified travel mode, equivalent to `DRIVING`. TRAVEL_MODE_UNSPECIFIED = 0 # Travel mode corresponding to driving directions (car, ...). DRIVING = 1 # Travel mode corresponding to walking directions. WALKING = 2 end # Policy on how a vehicle can be unloaded. Applies only to shipments having # both a pickup and a delivery. # # Other shipments are free to occur anywhere on the route independent of # `unloading_policy`. module UnloadingPolicy # Unspecified unloading policy; deliveries must just occur after their # corresponding pickups. UNLOADING_POLICY_UNSPECIFIED = 0 # Deliveries must occur in reverse order of pickups LAST_IN_FIRST_OUT = 1 # Deliveries must occur in the same order as pickups FIRST_IN_FIRST_OUT = 2 end end |
#cost_per_kilometer ⇒ ::Float
Returns Cost per kilometer of the vehicle route. This cost is applied to the
distance reported in the
ShipmentRoute.transitions
and does not apply to any distance implicitly traveled from the
arrival_location
to the departure_location
of a single VisitRequest
.
1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 |
# File 'proto_docs/google/cloud/optimization/v1/fleet_routing.rb', line 1371 class Vehicle include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Defines a load limit applying to a vehicle, e.g. "this truck may only # carry up to 3500 kg". See # {::Google::Cloud::Optimization::V1::Vehicle#load_limits load_limits}. # @!attribute [rw] max_load # @return [::Integer] # The maximum acceptable amount of load. # @!attribute [rw] soft_max_load # @return [::Integer] # A soft limit of the load. See # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit#cost_per_unit_above_soft_max cost_per_unit_above_soft_max}. # @!attribute [rw] cost_per_unit_above_soft_max # @return [::Float] # If the load ever exceeds # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit#soft_max_load soft_max_load} # along this vehicle's route, the following cost penalty applies (only once # per vehicle): (load - # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit#soft_max_load soft_max_load}) # * {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit#cost_per_unit_above_soft_max cost_per_unit_above_soft_max}. All costs # add up and must be in the same unit as # {::Google::Cloud::Optimization::V1::Shipment#penalty_cost Shipment.penalty_cost}. # @!attribute [rw] start_load_interval # @return [::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval] # The acceptable load interval of the vehicle at the start of the route. # @!attribute [rw] end_load_interval # @return [::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval] # The acceptable load interval of the vehicle at the end of the route. class LoadLimit include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Interval of acceptable load amounts. # @!attribute [rw] min # @return [::Integer] # A minimum acceptable load. Must be ≥ 0. # If they're both specified, # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval#min min} must # be ≤ # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval#max max}. # @!attribute [rw] max # @return [::Integer] # A maximum acceptable load. Must be ≥ 0. If unspecified, the maximum # load is unrestricted by this message. # If they're both specified, # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval#min min} must # be ≤ # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval#max max}. class Interval include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # A limit defining a maximum duration of the route of a vehicle. It can be # either hard or soft. # # When a soft limit field is defined, both the soft max threshold and its # associated cost must be defined together. # @!attribute [rw] max_duration # @return [::Google::Protobuf::Duration] # A hard limit constraining the duration to be at most max_duration. # @!attribute [rw] soft_max_duration # @return [::Google::Protobuf::Duration] # A soft limit not enforcing a maximum duration limit, but when violated # makes the route incur a cost. This cost adds up to other costs defined in # the model, with the same unit. # # If defined, `soft_max_duration` must be nonnegative. If max_duration is # also defined, `soft_max_duration` must be less than max_duration. # @!attribute [rw] cost_per_hour_after_soft_max # @return [::Float] # Cost per hour incurred if the `soft_max_duration` threshold is violated. # The additional cost is 0 if the duration is under the threshold, # otherwise the cost depends on the duration as follows: # ``` # cost_per_hour_after_soft_max * (duration - soft_max_duration) # ``` # The cost must be nonnegative. # @!attribute [rw] quadratic_soft_max_duration # @return [::Google::Protobuf::Duration] # A soft limit not enforcing a maximum duration limit, but when violated # makes the route incur a cost, quadratic in the duration. This cost adds # up to other costs defined in the model, with the same unit. # # If defined, `quadratic_soft_max_duration` must be nonnegative. If # `max_duration` is also defined, `quadratic_soft_max_duration` must be # less than `max_duration`, and the difference must be no larger than one # day: # # `max_duration - quadratic_soft_max_duration <= 86400 seconds` # @!attribute [rw] cost_per_square_hour_after_quadratic_soft_max # @return [::Float] # Cost per square hour incurred if the # `quadratic_soft_max_duration` threshold is violated. # # The additional cost is 0 if the duration is under the threshold, # otherwise the cost depends on the duration as follows: # # ``` # cost_per_square_hour_after_quadratic_soft_max * # (duration - quadratic_soft_max_duration)^2 # ``` # # The cost must be nonnegative. class DurationLimit include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Cloud::Optimization::V1::Vehicle::LoadLimit] class LoadLimitsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Protobuf::Duration] class ExtraVisitDurationForVisitTypeEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Travel modes which can be used by vehicles. # # These should be a subset of the Google Maps Platform Routes Preferred API # travel modes, see: # https://developers.google.com/maps/documentation/routes_preferred/reference/rest/Shared.Types/RouteTravelMode. module TravelMode # Unspecified travel mode, equivalent to `DRIVING`. TRAVEL_MODE_UNSPECIFIED = 0 # Travel mode corresponding to driving directions (car, ...). DRIVING = 1 # Travel mode corresponding to walking directions. WALKING = 2 end # Policy on how a vehicle can be unloaded. Applies only to shipments having # both a pickup and a delivery. # # Other shipments are free to occur anywhere on the route independent of # `unloading_policy`. module UnloadingPolicy # Unspecified unloading policy; deliveries must just occur after their # corresponding pickups. UNLOADING_POLICY_UNSPECIFIED = 0 # Deliveries must occur in reverse order of pickups LAST_IN_FIRST_OUT = 1 # Deliveries must occur in the same order as pickups FIRST_IN_FIRST_OUT = 2 end end |
#cost_per_traveled_hour ⇒ ::Float
Returns Cost per traveled hour of the vehicle route. This cost is applied only to travel time taken by the route (i.e., that reported in ShipmentRoute.transitions), and excludes waiting time and visit time.
1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 |
# File 'proto_docs/google/cloud/optimization/v1/fleet_routing.rb', line 1371 class Vehicle include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Defines a load limit applying to a vehicle, e.g. "this truck may only # carry up to 3500 kg". See # {::Google::Cloud::Optimization::V1::Vehicle#load_limits load_limits}. # @!attribute [rw] max_load # @return [::Integer] # The maximum acceptable amount of load. # @!attribute [rw] soft_max_load # @return [::Integer] # A soft limit of the load. See # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit#cost_per_unit_above_soft_max cost_per_unit_above_soft_max}. # @!attribute [rw] cost_per_unit_above_soft_max # @return [::Float] # If the load ever exceeds # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit#soft_max_load soft_max_load} # along this vehicle's route, the following cost penalty applies (only once # per vehicle): (load - # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit#soft_max_load soft_max_load}) # * {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit#cost_per_unit_above_soft_max cost_per_unit_above_soft_max}. All costs # add up and must be in the same unit as # {::Google::Cloud::Optimization::V1::Shipment#penalty_cost Shipment.penalty_cost}. # @!attribute [rw] start_load_interval # @return [::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval] # The acceptable load interval of the vehicle at the start of the route. # @!attribute [rw] end_load_interval # @return [::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval] # The acceptable load interval of the vehicle at the end of the route. class LoadLimit include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Interval of acceptable load amounts. # @!attribute [rw] min # @return [::Integer] # A minimum acceptable load. Must be ≥ 0. # If they're both specified, # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval#min min} must # be ≤ # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval#max max}. # @!attribute [rw] max # @return [::Integer] # A maximum acceptable load. Must be ≥ 0. If unspecified, the maximum # load is unrestricted by this message. # If they're both specified, # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval#min min} must # be ≤ # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval#max max}. class Interval include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # A limit defining a maximum duration of the route of a vehicle. It can be # either hard or soft. # # When a soft limit field is defined, both the soft max threshold and its # associated cost must be defined together. # @!attribute [rw] max_duration # @return [::Google::Protobuf::Duration] # A hard limit constraining the duration to be at most max_duration. # @!attribute [rw] soft_max_duration # @return [::Google::Protobuf::Duration] # A soft limit not enforcing a maximum duration limit, but when violated # makes the route incur a cost. This cost adds up to other costs defined in # the model, with the same unit. # # If defined, `soft_max_duration` must be nonnegative. If max_duration is # also defined, `soft_max_duration` must be less than max_duration. # @!attribute [rw] cost_per_hour_after_soft_max # @return [::Float] # Cost per hour incurred if the `soft_max_duration` threshold is violated. # The additional cost is 0 if the duration is under the threshold, # otherwise the cost depends on the duration as follows: # ``` # cost_per_hour_after_soft_max * (duration - soft_max_duration) # ``` # The cost must be nonnegative. # @!attribute [rw] quadratic_soft_max_duration # @return [::Google::Protobuf::Duration] # A soft limit not enforcing a maximum duration limit, but when violated # makes the route incur a cost, quadratic in the duration. This cost adds # up to other costs defined in the model, with the same unit. # # If defined, `quadratic_soft_max_duration` must be nonnegative. If # `max_duration` is also defined, `quadratic_soft_max_duration` must be # less than `max_duration`, and the difference must be no larger than one # day: # # `max_duration - quadratic_soft_max_duration <= 86400 seconds` # @!attribute [rw] cost_per_square_hour_after_quadratic_soft_max # @return [::Float] # Cost per square hour incurred if the # `quadratic_soft_max_duration` threshold is violated. # # The additional cost is 0 if the duration is under the threshold, # otherwise the cost depends on the duration as follows: # # ``` # cost_per_square_hour_after_quadratic_soft_max * # (duration - quadratic_soft_max_duration)^2 # ``` # # The cost must be nonnegative. class DurationLimit include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Cloud::Optimization::V1::Vehicle::LoadLimit] class LoadLimitsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Protobuf::Duration] class ExtraVisitDurationForVisitTypeEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Travel modes which can be used by vehicles. # # These should be a subset of the Google Maps Platform Routes Preferred API # travel modes, see: # https://developers.google.com/maps/documentation/routes_preferred/reference/rest/Shared.Types/RouteTravelMode. module TravelMode # Unspecified travel mode, equivalent to `DRIVING`. TRAVEL_MODE_UNSPECIFIED = 0 # Travel mode corresponding to driving directions (car, ...). DRIVING = 1 # Travel mode corresponding to walking directions. WALKING = 2 end # Policy on how a vehicle can be unloaded. Applies only to shipments having # both a pickup and a delivery. # # Other shipments are free to occur anywhere on the route independent of # `unloading_policy`. module UnloadingPolicy # Unspecified unloading policy; deliveries must just occur after their # corresponding pickups. UNLOADING_POLICY_UNSPECIFIED = 0 # Deliveries must occur in reverse order of pickups LAST_IN_FIRST_OUT = 1 # Deliveries must occur in the same order as pickups FIRST_IN_FIRST_OUT = 2 end end |
#end_load_intervals ⇒ ::Array<::Google::Cloud::Optimization::V1::CapacityQuantityInterval>
This field is deprecated and may be removed in the next major version update.
Returns Deprecated: Use Vehicle.LoadLimit.end_load_interval instead.
1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 |
# File 'proto_docs/google/cloud/optimization/v1/fleet_routing.rb', line 1371 class Vehicle include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Defines a load limit applying to a vehicle, e.g. "this truck may only # carry up to 3500 kg". See # {::Google::Cloud::Optimization::V1::Vehicle#load_limits load_limits}. # @!attribute [rw] max_load # @return [::Integer] # The maximum acceptable amount of load. # @!attribute [rw] soft_max_load # @return [::Integer] # A soft limit of the load. See # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit#cost_per_unit_above_soft_max cost_per_unit_above_soft_max}. # @!attribute [rw] cost_per_unit_above_soft_max # @return [::Float] # If the load ever exceeds # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit#soft_max_load soft_max_load} # along this vehicle's route, the following cost penalty applies (only once # per vehicle): (load - # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit#soft_max_load soft_max_load}) # * {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit#cost_per_unit_above_soft_max cost_per_unit_above_soft_max}. All costs # add up and must be in the same unit as # {::Google::Cloud::Optimization::V1::Shipment#penalty_cost Shipment.penalty_cost}. # @!attribute [rw] start_load_interval # @return [::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval] # The acceptable load interval of the vehicle at the start of the route. # @!attribute [rw] end_load_interval # @return [::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval] # The acceptable load interval of the vehicle at the end of the route. class LoadLimit include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Interval of acceptable load amounts. # @!attribute [rw] min # @return [::Integer] # A minimum acceptable load. Must be ≥ 0. # If they're both specified, # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval#min min} must # be ≤ # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval#max max}. # @!attribute [rw] max # @return [::Integer] # A maximum acceptable load. Must be ≥ 0. If unspecified, the maximum # load is unrestricted by this message. # If they're both specified, # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval#min min} must # be ≤ # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval#max max}. class Interval include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # A limit defining a maximum duration of the route of a vehicle. It can be # either hard or soft. # # When a soft limit field is defined, both the soft max threshold and its # associated cost must be defined together. # @!attribute [rw] max_duration # @return [::Google::Protobuf::Duration] # A hard limit constraining the duration to be at most max_duration. # @!attribute [rw] soft_max_duration # @return [::Google::Protobuf::Duration] # A soft limit not enforcing a maximum duration limit, but when violated # makes the route incur a cost. This cost adds up to other costs defined in # the model, with the same unit. # # If defined, `soft_max_duration` must be nonnegative. If max_duration is # also defined, `soft_max_duration` must be less than max_duration. # @!attribute [rw] cost_per_hour_after_soft_max # @return [::Float] # Cost per hour incurred if the `soft_max_duration` threshold is violated. # The additional cost is 0 if the duration is under the threshold, # otherwise the cost depends on the duration as follows: # ``` # cost_per_hour_after_soft_max * (duration - soft_max_duration) # ``` # The cost must be nonnegative. # @!attribute [rw] quadratic_soft_max_duration # @return [::Google::Protobuf::Duration] # A soft limit not enforcing a maximum duration limit, but when violated # makes the route incur a cost, quadratic in the duration. This cost adds # up to other costs defined in the model, with the same unit. # # If defined, `quadratic_soft_max_duration` must be nonnegative. If # `max_duration` is also defined, `quadratic_soft_max_duration` must be # less than `max_duration`, and the difference must be no larger than one # day: # # `max_duration - quadratic_soft_max_duration <= 86400 seconds` # @!attribute [rw] cost_per_square_hour_after_quadratic_soft_max # @return [::Float] # Cost per square hour incurred if the # `quadratic_soft_max_duration` threshold is violated. # # The additional cost is 0 if the duration is under the threshold, # otherwise the cost depends on the duration as follows: # # ``` # cost_per_square_hour_after_quadratic_soft_max * # (duration - quadratic_soft_max_duration)^2 # ``` # # The cost must be nonnegative. class DurationLimit include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Cloud::Optimization::V1::Vehicle::LoadLimit] class LoadLimitsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Protobuf::Duration] class ExtraVisitDurationForVisitTypeEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Travel modes which can be used by vehicles. # # These should be a subset of the Google Maps Platform Routes Preferred API # travel modes, see: # https://developers.google.com/maps/documentation/routes_preferred/reference/rest/Shared.Types/RouteTravelMode. module TravelMode # Unspecified travel mode, equivalent to `DRIVING`. TRAVEL_MODE_UNSPECIFIED = 0 # Travel mode corresponding to driving directions (car, ...). DRIVING = 1 # Travel mode corresponding to walking directions. WALKING = 2 end # Policy on how a vehicle can be unloaded. Applies only to shipments having # both a pickup and a delivery. # # Other shipments are free to occur anywhere on the route independent of # `unloading_policy`. module UnloadingPolicy # Unspecified unloading policy; deliveries must just occur after their # corresponding pickups. UNLOADING_POLICY_UNSPECIFIED = 0 # Deliveries must occur in reverse order of pickups LAST_IN_FIRST_OUT = 1 # Deliveries must occur in the same order as pickups FIRST_IN_FIRST_OUT = 2 end end |
#end_location ⇒ ::Google::Type::LatLng
Returns Geographic location where the vehicle ends after it has completed its last
VisitRequest
. If not specified the vehicle's ShipmentRoute
ends
immediately when it completes its last VisitRequest
.
If the shipment model has duration and distance matrices, end_location
must not be specified.
1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 |
# File 'proto_docs/google/cloud/optimization/v1/fleet_routing.rb', line 1371 class Vehicle include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Defines a load limit applying to a vehicle, e.g. "this truck may only # carry up to 3500 kg". See # {::Google::Cloud::Optimization::V1::Vehicle#load_limits load_limits}. # @!attribute [rw] max_load # @return [::Integer] # The maximum acceptable amount of load. # @!attribute [rw] soft_max_load # @return [::Integer] # A soft limit of the load. See # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit#cost_per_unit_above_soft_max cost_per_unit_above_soft_max}. # @!attribute [rw] cost_per_unit_above_soft_max # @return [::Float] # If the load ever exceeds # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit#soft_max_load soft_max_load} # along this vehicle's route, the following cost penalty applies (only once # per vehicle): (load - # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit#soft_max_load soft_max_load}) # * {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit#cost_per_unit_above_soft_max cost_per_unit_above_soft_max}. All costs # add up and must be in the same unit as # {::Google::Cloud::Optimization::V1::Shipment#penalty_cost Shipment.penalty_cost}. # @!attribute [rw] start_load_interval # @return [::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval] # The acceptable load interval of the vehicle at the start of the route. # @!attribute [rw] end_load_interval # @return [::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval] # The acceptable load interval of the vehicle at the end of the route. class LoadLimit include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Interval of acceptable load amounts. # @!attribute [rw] min # @return [::Integer] # A minimum acceptable load. Must be ≥ 0. # If they're both specified, # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval#min min} must # be ≤ # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval#max max}. # @!attribute [rw] max # @return [::Integer] # A maximum acceptable load. Must be ≥ 0. If unspecified, the maximum # load is unrestricted by this message. # If they're both specified, # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval#min min} must # be ≤ # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval#max max}. class Interval include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # A limit defining a maximum duration of the route of a vehicle. It can be # either hard or soft. # # When a soft limit field is defined, both the soft max threshold and its # associated cost must be defined together. # @!attribute [rw] max_duration # @return [::Google::Protobuf::Duration] # A hard limit constraining the duration to be at most max_duration. # @!attribute [rw] soft_max_duration # @return [::Google::Protobuf::Duration] # A soft limit not enforcing a maximum duration limit, but when violated # makes the route incur a cost. This cost adds up to other costs defined in # the model, with the same unit. # # If defined, `soft_max_duration` must be nonnegative. If max_duration is # also defined, `soft_max_duration` must be less than max_duration. # @!attribute [rw] cost_per_hour_after_soft_max # @return [::Float] # Cost per hour incurred if the `soft_max_duration` threshold is violated. # The additional cost is 0 if the duration is under the threshold, # otherwise the cost depends on the duration as follows: # ``` # cost_per_hour_after_soft_max * (duration - soft_max_duration) # ``` # The cost must be nonnegative. # @!attribute [rw] quadratic_soft_max_duration # @return [::Google::Protobuf::Duration] # A soft limit not enforcing a maximum duration limit, but when violated # makes the route incur a cost, quadratic in the duration. This cost adds # up to other costs defined in the model, with the same unit. # # If defined, `quadratic_soft_max_duration` must be nonnegative. If # `max_duration` is also defined, `quadratic_soft_max_duration` must be # less than `max_duration`, and the difference must be no larger than one # day: # # `max_duration - quadratic_soft_max_duration <= 86400 seconds` # @!attribute [rw] cost_per_square_hour_after_quadratic_soft_max # @return [::Float] # Cost per square hour incurred if the # `quadratic_soft_max_duration` threshold is violated. # # The additional cost is 0 if the duration is under the threshold, # otherwise the cost depends on the duration as follows: # # ``` # cost_per_square_hour_after_quadratic_soft_max * # (duration - quadratic_soft_max_duration)^2 # ``` # # The cost must be nonnegative. class DurationLimit include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Cloud::Optimization::V1::Vehicle::LoadLimit] class LoadLimitsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Protobuf::Duration] class ExtraVisitDurationForVisitTypeEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Travel modes which can be used by vehicles. # # These should be a subset of the Google Maps Platform Routes Preferred API # travel modes, see: # https://developers.google.com/maps/documentation/routes_preferred/reference/rest/Shared.Types/RouteTravelMode. module TravelMode # Unspecified travel mode, equivalent to `DRIVING`. TRAVEL_MODE_UNSPECIFIED = 0 # Travel mode corresponding to driving directions (car, ...). DRIVING = 1 # Travel mode corresponding to walking directions. WALKING = 2 end # Policy on how a vehicle can be unloaded. Applies only to shipments having # both a pickup and a delivery. # # Other shipments are free to occur anywhere on the route independent of # `unloading_policy`. module UnloadingPolicy # Unspecified unloading policy; deliveries must just occur after their # corresponding pickups. UNLOADING_POLICY_UNSPECIFIED = 0 # Deliveries must occur in reverse order of pickups LAST_IN_FIRST_OUT = 1 # Deliveries must occur in the same order as pickups FIRST_IN_FIRST_OUT = 2 end end |
#end_tags ⇒ ::Array<::String>
Returns Specifies tags attached to the end of the vehicle's route.
Empty or duplicate strings are not allowed.
1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 |
# File 'proto_docs/google/cloud/optimization/v1/fleet_routing.rb', line 1371 class Vehicle include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Defines a load limit applying to a vehicle, e.g. "this truck may only # carry up to 3500 kg". See # {::Google::Cloud::Optimization::V1::Vehicle#load_limits load_limits}. # @!attribute [rw] max_load # @return [::Integer] # The maximum acceptable amount of load. # @!attribute [rw] soft_max_load # @return [::Integer] # A soft limit of the load. See # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit#cost_per_unit_above_soft_max cost_per_unit_above_soft_max}. # @!attribute [rw] cost_per_unit_above_soft_max # @return [::Float] # If the load ever exceeds # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit#soft_max_load soft_max_load} # along this vehicle's route, the following cost penalty applies (only once # per vehicle): (load - # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit#soft_max_load soft_max_load}) # * {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit#cost_per_unit_above_soft_max cost_per_unit_above_soft_max}. All costs # add up and must be in the same unit as # {::Google::Cloud::Optimization::V1::Shipment#penalty_cost Shipment.penalty_cost}. # @!attribute [rw] start_load_interval # @return [::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval] # The acceptable load interval of the vehicle at the start of the route. # @!attribute [rw] end_load_interval # @return [::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval] # The acceptable load interval of the vehicle at the end of the route. class LoadLimit include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Interval of acceptable load amounts. # @!attribute [rw] min # @return [::Integer] # A minimum acceptable load. Must be ≥ 0. # If they're both specified, # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval#min min} must # be ≤ # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval#max max}. # @!attribute [rw] max # @return [::Integer] # A maximum acceptable load. Must be ≥ 0. If unspecified, the maximum # load is unrestricted by this message. # If they're both specified, # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval#min min} must # be ≤ # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval#max max}. class Interval include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # A limit defining a maximum duration of the route of a vehicle. It can be # either hard or soft. # # When a soft limit field is defined, both the soft max threshold and its # associated cost must be defined together. # @!attribute [rw] max_duration # @return [::Google::Protobuf::Duration] # A hard limit constraining the duration to be at most max_duration. # @!attribute [rw] soft_max_duration # @return [::Google::Protobuf::Duration] # A soft limit not enforcing a maximum duration limit, but when violated # makes the route incur a cost. This cost adds up to other costs defined in # the model, with the same unit. # # If defined, `soft_max_duration` must be nonnegative. If max_duration is # also defined, `soft_max_duration` must be less than max_duration. # @!attribute [rw] cost_per_hour_after_soft_max # @return [::Float] # Cost per hour incurred if the `soft_max_duration` threshold is violated. # The additional cost is 0 if the duration is under the threshold, # otherwise the cost depends on the duration as follows: # ``` # cost_per_hour_after_soft_max * (duration - soft_max_duration) # ``` # The cost must be nonnegative. # @!attribute [rw] quadratic_soft_max_duration # @return [::Google::Protobuf::Duration] # A soft limit not enforcing a maximum duration limit, but when violated # makes the route incur a cost, quadratic in the duration. This cost adds # up to other costs defined in the model, with the same unit. # # If defined, `quadratic_soft_max_duration` must be nonnegative. If # `max_duration` is also defined, `quadratic_soft_max_duration` must be # less than `max_duration`, and the difference must be no larger than one # day: # # `max_duration - quadratic_soft_max_duration <= 86400 seconds` # @!attribute [rw] cost_per_square_hour_after_quadratic_soft_max # @return [::Float] # Cost per square hour incurred if the # `quadratic_soft_max_duration` threshold is violated. # # The additional cost is 0 if the duration is under the threshold, # otherwise the cost depends on the duration as follows: # # ``` # cost_per_square_hour_after_quadratic_soft_max * # (duration - quadratic_soft_max_duration)^2 # ``` # # The cost must be nonnegative. class DurationLimit include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Cloud::Optimization::V1::Vehicle::LoadLimit] class LoadLimitsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Protobuf::Duration] class ExtraVisitDurationForVisitTypeEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Travel modes which can be used by vehicles. # # These should be a subset of the Google Maps Platform Routes Preferred API # travel modes, see: # https://developers.google.com/maps/documentation/routes_preferred/reference/rest/Shared.Types/RouteTravelMode. module TravelMode # Unspecified travel mode, equivalent to `DRIVING`. TRAVEL_MODE_UNSPECIFIED = 0 # Travel mode corresponding to driving directions (car, ...). DRIVING = 1 # Travel mode corresponding to walking directions. WALKING = 2 end # Policy on how a vehicle can be unloaded. Applies only to shipments having # both a pickup and a delivery. # # Other shipments are free to occur anywhere on the route independent of # `unloading_policy`. module UnloadingPolicy # Unspecified unloading policy; deliveries must just occur after their # corresponding pickups. UNLOADING_POLICY_UNSPECIFIED = 0 # Deliveries must occur in reverse order of pickups LAST_IN_FIRST_OUT = 1 # Deliveries must occur in the same order as pickups FIRST_IN_FIRST_OUT = 2 end end |
#end_time_windows ⇒ ::Array<::Google::Cloud::Optimization::V1::TimeWindow>
Returns Time windows during which the vehicle may arrive at its end location. They must be within the global time limits (see [ShipmentModel.global_*][google.cloud.optimization.v1.ShipmentModel.global_start_time] fields). If unspecified, there is no limitation besides those global time limits.
Time windows belonging to the same repeated field must be disjoint, i.e. no time window can overlap with or be adjacent to another, and they must be in chronological order.
cost_per_hour_after_soft_end_time
and soft_end_time
can only be set if
there is a single time window.
1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 |
# File 'proto_docs/google/cloud/optimization/v1/fleet_routing.rb', line 1371 class Vehicle include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Defines a load limit applying to a vehicle, e.g. "this truck may only # carry up to 3500 kg". See # {::Google::Cloud::Optimization::V1::Vehicle#load_limits load_limits}. # @!attribute [rw] max_load # @return [::Integer] # The maximum acceptable amount of load. # @!attribute [rw] soft_max_load # @return [::Integer] # A soft limit of the load. See # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit#cost_per_unit_above_soft_max cost_per_unit_above_soft_max}. # @!attribute [rw] cost_per_unit_above_soft_max # @return [::Float] # If the load ever exceeds # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit#soft_max_load soft_max_load} # along this vehicle's route, the following cost penalty applies (only once # per vehicle): (load - # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit#soft_max_load soft_max_load}) # * {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit#cost_per_unit_above_soft_max cost_per_unit_above_soft_max}. All costs # add up and must be in the same unit as # {::Google::Cloud::Optimization::V1::Shipment#penalty_cost Shipment.penalty_cost}. # @!attribute [rw] start_load_interval # @return [::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval] # The acceptable load interval of the vehicle at the start of the route. # @!attribute [rw] end_load_interval # @return [::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval] # The acceptable load interval of the vehicle at the end of the route. class LoadLimit include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Interval of acceptable load amounts. # @!attribute [rw] min # @return [::Integer] # A minimum acceptable load. Must be ≥ 0. # If they're both specified, # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval#min min} must # be ≤ # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval#max max}. # @!attribute [rw] max # @return [::Integer] # A maximum acceptable load. Must be ≥ 0. If unspecified, the maximum # load is unrestricted by this message. # If they're both specified, # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval#min min} must # be ≤ # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval#max max}. class Interval include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # A limit defining a maximum duration of the route of a vehicle. It can be # either hard or soft. # # When a soft limit field is defined, both the soft max threshold and its # associated cost must be defined together. # @!attribute [rw] max_duration # @return [::Google::Protobuf::Duration] # A hard limit constraining the duration to be at most max_duration. # @!attribute [rw] soft_max_duration # @return [::Google::Protobuf::Duration] # A soft limit not enforcing a maximum duration limit, but when violated # makes the route incur a cost. This cost adds up to other costs defined in # the model, with the same unit. # # If defined, `soft_max_duration` must be nonnegative. If max_duration is # also defined, `soft_max_duration` must be less than max_duration. # @!attribute [rw] cost_per_hour_after_soft_max # @return [::Float] # Cost per hour incurred if the `soft_max_duration` threshold is violated. # The additional cost is 0 if the duration is under the threshold, # otherwise the cost depends on the duration as follows: # ``` # cost_per_hour_after_soft_max * (duration - soft_max_duration) # ``` # The cost must be nonnegative. # @!attribute [rw] quadratic_soft_max_duration # @return [::Google::Protobuf::Duration] # A soft limit not enforcing a maximum duration limit, but when violated # makes the route incur a cost, quadratic in the duration. This cost adds # up to other costs defined in the model, with the same unit. # # If defined, `quadratic_soft_max_duration` must be nonnegative. If # `max_duration` is also defined, `quadratic_soft_max_duration` must be # less than `max_duration`, and the difference must be no larger than one # day: # # `max_duration - quadratic_soft_max_duration <= 86400 seconds` # @!attribute [rw] cost_per_square_hour_after_quadratic_soft_max # @return [::Float] # Cost per square hour incurred if the # `quadratic_soft_max_duration` threshold is violated. # # The additional cost is 0 if the duration is under the threshold, # otherwise the cost depends on the duration as follows: # # ``` # cost_per_square_hour_after_quadratic_soft_max * # (duration - quadratic_soft_max_duration)^2 # ``` # # The cost must be nonnegative. class DurationLimit include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Cloud::Optimization::V1::Vehicle::LoadLimit] class LoadLimitsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Protobuf::Duration] class ExtraVisitDurationForVisitTypeEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Travel modes which can be used by vehicles. # # These should be a subset of the Google Maps Platform Routes Preferred API # travel modes, see: # https://developers.google.com/maps/documentation/routes_preferred/reference/rest/Shared.Types/RouteTravelMode. module TravelMode # Unspecified travel mode, equivalent to `DRIVING`. TRAVEL_MODE_UNSPECIFIED = 0 # Travel mode corresponding to driving directions (car, ...). DRIVING = 1 # Travel mode corresponding to walking directions. WALKING = 2 end # Policy on how a vehicle can be unloaded. Applies only to shipments having # both a pickup and a delivery. # # Other shipments are free to occur anywhere on the route independent of # `unloading_policy`. module UnloadingPolicy # Unspecified unloading policy; deliveries must just occur after their # corresponding pickups. UNLOADING_POLICY_UNSPECIFIED = 0 # Deliveries must occur in reverse order of pickups LAST_IN_FIRST_OUT = 1 # Deliveries must occur in the same order as pickups FIRST_IN_FIRST_OUT = 2 end end |
#end_waypoint ⇒ ::Google::Cloud::Optimization::V1::Waypoint
Returns Waypoint representing a geographic location where the vehicle ends after
it has completed its last VisitRequest
. If neither end_waypoint
nor
end_location
is specified, the vehicle's ShipmentRoute
ends immediately
when it completes its last VisitRequest
.
If the shipment model has duration and distance matrices, end_waypoint
must not be specified.
1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 |
# File 'proto_docs/google/cloud/optimization/v1/fleet_routing.rb', line 1371 class Vehicle include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Defines a load limit applying to a vehicle, e.g. "this truck may only # carry up to 3500 kg". See # {::Google::Cloud::Optimization::V1::Vehicle#load_limits load_limits}. # @!attribute [rw] max_load # @return [::Integer] # The maximum acceptable amount of load. # @!attribute [rw] soft_max_load # @return [::Integer] # A soft limit of the load. See # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit#cost_per_unit_above_soft_max cost_per_unit_above_soft_max}. # @!attribute [rw] cost_per_unit_above_soft_max # @return [::Float] # If the load ever exceeds # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit#soft_max_load soft_max_load} # along this vehicle's route, the following cost penalty applies (only once # per vehicle): (load - # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit#soft_max_load soft_max_load}) # * {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit#cost_per_unit_above_soft_max cost_per_unit_above_soft_max}. All costs # add up and must be in the same unit as # {::Google::Cloud::Optimization::V1::Shipment#penalty_cost Shipment.penalty_cost}. # @!attribute [rw] start_load_interval # @return [::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval] # The acceptable load interval of the vehicle at the start of the route. # @!attribute [rw] end_load_interval # @return [::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval] # The acceptable load interval of the vehicle at the end of the route. class LoadLimit include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Interval of acceptable load amounts. # @!attribute [rw] min # @return [::Integer] # A minimum acceptable load. Must be ≥ 0. # If they're both specified, # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval#min min} must # be ≤ # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval#max max}. # @!attribute [rw] max # @return [::Integer] # A maximum acceptable load. Must be ≥ 0. If unspecified, the maximum # load is unrestricted by this message. # If they're both specified, # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval#min min} must # be ≤ # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval#max max}. class Interval include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # A limit defining a maximum duration of the route of a vehicle. It can be # either hard or soft. # # When a soft limit field is defined, both the soft max threshold and its # associated cost must be defined together. # @!attribute [rw] max_duration # @return [::Google::Protobuf::Duration] # A hard limit constraining the duration to be at most max_duration. # @!attribute [rw] soft_max_duration # @return [::Google::Protobuf::Duration] # A soft limit not enforcing a maximum duration limit, but when violated # makes the route incur a cost. This cost adds up to other costs defined in # the model, with the same unit. # # If defined, `soft_max_duration` must be nonnegative. If max_duration is # also defined, `soft_max_duration` must be less than max_duration. # @!attribute [rw] cost_per_hour_after_soft_max # @return [::Float] # Cost per hour incurred if the `soft_max_duration` threshold is violated. # The additional cost is 0 if the duration is under the threshold, # otherwise the cost depends on the duration as follows: # ``` # cost_per_hour_after_soft_max * (duration - soft_max_duration) # ``` # The cost must be nonnegative. # @!attribute [rw] quadratic_soft_max_duration # @return [::Google::Protobuf::Duration] # A soft limit not enforcing a maximum duration limit, but when violated # makes the route incur a cost, quadratic in the duration. This cost adds # up to other costs defined in the model, with the same unit. # # If defined, `quadratic_soft_max_duration` must be nonnegative. If # `max_duration` is also defined, `quadratic_soft_max_duration` must be # less than `max_duration`, and the difference must be no larger than one # day: # # `max_duration - quadratic_soft_max_duration <= 86400 seconds` # @!attribute [rw] cost_per_square_hour_after_quadratic_soft_max # @return [::Float] # Cost per square hour incurred if the # `quadratic_soft_max_duration` threshold is violated. # # The additional cost is 0 if the duration is under the threshold, # otherwise the cost depends on the duration as follows: # # ``` # cost_per_square_hour_after_quadratic_soft_max * # (duration - quadratic_soft_max_duration)^2 # ``` # # The cost must be nonnegative. class DurationLimit include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Cloud::Optimization::V1::Vehicle::LoadLimit] class LoadLimitsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Protobuf::Duration] class ExtraVisitDurationForVisitTypeEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Travel modes which can be used by vehicles. # # These should be a subset of the Google Maps Platform Routes Preferred API # travel modes, see: # https://developers.google.com/maps/documentation/routes_preferred/reference/rest/Shared.Types/RouteTravelMode. module TravelMode # Unspecified travel mode, equivalent to `DRIVING`. TRAVEL_MODE_UNSPECIFIED = 0 # Travel mode corresponding to driving directions (car, ...). DRIVING = 1 # Travel mode corresponding to walking directions. WALKING = 2 end # Policy on how a vehicle can be unloaded. Applies only to shipments having # both a pickup and a delivery. # # Other shipments are free to occur anywhere on the route independent of # `unloading_policy`. module UnloadingPolicy # Unspecified unloading policy; deliveries must just occur after their # corresponding pickups. UNLOADING_POLICY_UNSPECIFIED = 0 # Deliveries must occur in reverse order of pickups LAST_IN_FIRST_OUT = 1 # Deliveries must occur in the same order as pickups FIRST_IN_FIRST_OUT = 2 end end |
#extra_visit_duration_for_visit_type ⇒ ::Google::Protobuf::Map{::String => ::Google::Protobuf::Duration}
Returns Specifies a map from visit_types strings to durations. The duration is time
in addition to
VisitRequest.duration
to be taken at visits with the specified visit_types
. This extra visit
duration adds cost if cost_per_hour
is specified. Keys (i.e.
visit_types
) cannot be empty strings.
If a visit request has multiple types, a duration will be added for each type in the map.
1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 |
# File 'proto_docs/google/cloud/optimization/v1/fleet_routing.rb', line 1371 class Vehicle include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Defines a load limit applying to a vehicle, e.g. "this truck may only # carry up to 3500 kg". See # {::Google::Cloud::Optimization::V1::Vehicle#load_limits load_limits}. # @!attribute [rw] max_load # @return [::Integer] # The maximum acceptable amount of load. # @!attribute [rw] soft_max_load # @return [::Integer] # A soft limit of the load. See # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit#cost_per_unit_above_soft_max cost_per_unit_above_soft_max}. # @!attribute [rw] cost_per_unit_above_soft_max # @return [::Float] # If the load ever exceeds # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit#soft_max_load soft_max_load} # along this vehicle's route, the following cost penalty applies (only once # per vehicle): (load - # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit#soft_max_load soft_max_load}) # * {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit#cost_per_unit_above_soft_max cost_per_unit_above_soft_max}. All costs # add up and must be in the same unit as # {::Google::Cloud::Optimization::V1::Shipment#penalty_cost Shipment.penalty_cost}. # @!attribute [rw] start_load_interval # @return [::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval] # The acceptable load interval of the vehicle at the start of the route. # @!attribute [rw] end_load_interval # @return [::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval] # The acceptable load interval of the vehicle at the end of the route. class LoadLimit include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Interval of acceptable load amounts. # @!attribute [rw] min # @return [::Integer] # A minimum acceptable load. Must be ≥ 0. # If they're both specified, # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval#min min} must # be ≤ # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval#max max}. # @!attribute [rw] max # @return [::Integer] # A maximum acceptable load. Must be ≥ 0. If unspecified, the maximum # load is unrestricted by this message. # If they're both specified, # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval#min min} must # be ≤ # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval#max max}. class Interval include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # A limit defining a maximum duration of the route of a vehicle. It can be # either hard or soft. # # When a soft limit field is defined, both the soft max threshold and its # associated cost must be defined together. # @!attribute [rw] max_duration # @return [::Google::Protobuf::Duration] # A hard limit constraining the duration to be at most max_duration. # @!attribute [rw] soft_max_duration # @return [::Google::Protobuf::Duration] # A soft limit not enforcing a maximum duration limit, but when violated # makes the route incur a cost. This cost adds up to other costs defined in # the model, with the same unit. # # If defined, `soft_max_duration` must be nonnegative. If max_duration is # also defined, `soft_max_duration` must be less than max_duration. # @!attribute [rw] cost_per_hour_after_soft_max # @return [::Float] # Cost per hour incurred if the `soft_max_duration` threshold is violated. # The additional cost is 0 if the duration is under the threshold, # otherwise the cost depends on the duration as follows: # ``` # cost_per_hour_after_soft_max * (duration - soft_max_duration) # ``` # The cost must be nonnegative. # @!attribute [rw] quadratic_soft_max_duration # @return [::Google::Protobuf::Duration] # A soft limit not enforcing a maximum duration limit, but when violated # makes the route incur a cost, quadratic in the duration. This cost adds # up to other costs defined in the model, with the same unit. # # If defined, `quadratic_soft_max_duration` must be nonnegative. If # `max_duration` is also defined, `quadratic_soft_max_duration` must be # less than `max_duration`, and the difference must be no larger than one # day: # # `max_duration - quadratic_soft_max_duration <= 86400 seconds` # @!attribute [rw] cost_per_square_hour_after_quadratic_soft_max # @return [::Float] # Cost per square hour incurred if the # `quadratic_soft_max_duration` threshold is violated. # # The additional cost is 0 if the duration is under the threshold, # otherwise the cost depends on the duration as follows: # # ``` # cost_per_square_hour_after_quadratic_soft_max * # (duration - quadratic_soft_max_duration)^2 # ``` # # The cost must be nonnegative. class DurationLimit include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Cloud::Optimization::V1::Vehicle::LoadLimit] class LoadLimitsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Protobuf::Duration] class ExtraVisitDurationForVisitTypeEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Travel modes which can be used by vehicles. # # These should be a subset of the Google Maps Platform Routes Preferred API # travel modes, see: # https://developers.google.com/maps/documentation/routes_preferred/reference/rest/Shared.Types/RouteTravelMode. module TravelMode # Unspecified travel mode, equivalent to `DRIVING`. TRAVEL_MODE_UNSPECIFIED = 0 # Travel mode corresponding to driving directions (car, ...). DRIVING = 1 # Travel mode corresponding to walking directions. WALKING = 2 end # Policy on how a vehicle can be unloaded. Applies only to shipments having # both a pickup and a delivery. # # Other shipments are free to occur anywhere on the route independent of # `unloading_policy`. module UnloadingPolicy # Unspecified unloading policy; deliveries must just occur after their # corresponding pickups. UNLOADING_POLICY_UNSPECIFIED = 0 # Deliveries must occur in reverse order of pickups LAST_IN_FIRST_OUT = 1 # Deliveries must occur in the same order as pickups FIRST_IN_FIRST_OUT = 2 end end |
#fixed_cost ⇒ ::Float
Returns Fixed cost applied if this vehicle is used to handle a shipment.
1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 |
# File 'proto_docs/google/cloud/optimization/v1/fleet_routing.rb', line 1371 class Vehicle include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Defines a load limit applying to a vehicle, e.g. "this truck may only # carry up to 3500 kg". See # {::Google::Cloud::Optimization::V1::Vehicle#load_limits load_limits}. # @!attribute [rw] max_load # @return [::Integer] # The maximum acceptable amount of load. # @!attribute [rw] soft_max_load # @return [::Integer] # A soft limit of the load. See # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit#cost_per_unit_above_soft_max cost_per_unit_above_soft_max}. # @!attribute [rw] cost_per_unit_above_soft_max # @return [::Float] # If the load ever exceeds # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit#soft_max_load soft_max_load} # along this vehicle's route, the following cost penalty applies (only once # per vehicle): (load - # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit#soft_max_load soft_max_load}) # * {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit#cost_per_unit_above_soft_max cost_per_unit_above_soft_max}. All costs # add up and must be in the same unit as # {::Google::Cloud::Optimization::V1::Shipment#penalty_cost Shipment.penalty_cost}. # @!attribute [rw] start_load_interval # @return [::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval] # The acceptable load interval of the vehicle at the start of the route. # @!attribute [rw] end_load_interval # @return [::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval] # The acceptable load interval of the vehicle at the end of the route. class LoadLimit include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Interval of acceptable load amounts. # @!attribute [rw] min # @return [::Integer] # A minimum acceptable load. Must be ≥ 0. # If they're both specified, # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval#min min} must # be ≤ # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval#max max}. # @!attribute [rw] max # @return [::Integer] # A maximum acceptable load. Must be ≥ 0. If unspecified, the maximum # load is unrestricted by this message. # If they're both specified, # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval#min min} must # be ≤ # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval#max max}. class Interval include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # A limit defining a maximum duration of the route of a vehicle. It can be # either hard or soft. # # When a soft limit field is defined, both the soft max threshold and its # associated cost must be defined together. # @!attribute [rw] max_duration # @return [::Google::Protobuf::Duration] # A hard limit constraining the duration to be at most max_duration. # @!attribute [rw] soft_max_duration # @return [::Google::Protobuf::Duration] # A soft limit not enforcing a maximum duration limit, but when violated # makes the route incur a cost. This cost adds up to other costs defined in # the model, with the same unit. # # If defined, `soft_max_duration` must be nonnegative. If max_duration is # also defined, `soft_max_duration` must be less than max_duration. # @!attribute [rw] cost_per_hour_after_soft_max # @return [::Float] # Cost per hour incurred if the `soft_max_duration` threshold is violated. # The additional cost is 0 if the duration is under the threshold, # otherwise the cost depends on the duration as follows: # ``` # cost_per_hour_after_soft_max * (duration - soft_max_duration) # ``` # The cost must be nonnegative. # @!attribute [rw] quadratic_soft_max_duration # @return [::Google::Protobuf::Duration] # A soft limit not enforcing a maximum duration limit, but when violated # makes the route incur a cost, quadratic in the duration. This cost adds # up to other costs defined in the model, with the same unit. # # If defined, `quadratic_soft_max_duration` must be nonnegative. If # `max_duration` is also defined, `quadratic_soft_max_duration` must be # less than `max_duration`, and the difference must be no larger than one # day: # # `max_duration - quadratic_soft_max_duration <= 86400 seconds` # @!attribute [rw] cost_per_square_hour_after_quadratic_soft_max # @return [::Float] # Cost per square hour incurred if the # `quadratic_soft_max_duration` threshold is violated. # # The additional cost is 0 if the duration is under the threshold, # otherwise the cost depends on the duration as follows: # # ``` # cost_per_square_hour_after_quadratic_soft_max * # (duration - quadratic_soft_max_duration)^2 # ``` # # The cost must be nonnegative. class DurationLimit include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Cloud::Optimization::V1::Vehicle::LoadLimit] class LoadLimitsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Protobuf::Duration] class ExtraVisitDurationForVisitTypeEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Travel modes which can be used by vehicles. # # These should be a subset of the Google Maps Platform Routes Preferred API # travel modes, see: # https://developers.google.com/maps/documentation/routes_preferred/reference/rest/Shared.Types/RouteTravelMode. module TravelMode # Unspecified travel mode, equivalent to `DRIVING`. TRAVEL_MODE_UNSPECIFIED = 0 # Travel mode corresponding to driving directions (car, ...). DRIVING = 1 # Travel mode corresponding to walking directions. WALKING = 2 end # Policy on how a vehicle can be unloaded. Applies only to shipments having # both a pickup and a delivery. # # Other shipments are free to occur anywhere on the route independent of # `unloading_policy`. module UnloadingPolicy # Unspecified unloading policy; deliveries must just occur after their # corresponding pickups. UNLOADING_POLICY_UNSPECIFIED = 0 # Deliveries must occur in reverse order of pickups LAST_IN_FIRST_OUT = 1 # Deliveries must occur in the same order as pickups FIRST_IN_FIRST_OUT = 2 end end |
#ignore ⇒ ::Boolean
Returns If true, used_if_route_is_empty
must be false, and this vehicle will
remain unused.
If a shipment is performed by an ignored vehicle in
injected_first_solution_routes
, it is skipped in the first solution but
is free to be performed in the response.
If a shipment is performed by an ignored vehicle in
injected_solution_constraint
and any related pickup/delivery is
constrained to remain on the vehicle (i.e., not relaxed to level
RELAX_ALL_AFTER_THRESHOLD
), it is skipped in the response.
If a shipment has a non-empty allowed_vehicle_indices
field and all of
the allowed vehicles are ignored, it is skipped in the response.
1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 |
# File 'proto_docs/google/cloud/optimization/v1/fleet_routing.rb', line 1371 class Vehicle include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Defines a load limit applying to a vehicle, e.g. "this truck may only # carry up to 3500 kg". See # {::Google::Cloud::Optimization::V1::Vehicle#load_limits load_limits}. # @!attribute [rw] max_load # @return [::Integer] # The maximum acceptable amount of load. # @!attribute [rw] soft_max_load # @return [::Integer] # A soft limit of the load. See # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit#cost_per_unit_above_soft_max cost_per_unit_above_soft_max}. # @!attribute [rw] cost_per_unit_above_soft_max # @return [::Float] # If the load ever exceeds # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit#soft_max_load soft_max_load} # along this vehicle's route, the following cost penalty applies (only once # per vehicle): (load - # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit#soft_max_load soft_max_load}) # * {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit#cost_per_unit_above_soft_max cost_per_unit_above_soft_max}. All costs # add up and must be in the same unit as # {::Google::Cloud::Optimization::V1::Shipment#penalty_cost Shipment.penalty_cost}. # @!attribute [rw] start_load_interval # @return [::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval] # The acceptable load interval of the vehicle at the start of the route. # @!attribute [rw] end_load_interval # @return [::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval] # The acceptable load interval of the vehicle at the end of the route. class LoadLimit include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Interval of acceptable load amounts. # @!attribute [rw] min # @return [::Integer] # A minimum acceptable load. Must be ≥ 0. # If they're both specified, # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval#min min} must # be ≤ # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval#max max}. # @!attribute [rw] max # @return [::Integer] # A maximum acceptable load. Must be ≥ 0. If unspecified, the maximum # load is unrestricted by this message. # If they're both specified, # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval#min min} must # be ≤ # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval#max max}. class Interval include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # A limit defining a maximum duration of the route of a vehicle. It can be # either hard or soft. # # When a soft limit field is defined, both the soft max threshold and its # associated cost must be defined together. # @!attribute [rw] max_duration # @return [::Google::Protobuf::Duration] # A hard limit constraining the duration to be at most max_duration. # @!attribute [rw] soft_max_duration # @return [::Google::Protobuf::Duration] # A soft limit not enforcing a maximum duration limit, but when violated # makes the route incur a cost. This cost adds up to other costs defined in # the model, with the same unit. # # If defined, `soft_max_duration` must be nonnegative. If max_duration is # also defined, `soft_max_duration` must be less than max_duration. # @!attribute [rw] cost_per_hour_after_soft_max # @return [::Float] # Cost per hour incurred if the `soft_max_duration` threshold is violated. # The additional cost is 0 if the duration is under the threshold, # otherwise the cost depends on the duration as follows: # ``` # cost_per_hour_after_soft_max * (duration - soft_max_duration) # ``` # The cost must be nonnegative. # @!attribute [rw] quadratic_soft_max_duration # @return [::Google::Protobuf::Duration] # A soft limit not enforcing a maximum duration limit, but when violated # makes the route incur a cost, quadratic in the duration. This cost adds # up to other costs defined in the model, with the same unit. # # If defined, `quadratic_soft_max_duration` must be nonnegative. If # `max_duration` is also defined, `quadratic_soft_max_duration` must be # less than `max_duration`, and the difference must be no larger than one # day: # # `max_duration - quadratic_soft_max_duration <= 86400 seconds` # @!attribute [rw] cost_per_square_hour_after_quadratic_soft_max # @return [::Float] # Cost per square hour incurred if the # `quadratic_soft_max_duration` threshold is violated. # # The additional cost is 0 if the duration is under the threshold, # otherwise the cost depends on the duration as follows: # # ``` # cost_per_square_hour_after_quadratic_soft_max * # (duration - quadratic_soft_max_duration)^2 # ``` # # The cost must be nonnegative. class DurationLimit include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Cloud::Optimization::V1::Vehicle::LoadLimit] class LoadLimitsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Protobuf::Duration] class ExtraVisitDurationForVisitTypeEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Travel modes which can be used by vehicles. # # These should be a subset of the Google Maps Platform Routes Preferred API # travel modes, see: # https://developers.google.com/maps/documentation/routes_preferred/reference/rest/Shared.Types/RouteTravelMode. module TravelMode # Unspecified travel mode, equivalent to `DRIVING`. TRAVEL_MODE_UNSPECIFIED = 0 # Travel mode corresponding to driving directions (car, ...). DRIVING = 1 # Travel mode corresponding to walking directions. WALKING = 2 end # Policy on how a vehicle can be unloaded. Applies only to shipments having # both a pickup and a delivery. # # Other shipments are free to occur anywhere on the route independent of # `unloading_policy`. module UnloadingPolicy # Unspecified unloading policy; deliveries must just occur after their # corresponding pickups. UNLOADING_POLICY_UNSPECIFIED = 0 # Deliveries must occur in reverse order of pickups LAST_IN_FIRST_OUT = 1 # Deliveries must occur in the same order as pickups FIRST_IN_FIRST_OUT = 2 end end |
#label ⇒ ::String
Returns Specifies a label for this vehicle. This label is reported in the response
as the vehicle_label
of the corresponding
ShipmentRoute.
1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 |
# File 'proto_docs/google/cloud/optimization/v1/fleet_routing.rb', line 1371 class Vehicle include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Defines a load limit applying to a vehicle, e.g. "this truck may only # carry up to 3500 kg". See # {::Google::Cloud::Optimization::V1::Vehicle#load_limits load_limits}. # @!attribute [rw] max_load # @return [::Integer] # The maximum acceptable amount of load. # @!attribute [rw] soft_max_load # @return [::Integer] # A soft limit of the load. See # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit#cost_per_unit_above_soft_max cost_per_unit_above_soft_max}. # @!attribute [rw] cost_per_unit_above_soft_max # @return [::Float] # If the load ever exceeds # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit#soft_max_load soft_max_load} # along this vehicle's route, the following cost penalty applies (only once # per vehicle): (load - # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit#soft_max_load soft_max_load}) # * {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit#cost_per_unit_above_soft_max cost_per_unit_above_soft_max}. All costs # add up and must be in the same unit as # {::Google::Cloud::Optimization::V1::Shipment#penalty_cost Shipment.penalty_cost}. # @!attribute [rw] start_load_interval # @return [::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval] # The acceptable load interval of the vehicle at the start of the route. # @!attribute [rw] end_load_interval # @return [::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval] # The acceptable load interval of the vehicle at the end of the route. class LoadLimit include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Interval of acceptable load amounts. # @!attribute [rw] min # @return [::Integer] # A minimum acceptable load. Must be ≥ 0. # If they're both specified, # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval#min min} must # be ≤ # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval#max max}. # @!attribute [rw] max # @return [::Integer] # A maximum acceptable load. Must be ≥ 0. If unspecified, the maximum # load is unrestricted by this message. # If they're both specified, # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval#min min} must # be ≤ # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval#max max}. class Interval include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # A limit defining a maximum duration of the route of a vehicle. It can be # either hard or soft. # # When a soft limit field is defined, both the soft max threshold and its # associated cost must be defined together. # @!attribute [rw] max_duration # @return [::Google::Protobuf::Duration] # A hard limit constraining the duration to be at most max_duration. # @!attribute [rw] soft_max_duration # @return [::Google::Protobuf::Duration] # A soft limit not enforcing a maximum duration limit, but when violated # makes the route incur a cost. This cost adds up to other costs defined in # the model, with the same unit. # # If defined, `soft_max_duration` must be nonnegative. If max_duration is # also defined, `soft_max_duration` must be less than max_duration. # @!attribute [rw] cost_per_hour_after_soft_max # @return [::Float] # Cost per hour incurred if the `soft_max_duration` threshold is violated. # The additional cost is 0 if the duration is under the threshold, # otherwise the cost depends on the duration as follows: # ``` # cost_per_hour_after_soft_max * (duration - soft_max_duration) # ``` # The cost must be nonnegative. # @!attribute [rw] quadratic_soft_max_duration # @return [::Google::Protobuf::Duration] # A soft limit not enforcing a maximum duration limit, but when violated # makes the route incur a cost, quadratic in the duration. This cost adds # up to other costs defined in the model, with the same unit. # # If defined, `quadratic_soft_max_duration` must be nonnegative. If # `max_duration` is also defined, `quadratic_soft_max_duration` must be # less than `max_duration`, and the difference must be no larger than one # day: # # `max_duration - quadratic_soft_max_duration <= 86400 seconds` # @!attribute [rw] cost_per_square_hour_after_quadratic_soft_max # @return [::Float] # Cost per square hour incurred if the # `quadratic_soft_max_duration` threshold is violated. # # The additional cost is 0 if the duration is under the threshold, # otherwise the cost depends on the duration as follows: # # ``` # cost_per_square_hour_after_quadratic_soft_max * # (duration - quadratic_soft_max_duration)^2 # ``` # # The cost must be nonnegative. class DurationLimit include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Cloud::Optimization::V1::Vehicle::LoadLimit] class LoadLimitsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Protobuf::Duration] class ExtraVisitDurationForVisitTypeEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Travel modes which can be used by vehicles. # # These should be a subset of the Google Maps Platform Routes Preferred API # travel modes, see: # https://developers.google.com/maps/documentation/routes_preferred/reference/rest/Shared.Types/RouteTravelMode. module TravelMode # Unspecified travel mode, equivalent to `DRIVING`. TRAVEL_MODE_UNSPECIFIED = 0 # Travel mode corresponding to driving directions (car, ...). DRIVING = 1 # Travel mode corresponding to walking directions. WALKING = 2 end # Policy on how a vehicle can be unloaded. Applies only to shipments having # both a pickup and a delivery. # # Other shipments are free to occur anywhere on the route independent of # `unloading_policy`. module UnloadingPolicy # Unspecified unloading policy; deliveries must just occur after their # corresponding pickups. UNLOADING_POLICY_UNSPECIFIED = 0 # Deliveries must occur in reverse order of pickups LAST_IN_FIRST_OUT = 1 # Deliveries must occur in the same order as pickups FIRST_IN_FIRST_OUT = 2 end end |
#load_limits ⇒ ::Google::Protobuf::Map{::String => ::Google::Cloud::Optimization::V1::Vehicle::LoadLimit}
Returns Capacities of the vehicle (weight, volume, # of pallets for example). The keys in the map are the identifiers of the type of load, consistent with the keys of the Shipment.load_demands field. If a given key is absent from this map, the corresponding capacity is considered to be limitless.
1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 |
# File 'proto_docs/google/cloud/optimization/v1/fleet_routing.rb', line 1371 class Vehicle include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Defines a load limit applying to a vehicle, e.g. "this truck may only # carry up to 3500 kg". See # {::Google::Cloud::Optimization::V1::Vehicle#load_limits load_limits}. # @!attribute [rw] max_load # @return [::Integer] # The maximum acceptable amount of load. # @!attribute [rw] soft_max_load # @return [::Integer] # A soft limit of the load. See # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit#cost_per_unit_above_soft_max cost_per_unit_above_soft_max}. # @!attribute [rw] cost_per_unit_above_soft_max # @return [::Float] # If the load ever exceeds # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit#soft_max_load soft_max_load} # along this vehicle's route, the following cost penalty applies (only once # per vehicle): (load - # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit#soft_max_load soft_max_load}) # * {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit#cost_per_unit_above_soft_max cost_per_unit_above_soft_max}. All costs # add up and must be in the same unit as # {::Google::Cloud::Optimization::V1::Shipment#penalty_cost Shipment.penalty_cost}. # @!attribute [rw] start_load_interval # @return [::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval] # The acceptable load interval of the vehicle at the start of the route. # @!attribute [rw] end_load_interval # @return [::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval] # The acceptable load interval of the vehicle at the end of the route. class LoadLimit include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Interval of acceptable load amounts. # @!attribute [rw] min # @return [::Integer] # A minimum acceptable load. Must be ≥ 0. # If they're both specified, # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval#min min} must # be ≤ # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval#max max}. # @!attribute [rw] max # @return [::Integer] # A maximum acceptable load. Must be ≥ 0. If unspecified, the maximum # load is unrestricted by this message. # If they're both specified, # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval#min min} must # be ≤ # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval#max max}. class Interval include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # A limit defining a maximum duration of the route of a vehicle. It can be # either hard or soft. # # When a soft limit field is defined, both the soft max threshold and its # associated cost must be defined together. # @!attribute [rw] max_duration # @return [::Google::Protobuf::Duration] # A hard limit constraining the duration to be at most max_duration. # @!attribute [rw] soft_max_duration # @return [::Google::Protobuf::Duration] # A soft limit not enforcing a maximum duration limit, but when violated # makes the route incur a cost. This cost adds up to other costs defined in # the model, with the same unit. # # If defined, `soft_max_duration` must be nonnegative. If max_duration is # also defined, `soft_max_duration` must be less than max_duration. # @!attribute [rw] cost_per_hour_after_soft_max # @return [::Float] # Cost per hour incurred if the `soft_max_duration` threshold is violated. # The additional cost is 0 if the duration is under the threshold, # otherwise the cost depends on the duration as follows: # ``` # cost_per_hour_after_soft_max * (duration - soft_max_duration) # ``` # The cost must be nonnegative. # @!attribute [rw] quadratic_soft_max_duration # @return [::Google::Protobuf::Duration] # A soft limit not enforcing a maximum duration limit, but when violated # makes the route incur a cost, quadratic in the duration. This cost adds # up to other costs defined in the model, with the same unit. # # If defined, `quadratic_soft_max_duration` must be nonnegative. If # `max_duration` is also defined, `quadratic_soft_max_duration` must be # less than `max_duration`, and the difference must be no larger than one # day: # # `max_duration - quadratic_soft_max_duration <= 86400 seconds` # @!attribute [rw] cost_per_square_hour_after_quadratic_soft_max # @return [::Float] # Cost per square hour incurred if the # `quadratic_soft_max_duration` threshold is violated. # # The additional cost is 0 if the duration is under the threshold, # otherwise the cost depends on the duration as follows: # # ``` # cost_per_square_hour_after_quadratic_soft_max * # (duration - quadratic_soft_max_duration)^2 # ``` # # The cost must be nonnegative. class DurationLimit include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Cloud::Optimization::V1::Vehicle::LoadLimit] class LoadLimitsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Protobuf::Duration] class ExtraVisitDurationForVisitTypeEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Travel modes which can be used by vehicles. # # These should be a subset of the Google Maps Platform Routes Preferred API # travel modes, see: # https://developers.google.com/maps/documentation/routes_preferred/reference/rest/Shared.Types/RouteTravelMode. module TravelMode # Unspecified travel mode, equivalent to `DRIVING`. TRAVEL_MODE_UNSPECIFIED = 0 # Travel mode corresponding to driving directions (car, ...). DRIVING = 1 # Travel mode corresponding to walking directions. WALKING = 2 end # Policy on how a vehicle can be unloaded. Applies only to shipments having # both a pickup and a delivery. # # Other shipments are free to occur anywhere on the route independent of # `unloading_policy`. module UnloadingPolicy # Unspecified unloading policy; deliveries must just occur after their # corresponding pickups. UNLOADING_POLICY_UNSPECIFIED = 0 # Deliveries must occur in reverse order of pickups LAST_IN_FIRST_OUT = 1 # Deliveries must occur in the same order as pickups FIRST_IN_FIRST_OUT = 2 end end |
#route_distance_limit ⇒ ::Google::Cloud::Optimization::V1::DistanceLimit
Returns Limit applied to the total distance of the vehicle's route. In a given
OptimizeToursResponse
, the route distance is the sum of all its
transitions.travel_distance_meters.
1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 |
# File 'proto_docs/google/cloud/optimization/v1/fleet_routing.rb', line 1371 class Vehicle include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Defines a load limit applying to a vehicle, e.g. "this truck may only # carry up to 3500 kg". See # {::Google::Cloud::Optimization::V1::Vehicle#load_limits load_limits}. # @!attribute [rw] max_load # @return [::Integer] # The maximum acceptable amount of load. # @!attribute [rw] soft_max_load # @return [::Integer] # A soft limit of the load. See # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit#cost_per_unit_above_soft_max cost_per_unit_above_soft_max}. # @!attribute [rw] cost_per_unit_above_soft_max # @return [::Float] # If the load ever exceeds # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit#soft_max_load soft_max_load} # along this vehicle's route, the following cost penalty applies (only once # per vehicle): (load - # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit#soft_max_load soft_max_load}) # * {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit#cost_per_unit_above_soft_max cost_per_unit_above_soft_max}. All costs # add up and must be in the same unit as # {::Google::Cloud::Optimization::V1::Shipment#penalty_cost Shipment.penalty_cost}. # @!attribute [rw] start_load_interval # @return [::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval] # The acceptable load interval of the vehicle at the start of the route. # @!attribute [rw] end_load_interval # @return [::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval] # The acceptable load interval of the vehicle at the end of the route. class LoadLimit include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Interval of acceptable load amounts. # @!attribute [rw] min # @return [::Integer] # A minimum acceptable load. Must be ≥ 0. # If they're both specified, # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval#min min} must # be ≤ # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval#max max}. # @!attribute [rw] max # @return [::Integer] # A maximum acceptable load. Must be ≥ 0. If unspecified, the maximum # load is unrestricted by this message. # If they're both specified, # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval#min min} must # be ≤ # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval#max max}. class Interval include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # A limit defining a maximum duration of the route of a vehicle. It can be # either hard or soft. # # When a soft limit field is defined, both the soft max threshold and its # associated cost must be defined together. # @!attribute [rw] max_duration # @return [::Google::Protobuf::Duration] # A hard limit constraining the duration to be at most max_duration. # @!attribute [rw] soft_max_duration # @return [::Google::Protobuf::Duration] # A soft limit not enforcing a maximum duration limit, but when violated # makes the route incur a cost. This cost adds up to other costs defined in # the model, with the same unit. # # If defined, `soft_max_duration` must be nonnegative. If max_duration is # also defined, `soft_max_duration` must be less than max_duration. # @!attribute [rw] cost_per_hour_after_soft_max # @return [::Float] # Cost per hour incurred if the `soft_max_duration` threshold is violated. # The additional cost is 0 if the duration is under the threshold, # otherwise the cost depends on the duration as follows: # ``` # cost_per_hour_after_soft_max * (duration - soft_max_duration) # ``` # The cost must be nonnegative. # @!attribute [rw] quadratic_soft_max_duration # @return [::Google::Protobuf::Duration] # A soft limit not enforcing a maximum duration limit, but when violated # makes the route incur a cost, quadratic in the duration. This cost adds # up to other costs defined in the model, with the same unit. # # If defined, `quadratic_soft_max_duration` must be nonnegative. If # `max_duration` is also defined, `quadratic_soft_max_duration` must be # less than `max_duration`, and the difference must be no larger than one # day: # # `max_duration - quadratic_soft_max_duration <= 86400 seconds` # @!attribute [rw] cost_per_square_hour_after_quadratic_soft_max # @return [::Float] # Cost per square hour incurred if the # `quadratic_soft_max_duration` threshold is violated. # # The additional cost is 0 if the duration is under the threshold, # otherwise the cost depends on the duration as follows: # # ``` # cost_per_square_hour_after_quadratic_soft_max * # (duration - quadratic_soft_max_duration)^2 # ``` # # The cost must be nonnegative. class DurationLimit include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Cloud::Optimization::V1::Vehicle::LoadLimit] class LoadLimitsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Protobuf::Duration] class ExtraVisitDurationForVisitTypeEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Travel modes which can be used by vehicles. # # These should be a subset of the Google Maps Platform Routes Preferred API # travel modes, see: # https://developers.google.com/maps/documentation/routes_preferred/reference/rest/Shared.Types/RouteTravelMode. module TravelMode # Unspecified travel mode, equivalent to `DRIVING`. TRAVEL_MODE_UNSPECIFIED = 0 # Travel mode corresponding to driving directions (car, ...). DRIVING = 1 # Travel mode corresponding to walking directions. WALKING = 2 end # Policy on how a vehicle can be unloaded. Applies only to shipments having # both a pickup and a delivery. # # Other shipments are free to occur anywhere on the route independent of # `unloading_policy`. module UnloadingPolicy # Unspecified unloading policy; deliveries must just occur after their # corresponding pickups. UNLOADING_POLICY_UNSPECIFIED = 0 # Deliveries must occur in reverse order of pickups LAST_IN_FIRST_OUT = 1 # Deliveries must occur in the same order as pickups FIRST_IN_FIRST_OUT = 2 end end |
#route_duration_limit ⇒ ::Google::Cloud::Optimization::V1::Vehicle::DurationLimit
Returns Limit applied to the total duration of the vehicle's route. In a given
OptimizeToursResponse
, the route duration of a vehicle is the
difference between its vehicle_end_time
and vehicle_start_time
.
1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 |
# File 'proto_docs/google/cloud/optimization/v1/fleet_routing.rb', line 1371 class Vehicle include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Defines a load limit applying to a vehicle, e.g. "this truck may only # carry up to 3500 kg". See # {::Google::Cloud::Optimization::V1::Vehicle#load_limits load_limits}. # @!attribute [rw] max_load # @return [::Integer] # The maximum acceptable amount of load. # @!attribute [rw] soft_max_load # @return [::Integer] # A soft limit of the load. See # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit#cost_per_unit_above_soft_max cost_per_unit_above_soft_max}. # @!attribute [rw] cost_per_unit_above_soft_max # @return [::Float] # If the load ever exceeds # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit#soft_max_load soft_max_load} # along this vehicle's route, the following cost penalty applies (only once # per vehicle): (load - # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit#soft_max_load soft_max_load}) # * {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit#cost_per_unit_above_soft_max cost_per_unit_above_soft_max}. All costs # add up and must be in the same unit as # {::Google::Cloud::Optimization::V1::Shipment#penalty_cost Shipment.penalty_cost}. # @!attribute [rw] start_load_interval # @return [::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval] # The acceptable load interval of the vehicle at the start of the route. # @!attribute [rw] end_load_interval # @return [::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval] # The acceptable load interval of the vehicle at the end of the route. class LoadLimit include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Interval of acceptable load amounts. # @!attribute [rw] min # @return [::Integer] # A minimum acceptable load. Must be ≥ 0. # If they're both specified, # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval#min min} must # be ≤ # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval#max max}. # @!attribute [rw] max # @return [::Integer] # A maximum acceptable load. Must be ≥ 0. If unspecified, the maximum # load is unrestricted by this message. # If they're both specified, # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval#min min} must # be ≤ # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval#max max}. class Interval include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # A limit defining a maximum duration of the route of a vehicle. It can be # either hard or soft. # # When a soft limit field is defined, both the soft max threshold and its # associated cost must be defined together. # @!attribute [rw] max_duration # @return [::Google::Protobuf::Duration] # A hard limit constraining the duration to be at most max_duration. # @!attribute [rw] soft_max_duration # @return [::Google::Protobuf::Duration] # A soft limit not enforcing a maximum duration limit, but when violated # makes the route incur a cost. This cost adds up to other costs defined in # the model, with the same unit. # # If defined, `soft_max_duration` must be nonnegative. If max_duration is # also defined, `soft_max_duration` must be less than max_duration. # @!attribute [rw] cost_per_hour_after_soft_max # @return [::Float] # Cost per hour incurred if the `soft_max_duration` threshold is violated. # The additional cost is 0 if the duration is under the threshold, # otherwise the cost depends on the duration as follows: # ``` # cost_per_hour_after_soft_max * (duration - soft_max_duration) # ``` # The cost must be nonnegative. # @!attribute [rw] quadratic_soft_max_duration # @return [::Google::Protobuf::Duration] # A soft limit not enforcing a maximum duration limit, but when violated # makes the route incur a cost, quadratic in the duration. This cost adds # up to other costs defined in the model, with the same unit. # # If defined, `quadratic_soft_max_duration` must be nonnegative. If # `max_duration` is also defined, `quadratic_soft_max_duration` must be # less than `max_duration`, and the difference must be no larger than one # day: # # `max_duration - quadratic_soft_max_duration <= 86400 seconds` # @!attribute [rw] cost_per_square_hour_after_quadratic_soft_max # @return [::Float] # Cost per square hour incurred if the # `quadratic_soft_max_duration` threshold is violated. # # The additional cost is 0 if the duration is under the threshold, # otherwise the cost depends on the duration as follows: # # ``` # cost_per_square_hour_after_quadratic_soft_max * # (duration - quadratic_soft_max_duration)^2 # ``` # # The cost must be nonnegative. class DurationLimit include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Cloud::Optimization::V1::Vehicle::LoadLimit] class LoadLimitsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Protobuf::Duration] class ExtraVisitDurationForVisitTypeEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Travel modes which can be used by vehicles. # # These should be a subset of the Google Maps Platform Routes Preferred API # travel modes, see: # https://developers.google.com/maps/documentation/routes_preferred/reference/rest/Shared.Types/RouteTravelMode. module TravelMode # Unspecified travel mode, equivalent to `DRIVING`. TRAVEL_MODE_UNSPECIFIED = 0 # Travel mode corresponding to driving directions (car, ...). DRIVING = 1 # Travel mode corresponding to walking directions. WALKING = 2 end # Policy on how a vehicle can be unloaded. Applies only to shipments having # both a pickup and a delivery. # # Other shipments are free to occur anywhere on the route independent of # `unloading_policy`. module UnloadingPolicy # Unspecified unloading policy; deliveries must just occur after their # corresponding pickups. UNLOADING_POLICY_UNSPECIFIED = 0 # Deliveries must occur in reverse order of pickups LAST_IN_FIRST_OUT = 1 # Deliveries must occur in the same order as pickups FIRST_IN_FIRST_OUT = 2 end end |
#route_modifiers ⇒ ::Google::Cloud::Optimization::V1::RouteModifiers
Returns Optional. A set of conditions to satisfy that affect the way routes are calculated for the given vehicle.
1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 |
# File 'proto_docs/google/cloud/optimization/v1/fleet_routing.rb', line 1371 class Vehicle include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Defines a load limit applying to a vehicle, e.g. "this truck may only # carry up to 3500 kg". See # {::Google::Cloud::Optimization::V1::Vehicle#load_limits load_limits}. # @!attribute [rw] max_load # @return [::Integer] # The maximum acceptable amount of load. # @!attribute [rw] soft_max_load # @return [::Integer] # A soft limit of the load. See # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit#cost_per_unit_above_soft_max cost_per_unit_above_soft_max}. # @!attribute [rw] cost_per_unit_above_soft_max # @return [::Float] # If the load ever exceeds # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit#soft_max_load soft_max_load} # along this vehicle's route, the following cost penalty applies (only once # per vehicle): (load - # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit#soft_max_load soft_max_load}) # * {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit#cost_per_unit_above_soft_max cost_per_unit_above_soft_max}. All costs # add up and must be in the same unit as # {::Google::Cloud::Optimization::V1::Shipment#penalty_cost Shipment.penalty_cost}. # @!attribute [rw] start_load_interval # @return [::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval] # The acceptable load interval of the vehicle at the start of the route. # @!attribute [rw] end_load_interval # @return [::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval] # The acceptable load interval of the vehicle at the end of the route. class LoadLimit include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Interval of acceptable load amounts. # @!attribute [rw] min # @return [::Integer] # A minimum acceptable load. Must be ≥ 0. # If they're both specified, # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval#min min} must # be ≤ # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval#max max}. # @!attribute [rw] max # @return [::Integer] # A maximum acceptable load. Must be ≥ 0. If unspecified, the maximum # load is unrestricted by this message. # If they're both specified, # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval#min min} must # be ≤ # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval#max max}. class Interval include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # A limit defining a maximum duration of the route of a vehicle. It can be # either hard or soft. # # When a soft limit field is defined, both the soft max threshold and its # associated cost must be defined together. # @!attribute [rw] max_duration # @return [::Google::Protobuf::Duration] # A hard limit constraining the duration to be at most max_duration. # @!attribute [rw] soft_max_duration # @return [::Google::Protobuf::Duration] # A soft limit not enforcing a maximum duration limit, but when violated # makes the route incur a cost. This cost adds up to other costs defined in # the model, with the same unit. # # If defined, `soft_max_duration` must be nonnegative. If max_duration is # also defined, `soft_max_duration` must be less than max_duration. # @!attribute [rw] cost_per_hour_after_soft_max # @return [::Float] # Cost per hour incurred if the `soft_max_duration` threshold is violated. # The additional cost is 0 if the duration is under the threshold, # otherwise the cost depends on the duration as follows: # ``` # cost_per_hour_after_soft_max * (duration - soft_max_duration) # ``` # The cost must be nonnegative. # @!attribute [rw] quadratic_soft_max_duration # @return [::Google::Protobuf::Duration] # A soft limit not enforcing a maximum duration limit, but when violated # makes the route incur a cost, quadratic in the duration. This cost adds # up to other costs defined in the model, with the same unit. # # If defined, `quadratic_soft_max_duration` must be nonnegative. If # `max_duration` is also defined, `quadratic_soft_max_duration` must be # less than `max_duration`, and the difference must be no larger than one # day: # # `max_duration - quadratic_soft_max_duration <= 86400 seconds` # @!attribute [rw] cost_per_square_hour_after_quadratic_soft_max # @return [::Float] # Cost per square hour incurred if the # `quadratic_soft_max_duration` threshold is violated. # # The additional cost is 0 if the duration is under the threshold, # otherwise the cost depends on the duration as follows: # # ``` # cost_per_square_hour_after_quadratic_soft_max * # (duration - quadratic_soft_max_duration)^2 # ``` # # The cost must be nonnegative. class DurationLimit include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Cloud::Optimization::V1::Vehicle::LoadLimit] class LoadLimitsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Protobuf::Duration] class ExtraVisitDurationForVisitTypeEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Travel modes which can be used by vehicles. # # These should be a subset of the Google Maps Platform Routes Preferred API # travel modes, see: # https://developers.google.com/maps/documentation/routes_preferred/reference/rest/Shared.Types/RouteTravelMode. module TravelMode # Unspecified travel mode, equivalent to `DRIVING`. TRAVEL_MODE_UNSPECIFIED = 0 # Travel mode corresponding to driving directions (car, ...). DRIVING = 1 # Travel mode corresponding to walking directions. WALKING = 2 end # Policy on how a vehicle can be unloaded. Applies only to shipments having # both a pickup and a delivery. # # Other shipments are free to occur anywhere on the route independent of # `unloading_policy`. module UnloadingPolicy # Unspecified unloading policy; deliveries must just occur after their # corresponding pickups. UNLOADING_POLICY_UNSPECIFIED = 0 # Deliveries must occur in reverse order of pickups LAST_IN_FIRST_OUT = 1 # Deliveries must occur in the same order as pickups FIRST_IN_FIRST_OUT = 2 end end |
#start_load_intervals ⇒ ::Array<::Google::Cloud::Optimization::V1::CapacityQuantityInterval>
This field is deprecated and may be removed in the next major version update.
Returns Deprecated: Use Vehicle.LoadLimit.start_load_interval instead.
1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 |
# File 'proto_docs/google/cloud/optimization/v1/fleet_routing.rb', line 1371 class Vehicle include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Defines a load limit applying to a vehicle, e.g. "this truck may only # carry up to 3500 kg". See # {::Google::Cloud::Optimization::V1::Vehicle#load_limits load_limits}. # @!attribute [rw] max_load # @return [::Integer] # The maximum acceptable amount of load. # @!attribute [rw] soft_max_load # @return [::Integer] # A soft limit of the load. See # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit#cost_per_unit_above_soft_max cost_per_unit_above_soft_max}. # @!attribute [rw] cost_per_unit_above_soft_max # @return [::Float] # If the load ever exceeds # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit#soft_max_load soft_max_load} # along this vehicle's route, the following cost penalty applies (only once # per vehicle): (load - # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit#soft_max_load soft_max_load}) # * {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit#cost_per_unit_above_soft_max cost_per_unit_above_soft_max}. All costs # add up and must be in the same unit as # {::Google::Cloud::Optimization::V1::Shipment#penalty_cost Shipment.penalty_cost}. # @!attribute [rw] start_load_interval # @return [::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval] # The acceptable load interval of the vehicle at the start of the route. # @!attribute [rw] end_load_interval # @return [::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval] # The acceptable load interval of the vehicle at the end of the route. class LoadLimit include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Interval of acceptable load amounts. # @!attribute [rw] min # @return [::Integer] # A minimum acceptable load. Must be ≥ 0. # If they're both specified, # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval#min min} must # be ≤ # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval#max max}. # @!attribute [rw] max # @return [::Integer] # A maximum acceptable load. Must be ≥ 0. If unspecified, the maximum # load is unrestricted by this message. # If they're both specified, # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval#min min} must # be ≤ # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval#max max}. class Interval include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # A limit defining a maximum duration of the route of a vehicle. It can be # either hard or soft. # # When a soft limit field is defined, both the soft max threshold and its # associated cost must be defined together. # @!attribute [rw] max_duration # @return [::Google::Protobuf::Duration] # A hard limit constraining the duration to be at most max_duration. # @!attribute [rw] soft_max_duration # @return [::Google::Protobuf::Duration] # A soft limit not enforcing a maximum duration limit, but when violated # makes the route incur a cost. This cost adds up to other costs defined in # the model, with the same unit. # # If defined, `soft_max_duration` must be nonnegative. If max_duration is # also defined, `soft_max_duration` must be less than max_duration. # @!attribute [rw] cost_per_hour_after_soft_max # @return [::Float] # Cost per hour incurred if the `soft_max_duration` threshold is violated. # The additional cost is 0 if the duration is under the threshold, # otherwise the cost depends on the duration as follows: # ``` # cost_per_hour_after_soft_max * (duration - soft_max_duration) # ``` # The cost must be nonnegative. # @!attribute [rw] quadratic_soft_max_duration # @return [::Google::Protobuf::Duration] # A soft limit not enforcing a maximum duration limit, but when violated # makes the route incur a cost, quadratic in the duration. This cost adds # up to other costs defined in the model, with the same unit. # # If defined, `quadratic_soft_max_duration` must be nonnegative. If # `max_duration` is also defined, `quadratic_soft_max_duration` must be # less than `max_duration`, and the difference must be no larger than one # day: # # `max_duration - quadratic_soft_max_duration <= 86400 seconds` # @!attribute [rw] cost_per_square_hour_after_quadratic_soft_max # @return [::Float] # Cost per square hour incurred if the # `quadratic_soft_max_duration` threshold is violated. # # The additional cost is 0 if the duration is under the threshold, # otherwise the cost depends on the duration as follows: # # ``` # cost_per_square_hour_after_quadratic_soft_max * # (duration - quadratic_soft_max_duration)^2 # ``` # # The cost must be nonnegative. class DurationLimit include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Cloud::Optimization::V1::Vehicle::LoadLimit] class LoadLimitsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Protobuf::Duration] class ExtraVisitDurationForVisitTypeEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Travel modes which can be used by vehicles. # # These should be a subset of the Google Maps Platform Routes Preferred API # travel modes, see: # https://developers.google.com/maps/documentation/routes_preferred/reference/rest/Shared.Types/RouteTravelMode. module TravelMode # Unspecified travel mode, equivalent to `DRIVING`. TRAVEL_MODE_UNSPECIFIED = 0 # Travel mode corresponding to driving directions (car, ...). DRIVING = 1 # Travel mode corresponding to walking directions. WALKING = 2 end # Policy on how a vehicle can be unloaded. Applies only to shipments having # both a pickup and a delivery. # # Other shipments are free to occur anywhere on the route independent of # `unloading_policy`. module UnloadingPolicy # Unspecified unloading policy; deliveries must just occur after their # corresponding pickups. UNLOADING_POLICY_UNSPECIFIED = 0 # Deliveries must occur in reverse order of pickups LAST_IN_FIRST_OUT = 1 # Deliveries must occur in the same order as pickups FIRST_IN_FIRST_OUT = 2 end end |
#start_location ⇒ ::Google::Type::LatLng
Returns Geographic location where the vehicle starts before picking up any
shipments. If not specified, the vehicle starts at its first pickup.
If the shipment model has duration and distance matrices, start_location
must not be specified.
1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 |
# File 'proto_docs/google/cloud/optimization/v1/fleet_routing.rb', line 1371 class Vehicle include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Defines a load limit applying to a vehicle, e.g. "this truck may only # carry up to 3500 kg". See # {::Google::Cloud::Optimization::V1::Vehicle#load_limits load_limits}. # @!attribute [rw] max_load # @return [::Integer] # The maximum acceptable amount of load. # @!attribute [rw] soft_max_load # @return [::Integer] # A soft limit of the load. See # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit#cost_per_unit_above_soft_max cost_per_unit_above_soft_max}. # @!attribute [rw] cost_per_unit_above_soft_max # @return [::Float] # If the load ever exceeds # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit#soft_max_load soft_max_load} # along this vehicle's route, the following cost penalty applies (only once # per vehicle): (load - # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit#soft_max_load soft_max_load}) # * {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit#cost_per_unit_above_soft_max cost_per_unit_above_soft_max}. All costs # add up and must be in the same unit as # {::Google::Cloud::Optimization::V1::Shipment#penalty_cost Shipment.penalty_cost}. # @!attribute [rw] start_load_interval # @return [::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval] # The acceptable load interval of the vehicle at the start of the route. # @!attribute [rw] end_load_interval # @return [::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval] # The acceptable load interval of the vehicle at the end of the route. class LoadLimit include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Interval of acceptable load amounts. # @!attribute [rw] min # @return [::Integer] # A minimum acceptable load. Must be ≥ 0. # If they're both specified, # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval#min min} must # be ≤ # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval#max max}. # @!attribute [rw] max # @return [::Integer] # A maximum acceptable load. Must be ≥ 0. If unspecified, the maximum # load is unrestricted by this message. # If they're both specified, # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval#min min} must # be ≤ # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval#max max}. class Interval include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # A limit defining a maximum duration of the route of a vehicle. It can be # either hard or soft. # # When a soft limit field is defined, both the soft max threshold and its # associated cost must be defined together. # @!attribute [rw] max_duration # @return [::Google::Protobuf::Duration] # A hard limit constraining the duration to be at most max_duration. # @!attribute [rw] soft_max_duration # @return [::Google::Protobuf::Duration] # A soft limit not enforcing a maximum duration limit, but when violated # makes the route incur a cost. This cost adds up to other costs defined in # the model, with the same unit. # # If defined, `soft_max_duration` must be nonnegative. If max_duration is # also defined, `soft_max_duration` must be less than max_duration. # @!attribute [rw] cost_per_hour_after_soft_max # @return [::Float] # Cost per hour incurred if the `soft_max_duration` threshold is violated. # The additional cost is 0 if the duration is under the threshold, # otherwise the cost depends on the duration as follows: # ``` # cost_per_hour_after_soft_max * (duration - soft_max_duration) # ``` # The cost must be nonnegative. # @!attribute [rw] quadratic_soft_max_duration # @return [::Google::Protobuf::Duration] # A soft limit not enforcing a maximum duration limit, but when violated # makes the route incur a cost, quadratic in the duration. This cost adds # up to other costs defined in the model, with the same unit. # # If defined, `quadratic_soft_max_duration` must be nonnegative. If # `max_duration` is also defined, `quadratic_soft_max_duration` must be # less than `max_duration`, and the difference must be no larger than one # day: # # `max_duration - quadratic_soft_max_duration <= 86400 seconds` # @!attribute [rw] cost_per_square_hour_after_quadratic_soft_max # @return [::Float] # Cost per square hour incurred if the # `quadratic_soft_max_duration` threshold is violated. # # The additional cost is 0 if the duration is under the threshold, # otherwise the cost depends on the duration as follows: # # ``` # cost_per_square_hour_after_quadratic_soft_max * # (duration - quadratic_soft_max_duration)^2 # ``` # # The cost must be nonnegative. class DurationLimit include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Cloud::Optimization::V1::Vehicle::LoadLimit] class LoadLimitsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Protobuf::Duration] class ExtraVisitDurationForVisitTypeEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Travel modes which can be used by vehicles. # # These should be a subset of the Google Maps Platform Routes Preferred API # travel modes, see: # https://developers.google.com/maps/documentation/routes_preferred/reference/rest/Shared.Types/RouteTravelMode. module TravelMode # Unspecified travel mode, equivalent to `DRIVING`. TRAVEL_MODE_UNSPECIFIED = 0 # Travel mode corresponding to driving directions (car, ...). DRIVING = 1 # Travel mode corresponding to walking directions. WALKING = 2 end # Policy on how a vehicle can be unloaded. Applies only to shipments having # both a pickup and a delivery. # # Other shipments are free to occur anywhere on the route independent of # `unloading_policy`. module UnloadingPolicy # Unspecified unloading policy; deliveries must just occur after their # corresponding pickups. UNLOADING_POLICY_UNSPECIFIED = 0 # Deliveries must occur in reverse order of pickups LAST_IN_FIRST_OUT = 1 # Deliveries must occur in the same order as pickups FIRST_IN_FIRST_OUT = 2 end end |
#start_tags ⇒ ::Array<::String>
Returns Specifies tags attached to the start of the vehicle's route.
Empty or duplicate strings are not allowed.
1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 |
# File 'proto_docs/google/cloud/optimization/v1/fleet_routing.rb', line 1371 class Vehicle include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Defines a load limit applying to a vehicle, e.g. "this truck may only # carry up to 3500 kg". See # {::Google::Cloud::Optimization::V1::Vehicle#load_limits load_limits}. # @!attribute [rw] max_load # @return [::Integer] # The maximum acceptable amount of load. # @!attribute [rw] soft_max_load # @return [::Integer] # A soft limit of the load. See # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit#cost_per_unit_above_soft_max cost_per_unit_above_soft_max}. # @!attribute [rw] cost_per_unit_above_soft_max # @return [::Float] # If the load ever exceeds # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit#soft_max_load soft_max_load} # along this vehicle's route, the following cost penalty applies (only once # per vehicle): (load - # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit#soft_max_load soft_max_load}) # * {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit#cost_per_unit_above_soft_max cost_per_unit_above_soft_max}. All costs # add up and must be in the same unit as # {::Google::Cloud::Optimization::V1::Shipment#penalty_cost Shipment.penalty_cost}. # @!attribute [rw] start_load_interval # @return [::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval] # The acceptable load interval of the vehicle at the start of the route. # @!attribute [rw] end_load_interval # @return [::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval] # The acceptable load interval of the vehicle at the end of the route. class LoadLimit include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Interval of acceptable load amounts. # @!attribute [rw] min # @return [::Integer] # A minimum acceptable load. Must be ≥ 0. # If they're both specified, # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval#min min} must # be ≤ # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval#max max}. # @!attribute [rw] max # @return [::Integer] # A maximum acceptable load. Must be ≥ 0. If unspecified, the maximum # load is unrestricted by this message. # If they're both specified, # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval#min min} must # be ≤ # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval#max max}. class Interval include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # A limit defining a maximum duration of the route of a vehicle. It can be # either hard or soft. # # When a soft limit field is defined, both the soft max threshold and its # associated cost must be defined together. # @!attribute [rw] max_duration # @return [::Google::Protobuf::Duration] # A hard limit constraining the duration to be at most max_duration. # @!attribute [rw] soft_max_duration # @return [::Google::Protobuf::Duration] # A soft limit not enforcing a maximum duration limit, but when violated # makes the route incur a cost. This cost adds up to other costs defined in # the model, with the same unit. # # If defined, `soft_max_duration` must be nonnegative. If max_duration is # also defined, `soft_max_duration` must be less than max_duration. # @!attribute [rw] cost_per_hour_after_soft_max # @return [::Float] # Cost per hour incurred if the `soft_max_duration` threshold is violated. # The additional cost is 0 if the duration is under the threshold, # otherwise the cost depends on the duration as follows: # ``` # cost_per_hour_after_soft_max * (duration - soft_max_duration) # ``` # The cost must be nonnegative. # @!attribute [rw] quadratic_soft_max_duration # @return [::Google::Protobuf::Duration] # A soft limit not enforcing a maximum duration limit, but when violated # makes the route incur a cost, quadratic in the duration. This cost adds # up to other costs defined in the model, with the same unit. # # If defined, `quadratic_soft_max_duration` must be nonnegative. If # `max_duration` is also defined, `quadratic_soft_max_duration` must be # less than `max_duration`, and the difference must be no larger than one # day: # # `max_duration - quadratic_soft_max_duration <= 86400 seconds` # @!attribute [rw] cost_per_square_hour_after_quadratic_soft_max # @return [::Float] # Cost per square hour incurred if the # `quadratic_soft_max_duration` threshold is violated. # # The additional cost is 0 if the duration is under the threshold, # otherwise the cost depends on the duration as follows: # # ``` # cost_per_square_hour_after_quadratic_soft_max * # (duration - quadratic_soft_max_duration)^2 # ``` # # The cost must be nonnegative. class DurationLimit include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Cloud::Optimization::V1::Vehicle::LoadLimit] class LoadLimitsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Protobuf::Duration] class ExtraVisitDurationForVisitTypeEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Travel modes which can be used by vehicles. # # These should be a subset of the Google Maps Platform Routes Preferred API # travel modes, see: # https://developers.google.com/maps/documentation/routes_preferred/reference/rest/Shared.Types/RouteTravelMode. module TravelMode # Unspecified travel mode, equivalent to `DRIVING`. TRAVEL_MODE_UNSPECIFIED = 0 # Travel mode corresponding to driving directions (car, ...). DRIVING = 1 # Travel mode corresponding to walking directions. WALKING = 2 end # Policy on how a vehicle can be unloaded. Applies only to shipments having # both a pickup and a delivery. # # Other shipments are free to occur anywhere on the route independent of # `unloading_policy`. module UnloadingPolicy # Unspecified unloading policy; deliveries must just occur after their # corresponding pickups. UNLOADING_POLICY_UNSPECIFIED = 0 # Deliveries must occur in reverse order of pickups LAST_IN_FIRST_OUT = 1 # Deliveries must occur in the same order as pickups FIRST_IN_FIRST_OUT = 2 end end |
#start_time_windows ⇒ ::Array<::Google::Cloud::Optimization::V1::TimeWindow>
Returns Time windows during which the vehicle may depart its start location. They must be within the global time limits (see [ShipmentModel.global_*][google.cloud.optimization.v1.ShipmentModel.global_start_time] fields). If unspecified, there is no limitation besides those global time limits.
Time windows belonging to the same repeated field must be disjoint, i.e. no time window can overlap with or be adjacent to another, and they must be in chronological order.
cost_per_hour_after_soft_end_time
and soft_end_time
can only be set if
there is a single time window.
1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 |
# File 'proto_docs/google/cloud/optimization/v1/fleet_routing.rb', line 1371 class Vehicle include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Defines a load limit applying to a vehicle, e.g. "this truck may only # carry up to 3500 kg". See # {::Google::Cloud::Optimization::V1::Vehicle#load_limits load_limits}. # @!attribute [rw] max_load # @return [::Integer] # The maximum acceptable amount of load. # @!attribute [rw] soft_max_load # @return [::Integer] # A soft limit of the load. See # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit#cost_per_unit_above_soft_max cost_per_unit_above_soft_max}. # @!attribute [rw] cost_per_unit_above_soft_max # @return [::Float] # If the load ever exceeds # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit#soft_max_load soft_max_load} # along this vehicle's route, the following cost penalty applies (only once # per vehicle): (load - # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit#soft_max_load soft_max_load}) # * {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit#cost_per_unit_above_soft_max cost_per_unit_above_soft_max}. All costs # add up and must be in the same unit as # {::Google::Cloud::Optimization::V1::Shipment#penalty_cost Shipment.penalty_cost}. # @!attribute [rw] start_load_interval # @return [::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval] # The acceptable load interval of the vehicle at the start of the route. # @!attribute [rw] end_load_interval # @return [::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval] # The acceptable load interval of the vehicle at the end of the route. class LoadLimit include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Interval of acceptable load amounts. # @!attribute [rw] min # @return [::Integer] # A minimum acceptable load. Must be ≥ 0. # If they're both specified, # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval#min min} must # be ≤ # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval#max max}. # @!attribute [rw] max # @return [::Integer] # A maximum acceptable load. Must be ≥ 0. If unspecified, the maximum # load is unrestricted by this message. # If they're both specified, # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval#min min} must # be ≤ # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval#max max}. class Interval include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # A limit defining a maximum duration of the route of a vehicle. It can be # either hard or soft. # # When a soft limit field is defined, both the soft max threshold and its # associated cost must be defined together. # @!attribute [rw] max_duration # @return [::Google::Protobuf::Duration] # A hard limit constraining the duration to be at most max_duration. # @!attribute [rw] soft_max_duration # @return [::Google::Protobuf::Duration] # A soft limit not enforcing a maximum duration limit, but when violated # makes the route incur a cost. This cost adds up to other costs defined in # the model, with the same unit. # # If defined, `soft_max_duration` must be nonnegative. If max_duration is # also defined, `soft_max_duration` must be less than max_duration. # @!attribute [rw] cost_per_hour_after_soft_max # @return [::Float] # Cost per hour incurred if the `soft_max_duration` threshold is violated. # The additional cost is 0 if the duration is under the threshold, # otherwise the cost depends on the duration as follows: # ``` # cost_per_hour_after_soft_max * (duration - soft_max_duration) # ``` # The cost must be nonnegative. # @!attribute [rw] quadratic_soft_max_duration # @return [::Google::Protobuf::Duration] # A soft limit not enforcing a maximum duration limit, but when violated # makes the route incur a cost, quadratic in the duration. This cost adds # up to other costs defined in the model, with the same unit. # # If defined, `quadratic_soft_max_duration` must be nonnegative. If # `max_duration` is also defined, `quadratic_soft_max_duration` must be # less than `max_duration`, and the difference must be no larger than one # day: # # `max_duration - quadratic_soft_max_duration <= 86400 seconds` # @!attribute [rw] cost_per_square_hour_after_quadratic_soft_max # @return [::Float] # Cost per square hour incurred if the # `quadratic_soft_max_duration` threshold is violated. # # The additional cost is 0 if the duration is under the threshold, # otherwise the cost depends on the duration as follows: # # ``` # cost_per_square_hour_after_quadratic_soft_max * # (duration - quadratic_soft_max_duration)^2 # ``` # # The cost must be nonnegative. class DurationLimit include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Cloud::Optimization::V1::Vehicle::LoadLimit] class LoadLimitsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Protobuf::Duration] class ExtraVisitDurationForVisitTypeEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Travel modes which can be used by vehicles. # # These should be a subset of the Google Maps Platform Routes Preferred API # travel modes, see: # https://developers.google.com/maps/documentation/routes_preferred/reference/rest/Shared.Types/RouteTravelMode. module TravelMode # Unspecified travel mode, equivalent to `DRIVING`. TRAVEL_MODE_UNSPECIFIED = 0 # Travel mode corresponding to driving directions (car, ...). DRIVING = 1 # Travel mode corresponding to walking directions. WALKING = 2 end # Policy on how a vehicle can be unloaded. Applies only to shipments having # both a pickup and a delivery. # # Other shipments are free to occur anywhere on the route independent of # `unloading_policy`. module UnloadingPolicy # Unspecified unloading policy; deliveries must just occur after their # corresponding pickups. UNLOADING_POLICY_UNSPECIFIED = 0 # Deliveries must occur in reverse order of pickups LAST_IN_FIRST_OUT = 1 # Deliveries must occur in the same order as pickups FIRST_IN_FIRST_OUT = 2 end end |
#start_waypoint ⇒ ::Google::Cloud::Optimization::V1::Waypoint
Returns Waypoint representing a geographic location where the vehicle starts before
picking up any shipments. If neither start_waypoint
nor start_location
is specified, the vehicle starts at its first pickup.
If the shipment model has duration and distance matrices, start_waypoint
must not be specified.
1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 |
# File 'proto_docs/google/cloud/optimization/v1/fleet_routing.rb', line 1371 class Vehicle include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Defines a load limit applying to a vehicle, e.g. "this truck may only # carry up to 3500 kg". See # {::Google::Cloud::Optimization::V1::Vehicle#load_limits load_limits}. # @!attribute [rw] max_load # @return [::Integer] # The maximum acceptable amount of load. # @!attribute [rw] soft_max_load # @return [::Integer] # A soft limit of the load. See # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit#cost_per_unit_above_soft_max cost_per_unit_above_soft_max}. # @!attribute [rw] cost_per_unit_above_soft_max # @return [::Float] # If the load ever exceeds # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit#soft_max_load soft_max_load} # along this vehicle's route, the following cost penalty applies (only once # per vehicle): (load - # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit#soft_max_load soft_max_load}) # * {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit#cost_per_unit_above_soft_max cost_per_unit_above_soft_max}. All costs # add up and must be in the same unit as # {::Google::Cloud::Optimization::V1::Shipment#penalty_cost Shipment.penalty_cost}. # @!attribute [rw] start_load_interval # @return [::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval] # The acceptable load interval of the vehicle at the start of the route. # @!attribute [rw] end_load_interval # @return [::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval] # The acceptable load interval of the vehicle at the end of the route. class LoadLimit include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Interval of acceptable load amounts. # @!attribute [rw] min # @return [::Integer] # A minimum acceptable load. Must be ≥ 0. # If they're both specified, # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval#min min} must # be ≤ # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval#max max}. # @!attribute [rw] max # @return [::Integer] # A maximum acceptable load. Must be ≥ 0. If unspecified, the maximum # load is unrestricted by this message. # If they're both specified, # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval#min min} must # be ≤ # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval#max max}. class Interval include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # A limit defining a maximum duration of the route of a vehicle. It can be # either hard or soft. # # When a soft limit field is defined, both the soft max threshold and its # associated cost must be defined together. # @!attribute [rw] max_duration # @return [::Google::Protobuf::Duration] # A hard limit constraining the duration to be at most max_duration. # @!attribute [rw] soft_max_duration # @return [::Google::Protobuf::Duration] # A soft limit not enforcing a maximum duration limit, but when violated # makes the route incur a cost. This cost adds up to other costs defined in # the model, with the same unit. # # If defined, `soft_max_duration` must be nonnegative. If max_duration is # also defined, `soft_max_duration` must be less than max_duration. # @!attribute [rw] cost_per_hour_after_soft_max # @return [::Float] # Cost per hour incurred if the `soft_max_duration` threshold is violated. # The additional cost is 0 if the duration is under the threshold, # otherwise the cost depends on the duration as follows: # ``` # cost_per_hour_after_soft_max * (duration - soft_max_duration) # ``` # The cost must be nonnegative. # @!attribute [rw] quadratic_soft_max_duration # @return [::Google::Protobuf::Duration] # A soft limit not enforcing a maximum duration limit, but when violated # makes the route incur a cost, quadratic in the duration. This cost adds # up to other costs defined in the model, with the same unit. # # If defined, `quadratic_soft_max_duration` must be nonnegative. If # `max_duration` is also defined, `quadratic_soft_max_duration` must be # less than `max_duration`, and the difference must be no larger than one # day: # # `max_duration - quadratic_soft_max_duration <= 86400 seconds` # @!attribute [rw] cost_per_square_hour_after_quadratic_soft_max # @return [::Float] # Cost per square hour incurred if the # `quadratic_soft_max_duration` threshold is violated. # # The additional cost is 0 if the duration is under the threshold, # otherwise the cost depends on the duration as follows: # # ``` # cost_per_square_hour_after_quadratic_soft_max * # (duration - quadratic_soft_max_duration)^2 # ``` # # The cost must be nonnegative. class DurationLimit include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Cloud::Optimization::V1::Vehicle::LoadLimit] class LoadLimitsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Protobuf::Duration] class ExtraVisitDurationForVisitTypeEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Travel modes which can be used by vehicles. # # These should be a subset of the Google Maps Platform Routes Preferred API # travel modes, see: # https://developers.google.com/maps/documentation/routes_preferred/reference/rest/Shared.Types/RouteTravelMode. module TravelMode # Unspecified travel mode, equivalent to `DRIVING`. TRAVEL_MODE_UNSPECIFIED = 0 # Travel mode corresponding to driving directions (car, ...). DRIVING = 1 # Travel mode corresponding to walking directions. WALKING = 2 end # Policy on how a vehicle can be unloaded. Applies only to shipments having # both a pickup and a delivery. # # Other shipments are free to occur anywhere on the route independent of # `unloading_policy`. module UnloadingPolicy # Unspecified unloading policy; deliveries must just occur after their # corresponding pickups. UNLOADING_POLICY_UNSPECIFIED = 0 # Deliveries must occur in reverse order of pickups LAST_IN_FIRST_OUT = 1 # Deliveries must occur in the same order as pickups FIRST_IN_FIRST_OUT = 2 end end |
#travel_duration_limit ⇒ ::Google::Cloud::Optimization::V1::Vehicle::DurationLimit
Returns Limit applied to the travel duration of the vehicle's route. In a given
OptimizeToursResponse
, the route travel duration is the sum of all its
transitions.travel_duration.
1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 |
# File 'proto_docs/google/cloud/optimization/v1/fleet_routing.rb', line 1371 class Vehicle include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Defines a load limit applying to a vehicle, e.g. "this truck may only # carry up to 3500 kg". See # {::Google::Cloud::Optimization::V1::Vehicle#load_limits load_limits}. # @!attribute [rw] max_load # @return [::Integer] # The maximum acceptable amount of load. # @!attribute [rw] soft_max_load # @return [::Integer] # A soft limit of the load. See # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit#cost_per_unit_above_soft_max cost_per_unit_above_soft_max}. # @!attribute [rw] cost_per_unit_above_soft_max # @return [::Float] # If the load ever exceeds # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit#soft_max_load soft_max_load} # along this vehicle's route, the following cost penalty applies (only once # per vehicle): (load - # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit#soft_max_load soft_max_load}) # * {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit#cost_per_unit_above_soft_max cost_per_unit_above_soft_max}. All costs # add up and must be in the same unit as # {::Google::Cloud::Optimization::V1::Shipment#penalty_cost Shipment.penalty_cost}. # @!attribute [rw] start_load_interval # @return [::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval] # The acceptable load interval of the vehicle at the start of the route. # @!attribute [rw] end_load_interval # @return [::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval] # The acceptable load interval of the vehicle at the end of the route. class LoadLimit include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Interval of acceptable load amounts. # @!attribute [rw] min # @return [::Integer] # A minimum acceptable load. Must be ≥ 0. # If they're both specified, # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval#min min} must # be ≤ # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval#max max}. # @!attribute [rw] max # @return [::Integer] # A maximum acceptable load. Must be ≥ 0. If unspecified, the maximum # load is unrestricted by this message. # If they're both specified, # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval#min min} must # be ≤ # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval#max max}. class Interval include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # A limit defining a maximum duration of the route of a vehicle. It can be # either hard or soft. # # When a soft limit field is defined, both the soft max threshold and its # associated cost must be defined together. # @!attribute [rw] max_duration # @return [::Google::Protobuf::Duration] # A hard limit constraining the duration to be at most max_duration. # @!attribute [rw] soft_max_duration # @return [::Google::Protobuf::Duration] # A soft limit not enforcing a maximum duration limit, but when violated # makes the route incur a cost. This cost adds up to other costs defined in # the model, with the same unit. # # If defined, `soft_max_duration` must be nonnegative. If max_duration is # also defined, `soft_max_duration` must be less than max_duration. # @!attribute [rw] cost_per_hour_after_soft_max # @return [::Float] # Cost per hour incurred if the `soft_max_duration` threshold is violated. # The additional cost is 0 if the duration is under the threshold, # otherwise the cost depends on the duration as follows: # ``` # cost_per_hour_after_soft_max * (duration - soft_max_duration) # ``` # The cost must be nonnegative. # @!attribute [rw] quadratic_soft_max_duration # @return [::Google::Protobuf::Duration] # A soft limit not enforcing a maximum duration limit, but when violated # makes the route incur a cost, quadratic in the duration. This cost adds # up to other costs defined in the model, with the same unit. # # If defined, `quadratic_soft_max_duration` must be nonnegative. If # `max_duration` is also defined, `quadratic_soft_max_duration` must be # less than `max_duration`, and the difference must be no larger than one # day: # # `max_duration - quadratic_soft_max_duration <= 86400 seconds` # @!attribute [rw] cost_per_square_hour_after_quadratic_soft_max # @return [::Float] # Cost per square hour incurred if the # `quadratic_soft_max_duration` threshold is violated. # # The additional cost is 0 if the duration is under the threshold, # otherwise the cost depends on the duration as follows: # # ``` # cost_per_square_hour_after_quadratic_soft_max * # (duration - quadratic_soft_max_duration)^2 # ``` # # The cost must be nonnegative. class DurationLimit include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Cloud::Optimization::V1::Vehicle::LoadLimit] class LoadLimitsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Protobuf::Duration] class ExtraVisitDurationForVisitTypeEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Travel modes which can be used by vehicles. # # These should be a subset of the Google Maps Platform Routes Preferred API # travel modes, see: # https://developers.google.com/maps/documentation/routes_preferred/reference/rest/Shared.Types/RouteTravelMode. module TravelMode # Unspecified travel mode, equivalent to `DRIVING`. TRAVEL_MODE_UNSPECIFIED = 0 # Travel mode corresponding to driving directions (car, ...). DRIVING = 1 # Travel mode corresponding to walking directions. WALKING = 2 end # Policy on how a vehicle can be unloaded. Applies only to shipments having # both a pickup and a delivery. # # Other shipments are free to occur anywhere on the route independent of # `unloading_policy`. module UnloadingPolicy # Unspecified unloading policy; deliveries must just occur after their # corresponding pickups. UNLOADING_POLICY_UNSPECIFIED = 0 # Deliveries must occur in reverse order of pickups LAST_IN_FIRST_OUT = 1 # Deliveries must occur in the same order as pickups FIRST_IN_FIRST_OUT = 2 end end |
#travel_duration_multiple ⇒ ::Float
Returns Specifies a multiplicative factor that can be used to increase or decrease
travel times of this vehicle. For example, setting this to 2.0 means
that this vehicle is slower and has travel times that are twice what they
are for standard vehicles. This multiple does not affect visit durations.
It does affect cost if cost_per_hour
or cost_per_traveled_hour
are
specified. This must be in the range [0.001, 1000.0]. If unset, the vehicle
is standard, and this multiple is considered 1.0.
WARNING: Travel times will be rounded to the nearest second after this multiple is applied but before performing any numerical operations, thus, a small multiple may result in a loss of precision.
See also extra_visit_duration_for_visit_type
below.
1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 |
# File 'proto_docs/google/cloud/optimization/v1/fleet_routing.rb', line 1371 class Vehicle include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Defines a load limit applying to a vehicle, e.g. "this truck may only # carry up to 3500 kg". See # {::Google::Cloud::Optimization::V1::Vehicle#load_limits load_limits}. # @!attribute [rw] max_load # @return [::Integer] # The maximum acceptable amount of load. # @!attribute [rw] soft_max_load # @return [::Integer] # A soft limit of the load. See # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit#cost_per_unit_above_soft_max cost_per_unit_above_soft_max}. # @!attribute [rw] cost_per_unit_above_soft_max # @return [::Float] # If the load ever exceeds # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit#soft_max_load soft_max_load} # along this vehicle's route, the following cost penalty applies (only once # per vehicle): (load - # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit#soft_max_load soft_max_load}) # * {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit#cost_per_unit_above_soft_max cost_per_unit_above_soft_max}. All costs # add up and must be in the same unit as # {::Google::Cloud::Optimization::V1::Shipment#penalty_cost Shipment.penalty_cost}. # @!attribute [rw] start_load_interval # @return [::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval] # The acceptable load interval of the vehicle at the start of the route. # @!attribute [rw] end_load_interval # @return [::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval] # The acceptable load interval of the vehicle at the end of the route. class LoadLimit include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Interval of acceptable load amounts. # @!attribute [rw] min # @return [::Integer] # A minimum acceptable load. Must be ≥ 0. # If they're both specified, # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval#min min} must # be ≤ # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval#max max}. # @!attribute [rw] max # @return [::Integer] # A maximum acceptable load. Must be ≥ 0. If unspecified, the maximum # load is unrestricted by this message. # If they're both specified, # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval#min min} must # be ≤ # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval#max max}. class Interval include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # A limit defining a maximum duration of the route of a vehicle. It can be # either hard or soft. # # When a soft limit field is defined, both the soft max threshold and its # associated cost must be defined together. # @!attribute [rw] max_duration # @return [::Google::Protobuf::Duration] # A hard limit constraining the duration to be at most max_duration. # @!attribute [rw] soft_max_duration # @return [::Google::Protobuf::Duration] # A soft limit not enforcing a maximum duration limit, but when violated # makes the route incur a cost. This cost adds up to other costs defined in # the model, with the same unit. # # If defined, `soft_max_duration` must be nonnegative. If max_duration is # also defined, `soft_max_duration` must be less than max_duration. # @!attribute [rw] cost_per_hour_after_soft_max # @return [::Float] # Cost per hour incurred if the `soft_max_duration` threshold is violated. # The additional cost is 0 if the duration is under the threshold, # otherwise the cost depends on the duration as follows: # ``` # cost_per_hour_after_soft_max * (duration - soft_max_duration) # ``` # The cost must be nonnegative. # @!attribute [rw] quadratic_soft_max_duration # @return [::Google::Protobuf::Duration] # A soft limit not enforcing a maximum duration limit, but when violated # makes the route incur a cost, quadratic in the duration. This cost adds # up to other costs defined in the model, with the same unit. # # If defined, `quadratic_soft_max_duration` must be nonnegative. If # `max_duration` is also defined, `quadratic_soft_max_duration` must be # less than `max_duration`, and the difference must be no larger than one # day: # # `max_duration - quadratic_soft_max_duration <= 86400 seconds` # @!attribute [rw] cost_per_square_hour_after_quadratic_soft_max # @return [::Float] # Cost per square hour incurred if the # `quadratic_soft_max_duration` threshold is violated. # # The additional cost is 0 if the duration is under the threshold, # otherwise the cost depends on the duration as follows: # # ``` # cost_per_square_hour_after_quadratic_soft_max * # (duration - quadratic_soft_max_duration)^2 # ``` # # The cost must be nonnegative. class DurationLimit include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Cloud::Optimization::V1::Vehicle::LoadLimit] class LoadLimitsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Protobuf::Duration] class ExtraVisitDurationForVisitTypeEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Travel modes which can be used by vehicles. # # These should be a subset of the Google Maps Platform Routes Preferred API # travel modes, see: # https://developers.google.com/maps/documentation/routes_preferred/reference/rest/Shared.Types/RouteTravelMode. module TravelMode # Unspecified travel mode, equivalent to `DRIVING`. TRAVEL_MODE_UNSPECIFIED = 0 # Travel mode corresponding to driving directions (car, ...). DRIVING = 1 # Travel mode corresponding to walking directions. WALKING = 2 end # Policy on how a vehicle can be unloaded. Applies only to shipments having # both a pickup and a delivery. # # Other shipments are free to occur anywhere on the route independent of # `unloading_policy`. module UnloadingPolicy # Unspecified unloading policy; deliveries must just occur after their # corresponding pickups. UNLOADING_POLICY_UNSPECIFIED = 0 # Deliveries must occur in reverse order of pickups LAST_IN_FIRST_OUT = 1 # Deliveries must occur in the same order as pickups FIRST_IN_FIRST_OUT = 2 end end |
#travel_mode ⇒ ::Google::Cloud::Optimization::V1::Vehicle::TravelMode
Returns The travel mode which affects the roads usable by the vehicle and its
speed. See also travel_duration_multiple
.
1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 |
# File 'proto_docs/google/cloud/optimization/v1/fleet_routing.rb', line 1371 class Vehicle include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Defines a load limit applying to a vehicle, e.g. "this truck may only # carry up to 3500 kg". See # {::Google::Cloud::Optimization::V1::Vehicle#load_limits load_limits}. # @!attribute [rw] max_load # @return [::Integer] # The maximum acceptable amount of load. # @!attribute [rw] soft_max_load # @return [::Integer] # A soft limit of the load. See # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit#cost_per_unit_above_soft_max cost_per_unit_above_soft_max}. # @!attribute [rw] cost_per_unit_above_soft_max # @return [::Float] # If the load ever exceeds # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit#soft_max_load soft_max_load} # along this vehicle's route, the following cost penalty applies (only once # per vehicle): (load - # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit#soft_max_load soft_max_load}) # * {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit#cost_per_unit_above_soft_max cost_per_unit_above_soft_max}. All costs # add up and must be in the same unit as # {::Google::Cloud::Optimization::V1::Shipment#penalty_cost Shipment.penalty_cost}. # @!attribute [rw] start_load_interval # @return [::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval] # The acceptable load interval of the vehicle at the start of the route. # @!attribute [rw] end_load_interval # @return [::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval] # The acceptable load interval of the vehicle at the end of the route. class LoadLimit include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Interval of acceptable load amounts. # @!attribute [rw] min # @return [::Integer] # A minimum acceptable load. Must be ≥ 0. # If they're both specified, # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval#min min} must # be ≤ # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval#max max}. # @!attribute [rw] max # @return [::Integer] # A maximum acceptable load. Must be ≥ 0. If unspecified, the maximum # load is unrestricted by this message. # If they're both specified, # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval#min min} must # be ≤ # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval#max max}. class Interval include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # A limit defining a maximum duration of the route of a vehicle. It can be # either hard or soft. # # When a soft limit field is defined, both the soft max threshold and its # associated cost must be defined together. # @!attribute [rw] max_duration # @return [::Google::Protobuf::Duration] # A hard limit constraining the duration to be at most max_duration. # @!attribute [rw] soft_max_duration # @return [::Google::Protobuf::Duration] # A soft limit not enforcing a maximum duration limit, but when violated # makes the route incur a cost. This cost adds up to other costs defined in # the model, with the same unit. # # If defined, `soft_max_duration` must be nonnegative. If max_duration is # also defined, `soft_max_duration` must be less than max_duration. # @!attribute [rw] cost_per_hour_after_soft_max # @return [::Float] # Cost per hour incurred if the `soft_max_duration` threshold is violated. # The additional cost is 0 if the duration is under the threshold, # otherwise the cost depends on the duration as follows: # ``` # cost_per_hour_after_soft_max * (duration - soft_max_duration) # ``` # The cost must be nonnegative. # @!attribute [rw] quadratic_soft_max_duration # @return [::Google::Protobuf::Duration] # A soft limit not enforcing a maximum duration limit, but when violated # makes the route incur a cost, quadratic in the duration. This cost adds # up to other costs defined in the model, with the same unit. # # If defined, `quadratic_soft_max_duration` must be nonnegative. If # `max_duration` is also defined, `quadratic_soft_max_duration` must be # less than `max_duration`, and the difference must be no larger than one # day: # # `max_duration - quadratic_soft_max_duration <= 86400 seconds` # @!attribute [rw] cost_per_square_hour_after_quadratic_soft_max # @return [::Float] # Cost per square hour incurred if the # `quadratic_soft_max_duration` threshold is violated. # # The additional cost is 0 if the duration is under the threshold, # otherwise the cost depends on the duration as follows: # # ``` # cost_per_square_hour_after_quadratic_soft_max * # (duration - quadratic_soft_max_duration)^2 # ``` # # The cost must be nonnegative. class DurationLimit include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Cloud::Optimization::V1::Vehicle::LoadLimit] class LoadLimitsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Protobuf::Duration] class ExtraVisitDurationForVisitTypeEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Travel modes which can be used by vehicles. # # These should be a subset of the Google Maps Platform Routes Preferred API # travel modes, see: # https://developers.google.com/maps/documentation/routes_preferred/reference/rest/Shared.Types/RouteTravelMode. module TravelMode # Unspecified travel mode, equivalent to `DRIVING`. TRAVEL_MODE_UNSPECIFIED = 0 # Travel mode corresponding to driving directions (car, ...). DRIVING = 1 # Travel mode corresponding to walking directions. WALKING = 2 end # Policy on how a vehicle can be unloaded. Applies only to shipments having # both a pickup and a delivery. # # Other shipments are free to occur anywhere on the route independent of # `unloading_policy`. module UnloadingPolicy # Unspecified unloading policy; deliveries must just occur after their # corresponding pickups. UNLOADING_POLICY_UNSPECIFIED = 0 # Deliveries must occur in reverse order of pickups LAST_IN_FIRST_OUT = 1 # Deliveries must occur in the same order as pickups FIRST_IN_FIRST_OUT = 2 end end |
#unloading_policy ⇒ ::Google::Cloud::Optimization::V1::Vehicle::UnloadingPolicy
Returns Unloading policy enforced on the vehicle.
1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 |
# File 'proto_docs/google/cloud/optimization/v1/fleet_routing.rb', line 1371 class Vehicle include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Defines a load limit applying to a vehicle, e.g. "this truck may only # carry up to 3500 kg". See # {::Google::Cloud::Optimization::V1::Vehicle#load_limits load_limits}. # @!attribute [rw] max_load # @return [::Integer] # The maximum acceptable amount of load. # @!attribute [rw] soft_max_load # @return [::Integer] # A soft limit of the load. See # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit#cost_per_unit_above_soft_max cost_per_unit_above_soft_max}. # @!attribute [rw] cost_per_unit_above_soft_max # @return [::Float] # If the load ever exceeds # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit#soft_max_load soft_max_load} # along this vehicle's route, the following cost penalty applies (only once # per vehicle): (load - # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit#soft_max_load soft_max_load}) # * {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit#cost_per_unit_above_soft_max cost_per_unit_above_soft_max}. All costs # add up and must be in the same unit as # {::Google::Cloud::Optimization::V1::Shipment#penalty_cost Shipment.penalty_cost}. # @!attribute [rw] start_load_interval # @return [::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval] # The acceptable load interval of the vehicle at the start of the route. # @!attribute [rw] end_load_interval # @return [::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval] # The acceptable load interval of the vehicle at the end of the route. class LoadLimit include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Interval of acceptable load amounts. # @!attribute [rw] min # @return [::Integer] # A minimum acceptable load. Must be ≥ 0. # If they're both specified, # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval#min min} must # be ≤ # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval#max max}. # @!attribute [rw] max # @return [::Integer] # A maximum acceptable load. Must be ≥ 0. If unspecified, the maximum # load is unrestricted by this message. # If they're both specified, # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval#min min} must # be ≤ # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval#max max}. class Interval include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # A limit defining a maximum duration of the route of a vehicle. It can be # either hard or soft. # # When a soft limit field is defined, both the soft max threshold and its # associated cost must be defined together. # @!attribute [rw] max_duration # @return [::Google::Protobuf::Duration] # A hard limit constraining the duration to be at most max_duration. # @!attribute [rw] soft_max_duration # @return [::Google::Protobuf::Duration] # A soft limit not enforcing a maximum duration limit, but when violated # makes the route incur a cost. This cost adds up to other costs defined in # the model, with the same unit. # # If defined, `soft_max_duration` must be nonnegative. If max_duration is # also defined, `soft_max_duration` must be less than max_duration. # @!attribute [rw] cost_per_hour_after_soft_max # @return [::Float] # Cost per hour incurred if the `soft_max_duration` threshold is violated. # The additional cost is 0 if the duration is under the threshold, # otherwise the cost depends on the duration as follows: # ``` # cost_per_hour_after_soft_max * (duration - soft_max_duration) # ``` # The cost must be nonnegative. # @!attribute [rw] quadratic_soft_max_duration # @return [::Google::Protobuf::Duration] # A soft limit not enforcing a maximum duration limit, but when violated # makes the route incur a cost, quadratic in the duration. This cost adds # up to other costs defined in the model, with the same unit. # # If defined, `quadratic_soft_max_duration` must be nonnegative. If # `max_duration` is also defined, `quadratic_soft_max_duration` must be # less than `max_duration`, and the difference must be no larger than one # day: # # `max_duration - quadratic_soft_max_duration <= 86400 seconds` # @!attribute [rw] cost_per_square_hour_after_quadratic_soft_max # @return [::Float] # Cost per square hour incurred if the # `quadratic_soft_max_duration` threshold is violated. # # The additional cost is 0 if the duration is under the threshold, # otherwise the cost depends on the duration as follows: # # ``` # cost_per_square_hour_after_quadratic_soft_max * # (duration - quadratic_soft_max_duration)^2 # ``` # # The cost must be nonnegative. class DurationLimit include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Cloud::Optimization::V1::Vehicle::LoadLimit] class LoadLimitsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Protobuf::Duration] class ExtraVisitDurationForVisitTypeEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Travel modes which can be used by vehicles. # # These should be a subset of the Google Maps Platform Routes Preferred API # travel modes, see: # https://developers.google.com/maps/documentation/routes_preferred/reference/rest/Shared.Types/RouteTravelMode. module TravelMode # Unspecified travel mode, equivalent to `DRIVING`. TRAVEL_MODE_UNSPECIFIED = 0 # Travel mode corresponding to driving directions (car, ...). DRIVING = 1 # Travel mode corresponding to walking directions. WALKING = 2 end # Policy on how a vehicle can be unloaded. Applies only to shipments having # both a pickup and a delivery. # # Other shipments are free to occur anywhere on the route independent of # `unloading_policy`. module UnloadingPolicy # Unspecified unloading policy; deliveries must just occur after their # corresponding pickups. UNLOADING_POLICY_UNSPECIFIED = 0 # Deliveries must occur in reverse order of pickups LAST_IN_FIRST_OUT = 1 # Deliveries must occur in the same order as pickups FIRST_IN_FIRST_OUT = 2 end end |
#used_if_route_is_empty ⇒ ::Boolean
Returns This field only applies to vehicles when their route does not serve any shipments. It indicates if the vehicle should be considered as used or not in this case.
If true, the vehicle goes from its start to its end location even if it doesn't serve any shipments, and time and distance costs resulting from its start --> end travel are taken into account.
Otherwise, it doesn't travel from its start to its end location, and no
break_rule
or delay (from TransitionAttributes
) are scheduled for this
vehicle. In this case, the vehicle's ShipmentRoute
doesn't contain any
information except for the vehicle index and label.
1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 |
# File 'proto_docs/google/cloud/optimization/v1/fleet_routing.rb', line 1371 class Vehicle include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Defines a load limit applying to a vehicle, e.g. "this truck may only # carry up to 3500 kg". See # {::Google::Cloud::Optimization::V1::Vehicle#load_limits load_limits}. # @!attribute [rw] max_load # @return [::Integer] # The maximum acceptable amount of load. # @!attribute [rw] soft_max_load # @return [::Integer] # A soft limit of the load. See # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit#cost_per_unit_above_soft_max cost_per_unit_above_soft_max}. # @!attribute [rw] cost_per_unit_above_soft_max # @return [::Float] # If the load ever exceeds # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit#soft_max_load soft_max_load} # along this vehicle's route, the following cost penalty applies (only once # per vehicle): (load - # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit#soft_max_load soft_max_load}) # * {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit#cost_per_unit_above_soft_max cost_per_unit_above_soft_max}. All costs # add up and must be in the same unit as # {::Google::Cloud::Optimization::V1::Shipment#penalty_cost Shipment.penalty_cost}. # @!attribute [rw] start_load_interval # @return [::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval] # The acceptable load interval of the vehicle at the start of the route. # @!attribute [rw] end_load_interval # @return [::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval] # The acceptable load interval of the vehicle at the end of the route. class LoadLimit include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Interval of acceptable load amounts. # @!attribute [rw] min # @return [::Integer] # A minimum acceptable load. Must be ≥ 0. # If they're both specified, # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval#min min} must # be ≤ # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval#max max}. # @!attribute [rw] max # @return [::Integer] # A maximum acceptable load. Must be ≥ 0. If unspecified, the maximum # load is unrestricted by this message. # If they're both specified, # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval#min min} must # be ≤ # {::Google::Cloud::Optimization::V1::Vehicle::LoadLimit::Interval#max max}. class Interval include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # A limit defining a maximum duration of the route of a vehicle. It can be # either hard or soft. # # When a soft limit field is defined, both the soft max threshold and its # associated cost must be defined together. # @!attribute [rw] max_duration # @return [::Google::Protobuf::Duration] # A hard limit constraining the duration to be at most max_duration. # @!attribute [rw] soft_max_duration # @return [::Google::Protobuf::Duration] # A soft limit not enforcing a maximum duration limit, but when violated # makes the route incur a cost. This cost adds up to other costs defined in # the model, with the same unit. # # If defined, `soft_max_duration` must be nonnegative. If max_duration is # also defined, `soft_max_duration` must be less than max_duration. # @!attribute [rw] cost_per_hour_after_soft_max # @return [::Float] # Cost per hour incurred if the `soft_max_duration` threshold is violated. # The additional cost is 0 if the duration is under the threshold, # otherwise the cost depends on the duration as follows: # ``` # cost_per_hour_after_soft_max * (duration - soft_max_duration) # ``` # The cost must be nonnegative. # @!attribute [rw] quadratic_soft_max_duration # @return [::Google::Protobuf::Duration] # A soft limit not enforcing a maximum duration limit, but when violated # makes the route incur a cost, quadratic in the duration. This cost adds # up to other costs defined in the model, with the same unit. # # If defined, `quadratic_soft_max_duration` must be nonnegative. If # `max_duration` is also defined, `quadratic_soft_max_duration` must be # less than `max_duration`, and the difference must be no larger than one # day: # # `max_duration - quadratic_soft_max_duration <= 86400 seconds` # @!attribute [rw] cost_per_square_hour_after_quadratic_soft_max # @return [::Float] # Cost per square hour incurred if the # `quadratic_soft_max_duration` threshold is violated. # # The additional cost is 0 if the duration is under the threshold, # otherwise the cost depends on the duration as follows: # # ``` # cost_per_square_hour_after_quadratic_soft_max * # (duration - quadratic_soft_max_duration)^2 # ``` # # The cost must be nonnegative. class DurationLimit include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Cloud::Optimization::V1::Vehicle::LoadLimit] class LoadLimitsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Protobuf::Duration] class ExtraVisitDurationForVisitTypeEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Travel modes which can be used by vehicles. # # These should be a subset of the Google Maps Platform Routes Preferred API # travel modes, see: # https://developers.google.com/maps/documentation/routes_preferred/reference/rest/Shared.Types/RouteTravelMode. module TravelMode # Unspecified travel mode, equivalent to `DRIVING`. TRAVEL_MODE_UNSPECIFIED = 0 # Travel mode corresponding to driving directions (car, ...). DRIVING = 1 # Travel mode corresponding to walking directions. WALKING = 2 end # Policy on how a vehicle can be unloaded. Applies only to shipments having # both a pickup and a delivery. # # Other shipments are free to occur anywhere on the route independent of # `unloading_policy`. module UnloadingPolicy # Unspecified unloading policy; deliveries must just occur after their # corresponding pickups. UNLOADING_POLICY_UNSPECIFIED = 0 # Deliveries must occur in reverse order of pickups LAST_IN_FIRST_OUT = 1 # Deliveries must occur in the same order as pickups FIRST_IN_FIRST_OUT = 2 end end |