[Scip] Change variable type
Gerald Gamrath
gamrath at zib.de
Fri May 17 03:00:40 MEST 2013
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?
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(). 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.
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.
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 list
> Scip at zib.de
> http://listserv.zib.de/mailman/listinfo/scip
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listserv.zib.de/mailman/private/scip/attachments/20130517/4bd11522/attachment.html
More information about the Scip
mailing list