[Scip] Could a global cut be discarded ?

Tobias Achterberg achterberg at zib.de
Thu Jul 2 10:27:11 MEST 2009


Hi Nikolaj,

what you are doing is correct for what you want. You have set the 'removable' flag to
FALSE in the SCIPcreateEmptyRow() call in order to prevent SCIP from removing the row from
the LP. Additionally, you have set the 'forcecut' flag to TRUE in the SCIPaddCut() call.
This should make sure that the cut actually enters the LP and survives the cut filtering.
Therefore, the cut should enter and stay forever in the LP relaxation.

May it be that the cut is not violated, or only violated by a very small amount, when you
add it a second time?

In order to debug this you could call SCIPwriteLP() from your separator at the time the
cut is added a second time and verify that the first cut is in the LP. Additionally, you
should print the violation of the cut. Maybe, it is just a numerical issue.


Tobias


nikolaj at crt.umontreal.ca wrote:
> Hello everybody,
> 
> Thanks for your precious help last time.
> 
> In a branch and cut, I add several global cuts in a separator. For one
> graph, I've found that after I add one global cut, it was discovered again
> two times. When I print the added cuts with SCIPprintRow I get exactly the
> same cut. Could a global cut be discarded or else where did I go wrong?
> 
> Here is how I add the global cut (in the method scip_execlp) :
> 
> ------------------------------------
> SCIP_ROW* cut;
> std::ostringstream namebuf;
> 
> assert(sepa != NULL);
> assert(strcmp(SCIPsepaGetName(sepa), this->scip_name_) == 0);
> assert(scip != NULL);
> assert(result != NULL);
> 
> *result = SCIP_DIDNOTRUN;
> 
> //only call separator, if an optimal LP solution is at hand
> if( SCIPgetLPSolstat(scip) != SCIP_LPSOLSTAT_OPTIMAL ) {
>   return SCIP_OKAY;
> }
> 
> *result = SCIP_DIDNOTFIND;
> 
> //main loop
> //omitted here
> 
> //create cut
> namebuf.str("");
> namebuf << "generalized_odd_cut";
> SCIP_CALL_EXC( SCIPcreateEmptyRow(scip, &cut, namebuf.str().c_str(), 1.0,
> SCIPinfinity(scip),FALSE, FALSE, FALSE) );
> SCIP_CALL_EXC( SCIPcacheRowExtensions(scip, cut) );
> 
> //populate cut
> //loops omitted here, I add variables in the cut with:
> SCIP_CALL_EXC( SCIPaddVarToRow(scip, cut, model_->y_[*u_iter][*v_iter][k],
> 1.0) );
> 
> SCIP_CALL_EXC( SCIPflushRowExtensions(scip, cut) );
> SCIP_CALL_EXC( SCIPaddCut(scip, NULL, cut, TRUE) );
> SCIP_CALL_EXC( SCIPaddPoolCut(scip, cut) );
> 
> SCIPprintRow(scip,cut,NULL);
> 
> *result = SCIP_SEPARATED;
> 
> SCIP_CALL_EXC( SCIPreleaseRow(scip, &cut) );
> ------------------------------------
> 
> 
> Any help would be much appreciated.
> 
> Best regards,
> 
> Nikolaj
> 
> 
> 
> _______________________________________________
> Scip mailing list
> Scip at zib.de
> http://listserv.zib.de/mailman/listinfo/scip


More information about the Scip mailing list