![]() |
Google OR-Tools v9.12
a fast and portable software suite for combinatorial optimization
|
#include <integral_solver.h>
Public Member Functions | |
IntegralSolver () | |
IntegralSolver (const IntegralSolver &)=delete | |
This type is neither copyable nor movable. | |
IntegralSolver & | operator= (const IntegralSolver &)=delete |
~IntegralSolver ()=default | |
void | SetParameters (const BopParameters ¶meters) |
BopParameters | parameters () const |
ABSL_MUST_USE_RESULT BopSolveStatus | Solve (const glop::LinearProgram &linear_problem) |
Solves the given linear program and returns the solve status. | |
ABSL_MUST_USE_RESULT BopSolveStatus | SolveWithTimeLimit (const glop::LinearProgram &linear_problem, TimeLimit *time_limit) |
ABSL_MUST_USE_RESULT BopSolveStatus | Solve (const glop::LinearProgram &linear_problem, const glop::DenseRow &user_provided_initial_solution) |
ABSL_MUST_USE_RESULT BopSolveStatus | SolveWithTimeLimit (const glop::LinearProgram &linear_problem, const glop::DenseRow &user_provided_initial_solution, TimeLimit *time_limit) |
glop::Fractional | objective_value () const |
Returns the objective value of the solution with its offset. | |
glop::Fractional | best_bound () const |
Returns the best bound found so far. | |
const glop::DenseRow & | variable_values () const |
This class implements an Integer Programming solver, i.e. the solver solves problems with both integral and boolean variables, linear constraint and linear objective function.
Definition at line 31 of file integral_solver.h.
operations_research::bop::IntegralSolver::IntegralSolver | ( | ) |
Definition at line 1076 of file integral_solver.cc.
|
delete |
This type is neither copyable nor movable.
|
default |
|
inline |
Returns the best bound found so far.
Definition at line 69 of file integral_solver.h.
|
inline |
Returns the objective value of the solution with its offset.
Definition at line 66 of file integral_solver.h.
|
delete |
|
inline |
Definition at line 46 of file integral_solver.h.
|
inline |
Sets the solver parameters. See the proto for an extensive documentation.
Definition at line 43 of file integral_solver.h.
BopSolveStatus operations_research::bop::IntegralSolver::Solve | ( | const glop::LinearProgram & | linear_problem | ) |
Solves the given linear program and returns the solve status.
Definition at line 1079 of file integral_solver.cc.
BopSolveStatus operations_research::bop::IntegralSolver::Solve | ( | const glop::LinearProgram & | linear_problem, |
const glop::DenseRow & | user_provided_initial_solution ) |
Same as Solve() but starts from the given solution.
Definition at line 1088 of file integral_solver.cc.
BopSolveStatus operations_research::bop::IntegralSolver::SolveWithTimeLimit | ( | const glop::LinearProgram & | linear_problem, |
const glop::DenseRow & | user_provided_initial_solution, | ||
TimeLimit * | time_limit ) |
We make a copy so that we can clear it if the presolve is active.
Some code path requires to copy the given linear_problem. When this happens, we will simply change the target of this pointer.
The problem can be decomposed. Solve each sub-problem and aggregate the result.
Aggregate results.
Definition at line 1097 of file integral_solver.cc.
BopSolveStatus operations_research::bop::IntegralSolver::SolveWithTimeLimit | ( | const glop::LinearProgram & | linear_problem, |
TimeLimit * | time_limit ) |
Definition at line 1083 of file integral_solver.cc.
|
inline |
Returns the solution values. Note that the values only make sense when a solution is found.
Definition at line 73 of file integral_solver.h.