add grpc service file for CP-SAT
This commit is contained in:
48
ortools/sat/cp_model_service.proto
Normal file
48
ortools/sat/cp_model_service.proto
Normal file
@@ -0,0 +1,48 @@
|
||||
// Copyright 2010-2018 Google LLC
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
syntax = "proto3";
|
||||
|
||||
package operations_research.sat;
|
||||
|
||||
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_multiple_files = true;
|
||||
|
||||
// Experimental rpc code.
|
||||
|
||||
message SolveRequest {
|
||||
CpModelProto model = 1;
|
||||
int32 num_search_workers = 2;
|
||||
google.protobuf.Duration time_limit = 3;
|
||||
string search_parameters_as_string = 4;
|
||||
bool log_search_progress = 5;
|
||||
}
|
||||
|
||||
message SolveAnswer {
|
||||
CpSolverResponse response = 1;
|
||||
string search_log = 2;
|
||||
}
|
||||
|
||||
// This service enables sending a CpModelProto to a server and getting back
|
||||
// the optimal solution or all intermediate solutions of the problem.
|
||||
service CpSatRemoveSolve {
|
||||
// Single solve, sends a model, expects the optimal solution.
|
||||
rpc Solve(SolveRequest) returns (SolveAnswer) {}
|
||||
// Streaming solve, sends a model, expects all intermediate solutions as well
|
||||
// as the final one.
|
||||
rpc StreamingSolve(SolveRequest) returns (stream SolveAnswer) {}
|
||||
}
|
||||
Reference in New Issue
Block a user