Model.getConstrByName()

getConstrByName ( name )

Retrieve a linear constraint from its name. If multiple linear constraints have the same name, this method chooses one arbitrarily.

Arguments:

name: Name of desired constraint.

Return value:

Constraint with the specified name.

Example usage:

  c0 = model.getConstrByName("c0")