Try our new documentation site (beta).
Filter Content By
Version
Text Search
${sidebar_list_label} - Back
Filter by Language
GRBModel.getCoeff()
Query the coefficient of variable var
in linear constraint
constr
(note that the result can be zero).
double | getCoeff ( | GRBConstr | constr, |
GRBVar | var ) |
-
Arguments:
constr: The requested constraint.
var: The requested variable.
Return value:
The current value of the requested coefficient.
![](/wp-content/plugins/hd_documentations/content/images/documentation-ampl-guide.webp)
![](/wp-content/plugins/hd_documentations/content/images/documentation-cloud.webp)
![](/wp-content/plugins/hd_documentations/content/images/documentation-example-tour.webp)
![](/wp-content/plugins/hd_documentations/content/images/documentation-quick-start.webp)
![](/wp-content/plugins/hd_documentations/content/images/documentation-reference-manuals.webp)
![](/wp-content/plugins/hd_documentations/content/images/documentation-remote-services.webp)
![](/wp-content/plugins/hd_documentations/content/images/quickstart-os-linux.webp)
![](/wp-content/plugins/hd_documentations/content/images/quickstart-os-mac-osx.webp)
![](/wp-content/plugins/hd_documentations/content/images/quickstart-os-windows.webp)