1// Copyright 2010-2025 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";
22import "ortools/service/v1/mathopt/solver_resources.proto";
24option java_multiple_files = true;
25option java_package = "com.google.ortools.service.v1";
27option csharp_namespace = "Google.OrTools.Service";
29// A One Platform API exposing a set of optimization solvers for high-level
30// operations research problems.
33 // Solves the input model and returns the result at once. Use this when you
34 // don't need callbacks, incrementality and don't need to track the progress
36 rpc SolveMathOptModel(SolveMathOptModelRequest)
37 returns (SolveMathOptModelResponse) {}
40// Request for a unary remote solve in MathOpt.
41message SolveMathOptModelRequest {
42 // Solver type to numerically solve the problem. Note that if a solver does
43 // not support a specific feature in the model, the optimization procedure
44 // won't be successful.
45 mathopt.SolverTypeProto solver_type = 1;
47 // A mathematical representation of the optimization problem to solve.
48 mathopt.ModelProto model = 2;
50 // Hints on resources requested for the solve.
51 mathopt.SolverResourcesProto resources = 6;
53 // Parameters to control a single solve. The enable_output parameter is
54 // handled specifically. For solvers that support messages callbacks, setting
55 // it to true will have the server register a message callback. The resulting
56 // messages will be returned in SolveMathOptModelResponse.messages. For other
57 // solvers, setting enable_output to true will result in an error.
58 mathopt.SolveParametersProto parameters = 4;
60 // Parameters to control a single solve that are specific to the input model
61 // (see SolveParametersProto for model independent parameters).
62 mathopt.ModelSolveParametersProto model_parameters = 5;
65// Response for a unary remote solve in MathOpt.
66message SolveMathOptModelResponse {
67 // Description of the output of solving the model in the request.
68 mathopt.SolveResultProto result = 1;
70 // If SolveParametersProto.enable_output has been used, this will contain log
71 // messages for solvers that support message callbacks.
72 repeated string messages = 2;