<pclass="definition">Definition at line <aclass="el"href="linear__solver_8h_source.html#l00173">173</a> of file <aclass="el"href="linear__solver_8h_source.html">linear_solver.h</a>.</p>
<trclass="memdesc:a76c87990aabadd148304b95332a60ff8"><tdclass="mdescLeft"> </td><tdclass="mdescRight">The type of problems (LP or MIP) that will be solved and the underlying solver (GLOP, GLPK, CLP, CBC or SCIP) that will solve them. <ahref="classoperations__research_1_1MPSolver.html#a76c87990aabadd148304b95332a60ff8">More...</a><br/></td></tr>
<trclass="memdesc:a573d479910e373f5d771d303e440587d"><tdclass="mdescLeft"> </td><tdclass="mdescRight">The status of solving the problem. <ahref="classoperations__research_1_1MPSolver.html#a573d479910e373f5d771d303e440587d">More...</a><br/></td></tr>
<trclass="memdesc:afd922eb2bef96597c426557a8056f76d"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Advanced usage: possible basis status values for a variable and the slack variable of a linear constraint. <ahref="classoperations__research_1_1MPSolver.html#afd922eb2bef96597c426557a8056f76d">More...</a><br/></td></tr>
<trclass="memdesc:acdb0e5753d20e4d3ece49a0451d24c4f"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Create a solver with the given name and underlying solver backend. <ahref="classoperations__research_1_1MPSolver.html#acdb0e5753d20e4d3ece49a0451d24c4f">More...</a><br/></td></tr>
<trclass="memdesc:a191cd9b1ba3e3c01a558a1f6c02a4429"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns the name of the model set at construction. <ahref="classoperations__research_1_1MPSolver.html#a191cd9b1ba3e3c01a558a1f6c02a4429">More...</a><br/></td></tr>
<trclass="memdesc:aee8250cf90d66d569534338248924469"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns the optimization problem type set at construction. <ahref="classoperations__research_1_1MPSolver.html#aee8250cf90d66d569534338248924469">More...</a><br/></td></tr>
<trclass="memdesc:aa71d36872f416feaa853788a7a7a7ef8"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Clears the objective (including the optimization direction), all variables and constraints. <ahref="classoperations__research_1_1MPSolver.html#aa71d36872f416feaa853788a7a7a7ef8">More...</a><br/></td></tr>
<trclass="memdesc:a9d3beb2afe4ae647674b054bf29290e2"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns the number of variables. <ahref="classoperations__research_1_1MPSolver.html#a9d3beb2afe4ae647674b054bf29290e2">More...</a><br/></td></tr>
<trclass="memdesc:a34caaebb9e2b365ef0ec449e870f5b5d"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns the array of variables handled by the <aclass="el"href="classoperations__research_1_1MPSolver.html"title="This mathematical programming (MP) solver class is the main class though which users build and solve ...">MPSolver</a>. <ahref="classoperations__research_1_1MPSolver.html#a34caaebb9e2b365ef0ec449e870f5b5d">More...</a><br/></td></tr>
<trclass="memdesc:a981cdf256aa33e518b8747c96bf1a9c7"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Looks up a variable by name, and returns nullptr if it does not exist. <ahref="classoperations__research_1_1MPSolver.html#a981cdf256aa33e518b8747c96bf1a9c7">More...</a><br/></td></tr>
<trclass="memdesc:a728f0121faaa95a451eaef6eb13e2242"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Creates a variable with the given bounds, integrality requirement and name. <ahref="classoperations__research_1_1MPSolver.html#a728f0121faaa95a451eaef6eb13e2242">More...</a><br/></td></tr>
<trclass="memdesc:ae522890e16fd065100174a819558b461"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Creates a continuous variable. <ahref="classoperations__research_1_1MPSolver.html#ae522890e16fd065100174a819558b461">More...</a><br/></td></tr>
<trclass="memdesc:a33b5ede96c77f6cfdd4f54325f384ab7"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Creates an integer variable. <ahref="classoperations__research_1_1MPSolver.html#a33b5ede96c77f6cfdd4f54325f384ab7">More...</a><br/></td></tr>
<trclass="memdesc:a2090dbd973eba8c24c4fa7b2714e4c44"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Creates a boolean variable. <ahref="classoperations__research_1_1MPSolver.html#a2090dbd973eba8c24c4fa7b2714e4c44">More...</a><br/></td></tr>
<trclass="memdesc:a66fd302d0082c74e6dea35ac59784847"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Creates an array of variables. <ahref="classoperations__research_1_1MPSolver.html#a66fd302d0082c74e6dea35ac59784847">More...</a><br/></td></tr>
<trclass="memdesc:a648a61e30b62b1c17ab1f49fe6c9ed8d"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Creates an array of continuous variables. <ahref="classoperations__research_1_1MPSolver.html#a648a61e30b62b1c17ab1f49fe6c9ed8d">More...</a><br/></td></tr>
<trclass="memdesc:a9333144b7d28f68a7537b2ba19a1ba9b"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Creates an array of integer variables. <ahref="classoperations__research_1_1MPSolver.html#a9333144b7d28f68a7537b2ba19a1ba9b">More...</a><br/></td></tr>
<trclass="memdesc:a200ccd114eb5057856c05501c2d4abe5"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Creates an array of boolean variables. <ahref="classoperations__research_1_1MPSolver.html#a200ccd114eb5057856c05501c2d4abe5">More...</a><br/></td></tr>
<trclass="memdesc:a03666f2e70e42a9560aa9ce7416d2644"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns the number of constraints. <ahref="classoperations__research_1_1MPSolver.html#a03666f2e70e42a9560aa9ce7416d2644">More...</a><br/></td></tr>
<trclass="memdesc:a5ff11cd513c803ba3f75f2f672f1cf6f"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns the array of constraints handled by the <aclass="el"href="classoperations__research_1_1MPSolver.html"title="This mathematical programming (MP) solver class is the main class though which users build and solve ...">MPSolver</a>. <ahref="classoperations__research_1_1MPSolver.html#a5ff11cd513c803ba3f75f2f672f1cf6f">More...</a><br/></td></tr>
<trclass="memdesc:abbf4c26107aac610a00471f41740b01e"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Looks up a constraint by name, and returns nullptr if it does not exist. <ahref="classoperations__research_1_1MPSolver.html#abbf4c26107aac610a00471f41740b01e">More...</a><br/></td></tr>
<trclass="memdesc:a0f97f44428bff07c2308b45bfb62223b"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Creates a linear constraint with given bounds. <ahref="classoperations__research_1_1MPSolver.html#a0f97f44428bff07c2308b45bfb62223b">More...</a><br/></td></tr>
<trclass="memdesc:ab60f33fbc8132eda10c296885625b7d9"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Creates a constraint with -infinity and +infinity bounds. <ahref="classoperations__research_1_1MPSolver.html#ab60f33fbc8132eda10c296885625b7d9">More...</a><br/></td></tr>
<trclass="memdesc:a5cf8f81a46598a4ef20ae7674696c40d"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Creates a named constraint with given bounds. <ahref="classoperations__research_1_1MPSolver.html#a5cf8f81a46598a4ef20ae7674696c40d">More...</a><br/></td></tr>
<trclass="memdesc:a2ee6dd214598834edf57d950333b11f7"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Creates a named constraint with -infinity and +infinity bounds. <ahref="classoperations__research_1_1MPSolver.html#a2ee6dd214598834edf57d950333b11f7">More...</a><br/></td></tr>
<trclass="memdesc:a04cd78bd7a418107a920ca2ee7710aa7"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Creates a constraint owned by <aclass="el"href="classoperations__research_1_1MPSolver.html"title="This mathematical programming (MP) solver class is the main class though which users build and solve ...">MPSolver</a> enforcing: range.lower_bound() <= range.linear_expr() <= range.upper_bound() <ahref="classoperations__research_1_1MPSolver.html#a04cd78bd7a418107a920ca2ee7710aa7">More...</a><br/></td></tr>
<trclass="memdesc:afc5409af80c8d0d848fa354e5c8ea0b0"><tdclass="mdescLeft"> </td><tdclass="mdescRight">As above, but also names the constraint. <ahref="classoperations__research_1_1MPSolver.html#afc5409af80c8d0d848fa354e5c8ea0b0">More...</a><br/></td></tr>
<trclass="memdesc:a5004489a36bc1393efa043044a63732f"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns the objective object. <ahref="classoperations__research_1_1MPSolver.html#a5004489a36bc1393efa043044a63732f">More...</a><br/></td></tr>
<trclass="memdesc:a9f55f5e7a62b45961982063ebc1e9945"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Solves the problem using default parameter values. <ahref="classoperations__research_1_1MPSolver.html#a9f55f5e7a62b45961982063ebc1e9945">More...</a><br/></td></tr>
<trclass="memdesc:aaa2bb34f1712b9d7c36d75b1ec704563"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Solves the problem using the specified parameter values. <ahref="classoperations__research_1_1MPSolver.html#aaa2bb34f1712b9d7c36d75b1ec704563">More...</a><br/></td></tr>
<trclass="memdesc:aaa766a9aa802903bf7a6e5b8fb82c70c"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Writes the model using the solver internal write function. <ahref="classoperations__research_1_1MPSolver.html#aaa766a9aa802903bf7a6e5b8fb82c70c">More...</a><br/></td></tr>
<trclass="memdesc:ab17a7a859c6e429296e55570c06337cf"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Advanced usage: compute the "activities" of all constraints, which are the sums of their linear terms. <ahref="classoperations__research_1_1MPSolver.html#ab17a7a859c6e429296e55570c06337cf">More...</a><br/></td></tr>
<trclass="memdesc:a2c50b77c283c82d632f0dc605ceca3c3"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Advanced usage: Verifies the <em>correctness</em> of the solution. <ahref="classoperations__research_1_1MPSolver.html#a2c50b77c283c82d632f0dc605ceca3c3">More...</a><br/></td></tr>
<trclass="memdesc:a372de693ad40b3f42839c8ec6ac845f4"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Advanced usage: resets extracted model to solve from scratch. <ahref="classoperations__research_1_1MPSolver.html#a372de693ad40b3f42839c8ec6ac845f4">More...</a><br/></td></tr>
<trclass="memdesc:ac75b700ead5ff5d0944b5161e6dac9e8"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Interrupts the <aclass="el"href="classoperations__research_1_1MPSolver.html#a9f55f5e7a62b45961982063ebc1e9945"title="Solves the problem using default parameter values.">Solve()</a> execution to terminate processing if possible. <ahref="classoperations__research_1_1MPSolver.html#ac75b700ead5ff5d0944b5161e6dac9e8">More...</a><br/></td></tr>
<trclass="memdesc:ab0f83070e72cee887e874382ee6d6958"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Loads model from protocol buffer. <ahref="classoperations__research_1_1MPSolver.html#ab0f83070e72cee887e874382ee6d6958">More...</a><br/></td></tr>
<trclass="memdesc:ae74ce5ecb0dd3b4bcddb31bd59da7089"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Loads model from protocol buffer. <ahref="classoperations__research_1_1MPSolver.html#ae74ce5ecb0dd3b4bcddb31bd59da7089">More...</a><br/></td></tr>
<trclass="memdesc:a018794097e44ee8189380eef2b0f267f"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Encodes the current solution in a solution response protocol buffer. <ahref="classoperations__research_1_1MPSolver.html#a018794097e44ee8189380eef2b0f267f">More...</a><br/></td></tr>
<trclass="memdesc:a880227c1bbe5a1a2a21796a947804615"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Exports model to protocol buffer. <ahref="classoperations__research_1_1MPSolver.html#a880227c1bbe5a1a2a21796a947804615">More...</a><br/></td></tr>
<trclass="memdesc:a682a2933267dcfca8c5ba919406d7269"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Load a solution encoded in a protocol buffer onto this solver for easy access via the <aclass="el"href="classoperations__research_1_1MPSolver.html"title="This mathematical programming (MP) solver class is the main class though which users build and solve ...">MPSolver</a> interface. <ahref="classoperations__research_1_1MPSolver.html#a682a2933267dcfca8c5ba919406d7269">More...</a><br/></td></tr>
<trclass="memdesc:ae9513c0aac7da800987dd6bd053c929d"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Resets values of out of bound variables to the corresponding bound and returns an error if any of the variables have NaN value. <ahref="classoperations__research_1_1MPSolver.html#ae9513c0aac7da800987dd6bd053c929d">More...</a><br/></td></tr>
<trclass="memdesc:aa9a00625dd56e64b32c97b95445a1b9c"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Shortcuts to the homonymous MPModelProtoExporter methods, via exporting to a <aclass="el"href="classoperations__research_1_1MPModelProto.html">MPModelProto</a> with <aclass="el"href="classoperations__research_1_1MPSolver.html#a880227c1bbe5a1a2a21796a947804615"title="Exports model to protocol buffer.">ExportModelToProto()</a> (see above). <ahref="classoperations__research_1_1MPSolver.html#aa9a00625dd56e64b32c97b95445a1b9c">More...</a><br/></td></tr>
<trclass="memdesc:a9d0b53fb310c467e251ddbb25d499082"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Sets the number of threads to use by the underlying solver. <ahref="classoperations__research_1_1MPSolver.html#a9d0b53fb310c467e251ddbb25d499082">More...</a><br/></td></tr>
<trclass="memdesc:a8eb213aafa3773dfb6a05d184e61bb8a"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns the number of threads to be used during solve. <ahref="classoperations__research_1_1MPSolver.html#a8eb213aafa3773dfb6a05d184e61bb8a">More...</a><br/></td></tr>
<trclass="memdesc:a77083241e8bdb93b619c7b9feaf82dec"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Advanced usage: pass solver specific parameters in text format. <ahref="classoperations__research_1_1MPSolver.html#a77083241e8bdb93b619c7b9feaf82dec">More...</a><br/></td></tr>
<trclass="memdesc:a4bf4b01cb836a567c90aeeea374ca2a2"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Sets a hint for solution. <ahref="classoperations__research_1_1MPSolver.html#a4bf4b01cb836a567c90aeeea374ca2a2">More...</a><br/></td></tr>
<trclass="memdesc:ab32654406932f9a6afcf44c4d5a143d2"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Controls (or queries) the amount of output produced by the underlying solver. <ahref="classoperations__research_1_1MPSolver.html#ab32654406932f9a6afcf44c4d5a143d2">More...</a><br/></td></tr>
<trclass="memdesc:a8f94769e8f7f3e051ba504be9ed1fa6f"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns the number of simplex iterations. <ahref="classoperations__research_1_1MPSolver.html#a8f94769e8f7f3e051ba504be9ed1fa6f">More...</a><br/></td></tr>
<trclass="memdesc:a51ae17fc48ac80f494d7ed2202d61f29"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns the number of branch-and-bound nodes evaluated during the solve. <ahref="classoperations__research_1_1MPSolver.html#a51ae17fc48ac80f494d7ed2202d61f29">More...</a><br/></td></tr>
<trclass="memdesc:a858f72e8c0c03339c8d797d41a6fd4b8"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns a string describing the underlying solver and its version. <ahref="classoperations__research_1_1MPSolver.html#a858f72e8c0c03339c8d797d41a6fd4b8">More...</a><br/></td></tr>
<trclass="memdesc:a4eef77bb51bde41e69bed87ea44b86e1"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Advanced usage: computes the exact condition number of the current scaled basis: L1norm(B) * L1norm(inverse(B)), where B is the scaled basis. <ahref="classoperations__research_1_1MPSolver.html#a4eef77bb51bde41e69bed87ea44b86e1">More...</a><br/></td></tr>
<trclass="memdesc:a18daa488abaa904f23c8f74158290883"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Some solvers (MIP only, not LP) can produce multiple solutions to the problem. <ahref="classoperations__research_1_1MPSolver.html#a18daa488abaa904f23c8f74158290883">More...</a><br/></td></tr>
<trclass="memdesc:af63f7de45a05eb7439a7a1c9ca594fd8"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Whether the given problem type is supported (this will depend on the targets that you linked). <ahref="classoperations__research_1_1MPSolver.html#af63f7de45a05eb7439a7a1c9ca594fd8">More...</a><br/></td></tr>
<trclass="memdesc:a13350b0e0b8b4b2571b6088895f08ab1"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Parses the name of the solver. <ahref="classoperations__research_1_1MPSolver.html#a13350b0e0b8b4b2571b6088895f08ab1">More...</a><br/></td></tr>
<trclass="memdesc:a99ad12b13903108544b594819a65b793"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Solves the model encoded by a <aclass="el"href="classoperations__research_1_1MPModelRequest.html">MPModelRequest</a> protocol buffer and fills the solution encoded as a <aclass="el"href="classoperations__research_1_1MPSolutionResponse.html">MPSolutionResponse</a>. <ahref="classoperations__research_1_1MPSolver.html#a99ad12b13903108544b594819a65b793">More...</a><br/></td></tr>
<pclass="definition">Definition at line <aclass="el"href="linear__solver_8h_source.html#l00611">611</a> of file <aclass="el"href="linear__solver_8h_source.html">linear_solver.h</a>.</p>
<tr><tdclass="fieldname"><aid="a76c87990aabadd148304b95332a60ff8aa12b397b225ca43d143085b619706e18"></a>SAT_INTEGER_PROGRAMMING </td><tdclass="fielddoc"><p>SAT based solver (requires only integer and Boolean variables). </p>
<p>If you pass it mixed integer problems, it will scale coefficients to integer values, and solve continuous variables as integral variables. </p>
<pclass="definition">Definition at line <aclass="el"href="linear__solver_8h_source.html#l00181">181</a> of file <aclass="el"href="linear__solver_8h_source.html">linear_solver.h</a>.</p>
<p>The straightforward translation to homonymous enum values of MPSolverResponseStatus (see ./linear_solver.proto) is guaranteed by ./enum_consistency_test.cc, you may rely on it. </p>
<tr><tdclass="fieldname"><aid="a573d479910e373f5d771d303e440587da03f919221217f95d21a593a7120165e1"></a>FEASIBLE </td><tdclass="fielddoc"><p>feasible, or stopped by limit. </p>
<tr><tdclass="fieldname"><aid="a573d479910e373f5d771d303e440587dadd7ccc352d727224d39519584ed37cd7"></a>ABNORMAL </td><tdclass="fielddoc"><p>abnormal, i.e., error of some kind. </p>
<tr><tdclass="fieldname"><aid="a573d479910e373f5d771d303e440587dae071e79c23f061c9dd00ee09519a0031"></a>MODEL_INVALID </td><tdclass="fielddoc"><p>the model is trivially invalid (NaN coefficients, etc). </p>
<tr><tdclass="fieldname"><aid="a573d479910e373f5d771d303e440587da0e6873a155f86a4695f463bf8601d05f"></a>NOT_SOLVED </td><tdclass="fielddoc"><p>not been solved yet. </p>
<pclass="definition">Definition at line <aclass="el"href="linear__solver_8h_source.html#l00402">402</a> of file <aclass="el"href="linear__solver_8h_source.html">linear_solver.h</a>.</p>
<p>Clears the objective (including the optimization direction), all variables and constraints. </p>
<p>All the other properties of the <aclass="el"href="classoperations__research_1_1MPSolver.html"title="This mathematical programming (MP) solver class is the main class though which users build and solve ...">MPSolver</a> (like the time limit) are kept untouched. </p>
<p>The activities are returned in the same order as <aclass="el"href="classoperations__research_1_1MPSolver.html#a5ff11cd513c803ba3f75f2f672f1cf6f"title="Returns the array of constraints handled by the MPSolver.">constraints()</a>, which is the order in which constraints were added; but you can also use <aclass="el"href="classoperations__research_1_1MPConstraint.html#acca41811e8aaab0112b987749c0ecb93"title="Returns the index of the constraint in the MPSolver::constraints_.">MPConstraint::index()</a> to get a constraint's index. </p>
<p>Advanced usage: computes the exact condition number of the current scaled basis: L1norm(B) * L1norm(inverse(B)), where B is the scaled basis. </p>
<p>This method requires that a basis exists: it should be called after Solve. It is only available for continuous problems. It is implemented for GLPK but not CLP because CLP does not provide the API for doing it.</p>
<p>The condition number measures how well the constraint matrix is conditioned and can be used to predict whether numerical issues will arise during the solve: the model is declared infeasible whereas it is feasible (or vice-versa), the solution obtained is not optimal or violates some constraints, the resolution is slow because of repeated singularities.</p>
<p>The rule of thumb to interpret the condition number kappa is:</p><ul>
<li>o kappa <= 1e7: virtually no chance of numerical issues</li>
<li>o 1e7 < kappa <= 1e10: small chance of numerical issues</li>
<li>o 1e10 < kappa <= 1e13: medium chance of numerical issues</li>
<li>o kappa > 1e13: high chance of numerical issues</li>
</ul>
<p>The computation of the condition number depends on the quality of the LU decomposition, so it is not very accurate when the matrix is ill conditioned. </p>
<p>Returns the array of constraints handled by the <aclass="el"href="classoperations__research_1_1MPSolver.html"title="This mathematical programming (MP) solver class is the main class though which users build and solve ...">MPSolver</a>. </p>
<p>They are listed in the order in which they were created. </p>
<pclass="definition">Definition at line <aclass="el"href="linear__solver_8h_source.html#l00343">343</a> of file <aclass="el"href="linear__solver_8h_source.html">linear_solver.h</a>.</p>
<pclass="definition">Definition at line <aclass="el"href="linear__solver_8h_source.html#l00663">663</a> of file <aclass="el"href="linear__solver_8h_source.html">linear_solver.h</a>.</p>
<p>Shortcuts to the homonymous MPModelProtoExporter methods, via exporting to a <aclass="el"href="classoperations__research_1_1MPModelProto.html">MPModelProto</a> with <aclass="el"href="classoperations__research_1_1MPSolver.html#a880227c1bbe5a1a2a21796a947804615"title="Exports model to protocol buffer.">ExportModelToProto()</a> (see above). </p>
<pclass="definition">Definition at line <aclass="el"href="linear__solver_8h_source.html#l00579">579</a> of file <aclass="el"href="linear__solver_8h_source.html">linear_solver.h</a>.</p>
<pclass="definition">Definition at line <aclass="el"href="linear__solver_8h_source.html#l00588">588</a> of file <aclass="el"href="linear__solver_8h_source.html">linear_solver.h</a>.</p>
<p>You can use -<aclass="el"href="classoperations__research_1_1MPSolver.html#a9655632a7a05d89fc1562459b26d7955"title="Infinity.">MPSolver::infinity()</a> for negative infinity. </p>
<pclass="definition">Definition at line <aclass="el"href="linear__solver_8h_source.html#l00639">639</a> of file <aclass="el"href="linear__solver_8h_source.html">linear_solver.h</a>.</p>
<p>Interrupts the <aclass="el"href="classoperations__research_1_1MPSolver.html#a9f55f5e7a62b45961982063ebc1e9945"title="Solves the problem using default parameter values.">Solve()</a> execution to terminate processing if possible. </p>
<p>If the underlying interface supports interruption; it does that and returns true regardless of whether there's an ongoing <aclass="el"href="classoperations__research_1_1MPSolver.html#a9f55f5e7a62b45961982063ebc1e9945"title="Solves the problem using default parameter values.">Solve()</a> or not. The <aclass="el"href="classoperations__research_1_1MPSolver.html#a9f55f5e7a62b45961982063ebc1e9945"title="Solves the problem using default parameter values.">Solve()</a> call may still linger for a while depending on the conditions. If interruption is not supported; returns false and does nothing. </p>
<p>Returns MPSOLVER_MODEL_IS_VALID if the model is valid, and another status otherwise (currently only MPSOLVER_MODEL_INVALID and MPSOLVER_INFEASIBLE). If the model isn't valid, populates "error_message". </p>
<p>The same as above, except that the loading keeps original variable and constraint names. Caller should make sure that all variable names and constraint names are unique, respectively. </p>
<p>Load a solution encoded in a protocol buffer onto this solver for easy access via the <aclass="el"href="classoperations__research_1_1MPSolver.html"title="This mathematical programming (MP) solver class is the main class though which users build and solve ...">MPSolver</a> interface. </p>
<p>IMPORTANT: This may only be used in conjunction with ExportModel(), following this example:</p>
<p>Note: the objective value isn't checked. You can use <aclass="el"href="classoperations__research_1_1MPSolver.html#a2c50b77c283c82d632f0dc605ceca3c3"title="Advanced usage: Verifies the correctness of the solution.">VerifySolution()</a> for that. </p>
<p>Looks up a constraint by name, and returns nullptr if it does not exist. </p>
<p>The first call has a O(n) complexity, as the constraint name index is lazily created upon first use. Will crash if constraint names are not unique. </p>
<p>Looks up a variable by name, and returns nullptr if it does not exist. </p>
<p>The first call has a O(n) complexity, as the variable name index is lazily created upon first use. Will crash if variable names are not unique. </p>
<p>Creates a constraint owned by <aclass="el"href="classoperations__research_1_1MPSolver.html"title="This mathematical programming (MP) solver class is the main class though which users build and solve ...">MPSolver</a> enforcing: range.lower_bound() <= range.linear_expr() <= range.upper_bound() </p>
<p>Creates a linear constraint with given bounds. </p>
<p>Bounds can be finite or +/- <aclass="el"href="classoperations__research_1_1MPSolver.html#a9655632a7a05d89fc1562459b26d7955"title="Infinity.">MPSolver::infinity()</a>. The <aclass="el"href="classoperations__research_1_1MPSolver.html"title="This mathematical programming (MP) solver class is the main class though which users build and solve ...">MPSolver</a> class assumes ownership of the constraint.</p>
<dlclass="section return"><dt>Returns</dt><dd>a pointer to the newly created constraint. </dd></dl>
<p>Bounds can be finite or +/- <aclass="el"href="classoperations__research_1_1MPSolver.html#a9655632a7a05d89fc1562459b26d7955"title="Infinity.">MPSolver::infinity()</a>. The <aclass="el"href="classoperations__research_1_1MPSolver.html"title="This mathematical programming (MP) solver class is the main class though which users build and solve ...">MPSolver</a> owns the variable (i.e. the returned pointer is borrowed). Variable names are optional. If you give an empty name, name() will auto-generate one for you upon request. </p>
<p>All variables created have the same bounds and integrality requirement. If nb <= 0, no variables are created, the function crashes in non-opt mode.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir"></td><tdclass="paramname">nb</td><td>the number of variables to create. </td></tr>
<tr><tdclass="paramdir"></td><tdclass="paramname">lb</td><td>the lower bound of created variables </td></tr>
<tr><tdclass="paramdir"></td><tdclass="paramname">ub</td><td>the upper bound of created variables </td></tr>
<tr><tdclass="paramdir"></td><tdclass="paramname">integer</td><td>controls whether the created variables are continuous or integral. </td></tr>
<tr><tdclass="paramdir"></td><tdclass="paramname">name_prefix</td><td>the prefix of the variable names. Variables are named name_prefix0, name_prefix1, ... </td></tr>
<tr><tdclass="paramdir">[out]</td><tdclass="paramname">vars</td><td>the vector of variables to fill with variables. </td></tr>
<pclass="definition">Definition at line <aclass="el"href="linear__solver_8h_source.html#l00394">394</a> of file <aclass="el"href="linear__solver_8h_source.html">linear_solver.h</a>.</p>
<pclass="definition">Definition at line <aclass="el"href="linear__solver_8h_source.html#l00254">254</a> of file <aclass="el"href="linear__solver_8h_source.html">linear_solver.h</a>.</p>
<p>Some solvers (MIP only, not LP) can produce multiple solutions to the problem. </p>
<p>Returns true when another solution is available, and updates the MPVariable* objects to make the new solution queryable. Call only after calling solve.</p>
<p>The optimality properties of the additional solutions found, and whether or not the solver computes them ahead of time or when <aclass="el"href="classoperations__research_1_1MPSolver.html#a18daa488abaa904f23c8f74158290883"title="Some solvers (MIP only, not LP) can produce multiple solutions to the problem.">NextSolution()</a> is called is solver specific.</p>
<p>As of 2018-08-09, only Gurobi supports <aclass="el"href="classoperations__research_1_1MPSolver.html#a18daa488abaa904f23c8f74158290883"title="Some solvers (MIP only, not LP) can produce multiple solutions to the problem.">NextSolution()</a>, see linear_solver_underlying_gurobi_test for an example of how to configure Gurobi for this purpose. The other solvers return false unconditionally. </p>
<pclass="definition">Definition at line <aclass="el"href="linear__solver_8h_source.html#l00336">336</a> of file <aclass="el"href="linear__solver_8h_source.html">linear_solver.h</a>.</p>
<pclass="definition">Definition at line <aclass="el"href="linear__solver_8h_source.html#l00271">271</a> of file <aclass="el"href="linear__solver_8h_source.html">linear_solver.h</a>.</p>
<p>Note that the objective is owned by the solver, and is initialized to its default value (see the <aclass="el"href="classoperations__research_1_1MPObjective.html"title="A class to express a linear objective.">MPObjective</a> class below) at construction. </p>
<pclass="definition">Definition at line <aclass="el"href="linear__solver_8h_source.html#l00391">391</a> of file <aclass="el"href="linear__solver_8h_source.html">linear_solver.h</a>.</p>
<p>Controls (or queries) the amount of output produced by the underlying solver. </p>
<p>The output can surface to LOGs, or to stdout or stderr, depending on the implementation. The amount of output will greatly vary with each implementation and each problem.</p>
<pclass="definition">Definition at line <aclass="el"href="linear__solver_8h_source.html#l00259">259</a> of file <aclass="el"href="linear__solver_8h_source.html">linear_solver.h</a>.</p>
<p>This won't reset the parameters that were set with <aclass="el"href="classoperations__research_1_1MPSolver.html#a77083241e8bdb93b619c7b9feaf82dec"title="Advanced usage: pass solver specific parameters in text format.">SetSolverSpecificParametersAsString()</a> or <aclass="el"href="classoperations__research_1_1MPSolver.html#ac76284cc2e7493610853f6e8ff1746d2">set_time_limit()</a> or even clear the linear program. It will just make sure that next <aclass="el"href="classoperations__research_1_1MPSolver.html#a9f55f5e7a62b45961982063ebc1e9945"title="Solves the problem using default parameter values.">Solve()</a> will be as if everything was reconstructed from scratch. </p>
<pclass="definition">Definition at line <aclass="el"href="linear__solver_8h_source.html#l00744">744</a> of file <aclass="el"href="linear__solver_8h_source.html">linear_solver.h</a>.</p>
<p>If a feasible or almost-feasible solution to the problem is already known, it may be helpful to pass it to the solver so that it can be used. A solver that supports this feature will try to use this information to create its initial feasible solution.</p>
<p>Note: It may not always be faster to give a hint like this to the solver. There is also no guarantee that the solver will use this hint or try to return a solution "close" to this assignment in case of multiple optimal solutions. </p>
<p>Returns OkStatus if the operation was successful. num_threads must be equal to or greater than 1. Note that the behaviour of this call depends on the underlying solver. E.g., it may set the exact number of threads or the max number of threads (check the solver's interface implementation for details). Also, some solvers may not (yet) support this function, but still enable multi-threading via <aclass="el"href="classoperations__research_1_1MPSolver.html#a77083241e8bdb93b619c7b9feaf82dec"title="Advanced usage: pass solver specific parameters in text format.">SetSolverSpecificParametersAsString()</a>. </p>
<p>The format is solver-specific and is the same as the corresponding solver configuration file format. Returns true if the operation was successful. </p>
<p>This function takes a starting basis to be used in the next LP <aclass="el"href="classoperations__research_1_1MPSolver.html#a9f55f5e7a62b45961982063ebc1e9945"title="Solves the problem using default parameter values.">Solve()</a> call. The statuses of a current solution can be retrieved via the basis_status() function of a <aclass="el"href="classoperations__research_1_1MPVariable.html"title="The class for variables of a Mathematical Programming (MP) model.">MPVariable</a> or a <aclass="el"href="classoperations__research_1_1MPConstraint.html"title="The class for constraints of a Mathematical Programming (MP) model.">MPConstraint</a>.</p>
<p>WARNING: With Glop, you should disable presolve when using this because this information will not be modified in sync with the presolve and will likely not mean much on the presolved problem. </p>
<pclass="definition">Definition at line <aclass="el"href="linear__solver_8h_source.html#l00658">658</a> of file <aclass="el"href="linear__solver_8h_source.html">linear_solver.h</a>.</p>
<p>Solves the model encoded by a <aclass="el"href="classoperations__research_1_1MPModelRequest.html">MPModelRequest</a> protocol buffer and fills the solution encoded as a <aclass="el"href="classoperations__research_1_1MPSolutionResponse.html">MPSolutionResponse</a>. </p>
<p>Note(user): This creates a temporary <aclass="el"href="classoperations__research_1_1MPSolver.html"title="This mathematical programming (MP) solver class is the main class though which users build and solve ...">MPSolver</a> and destroys it at the end. If you want to keep the <aclass="el"href="classoperations__research_1_1MPSolver.html"title="This mathematical programming (MP) solver class is the main class though which users build and solve ...">MPSolver</a> alive (for debugging, or for incremental solving), you should write another version of this function that creates the <aclass="el"href="classoperations__research_1_1MPSolver.html"title="This mathematical programming (MP) solver class is the main class though which users build and solve ...">MPSolver</a> object on the heap and returns it. </p>
<pclass="definition">Definition at line <aclass="el"href="linear__solver_8h_source.html#l00739">739</a> of file <aclass="el"href="linear__solver_8h_source.html">linear_solver.h</a>.</p>
<pclass="definition">Definition at line <aclass="el"href="linear__solver_8h_source.html#l00749">749</a> of file <aclass="el"href="linear__solver_8h_source.html">linear_solver.h</a>.</p>
<pclass="definition">Definition at line <aclass="el"href="linear__solver_8h_source.html#l00657">657</a> of file <aclass="el"href="linear__solver_8h_source.html">linear_solver.h</a>.</p>
<p>Advanced usage: returns the underlying solver. </p>
<p>Returns the underlying solver so that the user can use solver-specific features or features that are not exposed in the simple API of <aclass="el"href="classoperations__research_1_1MPSolver.html"title="This mathematical programming (MP) solver class is the main class though which users build and solve ...">MPSolver</a>. This method is for advanced users, use at your own risk! In particular, if you modify the model or the solution by accessing the underlying solver directly, then the underlying solver will be out of sync with the information kept in the wrapper (<aclass="el"href="classoperations__research_1_1MPSolver.html"title="This mathematical programming (MP) solver class is the main class though which users build and solve ...">MPSolver</a>, <aclass="el"href="classoperations__research_1_1MPVariable.html"title="The class for variables of a Mathematical Programming (MP) model.">MPVariable</a>, <aclass="el"href="classoperations__research_1_1MPConstraint.html"title="The class for constraints of a Mathematical Programming (MP) model.">MPConstraint</a>, <aclass="el"href="classoperations__research_1_1MPObjective.html"title="A class to express a linear objective.">MPObjective</a>). You need to cast the void* returned back to its original type that depends on the interface (CBC: OsiClpSolverInterface*, CLP: ClpSimplex*, GLPK: glp_prob*, SCIP: SCIP*). </p>
<p>Returns the array of variables handled by the <aclass="el"href="classoperations__research_1_1MPSolver.html"title="This mathematical programming (MP) solver class is the main class though which users build and solve ...">MPSolver</a>. </p>
<p>(They are listed in the order in which they were created.) </p>
<pclass="definition">Definition at line <aclass="el"href="linear__solver_8h_source.html#l00277">277</a> of file <aclass="el"href="linear__solver_8h_source.html">linear_solver.h</a>.</p>
<p>Advanced usage: Verifies the <em>correctness</em> of the solution. </p>
<p>It verifies that all variables must be within their domains, all constraints must be satisfied, and the reported objective value must be accurate.</p>
<li>This can only be called after <aclass="el"href="classoperations__research_1_1MPSolver.html#a9f55f5e7a62b45961982063ebc1e9945"title="Solves the problem using default parameter values.">Solve()</a> was called.</li>
<li>If "tolerance" is negative, it will be set to <aclass="el"href="classoperations__research_1_1MPSolver.html#a9655632a7a05d89fc1562459b26d7955"title="Infinity.">infinity()</a>.</li>
<pclass="definition">Definition at line <aclass="el"href="linear__solver_8h_source.html#l00754">754</a> of file <aclass="el"href="linear__solver_8h_source.html">linear_solver.h</a>.</p>
<divclass="ttc"id="aclassoperations__research_1_1MPSolver_html_a5ff11cd513c803ba3f75f2f672f1cf6f"><divclass="ttname"><ahref="classoperations__research_1_1MPSolver.html#a5ff11cd513c803ba3f75f2f672f1cf6f">operations_research::MPSolver::constraints</a></div><divclass="ttdeci">const std::vector< MPConstraint * >& constraints() const</div><divclass="ttdoc">Returns the array of constraints handled by the MPSolver.</div><divclass="ttdef"><b>Definition:</b><ahref="linear__solver_8h_source.html#l00343">linear_solver.h:343</a></div></div>
<divclass="ttc"id="aclassoperations__research_1_1MPSolver_html_acdb0e5753d20e4d3ece49a0451d24c4f"><divclass="ttname"><ahref="classoperations__research_1_1MPSolver.html#acdb0e5753d20e4d3ece49a0451d24c4f">operations_research::MPSolver::MPSolver</a></div><divclass="ttdeci">MPSolver(const std::string &name, OptimizationProblemType problem_type)</div><divclass="ttdoc">Create a solver with the given name and underlying solver backend.</div></div>
<divclass="ttc"id="aclassoperations__research_1_1MPSolver_html_a34caaebb9e2b365ef0ec449e870f5b5d"><divclass="ttname"><ahref="classoperations__research_1_1MPSolver.html#a34caaebb9e2b365ef0ec449e870f5b5d">operations_research::MPSolver::variables</a></div><divclass="ttdeci">const std::vector< MPVariable * >& variables() const</div><divclass="ttdoc">Returns the array of variables handled by the MPSolver.</div><divclass="ttdef"><b>Definition:</b><ahref="linear__solver_8h_source.html#l00277">linear_solver.h:277</a></div></div>
<divclass="ttc"id="aclassoperations__research_1_1MPSolver_html_a99ad12b13903108544b594819a65b793"><divclass="ttname"><ahref="classoperations__research_1_1MPSolver.html#a99ad12b13903108544b594819a65b793">operations_research::MPSolver::SolveWithProto</a></div><divclass="ttdeci">static void SolveWithProto(const MPModelRequest &model_request, MPSolutionResponse *response)</div><divclass="ttdoc">Solves the model encoded by a MPModelRequest protocol buffer and fills the solution encoded as a MPSo...</div></div>