Package com.artelys.kalis
Class KSolution
- java.lang.Object
-
- com.artelys.kalis.KSolution
-
public class KSolution extends java.lang.Object
This 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 boolean
swigCMemOwn
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
delete()
protected void
finalize()
KSolution
getCopyPtr()
protected static long
getCPtr(KSolution obj)
double
getDblAttrib(int attrib)
double
getHashCode()
int
getIntAttrib(int attrib)
double
getObjectiveValue()
Return the objective value of the solution if applicabledouble
getValue(KFloatVar floatVar)
Return the instantiation of a variable in the solutionint
getValue(KIntVar intVar)
Return the instantiation of a variable in the solutiondouble
getValue(KNumVar numVar)
Return the instantiation of the variable in the solutionboolean
hasObjective()
void
print()
Pretty print the solutionvoid
print(com.artelys.kalis.SWIGTYPE_p_void ctx, com.artelys.kalis.SWIGTYPE_p_f_p_void_p_q_const__char__int pfp)
void
printProblem()
void
printResume()
void
printResume(com.artelys.kalis.SWIGTYPE_p_void ctx, com.artelys.kalis.SWIGTYPE_p_f_p_void_p_q_const__char__int pfp)
void
setAsTarget()
-
-
-
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:
finalize
in 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()
-
-