[SCIP] Obtaining Bound Constraints from variables
Rolf van der Hulst
r.p.vanderhulst at utwente.nl
Wed Aug 31 17:03:04 CEST 2022
Hi André,
Although I am not sure if there is a way to explicitly get the dual
solutions for the variables, I do have a workaround which would work for
you.
In many branch-and-price applications, the variable bounds are
implicitly satisfied. Thus, SCIP supports disabling them (e.g.
preventing them from entering the LP) by setting 'lazy bounds' through
the functions
SCIPchgVarLbLazy() and SCIPchgVarUbLazy(). In debug mode, SCIP checks if
the variables satisfy these lazy bounds, but does not enforce them in
the LP. In release mode, they are equivalent to unbounded variables.
In your case, you can make the bounds on relevant variables lazy, and
then explicitly add the variable bound constraints to the master problem
as linear constraints (rather than implicitly during variable creation).
Then, you can simply use the SCIPgetDualsolLinear() on these variable
bound constraints to get the dual solution.
There might be an easier way to do this, as it can be some work to add
all of the variable bounds explicitly as constraints.
Best,
Rolf
On 31-08-2022 15:48, André Mazal Krauss wrote:
> Hello SCIP team,
>
> I'm currently working on a VRP-related application, using SCIP. I'm
> using a Set Partioning formulation with Branch & Price, and my
> formulation is a minimization problem. I've started having issues with
> pricing of repeated variables and slow convergence. I suspect this is
> happening because I'm not correctly considering the duals of bound
> constraints on my pricing.
>
> My variables are all binary, so they should have implicit linear x > 0
> and x < 1 constraints, right? How can I collect these constraints,
> either during variable creation or later, so I can query their duals
> using SCIPgetDualsolLinear? I don't believe this will actually help
> solve the underlying issue, and I might have some reformulation to do,
> but having this would help me diagnose the problem better and make
> sure I understand it correctly.
>
> I have of course read the documentation but haven't found anything on
> bound constraints. Also, functions like SCIPgetNConss(scip) do not
> seem to account for these. I'd like to avoid creating them explicitly
> over the binary variables since this seems redundant and I'm not sure
> about how the solver would behave in this situation.
>
> Thanks in advance for your help,
> André Mazal Krauss
More information about the Scip
mailing list