8.6.13. MQConstr

class MQConstr

A multidimensional array consisting of quadratic constraints. Returned by Model.addConstr .

Properties

ndim

Number of MQConstr dimensions

shape

Shape of the MQConstr

size

Number of quadratic constraints contained in the MQConstr

Methods

getAttr()

Obtain the value of the associated attribute

item()

Get the unique quadratic constraint contained in this MQConstr

setAttr()

Set the value of the associated attribute

tolist()

Return an array containing all quadratic constraints in this MQConstr

getAttr(attrname)

Obtain the value of the associated attribute.

Parameters

attrname – The name of the attribute to obtain the value.

Note

Attribute can also be read and written directly through object attributes, in this case, the attribute name is case-insensitive

item()

Get the unique quadratic constraint contained in this MQConstr.

Note

An exception is thrown if this MQConstr contains more than one quadratic constraint.

setAttr(attrname, attrvalues)

Set the value of the associated attribute.

Parameters
  • attrname – The name of the attribute to be set.

  • attrvalues – The new value of the attribute to be set. Can be scalar or array

Note

Attribute can also be read and written directly through object attributes, in this case, the attribute name is case-insensitive

tolist()

Return an array containing all quadratic constraints in this MQConstr.