<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Hi folks,</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
I am using a heuristic that is a variant of fixandinfer in a problem that also has an active pricer.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
fixandinfer (and my variant) work by creating a pseudo-solution in a probing node.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
When this pseudo-solution is proposed as a new primal solution we get (unless I am mistaken) the following sequence of calls:</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
SCIPtryCurrentSol ->
<div>SCIPprimalTryCurrentSol -></div>
<div>SCIPprimalLinkCurrentSol -></div>
<div>SCIPsolLinkCurrentSol -></div>
<div>SCIPsolLinkPseudoSol -></div>
<div>SCIPlpGetPseudoObjval</div>
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
When we get to SCIPlpGetPseudoObjVal the following is executed<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
   if( lp->pseudoobjvalinf > 0 || set->nactivepricers > 0 )
<div>      return -SCIPsetInfinity(set);</div>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Presumably the idea here is that because there are active pricers then more variables might come along and so (since we are in the transformed problem) it makes sense to return -infinity as a bound. The problem is that we can have, restricted to the currently
 existing variables, a feasible solution which SCIP indeed judges to be feasible.<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
So what happens is that SCIP informs me that the problem is unbounded since it has found a solution that is (1) feasible and (2) with unbounded objective.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
I am currently getting round this problem by just copying over solution values to a brand new solution:</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
 /* have to copy pseudo solution since there are active pricers */
<div>      SCIP_CALL( SCIPallocBufferArray(scip, &vals, nvars) );</div>
<div>      SCIP_CALL( SCIPgetSolVals(scip, NULL, nvars, vars, vals) );</div>
<div>      SCIP_CALL( SCIPcreateSol(scip, &sol, heur) );</div>
<div>      SCIP_CALL( SCIPsetSolVals(scip, sol, nvars, vars, vals) );</div>
<div>      SCIPfreeBufferArray(scip, &vals);</div>
<div>      </div>
      SCIP_CALL( SCIPtrySolFree(scip, &sol, FALSE, FALSE, FALSE, FALSE, FALSE, &success) );</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Is there a better workaround?</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Btw, my variant differs from fixandinfer only in that the best variable to fix is that one whose pseudo-value (ie best with respect to objective) is closest to its current LP solution value. This actually works pretty well for my problem (each variable is binary,
 with negative objective and there is a collection of set packing constraints; each variable is in exactly one of these, so there are lots of easy propagations).
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
James<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div>
<div id="Signature">
<div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
James Cussens</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Dept of Computer Science, University of Bristol</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<a href="https://jcussens.github.io/">https://jcussens.github.io/</a><br>
</div>
</div>
</div>
</div>
</body>
</html>