<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from text --><style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<meta content="text/html; charset=UTF-8">
<style type="text/css" style="">
<!--
p
        {margin-top:0;
        margin-bottom:0}
-->
</style>
<div dir="ltr">
<div id="x_divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:#000000; font-family:Calibri,Helvetica,sans-serif">
<p>Hi Pedro,</p>
<p>    1, SCIP can use IPOPT as a solver for nonlinear and nonconvex problems. Thus, we cannot assume that dual exists generally. Even if your problem is convex, pyscipopt does not provide an interface to access the dual information, so it always returns zero.
 A better choice would be to call IPOPT yourself, rather than via SCIP.</p>
<p>   2. Since the SOC handler already exists, if your problem has a nonlinear constraint of  SOC type, then the handler will detect the constraint automatically and handle the other tasks (e.g., linearization) for you.</p>
<p><br>
</p>
<p>  Hope this helps you.</p>
<p><br>
</p>
<p>Best regards,</p>
<p>Liding Xu</p>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> Scip <scip-bounces@zib.de> on behalf of PEDRO ENRIQUE MALDONADO <pedro.maldonado.c@ug.uchile.cl><br>
<b>Sent:</b> Monday, December 1, 2025 3:12:30 AM<br>
<b>To:</b> scip@zib.de<br>
<b>Subject:</b> [SCIP] PYSCIPOPT: Dual solutions in a NLP and constraint handler for SOC constraints.</font>
<div> </div>
</div>
</div>
<font size="2"><span style="font-size:10pt;">
<div class="PlainText">Hi,<br>
<br>
I hope you are doing well. I would like to ask you a few questions<br>
regarding the implementation of the model in the Python wrapper:<br>
<br>
1- I have downloaded IPOPT and configured the solver parameters<br>
accordingly. In my research, and after reviewing the .pxd and .pxi<br>
files, I noticed that using the NLRow class one should be able to<br>
access the dual solution associated with these rows. However, in my<br>
experience, this function always returns 0.<br>
<br>
I know there are nonlinear rows, since the getConshdlrName() method of<br>
the Constraint class returns "nonlinear" for some of them, and I also<br>
know that the dual value should not be 0 for all of these constraints.<br>
Moreover, as far as I understand, IPOPT should always return dual<br>
solutions because it is a primal–dual interior-point solver. For that<br>
reason, I do not understand why I am unable to retrieve them.<br>
<br>
2- I am aware that the original SCIP code includes several constraint<br>
handlers, such as the Quadratic and Second-Order Cone constraint<br>
handlers. However, I have noticed that in the Python wrapper all<br>
constraints are classified as either linear or nonlinear, and this<br>
classification appears to be hard-coded in the Constraint class. I<br>
would greatly appreciate any guidance on whether there is an<br>
accessible way to add the SOC constraint handler using the existing C<br>
implementation. I am not very experienced with the C language, and so<br>
far creating the plugin directly in Python has not been successful.<br>
<br>
Thank you very much for your help.<br>
<br>
Best regards,<br>
Pedro Maldonado<br>
<br>
_______________________________________________<br>
Scip mailing list<br>
Scip@zib.de<br>
<a href="https://listserv.zib.de/mailman/listinfo/scip">https://listserv.zib.de/mailman/listinfo/scip</a><br>
</div>
</span></font>
</body>
</html>