@@ -83,16 +83,6 @@ class OptimizeToursRequest(proto.Message):
83
83
Shipment model to solve.
84
84
solving_mode (google.cloud.optimization_v1.types.OptimizeToursRequest.SolvingMode):
85
85
By default, the solving mode is ``DEFAULT_SOLVE`` (0).
86
- max_validation_errors (int):
87
- Truncates the number of validation errors returned. These
88
- errors are typically attached to an INVALID_ARGUMENT error
89
- payload as a BadRequest error detail
90
- (https://cloud.google.com/apis/design/errors#error_details),
91
- unless solving_mode=VALIDATE_ONLY: see the
92
- [OptimizeToursResponse.validation_errors][google.cloud.optimization.v1.OptimizeToursResponse.validation_errors]
93
- field. This defaults to 100 and is capped at 10,000.
94
-
95
- This field is a member of `oneof`_ ``_max_validation_errors``.
96
86
search_mode (google.cloud.optimization_v1.types.OptimizeToursRequest.SearchMode):
97
87
Search mode used to solve the request.
98
88
injected_first_solution_routes (MutableSequence[google.cloud.optimization_v1.types.ShipmentRoute]):
@@ -271,6 +261,16 @@ class OptimizeToursRequest(proto.Message):
271
261
Its value must be at least 1.0 meters/seconds.
272
262
273
263
This field is a member of `oneof`_ ``_geodesic_meters_per_second``.
264
+ max_validation_errors (int):
265
+ Truncates the number of validation errors returned. These
266
+ errors are typically attached to an INVALID_ARGUMENT error
267
+ payload as a BadRequest error detail
268
+ (https://cloud.google.com/apis/design/errors#error_details),
269
+ unless solving_mode=VALIDATE_ONLY: see the
270
+ [OptimizeToursResponse.validation_errors][google.cloud.optimization.v1.OptimizeToursResponse.validation_errors]
271
+ field. This defaults to 100 and is capped at 10,000.
272
+
273
+ This field is a member of `oneof`_ ``_max_validation_errors``.
274
274
label (str):
275
275
Label that may be used to identify this request, reported
276
276
back in the
@@ -301,12 +301,20 @@ class SolvingMode(proto.Enum):
301
301
as possible.
302
302
DETECT_SOME_INFEASIBLE_SHIPMENTS (2):
303
303
Only populates
304
+ [OptimizeToursResponse.validation_errors][google.cloud.optimization.v1.OptimizeToursResponse.validation_errors]
305
+ or
304
306
[OptimizeToursResponse.skipped_shipments][google.cloud.optimization.v1.OptimizeToursResponse.skipped_shipments],
305
307
and doesn't actually solve the rest of the request
306
- (``status`` and ``routes`` are unset in the response).
308
+ (``status`` and ``routes`` are unset in the response). If
309
+ infeasibilities in ``injected_solution_constraint`` routes
310
+ are detected they are populated in the
311
+ [OptimizeToursResponse.validation_errors][google.cloud.optimization.v1.OptimizeToursResponse.validation_errors]
312
+ field and
313
+ [OptimizeToursResponse.skipped_shipments][google.cloud.optimization.v1.OptimizeToursResponse.skipped_shipments]
314
+ is left empty.
307
315
308
316
*IMPORTANT*: not all infeasible shipments are returned here,
309
- but only the ones that are detected as infeasible as a
317
+ but only the ones that are detected as infeasible during
310
318
preprocessing.
311
319
"""
312
320
DEFAULT_SOLVE = 0
@@ -351,11 +359,6 @@ class SearchMode(proto.Enum):
351
359
number = 4 ,
352
360
enum = SolvingMode ,
353
361
)
354
- max_validation_errors : int = proto .Field (
355
- proto .INT32 ,
356
- number = 5 ,
357
- optional = True ,
358
- )
359
362
search_mode : SearchMode = proto .Field (
360
363
proto .ENUM ,
361
364
number = 6 ,
@@ -407,6 +410,11 @@ class SearchMode(proto.Enum):
407
410
number = 16 ,
408
411
optional = True ,
409
412
)
413
+ max_validation_errors : int = proto .Field (
414
+ proto .INT32 ,
415
+ number = 5 ,
416
+ optional = True ,
417
+ )
410
418
label : str = proto .Field (
411
419
proto .STRING ,
412
420
number = 17 ,
@@ -1915,9 +1923,13 @@ class TravelMode(proto.Enum):
1915
1923
DRIVING (1):
1916
1924
Travel mode corresponding to driving
1917
1925
directions (car, ...).
1926
+ WALKING (2):
1927
+ Travel mode corresponding to walking
1928
+ directions.
1918
1929
"""
1919
1930
TRAVEL_MODE_UNSPECIFIED = 0
1920
1931
DRIVING = 1
1932
+ WALKING = 2
1921
1933
1922
1934
class UnloadingPolicy (proto .Enum ):
1923
1935
r"""Policy on how a vehicle can be unloaded. Applies only to shipments
@@ -2450,6 +2462,18 @@ class DistanceLimit(proto.Message):
2450
2462
must be nonnegative.
2451
2463
2452
2464
This field is a member of `oneof`_ ``_soft_max_meters``.
2465
+ cost_per_kilometer_below_soft_max (float):
2466
+ Cost per kilometer incurred, increasing up to
2467
+ ``soft_max_meters``, with formula:
2468
+
2469
+ ::
2470
+
2471
+ min(distance_meters, soft_max_meters) / 1000.0 *
2472
+ cost_per_kilometer_below_soft_max.
2473
+
2474
+ This cost is not supported in ``route_distance_limit``.
2475
+
2476
+ This field is a member of `oneof`_ ``_cost_per_kilometer_below_soft_max``.
2453
2477
cost_per_kilometer_above_soft_max (float):
2454
2478
Cost per kilometer incurred if distance is above
2455
2479
``soft_max_meters`` limit. The additional cost is 0 if the
@@ -2476,6 +2500,11 @@ class DistanceLimit(proto.Message):
2476
2500
number = 2 ,
2477
2501
optional = True ,
2478
2502
)
2503
+ cost_per_kilometer_below_soft_max : float = proto .Field (
2504
+ proto .DOUBLE ,
2505
+ number = 4 ,
2506
+ optional = True ,
2507
+ )
2479
2508
cost_per_kilometer_above_soft_max : float = proto .Field (
2480
2509
proto .DOUBLE ,
2481
2510
number = 3 ,
@@ -3858,8 +3887,8 @@ class Level(proto.Enum):
3858
3887
or before them.
3859
3888
RELAX_VISIT_TIMES_AND_SEQUENCE_AFTER_THRESHOLD (2):
3860
3889
Same as ``RELAX_VISIT_TIMES_AFTER_THRESHOLD``, but the visit
3861
- sequence is also relaxed: visits remain simply bound to
3862
- their vehicle.
3890
+ sequence is also relaxed: visits can only be performed by
3891
+ this vehicle, but can potentially become unperformed .
3863
3892
RELAX_ALL_AFTER_THRESHOLD (3):
3864
3893
Same as ``RELAX_VISIT_TIMES_AND_SEQUENCE_AFTER_THRESHOLD``,
3865
3894
but the vehicle is also relaxed: visits are completely free
@@ -3985,6 +4014,8 @@ class OptimizeToursValidationError(proto.Message):
3985
4014
- INJECTED_SOLUTION_CONCURRENT_SOLUTION_TYPES = 2005;
3986
4015
- INJECTED_SOLUTION_MORE_THAN_ONE_PER_TYPE = 2006;
3987
4016
- INJECTED_SOLUTION_REFRESH_WITHOUT_POPULATE = 2008;
4017
+ - INJECTED_SOLUTION_CONSTRAINED_ROUTE_PORTION_INFEASIBLE
4018
+ = 2010;
3988
4019
3989
4020
- SHIPMENT_MODEL_ERROR = 22;
3990
4021
0 commit comments