Column()

Column ( coeffs=None, constrs=None )

Column constructor.

Arguments:

coeffs (optional): Lists the coefficients associated with the members of constrs.

constrs (optional): Constraint or constraints that participate in expression. If constrs is a list, then coeffs must contain a list of the same length. If constrs is a single constraint, then coeffs must be a scalar.

Return value:

An expression object.

Example usage:

  constrs = model.getConstrs()

  c = Column()
  c.addTerms(3.0, constrs[0])
  model.addVar(vtype=GRB.BINARY, obj=1.0, column=c)

  model.addVar(vtype=GRB.INTEGER, column=Column(3.0, constrs[0]))

  model.addVar(obj=3.0, column=Column([1.0, 2.0], constrs[1:3]))