Skip to content

Commit

Permalink
feat: [cloudoptimization] added support for walking mode and cost_per…
Browse files Browse the repository at this point in the history
…_kilometer_below_soft_max (#9803)

* feat: added support for walking mode and cost_per_kilometer_below_soft_max

Clients can now use walking as the travel mode. And clients can set a cost per kilometer bounded by the soft max.

PiperOrigin-RevId: 563199524

Source-Link: googleapis/googleapis@7578999

Source-Link: googleapis/googleapis-gen@ba24bb3
Copy-Tag: eyJwIjoiamF2YS1vcHRpbWl6YXRpb24vLk93bEJvdC55YW1sIiwiaCI6ImJhMjRiYjM3NGQ1MGYxMzMzZWJhMzZjZjI5OTg4YTA1NGJhNGZmZmYifQ==

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

---------

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] committed Sep 7, 2023
1 parent c087490 commit 52ef3cc
Show file tree
Hide file tree
Showing 24 changed files with 843 additions and 564 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@
* .setParent("parent-995424086")
* .setTimeout(Duration.newBuilder().build())
* .setModel(ShipmentModel.newBuilder().build())
* .setMaxValidationErrors(-1367418922)
* .addAllInjectedFirstSolutionRoutes(new ArrayList<ShipmentRoute>())
* .setInjectedSolutionConstraint(InjectedSolutionConstraint.newBuilder().build())
* .addAllRefreshDetailsRoutes(new ArrayList<ShipmentRoute>())
Expand All @@ -69,6 +68,7 @@
* .setAllowLargeDeadlineDespiteInterruptionRisk(true)
* .setUseGeodesicDistances(true)
* .setGeodesicMetersPerSecond(-2129658905)
* .setMaxValidationErrors(-1367418922)
* .setLabel("label102727412")
* .setPopulateTravelStepPolylines(true)
* .build();
Expand Down Expand Up @@ -248,7 +248,6 @@ public final OperationsClient getHttpJsonOperationsClient() {
* .setParent("parent-995424086")
* .setTimeout(Duration.newBuilder().build())
* .setModel(ShipmentModel.newBuilder().build())
* .setMaxValidationErrors(-1367418922)
* .addAllInjectedFirstSolutionRoutes(new ArrayList<ShipmentRoute>())
* .setInjectedSolutionConstraint(InjectedSolutionConstraint.newBuilder().build())
* .addAllRefreshDetailsRoutes(new ArrayList<ShipmentRoute>())
Expand All @@ -259,6 +258,7 @@ public final OperationsClient getHttpJsonOperationsClient() {
* .setAllowLargeDeadlineDespiteInterruptionRisk(true)
* .setUseGeodesicDistances(true)
* .setGeodesicMetersPerSecond(-2129658905)
* .setMaxValidationErrors(-1367418922)
* .setLabel("label102727412")
* .setPopulateTravelStepPolylines(true)
* .build();
Expand Down Expand Up @@ -302,7 +302,6 @@ public final OptimizeToursResponse optimizeTours(OptimizeToursRequest request) {
* .setParent("parent-995424086")
* .setTimeout(Duration.newBuilder().build())
* .setModel(ShipmentModel.newBuilder().build())
* .setMaxValidationErrors(-1367418922)
* .addAllInjectedFirstSolutionRoutes(new ArrayList<ShipmentRoute>())
* .setInjectedSolutionConstraint(InjectedSolutionConstraint.newBuilder().build())
* .addAllRefreshDetailsRoutes(new ArrayList<ShipmentRoute>())
Expand All @@ -313,6 +312,7 @@ public final OptimizeToursResponse optimizeTours(OptimizeToursRequest request) {
* .setAllowLargeDeadlineDespiteInterruptionRisk(true)
* .setUseGeodesicDistances(true)
* .setGeodesicMetersPerSecond(-2129658905)
* .setMaxValidationErrors(-1367418922)
* .setLabel("label102727412")
* .setPopulateTravelStepPolylines(true)
* .build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
* .setParent("parent-995424086")
* .setTimeout(Duration.newBuilder().build())
* .setModel(ShipmentModel.newBuilder().build())
* .setMaxValidationErrors(-1367418922)
* .addAllInjectedFirstSolutionRoutes(new ArrayList<ShipmentRoute>())
* .setInjectedSolutionConstraint(InjectedSolutionConstraint.newBuilder().build())
* .addAllRefreshDetailsRoutes(new ArrayList<ShipmentRoute>())
Expand All @@ -58,6 +57,7 @@
* .setAllowLargeDeadlineDespiteInterruptionRisk(true)
* .setUseGeodesicDistances(true)
* .setGeodesicMetersPerSecond(-2129658905)
* .setMaxValidationErrors(-1367418922)
* .setLabel("label102727412")
* .setPopulateTravelStepPolylines(true)
* .build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ public void optimizeToursTest() throws Exception {
.setParent("projects/project-5833/locations/location-5833")
.setTimeout(Duration.newBuilder().build())
.setModel(ShipmentModel.newBuilder().build())
.setMaxValidationErrors(-1367418922)
.addAllInjectedFirstSolutionRoutes(new ArrayList<ShipmentRoute>())
.setInjectedSolutionConstraint(InjectedSolutionConstraint.newBuilder().build())
.addAllRefreshDetailsRoutes(new ArrayList<ShipmentRoute>())
Expand All @@ -105,6 +104,7 @@ public void optimizeToursTest() throws Exception {
.setAllowLargeDeadlineDespiteInterruptionRisk(true)
.setUseGeodesicDistances(true)
.setGeodesicMetersPerSecond(-2129658905)
.setMaxValidationErrors(-1367418922)
.setLabel("label102727412")
.setPopulateTravelStepPolylines(true)
.build();
Expand Down Expand Up @@ -140,7 +140,6 @@ public void optimizeToursExceptionTest() throws Exception {
.setParent("projects/project-5833/locations/location-5833")
.setTimeout(Duration.newBuilder().build())
.setModel(ShipmentModel.newBuilder().build())
.setMaxValidationErrors(-1367418922)
.addAllInjectedFirstSolutionRoutes(new ArrayList<ShipmentRoute>())
.setInjectedSolutionConstraint(InjectedSolutionConstraint.newBuilder().build())
.addAllRefreshDetailsRoutes(new ArrayList<ShipmentRoute>())
Expand All @@ -151,6 +150,7 @@ public void optimizeToursExceptionTest() throws Exception {
.setAllowLargeDeadlineDespiteInterruptionRisk(true)
.setUseGeodesicDistances(true)
.setGeodesicMetersPerSecond(-2129658905)
.setMaxValidationErrors(-1367418922)
.setLabel("label102727412")
.setPopulateTravelStepPolylines(true)
.build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ public void optimizeToursTest() throws Exception {
.setParent("parent-995424086")
.setTimeout(Duration.newBuilder().build())
.setModel(ShipmentModel.newBuilder().build())
.setMaxValidationErrors(-1367418922)
.addAllInjectedFirstSolutionRoutes(new ArrayList<ShipmentRoute>())
.setInjectedSolutionConstraint(InjectedSolutionConstraint.newBuilder().build())
.addAllRefreshDetailsRoutes(new ArrayList<ShipmentRoute>())
Expand All @@ -110,6 +109,7 @@ public void optimizeToursTest() throws Exception {
.setAllowLargeDeadlineDespiteInterruptionRisk(true)
.setUseGeodesicDistances(true)
.setGeodesicMetersPerSecond(-2129658905)
.setMaxValidationErrors(-1367418922)
.setLabel("label102727412")
.setPopulateTravelStepPolylines(true)
.build();
Expand All @@ -125,7 +125,6 @@ public void optimizeToursTest() throws Exception {
Assert.assertEquals(request.getTimeout(), actualRequest.getTimeout());
Assert.assertEquals(request.getModel(), actualRequest.getModel());
Assert.assertEquals(request.getSolvingMode(), actualRequest.getSolvingMode());
Assert.assertEquals(request.getMaxValidationErrors(), actualRequest.getMaxValidationErrors());
Assert.assertEquals(request.getSearchMode(), actualRequest.getSearchMode());
Assert.assertEquals(
request.getInjectedFirstSolutionRoutesList(),
Expand All @@ -147,6 +146,7 @@ public void optimizeToursTest() throws Exception {
Assert.assertEquals(request.getUseGeodesicDistances(), actualRequest.getUseGeodesicDistances());
Assert.assertEquals(
request.getGeodesicMetersPerSecond(), actualRequest.getGeodesicMetersPerSecond(), 0.0001);
Assert.assertEquals(request.getMaxValidationErrors(), actualRequest.getMaxValidationErrors());
Assert.assertEquals(request.getLabel(), actualRequest.getLabel());
Assert.assertEquals(
request.getPopulateTravelStepPolylines(), actualRequest.getPopulateTravelStepPolylines());
Expand All @@ -167,7 +167,6 @@ public void optimizeToursExceptionTest() throws Exception {
.setParent("parent-995424086")
.setTimeout(Duration.newBuilder().build())
.setModel(ShipmentModel.newBuilder().build())
.setMaxValidationErrors(-1367418922)
.addAllInjectedFirstSolutionRoutes(new ArrayList<ShipmentRoute>())
.setInjectedSolutionConstraint(InjectedSolutionConstraint.newBuilder().build())
.addAllRefreshDetailsRoutes(new ArrayList<ShipmentRoute>())
Expand All @@ -178,6 +177,7 @@ public void optimizeToursExceptionTest() throws Exception {
.setAllowLargeDeadlineDespiteInterruptionRisk(true)
.setUseGeodesicDistances(true)
.setGeodesicMetersPerSecond(-2129658905)
.setMaxValidationErrors(-1367418922)
.setLabel("label102727412")
.setPopulateTravelStepPolylines(true)
.build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -704,7 +704,7 @@ public double getCostsOrThrow(java.lang.String key) {
* <code>double total_cost = 11 [deprecated = true];</code>
*
* @deprecated google.cloud.optimization.v1.AggregatedMetrics.total_cost is deprecated. See
* google/cloud/optimization/v1/fleet_routing.proto;l=2331
* google/cloud/optimization/v1/fleet_routing.proto;l=2351
* @return The totalCost.
*/
@java.lang.Override
Expand Down Expand Up @@ -3087,7 +3087,7 @@ public Builder putAllCosts(java.util.Map<java.lang.String, java.lang.Double> val
* <code>double total_cost = 11 [deprecated = true];</code>
*
* @deprecated google.cloud.optimization.v1.AggregatedMetrics.total_cost is deprecated. See
* google/cloud/optimization/v1/fleet_routing.proto;l=2331
* google/cloud/optimization/v1/fleet_routing.proto;l=2351
* @return The totalCost.
*/
@java.lang.Override
Expand All @@ -3109,7 +3109,7 @@ public double getTotalCost() {
* <code>double total_cost = 11 [deprecated = true];</code>
*
* @deprecated google.cloud.optimization.v1.AggregatedMetrics.total_cost is deprecated. See
* google/cloud/optimization/v1/fleet_routing.proto;l=2331
* google/cloud/optimization/v1/fleet_routing.proto;l=2351
* @param value The totalCost to set.
* @return This builder for chaining.
*/
Expand All @@ -3135,7 +3135,7 @@ public Builder setTotalCost(double value) {
* <code>double total_cost = 11 [deprecated = true];</code>
*
* @deprecated google.cloud.optimization.v1.AggregatedMetrics.total_cost is deprecated. See
* google/cloud/optimization/v1/fleet_routing.proto;l=2331
* google/cloud/optimization/v1/fleet_routing.proto;l=2351
* @return This builder for chaining.
*/
@java.lang.Deprecated
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ com.google.cloud.optimization.v1.ShipmentRoute.VehicleLoad getMaxLoadsOrThrow(
* <code>double total_cost = 11 [deprecated = true];</code>
*
* @deprecated google.cloud.optimization.v1.AggregatedMetrics.total_cost is deprecated. See
* google/cloud/optimization/v1/fleet_routing.proto;l=2331
* google/cloud/optimization/v1/fleet_routing.proto;l=2351
* @return The totalCost.
*/
@java.lang.Deprecated
Expand Down
Loading

0 comments on commit 52ef3cc

Please sign in to comment.