Documentation


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}

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}

the Pi attribute returns $y$.

Of course, not all models fit this canonical form. In general, dual values have the following properties:

  • Dual values for $\ge$ constraints are $\ge 0$.
  • Dual values for $\le$ constraints are $\le 0$.
  • Dual values for $=$ constraints are unconstrained.
For models with a maximization sense, the senses of the dual values are reversed: the dual is $\ge 0$ for a $\le$ constraint and $\le 0$ for a $\ge$ constraint.

Only available for continuous models.

For examples of how to query or modify attributes, refer to our Attribute Examples.