<ahref="solve__result_8h.html">Go to the documentation of this file.</a><divclass="fragment"><divclass="line"><aid="l00001"name="l00001"></a><spanclass="lineno"> 1</span><spanclass="comment">// Copyright 2010-2021 Google LLC</span></div>
<divclass="line"><aid="l00002"name="l00002"></a><spanclass="lineno"> 2</span><spanclass="comment">// Licensed under the Apache License, Version 2.0 (the "License");</span></div>
<divclass="line"><aid="l00003"name="l00003"></a><spanclass="lineno"> 3</span><spanclass="comment">// you may not use this file except in compliance with the License.</span></div>
<divclass="line"><aid="l00004"name="l00004"></a><spanclass="lineno"> 4</span><spanclass="comment">// You may obtain a copy of the License at</span></div>
<divclass="line"><aid="l00008"name="l00008"></a><spanclass="lineno"> 8</span><spanclass="comment">// Unless required by applicable law or agreed to in writing, software</span></div>
<divclass="line"><aid="l00009"name="l00009"></a><spanclass="lineno"> 9</span><spanclass="comment">// distributed under the License is distributed on an "AS IS" BASIS,</span></div>
<divclass="line"><aid="l00010"name="l00010"></a><spanclass="lineno"> 10</span><spanclass="comment">// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span></div>
<divclass="line"><aid="l00011"name="l00011"></a><spanclass="lineno"> 11</span><spanclass="comment">// See the License for the specific language governing permissions and</span></div>
<divclass="line"><aid="l00012"name="l00012"></a><spanclass="lineno"> 12</span><spanclass="comment">// limitations under the License.</span></div>
<divclass="line"><aid="l00036"name="l00036"></a><spanclass="lineno"> 36</span><spanclass="comment">// Problem feasibility status as claimed by the solver (solver is not required</span></div>
<divclass="line"><aid="l00037"name="l00037"></a><spanclass="lineno"> 37</span><spanclass="comment">// to return a certificate for the claim).</span></div>
<divclass="line"><aid="l00042"name="l00042"></a><spanclass="lineno"> 42</span><spanclass="comment">// Solver claims the problem is feasible.</span></div>
<divclass="line"><aid="l00045"name="l00045"></a><spanclass="lineno"> 45</span><spanclass="comment">// Solver claims the problem is infeasible.</span></div>
<divclass="line"><aid="l00051"name="l00051"></a><spanclass="lineno"> 51</span><spanclass="comment">// Feasibility status of the primal problem and its dual (or the dual of a</span></div>
<divclass="line"><aid="l00052"name="l00052"></a><spanclass="lineno"> 52</span><spanclass="comment">// continuous relaxation) as claimed by the solver. The solver is not required</span></div>
<divclass="line"><aid="l00053"name="l00053"></a><spanclass="lineno"> 53</span><spanclass="comment">// to return a certificate for the claim (e.g. the solver may claim primal</span></div>
<divclass="line"><aid="l00054"name="l00054"></a><spanclass="lineno"> 54</span><spanclass="comment">// feasibility without returning a primal feasible solutuion). This combined</span></div>
<divclass="line"><aid="l00055"name="l00055"></a><spanclass="lineno"> 55</span><spanclass="comment">// status gives a comprehensive description of a solver's claims about</span></div>
<divclass="line"><aid="l00056"name="l00056"></a><spanclass="lineno"> 56</span><spanclass="comment">// feasibility and unboundedness of the solved problem. For instance,</span></div>
<divclass="line"><aid="l00057"name="l00057"></a><spanclass="lineno"> 57</span><spanclass="comment">// * a feasible status for primal and dual problems indicates the primal is</span></div>
<divclass="line"><aid="l00058"name="l00058"></a><spanclass="lineno"> 58</span><spanclass="comment">// feasible and bounded and likely has an optimal solution (guaranteed for</span></div>
<divclass="line"><aid="l00059"name="l00059"></a><spanclass="lineno"> 59</span><spanclass="comment">// problems without non-linear constraints).</span></div>
<divclass="line"><aid="l00060"name="l00060"></a><spanclass="lineno"> 60</span><spanclass="comment">// * a primal feasible and a dual infeasible status indicates the primal</span></div>
<divclass="line"><aid="l00061"name="l00061"></a><spanclass="lineno"> 61</span><spanclass="comment">// problem is unbounded (i.e. has arbitrarily good solutions).</span></div>
<divclass="line"><aid="l00062"name="l00062"></a><spanclass="lineno"> 62</span><spanclass="comment">// Note that a dual infeasible status by itself (i.e. accompanied by an</span></div>
<divclass="line"><aid="l00063"name="l00063"></a><spanclass="lineno"> 63</span><spanclass="comment">// undetermined primal status) does not imply the primal problem is unbounded as</span></div>
<divclass="line"><aid="l00064"name="l00064"></a><spanclass="lineno"> 64</span><spanclass="comment">// we could have both problems be infeasible. Also, while a primal and dual</span></div>
<divclass="line"><aid="l00065"name="l00065"></a><spanclass="lineno"> 65</span><spanclass="comment">// feasible status may imply the existence of an optimal solution, it does not</span></div>
<divclass="line"><aid="l00066"name="l00066"></a><spanclass="lineno"> 66</span><spanclass="comment">// guarantee the solver has actually found such optimal solution.</span></div>
<divclass="line"><aid="l00071"name="l00071"></a><spanclass="lineno"> 71</span><spanclass="comment">// Status for the dual problem (or for the dual of a continuous relaxation).</span></div>
<divclass="line"><aid="l00074"name="l00074"></a><spanclass="lineno"> 74</span><spanclass="comment">// If true, the solver claims the primal or dual problem is infeasible, but</span></div>
<divclass="line"><aid="l00075"name="l00075"></a><spanclass="lineno"> 75</span><spanclass="comment">// it does not know which (or if both are infeasible). Can be true only when</span></div>
<divclass="line"><aid="l00076"name="l00076"></a><spanclass="lineno"> 76</span><spanclass="comment">// primal_problem_status = dual_problem_status = kUndetermined. This extra</span></div>
<divclass="line"><aid="l00077"name="l00077"></a><spanclass="lineno"> 77</span><spanclass="comment">// information is often needed when preprocessing determines there is no</span></div>
<divclass="line"><aid="l00078"name="l00078"></a><spanclass="lineno"> 78</span><spanclass="comment">// optimal solution to the problem (but can't determine if it is due to</span></div>
<divclass="line"><aid="l00079"name="l00079"></a><spanclass="lineno"> 79</span><spanclass="comment">// infeasibility, unboundedness, or both).</span></div>
<divclass="line"><aid="l00092"name="l00092"></a><spanclass="lineno"> 92</span><spanclass="comment">// Elapsed wall clock time as measured by math_opt, roughly the time inside</span></div>
<divclass="line"><aid="l00093"name="l00093"></a><spanclass="lineno"> 93</span><spanclass="comment">// Solver::Solve(). Note: this does not include work done building the model.</span></div>
<divclass="line"><aid="l00099"name="l00099"></a><spanclass="lineno"> 99</span><spanclass="comment">// Solver claims the optimal value is equal or better (smaller for</span></div>
<divclass="line"><aid="l00100"name="l00100"></a><spanclass="lineno"> 100</span><spanclass="comment">// minimization and larger for maximization) than best_primal_bound:</span></div>
<divclass="line"><aid="l00101"name="l00101"></a><spanclass="lineno"> 101</span><spanclass="comment">// * best_primal_bound is trivial (+inf for minimization and -inf</span></div>
<divclass="line"><aid="l00102"name="l00102"></a><spanclass="lineno"> 102</span><spanclass="comment">// maximization) when the solver does not claim to have such bound. This</span></div>
<divclass="line"><aid="l00103"name="l00103"></a><spanclass="lineno"> 103</span><spanclass="comment">// may happen for some solvers (e.g., PDLP, typically continuous solvers)</span></div>
<divclass="line"><aid="l00104"name="l00104"></a><spanclass="lineno"> 104</span><spanclass="comment">// even when returning optimal (solver could terminate with slightly</span></div>
<divclass="line"><aid="l00106"name="l00106"></a><spanclass="lineno"> 106</span><spanclass="comment">// * best_primal_bound can be closer to the optimal value than the objective</span></div>
<divclass="line"><aid="l00107"name="l00107"></a><spanclass="lineno"> 107</span><spanclass="comment">// of the best primal feasible solution. In particular, best_primal_bound</span></div>
<divclass="line"><aid="l00108"name="l00108"></a><spanclass="lineno"> 108</span><spanclass="comment">// may be non-trivial even when no primal feasible solutions are returned.</span></div>
<divclass="line"><aid="l00109"name="l00109"></a><spanclass="lineno"> 109</span><spanclass="comment">// * best_dual_bound is always better (smaller for minimization and larger</span></div>
<divclass="line"><aid="l00110"name="l00110"></a><spanclass="lineno"> 110</span><spanclass="comment">// for maximization) than best_primal_bound.</span></div>
<divclass="line"><aid="l00114"name="l00114"></a><spanclass="lineno"> 114</span><spanclass="comment">// Solver claims the optimal value is equal or worse (larger for</span></div>
<divclass="line"><aid="l00115"name="l00115"></a><spanclass="lineno"> 115</span><spanclass="comment">// minimization and smaller for maximization) than best_dual_bound:</span></div>
<divclass="line"><aid="l00116"name="l00116"></a><spanclass="lineno"> 116</span><spanclass="comment">// * best_dual_bound is always better (smaller for minimization and larger</span></div>
<divclass="line"><aid="l00117"name="l00117"></a><spanclass="lineno"> 117</span><spanclass="comment">// for maximization) than best_primal_bound.</span></div>
<divclass="line"><aid="l00118"name="l00118"></a><spanclass="lineno"> 118</span><spanclass="comment">// * best_dual_bound is trivial (-inf for minimization and +inf</span></div>
<divclass="line"><aid="l00119"name="l00119"></a><spanclass="lineno"> 119</span><spanclass="comment">// maximization) when the solver does not claim to have such bound.</span></div>
<divclass="line"><aid="l00120"name="l00120"></a><spanclass="lineno"> 120</span><spanclass="comment">// Similarly to best_primal_bound, this may happen for some solvers even</span></div>
<divclass="line"><aid="l00121"name="l00121"></a><spanclass="lineno"> 121</span><spanclass="comment">// when returning optimal. MIP solvers will typically report a bound even</span></div>
<divclass="line"><aid="l00122"name="l00122"></a><spanclass="lineno"> 122</span><spanclass="comment">// if it is imprecise.</span></div>
<divclass="line"><aid="l00123"name="l00123"></a><spanclass="lineno"> 123</span><spanclass="comment">// * for continuous problems best_dual_bound can be closer to the optimal</span></div>
<divclass="line"><aid="l00124"name="l00124"></a><spanclass="lineno"> 124</span><spanclass="comment">// value than the objective of the best dual feasible solution. For MIP</span></div>
<divclass="line"><aid="l00125"name="l00125"></a><spanclass="lineno"> 125</span><spanclass="comment">// one of the first non-trivial values for best_dual_bound is often the</span></div>
<divclass="line"><aid="l00126"name="l00126"></a><spanclass="lineno"> 126</span><spanclass="comment">// optimal value of the LP relaxation of the MIP.</span></div>
<divclass="line"><aid="l00129"name="l00129"></a><spanclass="lineno"> 129</span><spanclass="comment">// Feasibility statuses for primal and dual problems.</span></div>
<divclass="line"><aid="l00140"name="l00140"></a><spanclass="lineno"> 140</span><spanclass="comment">// Will CHECK fail on invalid input, if problem_status is invalid.</span></div>
<divclass="line"><aid="l00149"name="l00149"></a><spanclass="lineno"> 149</span><spanclass="comment">// The reason a call to Solve() terminates.</span></div>
<divclass="line"><aid="l00151"name="l00151"></a><spanclass="lineno"> 151</span><spanclass="comment">// A provably optimal solution (up to numerical tolerances) has been found.</span></div>
<divclass="line"><aid="l00154"name="l00154"></a><spanclass="lineno"> 154</span><spanclass="comment">// The primal problem has no feasible solutions.</span></div>
<divclass="line"><aid="l00157"name="l00157"></a><spanclass="lineno"> 157</span><spanclass="comment">// The primal problem is feasible and arbitrarily good solutions can be</span></div>
<divclass="line"><aid="l00158"name="l00158"></a><spanclass="lineno"> 158</span><spanclass="comment">// found along a primal ray.</span></div>
<divclass="line"><aid="l00161"name="l00161"></a><spanclass="lineno"> 161</span><spanclass="comment">// The primal problem is either infeasible or unbounded. More details on the</span></div>
<divclass="line"><aid="l00162"name="l00162"></a><spanclass="lineno"> 162</span><spanclass="comment">// problem status may be available in solve_stats.problem_status. Note that</span></div>
<divclass="line"><aid="l00163"name="l00163"></a><spanclass="lineno"> 163</span><spanclass="comment">// Gurobi's unbounded status may be mapped here as explained in</span></div>
<divclass="line"><aid="l00167"name="l00167"></a><spanclass="lineno"> 167</span><spanclass="comment">// The problem was solved to one of the criteria above (Optimal, Infeasible,</span></div>
<divclass="line"><aid="l00168"name="l00168"></a><spanclass="lineno"> 168</span><spanclass="comment">// Unbounded, or InfeasibleOrUnbounded), but one or more tolerances was not</span></div>
<divclass="line"><aid="l00169"name="l00169"></a><spanclass="lineno"> 169</span><spanclass="comment">// met. Some primal/dual solutions/rays be present, but either they will be</span></div>
<divclass="line"><aid="l00170"name="l00170"></a><spanclass="lineno"> 170</span><spanclass="comment">// slightly infeasible, or (if the problem was nearly optimal) their may be</span></div>
<divclass="line"><aid="l00171"name="l00171"></a><spanclass="lineno"> 171</span><spanclass="comment">// a gap between the best solution objective and best objective bound.</span></div>
<divclass="line"><aid="l00173"name="l00173"></a><spanclass="lineno"> 173</span><spanclass="comment">// Users can still query primal/dual solutions/rays and solution stats, but</span></div>
<divclass="line"><aid="l00174"name="l00174"></a><spanclass="lineno"> 174</span><spanclass="comment">// they are responsible for dealing with the numerical imprecision.</span></div>
<divclass="line"><aid="l00177"name="l00177"></a><spanclass="lineno"> 177</span><spanclass="comment">// The optimizer reached some kind of limit and a primal feasible solution</span></div>
<divclass="line"><aid="l00178"name="l00178"></a><spanclass="lineno"> 178</span><spanclass="comment">// is returned. See SolveResultProto.limit_detail for detailed description of</span></div>
<divclass="line"><aid="l00179"name="l00179"></a><spanclass="lineno"> 179</span><spanclass="comment">// the kind of limit that was reached.</span></div>
<divclass="line"><aid="l00182"name="l00182"></a><spanclass="lineno"> 182</span><spanclass="comment">// The optimizer reached some kind of limit and it did not find a primal</span></div>
<divclass="line"><aid="l00183"name="l00183"></a><spanclass="lineno"> 183</span><spanclass="comment">// feasible solution. See SolveResultProto.limit_detail for detailed</span></div>
<divclass="line"><aid="l00184"name="l00184"></a><spanclass="lineno"> 184</span><spanclass="comment">// description of the kind of limit that was reached.</span></div>
<divclass="line"><aid="l00187"name="l00187"></a><spanclass="lineno"> 187</span><spanclass="comment">// The algorithm stopped because it encountered unrecoverable numerical</span></div>
<divclass="line"><aid="l00188"name="l00188"></a><spanclass="lineno"> 188</span><spanclass="comment">// error. No solution information is available.</span></div>
<divclass="line"><aid="l00191"name="l00191"></a><spanclass="lineno"> 191</span><spanclass="comment">// The algorithm stopped because of an error not covered by one of the</span></div>
<divclass="line"><aid="l00192"name="l00192"></a><spanclass="lineno"> 192</span><spanclass="comment">// statuses defined above. No solution information is available.</span></div>
<divclass="line"><aid="l00198"name="l00198"></a><spanclass="lineno"> 198</span><spanclass="comment">// When a Solve() stops early with TerminationReason kFeasible or</span></div>
<divclass="line"><aid="l00199"name="l00199"></a><spanclass="lineno"> 199</span><spanclass="comment">// kNoSolutionFound, the specific limit that was hit.</span></div>
<divclass="line"><aid="l00201"name="l00201"></a><spanclass="lineno"> 201</span><spanclass="comment">// Used if the underlying solver cannot determine which limit was reached, or</span></div>
<divclass="line"><aid="l00202"name="l00202"></a><spanclass="lineno"> 202</span><spanclass="comment">// as a null value when we terminated not from a limit (e.g. kOptimal).</span></div>
<divclass="line"><aid="l00205"name="l00205"></a><spanclass="lineno"> 205</span><spanclass="comment">// An iterative algorithm stopped after conducting the maximum number of</span></div>
<divclass="line"><aid="l00206"name="l00206"></a><spanclass="lineno"> 206</span><spanclass="comment">// iterations (e.g. simplex or barrier iterations).</span></div>
<divclass="line"><aid="l00209"name="l00209"></a><spanclass="lineno"> 209</span><spanclass="comment">// The algorithm stopped after a user-specified computation time.</span></div>
<divclass="line"><aid="l00212"name="l00212"></a><spanclass="lineno"> 212</span><spanclass="comment">// A branch-and-bound algorithm stopped because it explored a maximum number</span></div>
<divclass="line"><aid="l00213"name="l00213"></a><spanclass="lineno"> 213</span><spanclass="comment">// of nodes in the branch-and-bound tree.</span></div>
<divclass="line"><aid="l00216"name="l00216"></a><spanclass="lineno"> 216</span><spanclass="comment">// The algorithm stopped because it found the required number of solutions.</span></div>
<divclass="line"><aid="l00217"name="l00217"></a><spanclass="lineno"> 217</span><spanclass="comment">// This is often used in MIPs to get the solver to return the first feasible</span></div>
<divclass="line"><aid="l00218"name="l00218"></a><spanclass="lineno"> 218</span><spanclass="comment">// solution it encounters.</span></div>
<divclass="line"><aid="l00221"name="l00221"></a><spanclass="lineno"> 221</span><spanclass="comment">// The algorithm stopped because it ran out of memory.</span></div>
<divclass="line"><aid="l00224"name="l00224"></a><spanclass="lineno"> 224</span><spanclass="comment">// The solver was run with a cutoff (e.g. SolveParameters.cutoff_limit was</span></div>
<divclass="line"><aid="l00225"name="l00225"></a><spanclass="lineno"> 225</span><spanclass="comment">// set) on the objective, indicating that the user did not want any solution</span></div>
<divclass="line"><aid="l00226"name="l00226"></a><spanclass="lineno"> 226</span><spanclass="comment">// worse than the cutoff, and the solver concluded there were no solutions at</span></div>
<divclass="line"><aid="l00227"name="l00227"></a><spanclass="lineno"> 227</span><spanclass="comment">// least as good as the cutoff. Typically no further solution information is</span></div>
<divclass="line"><aid="l00231"name="l00231"></a><spanclass="lineno"> 231</span><spanclass="comment">// The algorithm stopped because it found a solution better than a minimum</span></div>
<divclass="line"><aid="l00232"name="l00232"></a><spanclass="lineno"> 232</span><spanclass="comment">// limit set by the user.</span></div>
<divclass="line"><aid="l00235"name="l00235"></a><spanclass="lineno"> 235</span><spanclass="comment">// The algorithm stopped because the norm of an iterate became too large.</span></div>
<divclass="line"><aid="l00238"name="l00238"></a><spanclass="lineno"> 238</span><spanclass="comment">// The algorithm stopped because of an interrupt signal or a user interrupt</span></div>
<divclass="line"><aid="l00242"name="l00242"></a><spanclass="lineno"> 242</span><spanclass="comment">// The algorithm stopped because it was unable to continue making progress</span></div>
<divclass="line"><aid="l00243"name="l00243"></a><spanclass="lineno"> 243</span><spanclass="comment">// towards the solution.</span></div>
<divclass="line"><aid="l00246"name="l00246"></a><spanclass="lineno"> 246</span><spanclass="comment">// The algorithm stopped due to a limit not covered by one of the above. Note</span></div>
<divclass="line"><aid="l00247"name="l00247"></a><spanclass="lineno"> 247</span><spanclass="comment">// that kUndetermined is used when the reason cannot be determined, and kOther</span></div>
<divclass="line"><aid="l00248"name="l00248"></a><spanclass="lineno"> 248</span><spanclass="comment">// is used when the reason is known but does not fit into any of the above</span></div>
<divclass="line"><aid="l00255"name="l00255"></a><spanclass="lineno"> 255</span><spanclass="comment">// All information regarding why a call to Solve() terminated.</span></div>
<divclass="line"><aid="l00257"name="l00257"></a><spanclass="lineno"> 257</span><spanclass="comment">// When the reason is kFeasible or kNoSolutionFound, please use the static</span></div>
<divclass="line"><aid="l00258"name="l00258"></a><spanclass="lineno"> 258</span><spanclass="comment">// functions Feasible and NoSolutionFound.</span></div>
<divclass="line"><aid="l00263"name="l00263"></a><spanclass="lineno"> 263</span><spanclass="comment">// Is set iff reason is kFeasible or kNoSolutionFound.</span></div>
<divclass="line"><aid="l00266"name="l00266"></a><spanclass="lineno"> 266</span><spanclass="comment">// Additional typically solver specific information about termination.</span></div>
<divclass="line"><aid="l00267"name="l00267"></a><spanclass="lineno"> 267</span><spanclass="comment">// Not all solvers can always determine the limit which caused termination,</span></div>
<divclass="line"><aid="l00268"name="l00268"></a><spanclass="lineno"> 268</span><spanclass="comment">// Limit::kUndetermined is used when the cause cannot be determined.</span></div>
<divclass="line"><aid="l00271"name="l00271"></a><spanclass="lineno"> 271</span><spanclass="comment">// Returns true if a limit was reached (i.e. if reason is kFeasible or</span></div>
<divclass="line"><aid="l00272"name="l00272"></a><spanclass="lineno"> 272</span><spanclass="comment">// kNoSolutionFound, and limit is not empty).</span></div>
<divclass="line"><aid="l00275"name="l00275"></a><spanclass="lineno"> 275</span><spanclass="comment">// Will CHECK fail on invalid input, if reason is unspecified, if limit is</span></div>
<divclass="line"><aid="l00276"name="l00276"></a><spanclass="lineno"> 276</span><spanclass="comment">// set when reason is not TERMINATION_REASON_FEASIBLE or</span></div>
<divclass="line"><aid="l00277"name="l00277"></a><spanclass="lineno"> 277</span><spanclass="comment">// TERMINATION_REASON_NO_SOLUTION_FOUND, or if limit is unspecified when</span></div>
<divclass="line"><aid="l00278"name="l00278"></a><spanclass="lineno"> 278</span><spanclass="comment">// reason is TERMINATION_REASON_FEASIBLE or</span></div>
<divclass="line"><aid="l00279"name="l00279"></a><spanclass="lineno"> 279</span><spanclass="comment">// TERMINATION_REASON_NO_SOLUTION_FOUND (see solution_validator.h).</span></div>
<divclass="line"><aid="l00285"name="l00285"></a><spanclass="lineno"> 285</span><spanclass="comment">// Sets the reason to kNoSolutionFound</span></div>
<divclass="line"><aid="l00294"name="l00294"></a><spanclass="lineno"> 294</span><spanclass="comment">// The result of solving an optimization problem with Solve().</span></div>
<divclass="line"><aid="l00302"name="l00302"></a><spanclass="lineno"> 302</span><spanclass="comment">// Statistics on the solve process, e.g. running time, iterations.</span></div>
<divclass="line"><aid="l00305"name="l00305"></a><spanclass="lineno"> 305</span><spanclass="comment">// Basic solutions use, as of Nov 2021:</span></div>
<divclass="line"><aid="l00306"name="l00306"></a><spanclass="lineno"> 306</span><spanclass="comment">// * All convex optimization solvers (LP, convex QP) return only one</span></div>
<divclass="line"><aid="l00307"name="l00307"></a><spanclass="lineno"> 307</span><spanclass="comment">// solution as a primal dual pair.</span></div>
<divclass="line"><aid="l00308"name="l00308"></a><spanclass="lineno"> 308</span><spanclass="comment">// * Only MI(Q)P solvers return more than one solution. MIP solvers do not</span></div>
<divclass="line"><aid="l00309"name="l00309"></a><spanclass="lineno"> 309</span><spanclass="comment">// return any dual information, or primal infeasible solutions. Solutions</span></div>
<divclass="line"><aid="l00310"name="l00310"></a><spanclass="lineno"> 310</span><spanclass="comment">// are returned in order of best primal objective first. Gurobi solves</span></div>
<divclass="line"><aid="l00311"name="l00311"></a><spanclass="lineno"> 311</span><spanclass="comment">// nonconvex QP (integer or continuous) as MIQP.</span></div>
<divclass="line"><aid="l00313"name="l00313"></a><spanclass="lineno"> 313</span><spanclass="comment">// The general contract for the order of solutions that future solvers should</span></div>
<divclass="line"><aid="l00314"name="l00314"></a><spanclass="lineno"> 314</span><spanclass="comment">// implement is to order by:</span></div>
<divclass="line"><aid="l00315"name="l00315"></a><spanclass="lineno"> 315</span><spanclass="comment">// 1. The solutions with a primal feasible solution, ordered by best primal</span></div>
<divclass="line"><aid="l00317"name="l00317"></a><spanclass="lineno"> 317</span><spanclass="comment">// 2. The solutions with a dual feasible solution, ordered by best dual</span></div>
<divclass="line"><aid="l00318"name="l00318"></a><spanclass="lineno"> 318</span><spanclass="comment">// objective (unknown dual objective is worst)</span></div>
<divclass="line"><aid="l00319"name="l00319"></a><spanclass="lineno"> 319</span><spanclass="comment">// 3. All remaining solutions can be returned in any order.</span></div>
<divclass="line"><aid="l00322"name="l00322"></a><spanclass="lineno"> 322</span><spanclass="comment">// Directions of unbounded primal improvement, or equivalently, dual</span></div>
<divclass="line"><aid="l00323"name="l00323"></a><spanclass="lineno"> 323</span><spanclass="comment">// infeasibility certificates. Typically provided for TerminationReasons</span></div>
<divclass="line"><aid="l00324"name="l00324"></a><spanclass="lineno"> 324</span><spanclass="comment">// kUnbounded and kInfeasibleOrUnbounded.</span></div>
<divclass="line"><aid="l00327"name="l00327"></a><spanclass="lineno"> 327</span><spanclass="comment">// Directions of unbounded dual improvement, or equivalently, primal</span></div>
<divclass="line"><aid="l00328"name="l00328"></a><spanclass="lineno"> 328</span><spanclass="comment">// infeasibility certificates. Typically provided for TerminationReason</span></div>
<divclass="line"><aid="l00332"name="l00332"></a><spanclass="lineno"> 332</span><spanclass="comment">// Solver specific output from Gscip. Only populated if Gscip is used.</span></div>
<divclass="line"><aid="l00340"name="l00340"></a><spanclass="lineno"> 340</span><spanclass="comment">// Indicates if at least one primal feasible solution is available.</span></div>
<divclass="line"><aid="l00342"name="l00342"></a><spanclass="lineno"> 342</span><spanclass="comment">// When termination.reason is TerminationReason::kOptimal, this is guaranteed</span></div>
<divclass="line"><aid="l00343"name="l00343"></a><spanclass="lineno"> 343</span><spanclass="comment">// to be true and need not be checked.</span></div>
<divclass="line"><aid="l00346"name="l00346"></a><spanclass="lineno"> 346</span><spanclass="comment">// The objective value of the best primal feasible solution. Will CHECK fail</span></div>
<divclass="line"><aid="l00347"name="l00347"></a><spanclass="lineno"> 347</span><spanclass="comment">// if there are no primal feasible solutions.</span></div>
<divclass="line"><aid="l00350"name="l00350"></a><spanclass="lineno"> 350</span><spanclass="comment">// A bound on the best possible objective value.</span></div>
<divclass="line"><aid="l00353"name="l00353"></a><spanclass="lineno"> 353</span><spanclass="comment">// The variable values from the best primal feasible solution. Will CHECK fail</span></div>
<divclass="line"><aid="l00354"name="l00354"></a><spanclass="lineno"> 354</span><spanclass="comment">// if there are no primal feasible solutions.</span></div>
<divclass="line"><aid="l00357"name="l00357"></a><spanclass="lineno"> 357</span><spanclass="comment">// Returns true only if the problem has been shown to be feasible and bounded.</span></div>
<divclass="line"><aid="l00360"name="l00360"></a><spanclass="lineno"> 360</span><spanclass="comment">// Indicates if at least one primal ray is available.</span></div>
<divclass="line"><aid="l00362"name="l00362"></a><spanclass="lineno"> 362</span><spanclass="comment">// This is NOT guaranteed to be true when termination.reason is</span></div>
<divclass="line"><aid="l00363"name="l00363"></a><spanclass="lineno"> 363</span><spanclass="comment">// TerminationReason::kUnbounded or TerminationReason::kInfeasibleOrUnbounded.</span></div>
<divclass="line"><aid="l00366"name="l00366"></a><spanclass="lineno"> 366</span><spanclass="comment">// The variable values from the first primal ray. Will CHECK fail if there</span></div>
<divclass="line"><aid="l00367"name="l00367"></a><spanclass="lineno"> 367</span><spanclass="comment">// are no primal rays.</span></div>
<divclass="line"><aid="l00370"name="l00370"></a><spanclass="lineno"> 370</span><spanclass="comment">// Indicates if the best primal solution has an associated dual feasible</span></div>
<divclass="line"><aid="l00373"name="l00373"></a><spanclass="lineno"> 373</span><spanclass="comment">// This is NOT guaranteed to be true when termination.reason is</span></div>
<divclass="line"><aid="l00374"name="l00374"></a><spanclass="lineno"> 374</span><spanclass="comment">// TerminationReason::kOptimal. It also may be true even when the best primal</span></div>
<divclass="line"><aid="l00375"name="l00375"></a><spanclass="lineno"> 375</span><spanclass="comment">// solution is not feasible.</span></div>
<divclass="line"><aid="l00378"name="l00378"></a><spanclass="lineno"> 378</span><spanclass="comment">// The dual values from the best dual solution. Will CHECK fail if there</span></div>
<divclass="line"><aid="l00379"name="l00379"></a><spanclass="lineno"> 379</span><spanclass="comment">// are no dual solutions.</span></div>
<divclass="line"><aid="l00382"name="l00382"></a><spanclass="lineno"> 382</span><spanclass="comment">// The reduced from the best dual solution. Will CHECK fail if there</span></div>
<divclass="line"><aid="l00383"name="l00383"></a><spanclass="lineno"> 383</span><spanclass="comment">// are no dual solutions.</span></div>
<divclass="line"><aid="l00386"name="l00386"></a><spanclass="lineno"> 386</span><spanclass="comment">// Indicates if at least one dual ray is available.</span></div>
<divclass="line"><aid="l00388"name="l00388"></a><spanclass="lineno"> 388</span><spanclass="comment">// This is NOT guaranteed to be true when termination.reason is</span></div>
<divclass="line"><aid="l00392"name="l00392"></a><spanclass="lineno"> 392</span><spanclass="comment">// The dual values from the first dual ray. Will CHECK fail if there</span></div>
<divclass="line"><aid="l00393"name="l00393"></a><spanclass="lineno"> 393</span><spanclass="comment">// are no dual rays.</span></div>
<divclass="line"><aid="l00396"name="l00396"></a><spanclass="lineno"> 396</span><spanclass="comment">// The reduced from the first dual ray. Will CHECK fail if there</span></div>
<divclass="line"><aid="l00397"name="l00397"></a><spanclass="lineno"> 397</span><spanclass="comment">// are no dual rays.</span></div>
<divclass="line"><aid="l00400"name="l00400"></a><spanclass="lineno"> 400</span><spanclass="comment">// Indicates if at least one basis is available.</span></div>
<divclass="line"><aid="l00403"name="l00403"></a><spanclass="lineno"> 403</span><spanclass="comment">// The constraint basis status for the first primal/dual pair.</span></div>
<divclass="line"><aid="l00406"name="l00406"></a><spanclass="lineno"> 406</span><spanclass="comment">// The variable basis status for the first primal/dual pair.</span></div>
<divclass="ttc"id="anamespaceoperations__research_1_1math__opt_html_a2e76538efbebc3745c913d17d09bfa68"><divclass="ttname"><ahref="namespaceoperations__research_1_1math__opt.html#a2e76538efbebc3745c913d17d09bfa68">operations_research::math_opt::operator<<</a></div><divclass="ttdeci">std::ostream & operator<<(std::ostream &out, const E value)</div><divclass="ttdef"><b>Definition:</b><ahref="enums_8h_source.html#l00231">enums.h:231</a></div></div>
<divclass="ttc"id="anamespaceoperations__research_html"><divclass="ttname"><ahref="namespaceoperations__research.html">operations_research</a></div><divclass="ttdoc">Collection of objects used to extend the Constraint Solver library.</div><divclass="ttdef"><b>Definition:</b><ahref="dense__doubly__linked__list_8h_source.html#l00021">dense_doubly_linked_list.h:21</a></div></div>