<div dir="ltr"><p dir="ltr">Dear Steve,</p><p dir="ltr">Thank you for your answer,</p>
<p dir="ltr">the first problem was indeed my fault: a pause that I didn't realize was there! </p>
<p dir="ltr">As for the second, there also was a mistake in how I generated the new constraints for the pricing problem, so now it's working and I'm getting the right solution.<br>
</p><p>All the best,</p><p>Veronica</p>
<div style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Veronica,<br>
<br>
Thanks for your questions. It is great to see that you are using SCIP for<br>
branch-and-price. The Bin Packing example is great as a starting point.<br>
<br>
Your first problem seems a little strange. There is nothing in SCIP that<br>
is expected to cause that behaviour. Since it only occurs in the Farkas<br>
pricing, I would suggest that you review your own code to see if there is<br>
anything unexpected. The Farkas pricing does not need user input by<br>
default.<br>
<br>
The addFixedVarsConss function in the bin packing pricer forbids the<br>
columns that are excluded by your constraint handler from being generated<br>
in the pricer. The constraint handler will ensure that at each node only<br>
the feasible columns are present. However, the constraint handler does not<br>
have any control over the columns that can be generated. It is necessary<br>
in the pricer to get the currently active constraints from the constraint<br>
handler and fix variables so that forbidden columns are not generated.<br>
<br>
In writing your pricer, you don't necessarily need a function called<br>
addFixedVarsConss. However, you do need some function to forbid columns<br>
being generated that violate the active constraints.<br>
<br>
Cheers,<br>
<br>
Steve<br>
<br>
On Fri, June 10, 2016 3:18 pm, Veronica Dal Sasso wrote:<br>
> Dear all,<br>
> I'm implementing a branch-and-price algorithm using C++ and SCIP, and I am<br>
> facing a couple of difficulties:<br>
><br>
> 1) most of the times, when I need to use Farkas pricing, my program stops<br>
> and waits for some input, printing on the screen the string "<press>". I<br>
> just give a letter as input and then it goes on with the computation, but<br>
> I<br>
> don't understand why it happens and how I can avoid it (and if it affects<br>
> in any way the results).<br>
><br>
> 2) I implemented a branching rule following the binpacking example, but I<br>
> don't understand the role played by the function<br>
><br>
> addFixedVarsConss(SCIP* scip, SCIP* subscip, SCIP_VAR** vars, SCIP_CONS**<br>
> conss, int nitems)<br>
><br>
> in file pricer_binpacking.c, as at each node I already fix to 0 the<br>
> forbidden variables with the functions<br>
><br>
> checkVariable(SCIP* scip, SCIP_CONSDATA* consdata, SCIP_VAR* var, int<br>
> nfixedvars, SCIP_Bool cutoff)<br>
><br>
> and<br>
><br>
> consdataFixVariables((SCIP* scip, SCIP_CONSDATA* consdata, SCIP_VAR**<br>
> vars,<br>
> int nvars, SCIP_RESULT* result)<br>
><br>
> in file cons_samediff.c and then my pricing problem is modified as to<br>
> include informations on the forbidden columns, so that they will not be<br>
> generated at that node and chid nodes.<br>
> So as far as now I didn't implement the function addFixedVarsConss() but,<br>
> as I get a wrong solution to my problem, I'm thinking that maybe it has a<br>
> different role and that I need to implement it. Is that correct?<br>
><br>
> Thank you very much for your help,<br>
><br>
> Veronica Dal Sasso<br>
> _______________________________________________<br>
> Scip mailing list<br>
> <a href="mailto:Scip@zib.de" target="_blank">Scip@zib.de</a><br>
> <a href="http://listserv.zib.de/mailman/listinfo/scip" rel="noreferrer" target="_blank">http://listserv.zib.de/mailman/listinfo/scip</a><br>
><br>
<br>
<br>
</div>
</div>