KLinearRelaxationSolver¶
-
class KLinearRelaxationSolver : public KRelaxationSolver¶
This class is intended as a superclass for linear relaxation solvers.
Such a solver must be provided with
a linear relaxation (KLinearRelaxation)
an objective variable (KNumVar)
a sense for optimization (KProblem::Sense).
It relies on a LP/MIP solver to provide the following information:
a value (a bound for the relaxed problem, cf method getBound())
a solution, possibly not feasible for the original problem, but which can be used to guide the search for a feasible solution
if the problem is LP, reduced costs (that can be used for instance in the “reduced cost fixing” procedure).
- Since
2016.1
Subclassed by KClpLinearRelaxationSolver, KCoinLinearRelaxationSolver, KXPRSLinearRelaxationSolver
Public Types
Public Functions
-
virtual int writeLP(const char *filename) const = 0¶
Writes the current problem to a file (in lp format).
- Parameters
filename – the path of the file to write (existing file is overwrited, if any)
- Returns
return code is reserved for future use (for now, errors are trapped by an exception)
-
virtual void generateCuts(KLinearRelaxation *relaxation) = 0¶
Cut generation