Movatterモバイル変換


[0]ホーム

URL:


ContentsMenuExpandLight modeDark modeAuto light/dark mode
Gurobi Optimizer Reference Manual
Light LogoDark Logo

Concepts

Features

Reference

Gurobi
Back to top

GRBQConstr#

classGRBQConstr#

Gurobi quadratic constraint object. Quadratic constraints are alwaysassociated with a particular model. You create a quadratic constraintobject by adding a constraint to a model (usingGRBModel::addQConstr), rather than by using aGRBQConstrconstructor.

The methods on quadratic constraint objects are used to get and setquadratic constraint attributes. For example, quadratic constraintright-hand sides can be queried by callingget(GRB_DoubleAttr_QCRHS). Note, however, that it is generally moreefficient to query attributes for a set of constraints at once. This isdone using the attribute query method on theGRBModel object(GRBModel::get).

The full list of attributescan be found in theAttributes section of thisdocument. Examples of how to query and set attributes can also be foundinthis section.

charget(GRB_CharAttrattr)#
doubleget(GRB_DoubleAttrattr)#
intget(GRB_IntAttrattr)#
stringget(GRB_StringAttrattr)#

Query the value of a quadratic constraint attribute.

Parameters:

attr – The attribute being queried.

Returns:

The current value of the requested attribute.

voidset(GRB_CharAttrattr,charnewvalue)#
voidset(GRB_DoubleAttrattr,doublenewvalue)#
voidset(GRB_IntAttrattr,intnewvalue)#
voidset(GRB_StringAttrattr,conststring&newvalue)#

Set the value of a quadratic constraint attribute.

Parameters:
  • attr – The attribute being modified.

  • newvalue – The desired new value of the attribute.

Help and Feedback

On this page

[8]ページ先頭

©2009-2025 Movatter.jp