KSolution

class KSolution : public KAutoExternalObject<KSolution, KSolution_I>

This class represents a solution of a KProblem.

Example :

KProblem p(...);
KSolver solver(p);
solver.solve();
KSolution sol = p.getSolution();

See

KProblem

Since

2016.1

Public Functions

KSolution()

Constructor.

int getValue(KIntVar &intVar) const

Return the instantiation of a variable in the solution.

double getValue(KFloatVar &floatVar) const

Return the instantiation of a variable in the solution.

double getValue(KNumVar &numVar) const

Return the instantiation of the variable in the solution.

double getObjectiveValue() const

Return the objective value of the solution if applicable.

virtual void print() const

Pretty print the solution.