[SCIP] avoid presolver unboundedness in conshdlr
Marc Pfetsch
pfetsch at mathematik.tu-darmstadt.de
Thu Nov 16 16:54:57 CET 2023
Hi Brannon,
as you noticed the locking mechanism is the key. So you need to indeed
lock all variables otherwise SCIP thinks that it can arbitrarily
de/increase the values without violating feasibility.
The way to get fixed variables is to loop over all variables and check
their bounds (if you need to detect variables whose status is "FIXED"
you can check this status).
In any case, I recommend to implement your constraint handler such that
it actually has constraints (they do not need to be represented as rows
in the LP). In such constraints you could then store you variables x and y.
Note that the SOS1 constraint handler might already do what you are
looking for. Among a given set of variables it ensures that at most one
has a nonzero value. If x and y in your statement are scalar, then this
would fit. If x and y are vectors, you need to introduce an artificial
variable storing the dot-product first (using a nonlinear constraint).
For such constraints you can control whether they should appear in the
LP or not.
Best
Marc
On 16/11/2023 15:17, Brannon King wrote:
> I have a bilinear constraint for my program: dot(x, y) = 0, where y is
> binary and x is unrestricted. As an exercise, I want to convert this
> to a ghost constraint -- make it entirely handled by a constraint
> handler plugin (without putting any rows into the LP for it). However,
> without this constraint, my problem is unbounded. This is detected in
> the presolver.
>
> What result do I need to promulgate in the plugin's conspresol method
> to inform the presolver that my problem is not actually unbounded?
>
> What is the recommended way to get a list of fixed variables and their
> current value in the conspresol?
>
> conslock is triggered without a constraint (in my handler). Should I
> just call addVarLocks on all my x and y variables at that time?
> conslock seems important even though I don't have any constraints
> corresponding to my handler.
> _______________________________________________
> Scip mailing list
> Scip at zib.de
> https://listserv.zib.de/mailman/listinfo/scip
More information about the Scip
mailing list