We start from the dual problem:
$$ \min_{\lambda \ge 0} \left[ L(\lambda) = \sum_{i} \frac{(\lambda - c_i)^2}{2\beta_i} + \lambda E \right] $$Taking the derivative gives
$$ \frac{\partial L}{\partial \lambda} = \sum_i \frac{\lambda - c_i}{\beta_i} + E = 0. $$Solving for \( \lambda^* \) yields the adaptive shadow price
$$ \lambda^* = \frac{\sum_i \frac{c_i}{\beta_i} - E}{\sum_i \frac{1}{\beta_i}}. $$In code:
| |
With \( c=[3,4,5] \), \( \beta=[2,1,4] \), \( E=2 \), the price stays below $5 but reacts 1.2x faster than a static subsidy.