From e7c40b448f1f2aca08db0d2a11c4876415a47c98 Mon Sep 17 00:00:00 2001 From: Laurent Perron Date: Tue, 23 Feb 2021 18:09:59 +0100 Subject: [PATCH] simplify cp-sat service proto --- ortools/sat/cp_model_service.proto | 40 +++++++----------------------- 1 file changed, 9 insertions(+), 31 deletions(-) diff --git a/ortools/sat/cp_model_service.proto b/ortools/sat/cp_model_service.proto index b191ff34a7..3552644a85 100644 --- a/ortools/sat/cp_model_service.proto +++ b/ortools/sat/cp_model_service.proto @@ -13,51 +13,29 @@ syntax = "proto3"; -package operations_research.sat; +package operations_research.sat.v1; import "google/protobuf/duration.proto"; import "ortools/sat/cp_model.proto"; option csharp_namespace = "Google.OrTools.Sat"; -option java_package = "com.google.ortools.sat"; +option java_package = "com.google.ortools.sat.v1"; option java_multiple_files = true; option java_outer_classname = "CpModelServiceProto"; // This service enables sending a CpModelProto to a server and getting back -// the optimal solution or all intermediate solutions of the problem. -service CpSatSolver { - // Single solve, sends a model, expects the optimal solution. - rpc SolveProblem(CpSatSolveRequest) returns (CpSatSolveResponse) {} +// a solution of the problem. +service CpSolver { + // Single solve, sends a model, gets a response. + rpc SolveProblem(CpSolverRequest) returns (CpSolverResponse) { + } } // The request set to the remote solve service. -message CpSatSolveRequest { +message CpSolverRequest { // The model to solve. CpModelProto model = 1; - // The number of search workers to use. A value of 0 means the solver will - // try do decide upon a meaningful value. - int32 search_workers_count = 2; - - // The max time the solver will spend while trying to find the optimal - // solution. - google.protobuf.Duration time_limit = 3; - // Extra solver parameters passed as a string. - string search_parameters_as_string = 4; - - // If true, the solver internal log will be copied into the 'search_log' field - // of the response message. - bool log_search_progress = 5; + string parameters_as_string = 2; } - -// The response fo the remove solve service. -message CpSatSolveResponse { - // The actual solver response. - CpSolverResponse response = 1; - - // If log_search_progress was set in the solve request, this field will be - // filled by the internal log of the solver. - string search_log = 2; -} -