KConditionNumLinComb

class KConditionNumLinComb : public KConstraint

Conditionnal numeric linear combination constraint.

This constraint can be represented as a linear combination Sum(a_i * X_i * f(X_i)) { <= , != , == } C where the function f(X_i) is an indicator (1 or 0) function to specify.

Public Types

enum LinCombOperator

Available operators for the combination.

Values:

enumerator Equal
enumerator GreaterOrEqual
enumerator LessOrEqual

Public Functions

KConditionNumLinComb(const char *name, KDoubleArray &coeffs, KNumVarArray &vars, double cste, int linCombOperator)

Primary Constructor

Parameters
  • name – name of the constraint

  • coeffs – array of coefficients for the variables in the linear combination

  • vars – array of variables involved in the linear combination

  • cste – constant in the linear combination

  • linCombOperator – operator of the linear constraint {<=,>=,==}

KConditionNumLinComb(const KConditionNumLinComb &toCopy)

Copy Constructor.

virtual int conditionTest(int varIndex) = 0

Method to overload for indicator function.