Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
osqp.proto
Go to the documentation of this file.
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
5//
6// http://www.apache.org/licenses/LICENSE-2.0
7//
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.
13
14syntax = "proto3";
15
16package operations_research.math_opt;
17
18// This proto mirrors the fields of OsqpSettings in
19// osqp_cpp/include/osqp++.h, which in turn (nearly) mirrors the
20// fields of OSQPSettings in osqp/include/types.h. See also
21// https://osqp.org/docs/interfaces/solver_settings.html for documentation and
22// default values. This proto must be kept in sync with logic in osqp_solver.cc.
23// LINT.IfChange
24message OsqpSettingsProto {
25 // ADMM rho step. Must be > 0.
26 optional double rho = 1;
27
28 // ADMM sigma step. Must be > 0.
29 optional double sigma = 2;
30
31 // Number of heuristic scaling iterations. Must be >= 0.
32 optional int64 scaling = 3;
33
34 // Is rho step size adaptive?
35 optional bool adaptive_rho = 4;
36
37 // Number of iterations between rho adaptations; if 0, then automatically
38 // selected. Must be >= 0.
39 optional int64 adaptive_rho_interval = 5;
40
41 // Tolerance X for adapting rho: The new value must be X times larger or 1/X
42 // times smaller than the current value. Must be >= 1.
43 optional double adaptive_rho_tolerance = 6;
44
45 // In automatic mode (adaptive_rho_interval = 0), what fraction of setup time
46 // is spent on selecting rho. Must be >= 0.
47 optional double adaptive_rho_fraction = 7;
48
49 // Maximum number of iterations. Must be > 0.
50 optional int64 max_iter = 8;
51
52 // Absolute error tolerance for convergence. Must be >= 0.
53 optional double eps_abs = 9;
54
55 // Relative error tolerance for convergence. Must be >= 0.
56 optional double eps_rel = 10;
57
58 // Absolute error tolerance for primal infeasibility. Must be >= 0.
59 optional double eps_prim_inf = 11;
60
61 // Relative error tolerance for dual infeasibility. Must be >= 0.
62 optional double eps_dual_inf = 12;
63
64 // ADMM overrelaxation parameter. Must be > 0 and < 2.
65 optional double alpha = 13;
66
67 // Polishing regularization parameter. Must be > 0.
68 optional double delta = 14;
69
70 // Perform polishing?
71 optional bool polish = 15;
72
73 // Number of refinement iterations in polishing. Must be > 0.
74 optional int64 polish_refine_iter = 16;
75
76 // Print solver output?
77 optional bool verbose = 17;
78
79 // Use scaled termination criteria?
80 optional bool scaled_termination = 18;
81
82 // Interval for checking termination. If 0 or unset, termination checking is
83 // disabled. Must be >= 0.
84 optional int64 check_termination = 19;
85
86 // Perform warm starting?.
87 optional bool warm_start = 20;
88
89 // Run time limit in seconds. If 0 or unset, then no time limit. Must be >= 0.
90 optional double time_limit = 21;
91}
92// LINT.ThenChange(osqp_solver.cc:merge_from_proto,
93// osqp_solver.cc:must_initialize, osqp_solver.cc:solve,
94// osqp_solver.cc:try_overwrite_with_current_values,
95// //depot/osqp_cpp/include/osqp++.h:osqp_settings,
96// //depot/osqp_cpp/src/osqp++.cc:settings_translation)
97
98// Solver-specific output for OSQP.
99message OsqpOutput {
100 // Field is true if the underlying OSQP++ object was initialized for the
101 // current solve, and false if the object was instead used incrementally. In
102 // more detail, this tracks: was osqp::OsqpSolver::Init called on the
103 // operations_research::math_opt::OsqpSolver::solver_ field at any point
104 // during the solve process?
105 bool initialized_underlying_solver = 1;
106}