Class: Google::Cloud::Optimization::V1::SkippedShipment

Inherits:
Object
  • Object
show all
Extended by:
Protobuf::MessageExts::ClassMethods
Includes:
Protobuf::MessageExts
Defined in:
proto_docs/google/cloud/optimization/v1/fleet_routing.rb

Overview

Specifies details of unperformed shipments in a solution. For trivial cases and/or if we are able to identify the cause for skipping, we report the reason here.

Defined Under Namespace

Classes: Reason

Instance Attribute Summary collapse

Instance Attribute Details

#index::Integer

Returns The index corresponds to the index of the shipment in the source ShipmentModel.

Returns:

  • (::Integer)

    The index corresponds to the index of the shipment in the source ShipmentModel.



2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
# File 'proto_docs/google/cloud/optimization/v1/fleet_routing.rb', line 2347

class SkippedShipment
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # If we can explain why the shipment was skipped, reasons will be listed
  # here. If the reason is not the same for all vehicles, `reason` will have
  # more than 1 element. A skipped shipment cannot have duplicate reasons,
  # i.e. where all fields are the same except for `example_vehicle_index`.
  # Example:
  # ```
  # reasons {
  #   code: DEMAND_EXCEEDS_VEHICLE_CAPACITY
  #   example_vehicle_index: 1
  #   example_exceeded_capacity_type: "Apples"
  # }
  # reasons {
  #   code: DEMAND_EXCEEDS_VEHICLE_CAPACITY
  #   example_vehicle_index: 3
  #   example_exceeded_capacity_type: "Pears"
  # }
  # reasons {
  #   code: CANNOT_BE_PERFORMED_WITHIN_VEHICLE_DISTANCE_LIMIT
  #   example_vehicle_index: 1
  # }
  # ```
  # The skipped shipment is incompatible with all vehicles. The reasons may
  # be different for all vehicles but at least one vehicle's "Apples"
  # capacity would be exceeded (including vehicle 1), at least one vehicle's
  # "Pears" capacity would be exceeded (including vehicle 3) and at least one
  # vehicle's distance limit would be exceeded (including vehicle 1).
  # @!attribute [rw] code
  #   @return [::Google::Cloud::Optimization::V1::SkippedShipment::Reason::Code]
  #     Refer to the comments of Code.
  # @!attribute [rw] example_vehicle_index
  #   @return [::Integer]
  #     If the reason is related to a shipment-vehicle incompatibility, this
  #     field provides the index of one relevant vehicle.
  # @!attribute [rw] example_exceeded_capacity_type
  #   @return [::String]
  #     If the reason code is `DEMAND_EXCEEDS_VEHICLE_CAPACITY`, documents one
  #     capacity type that is exceeded.
  class Reason
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Code identifying the reason type. The order here is meaningless. In
    # particular, it gives no indication of whether a given reason will
    # appear before another in the solution, if both apply.
    module Code
      # This should never be used. If we are unable to understand why a
      # shipment was skipped, we simply return an empty set of reasons.
      CODE_UNSPECIFIED = 0

      # There is no vehicle in the model making all shipments infeasible.
      NO_VEHICLE = 1

      # The demand of the shipment exceeds a vehicle's capacity for some
      # capacity types, one of which is `example_exceeded_capacity_type`.
      DEMAND_EXCEEDS_VEHICLE_CAPACITY = 2

      # The minimum distance necessary to perform this shipment, i.e. from
      # the vehicle's `start_location` to the shipment's pickup and/or delivery
      # locations and to the vehicle's end location exceeds the vehicle's
      # `route_distance_limit`.
      #
      # Note that for this computation we use the geodesic distances.
      CANNOT_BE_PERFORMED_WITHIN_VEHICLE_DISTANCE_LIMIT = 3

      # The minimum time necessary to perform this shipment, including travel
      # time, wait time and service time exceeds the vehicle's
      # `route_duration_limit`.
      #
      # Note: travel time is computed in the best-case scenario, namely as
      # geodesic distance x 36 m/s (roughly 130 km/hour).
      CANNOT_BE_PERFORMED_WITHIN_VEHICLE_DURATION_LIMIT = 4

      # Same as above but we only compare minimum travel time and the
      # vehicle's `travel_duration_limit`.
      CANNOT_BE_PERFORMED_WITHIN_VEHICLE_TRAVEL_DURATION_LIMIT = 5

      # The vehicle cannot perform this shipment in the best-case scenario
      # (see `CANNOT_BE_PERFORMED_WITHIN_VEHICLE_DURATION_LIMIT` for time
      # computation) if it starts at its earliest start time: the total time
      # would make the vehicle end after its latest end time.
      CANNOT_BE_PERFORMED_WITHIN_VEHICLE_TIME_WINDOWS = 6

      # The `allowed_vehicle_indices` field of the shipment is not empty and
      # this vehicle does not belong to it.
      VEHICLE_NOT_ALLOWED = 7
    end
  end
end

#label::String

Returns Copy of the corresponding Shipment.label, if specified in the Shipment.

Returns:

  • (::String)

    Copy of the corresponding Shipment.label, if specified in the Shipment.



2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
# File 'proto_docs/google/cloud/optimization/v1/fleet_routing.rb', line 2347

class SkippedShipment
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # If we can explain why the shipment was skipped, reasons will be listed
  # here. If the reason is not the same for all vehicles, `reason` will have
  # more than 1 element. A skipped shipment cannot have duplicate reasons,
  # i.e. where all fields are the same except for `example_vehicle_index`.
  # Example:
  # ```
  # reasons {
  #   code: DEMAND_EXCEEDS_VEHICLE_CAPACITY
  #   example_vehicle_index: 1
  #   example_exceeded_capacity_type: "Apples"
  # }
  # reasons {
  #   code: DEMAND_EXCEEDS_VEHICLE_CAPACITY
  #   example_vehicle_index: 3
  #   example_exceeded_capacity_type: "Pears"
  # }
  # reasons {
  #   code: CANNOT_BE_PERFORMED_WITHIN_VEHICLE_DISTANCE_LIMIT
  #   example_vehicle_index: 1
  # }
  # ```
  # The skipped shipment is incompatible with all vehicles. The reasons may
  # be different for all vehicles but at least one vehicle's "Apples"
  # capacity would be exceeded (including vehicle 1), at least one vehicle's
  # "Pears" capacity would be exceeded (including vehicle 3) and at least one
  # vehicle's distance limit would be exceeded (including vehicle 1).
  # @!attribute [rw] code
  #   @return [::Google::Cloud::Optimization::V1::SkippedShipment::Reason::Code]
  #     Refer to the comments of Code.
  # @!attribute [rw] example_vehicle_index
  #   @return [::Integer]
  #     If the reason is related to a shipment-vehicle incompatibility, this
  #     field provides the index of one relevant vehicle.
  # @!attribute [rw] example_exceeded_capacity_type
  #   @return [::String]
  #     If the reason code is `DEMAND_EXCEEDS_VEHICLE_CAPACITY`, documents one
  #     capacity type that is exceeded.
  class Reason
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Code identifying the reason type. The order here is meaningless. In
    # particular, it gives no indication of whether a given reason will
    # appear before another in the solution, if both apply.
    module Code
      # This should never be used. If we are unable to understand why a
      # shipment was skipped, we simply return an empty set of reasons.
      CODE_UNSPECIFIED = 0

      # There is no vehicle in the model making all shipments infeasible.
      NO_VEHICLE = 1

      # The demand of the shipment exceeds a vehicle's capacity for some
      # capacity types, one of which is `example_exceeded_capacity_type`.
      DEMAND_EXCEEDS_VEHICLE_CAPACITY = 2

      # The minimum distance necessary to perform this shipment, i.e. from
      # the vehicle's `start_location` to the shipment's pickup and/or delivery
      # locations and to the vehicle's end location exceeds the vehicle's
      # `route_distance_limit`.
      #
      # Note that for this computation we use the geodesic distances.
      CANNOT_BE_PERFORMED_WITHIN_VEHICLE_DISTANCE_LIMIT = 3

      # The minimum time necessary to perform this shipment, including travel
      # time, wait time and service time exceeds the vehicle's
      # `route_duration_limit`.
      #
      # Note: travel time is computed in the best-case scenario, namely as
      # geodesic distance x 36 m/s (roughly 130 km/hour).
      CANNOT_BE_PERFORMED_WITHIN_VEHICLE_DURATION_LIMIT = 4

      # Same as above but we only compare minimum travel time and the
      # vehicle's `travel_duration_limit`.
      CANNOT_BE_PERFORMED_WITHIN_VEHICLE_TRAVEL_DURATION_LIMIT = 5

      # The vehicle cannot perform this shipment in the best-case scenario
      # (see `CANNOT_BE_PERFORMED_WITHIN_VEHICLE_DURATION_LIMIT` for time
      # computation) if it starts at its earliest start time: the total time
      # would make the vehicle end after its latest end time.
      CANNOT_BE_PERFORMED_WITHIN_VEHICLE_TIME_WINDOWS = 6

      # The `allowed_vehicle_indices` field of the shipment is not empty and
      # this vehicle does not belong to it.
      VEHICLE_NOT_ALLOWED = 7
    end
  end
end

#reasons::Array<::Google::Cloud::Optimization::V1::SkippedShipment::Reason>

Returns A list of reasons that explain why the shipment was skipped. See comment above Reason.

Returns:



2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
# File 'proto_docs/google/cloud/optimization/v1/fleet_routing.rb', line 2347

class SkippedShipment
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # If we can explain why the shipment was skipped, reasons will be listed
  # here. If the reason is not the same for all vehicles, `reason` will have
  # more than 1 element. A skipped shipment cannot have duplicate reasons,
  # i.e. where all fields are the same except for `example_vehicle_index`.
  # Example:
  # ```
  # reasons {
  #   code: DEMAND_EXCEEDS_VEHICLE_CAPACITY
  #   example_vehicle_index: 1
  #   example_exceeded_capacity_type: "Apples"
  # }
  # reasons {
  #   code: DEMAND_EXCEEDS_VEHICLE_CAPACITY
  #   example_vehicle_index: 3
  #   example_exceeded_capacity_type: "Pears"
  # }
  # reasons {
  #   code: CANNOT_BE_PERFORMED_WITHIN_VEHICLE_DISTANCE_LIMIT
  #   example_vehicle_index: 1
  # }
  # ```
  # The skipped shipment is incompatible with all vehicles. The reasons may
  # be different for all vehicles but at least one vehicle's "Apples"
  # capacity would be exceeded (including vehicle 1), at least one vehicle's
  # "Pears" capacity would be exceeded (including vehicle 3) and at least one
  # vehicle's distance limit would be exceeded (including vehicle 1).
  # @!attribute [rw] code
  #   @return [::Google::Cloud::Optimization::V1::SkippedShipment::Reason::Code]
  #     Refer to the comments of Code.
  # @!attribute [rw] example_vehicle_index
  #   @return [::Integer]
  #     If the reason is related to a shipment-vehicle incompatibility, this
  #     field provides the index of one relevant vehicle.
  # @!attribute [rw] example_exceeded_capacity_type
  #   @return [::String]
  #     If the reason code is `DEMAND_EXCEEDS_VEHICLE_CAPACITY`, documents one
  #     capacity type that is exceeded.
  class Reason
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Code identifying the reason type. The order here is meaningless. In
    # particular, it gives no indication of whether a given reason will
    # appear before another in the solution, if both apply.
    module Code
      # This should never be used. If we are unable to understand why a
      # shipment was skipped, we simply return an empty set of reasons.
      CODE_UNSPECIFIED = 0

      # There is no vehicle in the model making all shipments infeasible.
      NO_VEHICLE = 1

      # The demand of the shipment exceeds a vehicle's capacity for some
      # capacity types, one of which is `example_exceeded_capacity_type`.
      DEMAND_EXCEEDS_VEHICLE_CAPACITY = 2

      # The minimum distance necessary to perform this shipment, i.e. from
      # the vehicle's `start_location` to the shipment's pickup and/or delivery
      # locations and to the vehicle's end location exceeds the vehicle's
      # `route_distance_limit`.
      #
      # Note that for this computation we use the geodesic distances.
      CANNOT_BE_PERFORMED_WITHIN_VEHICLE_DISTANCE_LIMIT = 3

      # The minimum time necessary to perform this shipment, including travel
      # time, wait time and service time exceeds the vehicle's
      # `route_duration_limit`.
      #
      # Note: travel time is computed in the best-case scenario, namely as
      # geodesic distance x 36 m/s (roughly 130 km/hour).
      CANNOT_BE_PERFORMED_WITHIN_VEHICLE_DURATION_LIMIT = 4

      # Same as above but we only compare minimum travel time and the
      # vehicle's `travel_duration_limit`.
      CANNOT_BE_PERFORMED_WITHIN_VEHICLE_TRAVEL_DURATION_LIMIT = 5

      # The vehicle cannot perform this shipment in the best-case scenario
      # (see `CANNOT_BE_PERFORMED_WITHIN_VEHICLE_DURATION_LIMIT` for time
      # computation) if it starts at its earliest start time: the total time
      # would make the vehicle end after its latest end time.
      CANNOT_BE_PERFORMED_WITHIN_VEHICLE_TIME_WINDOWS = 6

      # The `allowed_vehicle_indices` field of the shipment is not empty and
      # this vehicle does not belong to it.
      VEHICLE_NOT_ALLOWED = 7
    end
  end
end