<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Dear Marco,</div>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Thank you for your quick reply.</div>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
To clarify, I am currently storing the constraints I initially created in a structure called
<i>cons</i>, and I retrieve the dual values of the i-th constraint using the following approach:</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<i>SCIPgetDualSolVal(scip, cons[i], &pi[i], NULL);</i></div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
So, I am not querying the <i>transformed</i> constraint for dual variables. Would it be more appropriate to first use the method
<i>SCIPgetTransformedCons</i> to retrieve the transformed constraints and then query the dual values? This is why I am not getting any dual values?</div>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Thank you for your help!</div>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Best regards,</div>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Enrico</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>Da:</b> Marco Lübbecke <marco.luebbecke@rwth-aachen.de><br>
<b>Inviato:</b> lunedì 27 gennaio 2025 22:12<br>
<b>A:</b> Enrico Calandrini <e.calandrini@studenti.unipi.it><br>
<b>Cc:</b> Hoen, Alexander <hoen@zib.de>; scip@zib.de <scip@zib.de><br>
<b>Oggetto:</b> Re: [SCIP] R: Access Dual Values with SCIP</font>
<div> </div>
</div>
<div>
<div dir="ltr">
<div>Hi Enrico,</div>
<div><br>
</div>
<div>do you query the *transformed* constraints for dual variables? <br>
</div>
<div><br>
</div>
<div>All the best, Marco</div>
<div><br>
</div>
</div>
<br>
<div class="x_gmail_quote x_gmail_quote_container">
<div dir="ltr" class="x_gmail_attr">Am Mo., 27. Jan. 2025 um 21:26 Uhr schrieb Enrico Calandrini <<a href="mailto:e.calandrini@studenti.unipi.it">e.calandrini@studenti.unipi.it</a>>:<br>
</div>
<blockquote class="x_gmail_quote" style="margin:0px 0px 0px 0.8ex; border-left:1px solid rgb(204,204,204); padding-left:1ex">
<div class="x_msg-7017406220233617199">
<div dir="ltr">
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Dear Alexander,</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
First of all, thank you very much for your response.</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
To provide a bit more context, I’m working with the SCIP C-API and creating the LP model using the basic methods (e.g.,
<i>SCIPcreateConsBasicLinear</i>, <i>SCIPaddCoefLinear</i>, etc.). After constructing the model, I simply call
<i>SCIPSolve</i> to solve it. As far as I understand, this should automatically use
<i>Soplex</i> to solve the problem.</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
However, I’ve encountered an issue: when I run the model without disabling presolve, SCIP is unable to provide dual solutions. In contrast, when I disable presolving, the computation slows down, but I do receive the dual values. I’m curious to understand whether
it is always necessary to disable presolve in order to retrieve the dual solutions, or if there is another way to obtain them.</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Thank you again for your time and assistance!</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Best regards,</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Enrico</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div id="x_m_3553310310135986827appendonsend"></div>
<hr style="display:inline-block; width:98%">
<div id="x_m_3553310310135986827divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>Da:</b> Hoen, Alexander <<a href="mailto:hoen@zib.de" target="_blank">hoen@zib.de</a>><br>
<b>Inviato:</b> lunedì 27 gennaio 2025 20:34<br>
<b>A:</b> Enrico Calandrini <<a href="mailto:e.calandrini@studenti.unipi.it" target="_blank">e.calandrini@studenti.unipi.it</a>>;
<a href="mailto:scip@zib.de" target="_blank">scip@zib.de</a> <<a href="mailto:scip@zib.de" target="_blank">scip@zib.de</a>><br>
<b>Oggetto:</b> Re: Access Dual Values with SCIP</font>
<div> </div>
</div>
<div dir="ltr">
<div id="x_m_3553310310135986827x_divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:rgb(0,0,0); font-family:Calibri,Helvetica,sans-serif">
<p>Dear Enrico,<br>
<br>
</p>
<p>for pure LP dual values are well-defined. <span style="font-size:12pt">Dual values represent the change in the objective function per unit increase in the right-hand side of a constraint, assuming the constraint remains binding.</span></p>
<p><span style="font-size:12pt"><br>
</span></p>
<p><span style="font-size:12pt">For MIP, the situation is more complex and the definition of the duality no longer holds due to the variables' integrality. Therefore, SCIP typically does not care about these dual values.</span></p>
<p><span style="font-size:12pt"><br>
</span></p>
<p><span style="font-size:12pt">If you want to solve LPs directly you can use the underlying LP Solver Soplex to obtain the dual solution of the LP.<br>
<br>
Best,<br>
Alexander</span></p>
</div>
<hr style="display:inline-block; width:98%">
<div id="x_m_3553310310135986827x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> Scip <<a href="mailto:scip-bounces@zib.de" target="_blank">scip-bounces@zib.de</a>> on behalf of Enrico Calandrini
<<a href="mailto:e.calandrini@studenti.unipi.it" target="_blank">e.calandrini@studenti.unipi.it</a>><br>
<b>Sent:</b> Monday, January 27, 2025 6:52:18 PM<br>
<b>To:</b> <a href="mailto:scip@zib.de" target="_blank">scip@zib.de</a><br>
<b>Subject:</b> [SCIP] Access Dual Values with SCIP</font>
<div> </div>
</div>
<div>
<div style="margin-top:1em; margin-bottom:1em; font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Hi everyone,</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
I hope this message finds you well.</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
I am currently working with SCIP and have a question regarding the retrieval of dual values. Specifically, I would like to confirm whether it is necessary to disable presolve in order to access dual values reliably.</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Could you kindly clarify how presolve interacts with dual value computation and if there are any recommended settings to ensure the dual values can be retrieved without issue?</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Thank you very much for your time and assistance. I appreciate the incredible work you’ve done with SCIP!</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Looking forward to your response.</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Best regards,</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Enrico Calandrini</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
University of Pisa, Department of Computer Science</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
</div>
</div>
</div>
_______________________________________________<br>
Scip mailing list<br>
<a href="mailto:Scip@zib.de" target="_blank">Scip@zib.de</a><br>
<a href="https://listserv.zib.de/mailman/listinfo/scip" rel="noreferrer" target="_blank">https://listserv.zib.de/mailman/listinfo/scip</a><br>
</div>
</blockquote>
</div>
<div><br clear="all">
</div>
<br>
<span class="x_gmail_signature_prefix">-- </span><br>
<div dir="ltr" class="x_gmail_signature">Prof. Dr. Marco Lübbecke<br>
RWTH Aachen University <br>
Chair of Operations Research <br>
Kackertstrasse 7 <br>
D-52072 Aachen <br>
Germany <br>
<br>
fon / fax: +49 241 80-93362 / 92369<br>
<a href="mailto:marco.luebbecke@rwth-aachen.de" target="_blank">marco.luebbecke@rwth-aachen.de</a><br>
<a href="http://www.or.rwth-aachen.de/luebbecke" target="_blank">www.or.rwth-aachen.de/luebbecke</a><br>
<br>
</div>
</div>
</body>
</html>