Try our new documentation site (beta).
Filter Content By
Version
Text Search
${sidebar_list_label} - Back
Filter by Language
Pi
Type: | double |
---|---|
Modifiable: | No |
The constraint dual value in the current solution (also known as the shadow price).
Given a linear programming problem
![\begin{displaymath}
\begin{array}{ll}
\mathrm{minimize} & c'x \
\mathrm{subject to} & Ax \ge b \
& x \ge 0
\end{array}\end{displaymath}](https://www.gurobi.com/wp-content/plugins/hd_documentations/documentation/8.1/refman/img123.png?x70725)
and a corresponding dual problem
![\begin{displaymath}
\begin{array}{ll}
\mathrm{maximize} & b'y \
\mathrm{subject to} & A'y \le c \
& y \ge 0
\end{array}\end{displaymath}](https://www.gurobi.com/wp-content/plugins/hd_documentations/documentation/8.1/refman/img124.png?x70725)
the Pi
attribute returns .
Of course, not all models fit this canonical form. In general, dual values have the following properties:
- Dual values for
constraints are
.
- Dual values for
constraints are
.
- Dual values for
constraints are unconstrained.
![<span>$</span>\ge 0<span>$</span>](https://www.gurobi.com/wp-content/plugins/hd_documentations/documentation/8.1/refman/img126.png?x70725)
![<span>$</span>\le<span>$</span>](https://www.gurobi.com/wp-content/plugins/hd_documentations/documentation/8.1/refman/img127.png?x70725)
![<span>$</span>\le 0<span>$</span>](https://www.gurobi.com/wp-content/plugins/hd_documentations/documentation/8.1/refman/img128.png?x70725)
![<span>$</span>\ge<span>$</span>](https://www.gurobi.com/wp-content/plugins/hd_documentations/documentation/8.1/refman/img125.png?x70725)
Only available for continuous models.
For examples of how to query or modify attributes, refer to our Attribute Examples.
![](/wp-content/plugins/hd_documentations/content/images/documentation-ampl-guide.webp?x70725)
![](/wp-content/plugins/hd_documentations/content/images/documentation-cloud.webp?x70725)
![](/wp-content/plugins/hd_documentations/content/images/documentation-example-tour.webp?x70725)
![](/wp-content/plugins/hd_documentations/content/images/documentation-quick-start.webp?x70725)
![](/wp-content/plugins/hd_documentations/content/images/documentation-reference-manuals.webp?x70725)
![](/wp-content/plugins/hd_documentations/content/images/documentation-remote-services.webp?x70725)
![](/wp-content/plugins/hd_documentations/content/images/quickstart-os-linux.webp?x70725)
![](/wp-content/plugins/hd_documentations/content/images/quickstart-os-mac-osx.webp?x70725)
![](/wp-content/plugins/hd_documentations/content/images/quickstart-os-windows.webp?x70725)