[Scip] [Fwd: Adding constraints during problem solve]
Stefan Heinz
heinz at zib.de
Tue May 15 17:41:38 MEST 2012
Hi Steve,
the question is what is redundant? I assume you mean that these
constraints are not tight in the LP relaxation. I further assume that
these constraints are model constraints. That means they define
feasibility. If these assumptions are true, then you have to add all the
constraints from the beginning to the problem. I further assume that you
want that certain constraints (the redundant once) are not added to the
LP relaxation but that they sould be separated (to get a faster LP
relaxation). This can be done in case of SCIP very easily via the magic
ten SCIP_Bool parameters in the SCIPcreateConsLinear() method
http://scip.zib.de/doc/html/cons__linear_8h.html#aa7aed137a4130b35b168812414413481
You want to set for those constraints the initial flag to FALSE and the
separation flag to TRUE. That means these constraints do not enter the
initial LP relaxation but are separated if the are violated. Besides
that you might also want to try to set the removable flag the TRUE. This
allows SCIP to remove the linear rows from the LP if they are not tight
anymore.
Does that answer your question(s)?
Best Stefan
On 05/15/12 01:16, Stephen J Maher wrote:
>
> I have a little more information about my problem that I forgot to put
> in the original email. If I add all the constraints at the problem
> creation stage, I get a different final solution compared to if I add
> them during the pricing loop. This is also the case if I add only a
> subset of the constraints at the creation stage, and in the first
> pricing loop add the rest.
>
> I think that I am doing something wrong, I just don't know what it is.
>
> Thanks a lot for your help guys.
>
> Steve
>
> -------- Original Message --------
> Subject: Adding constraints during problem solve
> Date: Fri, 11 May 2012 12:51:17 +1000
> From: Stephen J Maher <stephen.maher at unsw.edu.au>
> To: scip at zib.de <scip at zib.de>
>
>
>
> Hi all,
>
> I am having trouble with adding constraints to my problem at different
> stages during the solving. Generally I would like to add the
> constraints in the pricing stage. In my problem I am able to solve the
> complete MIP with a large number of constraints of which most are
> redundant. The aim is to leave out the redundant constraints and add
> them as required.
>
> I am finding that depending on the order in which these constraints
> are added to the LP, I achieve different final solutions. I was
> wondering the order is important, or if there is something that I am
> missing in regards to adding constraints during a pricing loop.
>
> I am adding the constraints by calling
>
> SCIPcreateConsLinear
> SCIPaddCons
> SCIPreleaseCons
>
> I have been looking over my pricer for a while to see if there is a
> pricing problem. At this stage I can't seem to see it if one exists.
>
> Any help would be appreciated.
>
> Cheers,
>
> Steve
>
More information about the Scip
mailing list