1// Copyright 2010-2024 Google LLC
2// Licensed under the Apache License, Version 2.0 (the "License");
3// you may not use this file except in compliance with the License.
4// You may obtain a copy of the License at
6// http://www.apache.org/licenses/LICENSE-2.0
8// Unless required by applicable law or agreed to in writing, software
9// distributed under the License is distributed on an "AS IS" BASIS,
10// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11// See the License for the specific language governing permissions and
12// limitations under the License.
16package operations_research.service.v1;
18import "ortools/service/v1/mathopt/model.proto";
19import "ortools/service/v1/mathopt/model_parameters.proto";
20import "ortools/service/v1/mathopt/parameters.proto";
21import "ortools/service/v1/mathopt/result.proto";
23option java_multiple_files = true;
24option java_package = "com.google.ortools.service.v1";
25option csharp_namespace = "Google.OrTools.Service";
27// A One Platform API exposing a set of optimization solvers for high-level
28// operations research problems.
30 // Solves the input model and returns the result at once. Use this when you
31 // don't need callbacks, incrementality and don't need to track the progress
33 rpc SolveMathOptModel(SolveMathOptModelRequest)
34 returns (SolveMathOptModelResponse) {}
37// Request for a unary remote solve in MathOpt.
38message SolveMathOptModelRequest {
39 // Solver type to numerically solve the problem. Note that if a solver does
40 // not support a specific feature in the model, the optimization procedure
41 // won't be successful.
42 mathopt.SolverTypeProto solver_type = 1;
44 // A mathematical representation of the optimization problem to solve.
45 mathopt.ModelProto model = 2;
47 // Parameters to control a single solve. The enable_output parameter is
48 // handled specifically. For solvers that support messages callbacks, setting
49 // it to true will have the server register a message callback. The resulting
50 // messages will be returned in SolveMathOptModelResponse.messages. For other
51 // solvers, setting enable_output to true will result in an error.
52 mathopt.SolveParametersProto parameters = 4;
54 // Parameters to control a single solve that are specific to the input model
55 // (see SolveParametersProto for model independent parameters).
56 mathopt.ModelSolveParametersProto model_parameters = 5;
59// Response for a unary remote solve in MathOpt.
60message SolveMathOptModelResponse {
61 // Description of the output of solving the model in the request.
62 mathopt.SolveResultProto result = 1;
64 // If SolveParametersProto.enable_output has been used, this will contain log
65 // messages for solvers that support message callbacks.
66 repeated string messages = 2;