Package com.artelys.kalis
Class KSolution
- java.lang.Object
-
- com.artelys.kalis.KSolution
-
public class KSolution extends java.lang.ObjectThis class represents a solution of a KProblem.
Example :
KProblem p(...); KSolver solver(p); solver.solve(); KSolution sol = p.getSolution();- Since:
- 2016.1
- See Also:
KProblem
-
-
Field Summary
Fields Modifier and Type Field Description protected booleanswigCMemOwn
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddelete()protected voidfinalize()KSolutiongetCopyPtr()protected static longgetCPtr(KSolution obj)doublegetDblAttrib(int attrib)doublegetHashCode()intgetIntAttrib(int attrib)doublegetObjectiveValue()Return the objective value of the solution if applicabledoublegetValue(KFloatVar floatVar)Return the instantiation of a variable in the solutionintgetValue(KIntVar intVar)Return the instantiation of a variable in the solutiondoublegetValue(KNumVar numVar)Return the instantiation of the variable in the solutionbooleanhasObjective()voidprint()Pretty print the solutionvoidprint(com.artelys.kalis.SWIGTYPE_p_void ctx, com.artelys.kalis.SWIGTYPE_p_f_p_void_p_q_const__char__int pfp)voidprintProblem()voidprintResume()voidprintResume(com.artelys.kalis.SWIGTYPE_p_void ctx, com.artelys.kalis.SWIGTYPE_p_f_p_void_p_q_const__char__int pfp)voidsetAsTarget()
-
-
-
Constructor Detail
-
KSolution
protected KSolution(long cPtr, boolean cMemoryOwn)
-
KSolution
public KSolution()
Constructor
-
KSolution
public KSolution(com.artelys.kalis.SWIGTYPE_p_KSolution_I solution)
-
KSolution
public KSolution(KSolution toCopy)
-
-
Method Detail
-
getCPtr
protected static long getCPtr(KSolution obj)
-
finalize
protected void finalize()
- Overrides:
finalizein classjava.lang.Object
-
delete
public void delete()
-
getCopyPtr
public KSolution getCopyPtr()
-
getValue
public int getValue(KIntVar intVar)
Return the instantiation of a variable in the solution
-
getValue
public double getValue(KFloatVar floatVar)
Return the instantiation of a variable in the solution
-
getValue
public double getValue(KNumVar numVar)
Return the instantiation of the variable in the solution
-
getObjectiveValue
public double getObjectiveValue()
Return the objective value of the solution if applicable
-
setAsTarget
public void setAsTarget()
-
print
public void print()
Pretty print the solution
-
print
public void print(com.artelys.kalis.SWIGTYPE_p_void ctx, com.artelys.kalis.SWIGTYPE_p_f_p_void_p_q_const__char__int pfp)
-
printResume
public void printResume(com.artelys.kalis.SWIGTYPE_p_void ctx, com.artelys.kalis.SWIGTYPE_p_f_p_void_p_q_const__char__int pfp)
-
printResume
public void printResume()
-
printProblem
public void printProblem()
-
getIntAttrib
public int getIntAttrib(int attrib)
-
getDblAttrib
public double getDblAttrib(int attrib)
-
hasObjective
public boolean hasObjective()
-
getHashCode
public double getHashCode()
-
-