Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
|
Incremental solve of a model. More...
#include <solve_impl.h>
Static Public Member Functions | |
static absl::StatusOr< std::unique_ptr< IncrementalSolverImpl > > | New (BaseSolverFactory solver_factory, Model *model, SolverType solver_type, const SolveInterrupter *user_canceller, bool remove_names) |
Incremental solve of a model.
Definition at line 75 of file solve_impl.h.
|
overridevirtual |
Updates the underlying solver with latest model changes and runs the computation.
Same as Solve() but compute the infeasible subsystem.
Implements operations_research::math_opt::IncrementalSolver.
Definition at line 201 of file solve_impl.cc.
|
overridevirtual |
Same as ComputeInfeasibleSubsystem() but does not update the underlying solver with the latest changes to the model.
This is an advanced API, most users should use ComputeInfeasibleSubsystem().
Implements operations_research::math_opt::IncrementalSolver.
Definition at line 243 of file solve_impl.cc.
|
static |
Creates a new incremental solve.
The user_canceller
parameter is optional.
Definition at line 152 of file solve_impl.cc.
|
overridevirtual |
Updates the underlying solver with latest model changes and runs the solve.
A Status error will be returned if inputs are invalid or there is an unexpected failure in an underlying solver or for some internal math_opt errors. Otherwise, check SolveResult::termination.reason to see if an optimal solution was found.
Memory model: the returned SolveResult owns its own memory (for solutions, solve stats, etc.), EXPECT for a pointer back to the model. As a result:
See callback.h for documentation on arguments.callback and arguments.callback_registration.
Implements operations_research::math_opt::IncrementalSolver.
Definition at line 193 of file solve_impl.cc.
|
inlineoverridevirtual |
Returns the underlying solver used.
Implements operations_research::math_opt::IncrementalSolver.
Definition at line 98 of file solve_impl.h.
|
overridevirtual |
Same as Solve() but does not update the underlying solver with the latest changes to the model.
This is an advanced API, most users should use Solve().
Implements operations_research::math_opt::IncrementalSolver.
Definition at line 236 of file solve_impl.cc.
|
overridevirtual |
Updates the model to solve.
This is an advanced API, most users should use Solve() above that does the update and before calling the solver. Calling this function is only useful for users that want to access to update data or users that need to use SolveWithoutUpdate() (which should not be common).
The returned value indicates if the update was possible or if the solver had to be recreated from scratch (which may happen when the solver does not support this specific update or any update at all). It also contains the attempted update data.
A status error will be returned if the underlying solver has an internal error.
Implements operations_research::math_opt::IncrementalSolver.
Definition at line 208 of file solve_impl.cc.