Constraint API#

class pyscipopt.Constraint#

Base class holding a pointer to corresponding SCIP_CONS

getConshdlrName()#

Return the constraint handler’s name.

Return type:

str

isActive()#

Returns True iff constraint is active in the current node.

Return type:

bool

isChecked()#

Returns True if constraint should be checked for feasibility.

Return type:

bool

isDynamic()#

Returns True if constraint is subject to aging.

Return type:

bool

isEnforced()#

Returns True if constraint should be enforced during node processing.

Return type:

bool

isInitial()#

Returns True if the relaxation of the constraint should be in the initial LP.

Return type:

bool

isKnapsack()#

Returns True if constraint is a knapsack constraint. This is a special case of a linear constraint.

Return type:

bool

isLinear()#

Returns True if constraint is linear

Return type:

bool

isLinearType()#

Returns True if constraint can be represented as a linear constraint.

Return type:

bool

isLocal()#

Returns True if constraint is only locally valid or not added to any (sub)problem.

Return type:

bool

isModifiable()#

Returns True if constraint is modifiable (subject to column generation).

Return type:

bool

isNonlinear()#

Returns True if constraint is nonlinear.

Return type:

bool

isOriginal()#

Retrieve whether the constraint belongs to the original problem.

Return type:

bool

isPropagated()#

Returns True if constraint should be propagated during node processing.

Return type:

bool

isRemovable()#

Returns True if constraint’s relaxation should be removed from the LP due to aging or cleanup.

Return type:

bool

isSeparated()#

Returns True if constraint should be separated during LP processing.

Return type:

bool

isStickingAtNode()#

Returns True if constraint is only locally valid or not added to any (sub)problem.

Return type:

bool