Thank you for your answer. I think I get the idea. In practice, I found that 
decreasing the tolerance for the complementarity constraint helps disambiguate 
these cases.

Kind regards,
Camille

From: [email protected] 
[mailto:[email protected]] On Behalf Of Ray Zimmerman
Sent: 26. oktober 2015 21:14
To: MATPOWER discussion forum <[email protected]>
Subject: Re: Nonzero shadow prices for non-binding constraints

Good question. Because the interior point solver does not explicitly define 
binding vs. non-binding constraints in the solution, any such classification 
must be done based on numerical tolerances. I’m pretty sure the intent of that 
code was to only zero out the shadow prices (i.e. mark the constraint as 
non-binding) if both the primal and dual solutions indicate that the constraint 
is not “active”. Not a very rigorous answer, I know, but it was an attempt at 
being conservative in marking a constraint as non-binding. If the shadow price 
is significant, then the constraint is still having an effect on the solution, 
even if the constraint value is not at the bound.

Hope this helps,

    Ray



On Oct 26, 2015, at 6:45 AM, Camille Hamon 
<[email protected]<mailto:[email protected]>> wrote:

Dear all,

I am implementing a search for the maximum loadability limit using an OPF with 
dispatchable loads in Matpower. To model PV buses, I set generator voltage set 
points as upper limits for the voltage magnitude at generator buses and set the 
lower voltage limits at a low number (0.1 for example). Also, I keep the 
reactive power upper limit. When the OPF has run, I check the shadow prices of 
the upper bound constraints on voltage magnitudes to identify the generators 
which are still PV buses and the generators which have become PQ buses. During 
my testing, I ran into cases where the upper bounds voltage constraints are 
non-binding, but the corresponding shadow prices are nonzero. I believe it is 
due to the different thresholds used to check binding constraints. In 
particular, as far as I understood, the shadow prices of all non-binding 
constraints are set to zero by the following lines (mips solver):

%% zero out multipliers on non-binding constraints
mu(h < -opt.feastol & mu < mu_threshold) = 0;

My understanding is that the first condition h < -opt.feastol checks for 
non-bining constraints (deviations from the limit h is larger than the 
tolerance opt.feastol). I do not understand the second condition, however (mu < 
mu_threshold), which checks for the magnitude of the Lagrange multipliers. In 
my results, I have the case where h for a constraint is indeed larger than the 
opt.feastol threshold (h=7 e-4) but the corresponding Lagrange multiplier is 
larger than the mu_threshold (mu=2 e-4) so that the shadow price is not set to 
zero. Note also that the product of h and mu for the corresponding constraint 
is small enough for the last MIPS iteration to conclude on convergence (i.e. 
the relative complementarity constraint is satisfied).

My question would then be:
-        What is the meaning of having the second check (mu < mu_threshold) in 
identifying the non-binding constraints?

Kind regards,
Camille Hamon
Post doc
Department of Electrical Power Engeneering
Norwegian University of Science and Technology (NTNU)


--_000_e8607519f2e44b44b83fcf43cc9ad18bitex10winntnuno_
Content-Type: text/html;
        charset="utf-8"
Content-Transfer-Encoding: base64

<html xmlns:v="urn:schemas-microsoft-com:vml" 
xmlns:o="urn:schemas-microsoft-com:office:office" 
xmlns:w="urn:schemas-microsoft-com:office:word" 
xmlns:m="http://schemas.microsoft.com/office/2004/12/omml"; 
xmlns="http://www.w3.org/TR/REC-html40";>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Helvetica;
        panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.apple-converted-space
        {mso-style-name:apple-converted-space;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="NO-BOK" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US" 
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D;mso-fareast-language:EN-US">Thank
 you for your answer. I think I get the idea. In practice, I found that 
decreasing the tolerance for the complementarity
 constraint helps disambiguate these cases.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" 
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" 
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D;mso-fareast-language:EN-US">Kind
 regards,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" 
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D;mso-fareast-language:EN-US">Camille<o:p></o:p></span></p>
<p class="MsoNormal"><a name="_MailEndCompose"><span lang="EN-US" 
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p>&nbsp;</o:p></span></a></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 
0cm">
<p class="MsoNormal"><b><span lang="EN-US" 
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif">From:</span></b><span
 lang="EN-US" 
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif"> 
[email protected] 
[mailto:[email protected]]
<b>On Behalf Of </b>Ray Zimmerman<br>
<b>Sent:</b> 26. oktober 2015 21:14<br>
<b>To:</b> MATPOWER discussion forum &lt;[email protected]&gt;<br>
<b>Subject:</b> Re: Nonzero shadow prices for non-binding 
constraints<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<div>
<p class="MsoNormal">Good question. Because the interior point solver does not 
explicitly define binding vs. non-binding constraints in the solution, any such 
classification must be done based on numerical tolerances. I’m pretty sure the 
intent of that code
 was to only zero out the shadow prices (i.e. mark the constraint as 
non-binding) if both the primal and dual solutions indicate that the constraint 
is not “active”. Not a very rigorous answer, I know, but it was an attempt at 
being conservative in marking
 a constraint as non-binding. If the shadow price is significant, then the 
constraint is still having an effect on the solution, even if the constraint 
value is not at the bound.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal">Hope this helps,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal">&nbsp; &nbsp; Ray<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<p class="MsoNormal">On Oct 26, 2015, at 6:45 AM, Camille Hamon &lt;<a 
href="mailto:[email protected]";>[email protected]</a>&gt; 
wrote:<o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<div>
<div>
<p class="MsoNormal"><span 
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif">Dear 
all,<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span 
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif">&nbsp;<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" 
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif">I am 
implementing a search for the maximum loadability limit using an OPF with 
dispatchable loads in Matpower. To model PV buses, I set generator voltage set 
points
 as upper limits for the voltage magnitude at generator buses and set the lower 
voltage limits at a low number (0.1 for example). Also, I keep the reactive 
power upper limit. When the OPF has run, I check the shadow prices of the upper 
bound constraints on
 voltage magnitudes to identify the generators which are still PV buses and the 
generators which have become PQ buses. During my testing, I ran into cases 
where the upper bounds voltage constraints are non-binding, but the 
corresponding shadow prices are nonzero.
 I believe it is due to the different thresholds used to check binding 
constraints. In particular, as far as I understood, the shadow prices of all 
non-binding constraints are set to zero by the following lines (mips 
solver):</span><span 
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" 
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif">&nbsp;</span><span
 
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" 
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif">%% zero out 
multipliers on non-binding constraints</span><span 
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" 
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif">mu(h &lt; 
-opt.feastol &amp; mu &lt; mu_threshold) = 0;</span><span 
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" 
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif">&nbsp;</span><span
 
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" 
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif">My 
understanding is that the first condition h &lt; -opt.feastol checks for 
non-bining constraints (deviations from the limit h is larger than the 
tolerance opt.feastol).
 I do not understand the second condition, however (mu &lt; mu_threshold), 
which checks for the magnitude of the Lagrange multipliers. In my results, I 
have the case where h for a constraint is indeed larger than the opt.feastol 
threshold (h=7 e-4) but the corresponding
 Lagrange multiplier is larger than the mu_threshold (mu=2 e-4) so that the 
shadow price is not set to zero. Note also that the product of h and mu for the 
corresponding constraint is small enough for the last MIPS iteration to 
conclude on convergence (i.e.
 the relative complementarity constraint is satisfied).<span 
class="apple-converted-space">&nbsp;</span></span><span 
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" 
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif">&nbsp;</span><span
 
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" 
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif">My question 
would then be:</span><span 
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif"><o:p></o:p></span></p>
</div>
<div style="margin-left:36.0pt">
<p class="MsoNormal" style="text-indent:-18.0pt"><span lang="EN-US" 
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif">-</span><span
 lang="EN-US" 
style="font-size:7.0pt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span 
class="apple-converted-space">&nbsp;</span></span><span lang="EN-US" 
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif">What
 is the meaning of having the second check (mu &lt; mu_threshold) in 
identifying the non-binding constraints?</span><span 
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" 
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif">&nbsp;</span><span
 
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" 
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif">Kind 
regards,</span><span 
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" 
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif">Camille 
Hamon</span><span 
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" 
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif">Post 
doc</span><span 
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" 
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif">Department 
of Electrical Power Engeneering</span><span 
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" 
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif">Norwegian 
University of Science and Technology (NTNU)</span><span 
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif"><o:p></o:p></span></p>
</div>
</div>
</blockquote>
</div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
</div>
</body>
</html>

--

Reply via email to