fix, reindent, add tests

This commit is contained in:
Laurent Perron
2022-09-27 18:00:48 +02:00
parent 1a5be9484e
commit f39efd5ac8
14 changed files with 95 additions and 51 deletions

View File

@@ -34,7 +34,6 @@ option java_multiple_files = true;
import "ortools/util/optional_boolean.proto";
package operations_research;
// A variable is always constrained in the form:
@@ -423,15 +422,18 @@ message MPModelRequest {
GLOP_LINEAR_PROGRAMMING = 2; // Recommended default for LP models.
GLPK_LINEAR_PROGRAMMING = 1;
GUROBI_LINEAR_PROGRAMMING = 6; // Commercial, needs a valid license.
XPRESS_LINEAR_PROGRAMMING = 101; // Commercial, needs a valid license. NOLINT
XPRESS_LINEAR_PROGRAMMING =
101; // Commercial, needs a valid license. NOLINT
CPLEX_LINEAR_PROGRAMMING = 10; // Commercial, needs a valid license. NOLINT
SCIP_MIXED_INTEGER_PROGRAMMING = 3; // Recommended default for MIP models.
GLPK_MIXED_INTEGER_PROGRAMMING = 4;
CBC_MIXED_INTEGER_PROGRAMMING = 5;
GUROBI_MIXED_INTEGER_PROGRAMMING = 7; // Commercial, needs a valid license.
XPRESS_MIXED_INTEGER_PROGRAMMING = 102; // Commercial, needs a valid license. NOLINT
CPLEX_MIXED_INTEGER_PROGRAMMING = 11; // Commercial, needs a valid license. NOLINT
XPRESS_MIXED_INTEGER_PROGRAMMING =
102; // Commercial, needs a valid license. NOLINT
CPLEX_MIXED_INTEGER_PROGRAMMING =
11; // Commercial, needs a valid license. NOLINT
BOP_INTEGER_PROGRAMMING = 12;
// WARNING: This solver will currently interpret all variables as integer,
@@ -440,7 +442,6 @@ message MPModelRequest {
// variables).
SAT_INTEGER_PROGRAMMING = 14;
// In-house linear programming solver based on the primal-dual hybrid
// gradient method. Sometimes faster than Glop for medium-size problems and
// scales to much larger problems than Glop.
@@ -460,7 +461,6 @@ message MPModelRequest {
// If not specified, the time limit on the solver is the RPC's deadline_left.
optional double solver_time_limit_seconds = 3;
// If this is set, then EnableOutput() will be set on the internal MPSolver
// that solves the model.
// WARNING: if you set this on a request to prod servers, it will be rejected
@@ -484,13 +484,10 @@ message MPModelRequest {
optional string solver_specific_parameters = 5;
optional bool ignore_solver_specific_parameters_failure = 9 [default = false];
// Advanced usage: model "delta". If used, "model" must be unset. See the
// definition of MPModelDeltaProto.
optional MPModelDeltaProto model_delta = 8;
// Controls the recovery of additional solutions, if any, saved by the
// underlying solver back in the MPSolutionResponse.additional_solutions.
// The repeated field will be length
@@ -499,10 +496,8 @@ message MPModelRequest {
// These additional solutions may have a worse objective than the main
// solution returned in the response.
optional int32 populate_additional_solutions_up_to = 11 [default = 0];
}
// Status returned by the solver. They follow a hierarchical nomenclature, to
// allow us to add more enum values in the future. Clients should use
// InCategory() to match these enums, with the following C++ pseudo-code:
@@ -585,7 +580,6 @@ enum MPSolverResponseStatus {
// solver that doesn't support cancellation. status_str should contain a
// description of the issue.
MPSOLVER_INCOMPATIBLE_OPTIONS = 0x71;
}
message MPSolution {
@@ -663,5 +657,4 @@ message MPSolutionResponse {
// additional solutions are different than the main solution described by the
// above fields `objective_value` and `variable_value`.
repeated MPSolution additional_solutions = 8;
}