Returns the Integer solution value of a variable in the current rounded
solution. These functions should only be called when HasIntegerSolution()
is true.
Set the coefficient of the variable in the objective. Calling it twice will
overwrite the previous value. Note that this doesn't set the objective
coefficient if the variable doesn't appear in any constraints. So this has
to be called after all the constraints are added.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-08-06 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eFeasibilityPump\u003c/code\u003e class in C++ is a heuristic for finding feasible solutions to Mixed-Integer Programs (MIPs).\u003c/p\u003e\n"],["\u003cp\u003eIt works by iteratively solving a Linear Program (LP) relaxation and rounding the solution to obtain an integer solution.\u003c/p\u003e\n"],["\u003cp\u003eUsers can add linear constraints, set objective coefficients, and control the maximum number of iterations.\u003c/p\u003e\n"],["\u003cp\u003eThe class provides methods to access the LP and integer solutions, their objective values, and feasibility status.\u003c/p\u003e\n"],["\u003cp\u003eThis documentation automatically generated from the Google OR-Tools library provides an overview of the class and its methods with links to the source code.\u003c/p\u003e\n"]]],["The `FeasibilityPump` class in C++ manages linear constraints and their solutions. Key actions include adding linear constraints via `AddLinearConstraint`, and setting objective coefficients using `SetObjectiveCoefficient`. Methods retrieve solution data, such as `GetLPSolutionValue` and `GetIntegerSolutionValue`. `HasLPSolution` and `HasIntegerSolution` check the availability of solutions. The class can also determine solution properties with `LPSolutionIsInteger`, `IntegerSolutionIsFeasible`, and check for model feasibility using `Solve`. `SetMaxFPIterations` lets you set a maximum number of iterations.\n"],null,["C++ Reference: class FeasibilityPump\n\n\nNote: This documentation is automatically generated.\n\n| Method ||\n|--------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [`AddLinearConstraint`](https://github.com/google/or-tools/blob/v9.4/ortools/sat/feasibility_pump.h#L54) | Return type: `void ` Arguments: `const LinearConstraint& ct` Add a new linear constraint to this LP. |\n| [`FeasibilityPump`](https://github.com/google/or-tools/blob/v9.4/ortools/sat/feasibility_pump.h#L44) | Return type: `explicit ` Arguments: `Model* model` \u003cbr /\u003e |\n| [`~FeasibilityPump`](https://github.com/google/or-tools/blob/v9.4/ortools/sat/feasibility_pump.h#L45) | \u003cbr /\u003e |\n| [`GetIntegerSolutionValue`](https://github.com/google/or-tools/blob/v9.4/ortools/sat/feasibility_pump.h#L80) | Return type: `int64_t ` Arguments: `IntegerVariable variable` \u003cbr /\u003e |\n| [`GetLPSolutionValue`](https://github.com/google/or-tools/blob/v9.4/ortools/sat/feasibility_pump.h#L66) | Return type: `double ` Arguments: `IntegerVariable variable` \u003cbr /\u003e |\n| [`HasIntegerSolution`](https://github.com/google/or-tools/blob/v9.4/ortools/sat/feasibility_pump.h#L73) | Return type: `bool ` Returns the Integer solution value of a variable in the current rounded solution. These functions should only be called when HasIntegerSolution() is true. |\n| [`HasLPSolution`](https://github.com/google/or-tools/blob/v9.4/ortools/sat/feasibility_pump.h#L64) | Return type: `bool ` Returns the LP value of a variable in the current solution. These functions should only be called when HasSolution() is true. |\n| [`IntegerSolutionIsFeasible`](https://github.com/google/or-tools/blob/v9.4/ortools/sat/feasibility_pump.h#L77) | Return type: `bool ` \u003cbr /\u003e |\n| [`IntegerSolutionObjectiveValue`](https://github.com/google/or-tools/blob/v9.4/ortools/sat/feasibility_pump.h#L74) | Return type: `int64_t ` \u003cbr /\u003e |\n| [`LPSolutionFractionality`](https://github.com/google/or-tools/blob/v9.4/ortools/sat/feasibility_pump.h#L68) | Return type: `double ` \u003cbr /\u003e |\n| [`LPSolutionIsInteger`](https://github.com/google/or-tools/blob/v9.4/ortools/sat/feasibility_pump.h#L67) | Return type: `bool ` \u003cbr /\u003e |\n| [`LPSolutionObjectiveValue`](https://github.com/google/or-tools/blob/v9.4/ortools/sat/feasibility_pump.h#L65) | Return type: `double ` \u003cbr /\u003e |\n| [`SetMaxFPIterations`](https://github.com/google/or-tools/blob/v9.4/ortools/sat/feasibility_pump.h#L49) | Return type: `void ` Arguments: `int max_iter` \u003cbr /\u003e |\n| [`SetObjectiveCoefficient`](https://github.com/google/or-tools/blob/v9.4/ortools/sat/feasibility_pump.h#L60) | Return type: `void ` Arguments: `IntegerVariable ivar, IntegerValue coeff` Set the coefficient of the variable in the objective. Calling it twice will overwrite the previous value. Note that this doesn't set the objective coefficient if the variable doesn't appear in any constraints. So this has to be called after all the constraints are added. |\n| [`Solve`](https://github.com/google/or-tools/blob/v9.4/ortools/sat/feasibility_pump.h#L83) | Return type: `bool ` Returns false if the model is proven to be infeasible. |"]]