Package com.artelys.kalis
Class KNumLinComb
- java.lang.Object
-
- com.artelys.kalis.KConstraint
-
- com.artelys.kalis.KNumLinComb
-
public class KNumLinComb extends KConstraint
This class creates a Sum(ai.Xi) { <= , != , == } C constraint
Example :
KNumVarArray X(...); //... problem.post(2 * X[1] + 3 * X[2] + 5 * X[3] + ... + 7 * X[n] == 3); // or problem.post(2 * X[1] + 3 * X[2] + 5 * X[3] + ... + 7 * X[n] <= 3); // or problem.post(2 * X[1] + 3 * X[2] + 5 * X[3] + ... + 7 * X[n] >= 3); // or problem.post(2 * X[1] + 3 * X[2] + 5 * X[3] + ... + 7 * X[n] != 3);- Since:
- 2016.1
- See Also:
KConstraint
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classKNumLinComb.LinCombOperator
-
Field Summary
-
Fields inherited from class com.artelys.kalis.KConstraint
swigCMemOwn
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedKNumLinComb(long cPtr, boolean cMemoryOwn)KNumLinComb(KNumLinComb toCopy)Copy ConstructorKNumLinComb(java.lang.String name, KDoubleArray coeffs, KNumVarArray vars, double cste, int linCombOperator)Primary Constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddelete()protected voidfinalize()com.artelys.kalis.SWIGTYPE_p_voidgetConstraintIPtr()protected static longgetCPtr(KNumLinComb obj)-
Methods inherited from class com.artelys.kalis.KConstraint
askIfEntailed, getArity, getCopyPtr, getCPtr, getInstance, getInstanceCopyPtr, getLinearRelaxation, getLinearRelaxation, getName, getPriority, getProblem, getTag, getTypeInfo, isGetLinearRelaxationImplemented, print, print, setName, setPriority, setTag
-
-
-
-
Constructor Detail
-
KNumLinComb
protected KNumLinComb(long cPtr, boolean cMemoryOwn)
-
KNumLinComb
public KNumLinComb(java.lang.String name, KDoubleArray coeffs, KNumVarArray vars, double cste, int linCombOperator)Primary Constructor- Parameters:
name- name of the constraintcoeffs- array of coefficients for the variables in the linear combinationvars- array of variables involved in the linear combinationcste- constant in the linear combinationlinCombOperator- operator of the linear constraint {<>,<=,>=,==}
-
KNumLinComb
public KNumLinComb(KNumLinComb toCopy)
Copy Constructor
-
-
Method Detail
-
getCPtr
protected static long getCPtr(KNumLinComb obj)
-
finalize
protected void finalize()
- Overrides:
finalizein classKConstraint
-
delete
public void delete()
- Overrides:
deletein classKConstraint
-
getConstraintIPtr
public com.artelys.kalis.SWIGTYPE_p_void getConstraintIPtr()
-
-