[Scip] Solving the root node with pricing and then solve as an IP

Stefan Heinz heinz at zib.de
Sat Sep 17 23:02:59 MEST 2011


Hi Sebastian,

yes there is currently nothing featuring that directly with a single 
method call.

To get what you want there are several option. I will discuss two of them.

1) You just start the scip_redcost() or SCIP_DECL_PRICERREDCOST(??) with

if( SCIPgetDepth(scip) != 0 )
{
    *result = SCIP_SUCCESS;
    return SCIP_OKAY;
}

This cost no time and will ensure that you only create columns at the 
root node. In that case you should additionally loop over all 
constraints and change the modifiable flag to FALSE (see below).

2) You could also force SCIP to perform a restart after you generated 
all columns at the root node. This has the advantage that you get a 
presolving loop over your fixed model. Therefore, you also should change 
the modifiable flag of all constraints to FALSE (see below). A way of 
realizing this is to add the following code at the beginning of the 
reduced cost method of the pricer(s).

if( SCIPgetNRuns(scip) > 1 )
{
    *result = SCIP_SUCCESS;
    return SCIP_OKAY;
}

if( SCIPgetDepth(scip) != 0 || SCIPgetNRuns(scip) == 0 )
{
    *result = SCIP_SUCCESS;
     SCIP_CALL( SCIPforceRestartSolve(scip)  );
    return SCIP_OKAY;
}

The open question is how to change the modifiable flag of all 
constraints. This could be done in the pricer callback scip_init() or 
SCIP_DECL_PRICERINIT(??) using the following code:

if( SCIPgetNRuns(scip) > 1 )
{
     SCIP_CONS** conss;
     int nconss;
     int c;

     conss = SCIPgetCons(scip);
     nconss = SCIPgetNCons(scip);

     for( c = 0; c < nconss; ++c )
     {
         SCIP_CALL( SCIPsetConsModifiable(scip, conss[c], FALSE) );
     }
}

Hope that helps and works.

Best Stefan


On 09/16/2011 05:15 PM, Sebastian Ruther wrote:
> Hello,
>
> I want to generate columns only at the root node and then solve the problem with the current set of columns using branch and cut and variable branching. So this would be similar to just printing the problem and then reading it in and solving with a solver like CPLEX or GUROBI.
> I tried to deactivate the pricer with SCIPdeactivatePricer but you are not allowed to do that in the solving stage. Unfortunately there is no function like SCIPsetBranchruleMaxdepth where you could set the depth of the pricer. Btw. wihy isn't there? You might have some partial/inexact pricing you want to do early in the tree.
>
> Thank you
> Sebastian
>
> _______________________________________________
> Scip mailing list
> Scip at zib.de
> http://listserv.zib.de/mailman/listinfo/scip



More information about the Scip mailing list