|
1 | | -// Copyright 2022 Google LLC |
| 1 | +// Copyright 2023 Google LLC |
2 | 2 | // |
3 | 3 | // Licensed under the Apache License, Version 2.0 (the "License"); |
4 | 4 | // you may not use this file except in compliance with the License. |
@@ -122,12 +122,20 @@ message OptimizeToursRequest { |
122 | 122 | VALIDATE_ONLY = 1; |
123 | 123 |
|
124 | 124 | // Only populates |
| 125 | + // [OptimizeToursResponse.validation_errors][google.cloud.optimization.v1.OptimizeToursResponse.validation_errors] |
| 126 | + // or |
125 | 127 | // [OptimizeToursResponse.skipped_shipments][google.cloud.optimization.v1.OptimizeToursResponse.skipped_shipments], |
126 | 128 | // and doesn't actually solve the rest of the request (`status` and `routes` |
127 | 129 | // are unset in the response). |
| 130 | + // If infeasibilities in `injected_solution_constraint` routes are detected |
| 131 | + // they are populated in the |
| 132 | + // [OptimizeToursResponse.validation_errors][google.cloud.optimization.v1.OptimizeToursResponse.validation_errors] |
| 133 | + // field and |
| 134 | + // [OptimizeToursResponse.skipped_shipments][google.cloud.optimization.v1.OptimizeToursResponse.skipped_shipments] |
| 135 | + // is left empty. |
128 | 136 | // |
129 | 137 | // *IMPORTANT*: not all infeasible shipments are returned here, but only the |
130 | | - // ones that are detected as infeasible as a preprocessing. |
| 138 | + // ones that are detected as infeasible during preprocessing. |
131 | 139 | DETECT_SOME_INFEASIBLE_SHIPMENTS = 2; |
132 | 140 | } |
133 | 141 |
|
@@ -165,15 +173,6 @@ message OptimizeToursRequest { |
165 | 173 | // By default, the solving mode is `DEFAULT_SOLVE` (0). |
166 | 174 | SolvingMode solving_mode = 4; |
167 | 175 |
|
168 | | - // Truncates the number of validation errors returned. These errors are |
169 | | - // typically attached to an INVALID_ARGUMENT error payload as a BadRequest |
170 | | - // error detail (https://cloud.google.com/apis/design/errors#error_details), |
171 | | - // unless solving_mode=VALIDATE_ONLY: see the |
172 | | - // [OptimizeToursResponse.validation_errors][google.cloud.optimization.v1.OptimizeToursResponse.validation_errors] |
173 | | - // field. |
174 | | - // This defaults to 100 and is capped at 10,000. |
175 | | - optional int32 max_validation_errors = 5; |
176 | | - |
177 | 176 | // Search mode used to solve the request. |
178 | 177 | SearchMode search_mode = 6; |
179 | 178 |
|
@@ -339,6 +338,15 @@ message OptimizeToursRequest { |
339 | 338 | // meters/seconds. |
340 | 339 | optional double geodesic_meters_per_second = 16; |
341 | 340 |
|
| 341 | + // Truncates the number of validation errors returned. These errors are |
| 342 | + // typically attached to an INVALID_ARGUMENT error payload as a BadRequest |
| 343 | + // error detail (https://cloud.google.com/apis/design/errors#error_details), |
| 344 | + // unless solving_mode=VALIDATE_ONLY: see the |
| 345 | + // [OptimizeToursResponse.validation_errors][google.cloud.optimization.v1.OptimizeToursResponse.validation_errors] |
| 346 | + // field. |
| 347 | + // This defaults to 100 and is capped at 10,000. |
| 348 | + optional int32 max_validation_errors = 5; |
| 349 | + |
342 | 350 | // Label that may be used to identify this request, reported back in the |
343 | 351 | // [OptimizeToursResponse.request_label][google.cloud.optimization.v1.OptimizeToursResponse.request_label]. |
344 | 352 | string label = 17; |
@@ -1131,6 +1139,9 @@ message Vehicle { |
1131 | 1139 |
|
1132 | 1140 | // Travel mode corresponding to driving directions (car, ...). |
1133 | 1141 | DRIVING = 1; |
| 1142 | + |
| 1143 | + // Travel mode corresponding to walking directions. |
| 1144 | + WALKING = 2; |
1134 | 1145 | } |
1135 | 1146 |
|
1136 | 1147 | // Policy on how a vehicle can be unloaded. Applies only to shipments having |
@@ -1565,6 +1576,15 @@ message DistanceLimit { |
1565 | 1576 | // nonnegative. |
1566 | 1577 | optional int64 soft_max_meters = 2; |
1567 | 1578 |
|
| 1579 | + // Cost per kilometer incurred, increasing up to `soft_max_meters`, with |
| 1580 | + // formula: |
| 1581 | + // ``` |
| 1582 | + // min(distance_meters, soft_max_meters) / 1000.0 * |
| 1583 | + // cost_per_kilometer_below_soft_max. |
| 1584 | + // ``` |
| 1585 | + // This cost is not supported in `route_distance_limit`. |
| 1586 | + optional double cost_per_kilometer_below_soft_max = 4; |
| 1587 | + |
1568 | 1588 | // Cost per kilometer incurred if distance is above `soft_max_meters` limit. |
1569 | 1589 | // The additional cost is 0 if the distance is under the limit, otherwise the |
1570 | 1590 | // formula used to compute the cost is the following: |
@@ -2395,7 +2415,8 @@ message InjectedSolutionConstraint { |
2395 | 2415 | RELAX_VISIT_TIMES_AFTER_THRESHOLD = 1; |
2396 | 2416 |
|
2397 | 2417 | // Same as `RELAX_VISIT_TIMES_AFTER_THRESHOLD`, but the visit sequence |
2398 | | - // is also relaxed: visits remain simply bound to their vehicle. |
| 2418 | + // is also relaxed: visits can only be performed by this vehicle, but |
| 2419 | + // can potentially become unperformed. |
2399 | 2420 | RELAX_VISIT_TIMES_AND_SEQUENCE_AFTER_THRESHOLD = 2; |
2400 | 2421 |
|
2401 | 2422 | // Same as `RELAX_VISIT_TIMES_AND_SEQUENCE_AFTER_THRESHOLD`, but the |
@@ -2533,6 +2554,7 @@ message OptimizeToursValidationError { |
2533 | 2554 | // * INJECTED_SOLUTION_CONCURRENT_SOLUTION_TYPES = 2005; |
2534 | 2555 | // * INJECTED_SOLUTION_MORE_THAN_ONE_PER_TYPE = 2006; |
2535 | 2556 | // * INJECTED_SOLUTION_REFRESH_WITHOUT_POPULATE = 2008; |
| 2557 | + // * INJECTED_SOLUTION_CONSTRAINED_ROUTE_PORTION_INFEASIBLE = 2010; |
2536 | 2558 | // * SHIPMENT_MODEL_ERROR = 22; |
2537 | 2559 | // * SHIPMENT_MODEL_TOO_LARGE = 2200; |
2538 | 2560 | // * SHIPMENT_MODEL_TOO_MANY_CAPACITY_TYPES = 2201; |
|
0 commit comments