[Scip] Change variable type

Leonardo Taccari taccari at elet.polimi.it
Fri May 17 18:26:04 MEST 2013


Thanks for your reply.

2013/5/17 Gerald Gamrath <gamrath at zib.de>

>  Hi Leonardo,
>
> you are right, you will not be able to change the type of a variable
> during solving. Your suggestion is right, you should copy the SCIP
> instance, the copy will then be in the problem creation stage, where you
> can change everything. Don't forget to set the enablepricing parameter of
> SCIPcopy() to FALSE, so that constraints will be unmodifiable and SCIP can
> do a lot more presolving in the copy. Which problems did you encounter when
> you tried this?
>

IIRC, I found some problems when mapping pointers to the old variables to
the ones in the copy.
No big deal: I can just rebuild the problem more or less for free (I
already have the code to build the original problem + additional variables
found - , and stored - in the pricing phases), so that's what I did.



>  Alternatively, you could also install the variables as binary variables
> right from the beginning and disable your pricer with
> SCIPdeactivatePricer() after solving the root LP, as well as marking all
> constraints unmodifiable via SCIPsetConsModifiable().
>

This is a clever idea I had not thought about. And thanks for the reminder
about the unmodifiable constraints: indeed, I had forgotten to set them
unmodifiable when I created the MIP with no pricer, and it does make a big
difference.


> At the end, you might also want to do a real branch-and-price, meaning
> that you also do pricing at later nodes, which however involves some more
> work on your side like implementing a branching rule.
>

Eventually I'm going to implement branching and have the full
branch-and-price, this is a first step in that direction.


> Did you already know that the SCIP Optimization Suite also includes is a
> generic branch-and-price solver called GCG? You only need to provide the
> original model in some standard format like mps or lp, together with some
> info about the structure and GCG will automatically perform a Dantzig-Wolfe
> reformulation and solve the resulting problem via branch-and-price. This
> might also be worth a try, if you really want to solve the problem to
> global optimality.
>

I briefly evaluated the idea of using GCG, but I need more control and
flexibility. I'm afraid GCG doesn't cut it, in my case.

Best,
Leonardo




> Best,
> Gerald
>
> Am 10.05.2013 19:42, schrieb Leonardo Taccari:
>
>  Hi,
>
> I'm using column generation to get an LP upper bound for a (maximization)
> MILP. I have a pricer and an initial heuristic that generate variables for
> the (linear) RMP, etc.
>
> Now, suppose that, after I get an optimal solution, I want to solve the
> integral version of the final RMP (keeping some/all of the columns
> generated by the pricing, so the original problem is not enough), by
> setting to binary the relaxed variables in the RMP and then solve again.
>
> SCIPchgVarType() doesn't seem to work after Scip has solved a problem. I
> tried to do something like copying the scip instance, but I haven't really
> figured out a solution.
>
> Is there an obvious way to change a VarType that I couldn't find?
>
> Thanks.
> Leonardo
>
>
> _______________________________________________
> Scip mailing listScip at zib.dehttp://listserv.zib.de/mailman/listinfo/scip
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listserv.zib.de/mailman/private/scip/attachments/20130517/c06f2eb0/attachment.html


More information about the Scip mailing list