[SCIP] automatic user cuts and lazy constraints

Ambros Gleixner gleixner at zib.de
Wed Sep 1 11:47:08 CEST 2021


Dear Diego,



Am 02.07.21 um 11:56 schrieb Diego Ponce:
> Dear SCIP community,
> 
> We are working in a MIP program which has three families of constraints:
> 
>   * 441 model constraints that are always present in the problem.
>   * 19  model constraints (weak) that model completely the problem.
>   * 7600 model constraints (strong) that model the problem by means of a
>     tighter formulation.
> 
> Moreover the weak constraints are the aggregation of the strong 
> constraints and either of the two could model the problem without the other.
> 
> We have written the separator plugin, but we would like to check how 
> SCIP handles user cuts or lazy constraints automatically. Defining or 
> not the /weak constraints/, we have tested a couple of options on the 
> parameters of the function SCIPcreateConsLinear() when creating the 
> /strong constraints/.
> 
>  1. Strong constraints initially defined.
>  2. (lazy constraints) Strong constraints not initially defined but set
>     to be enforced.
>  3. Weak and strong constraints initially defined.
>  4. (user cuts) Weak constraints initially defined plus strong
>     constraints not initially defined.
> 
> Attached you have the results. Our questions are the following:
> 
>   * Since the problem can be solved at the root node using strong
>     constraints, we guess that option (2) branches because SCIP decides
>     automatically not checking all the fractional solutions but the
>     integer ones. Are we right?
>   * Since the problem can be solved at the root node using strong
>     constraints, we guess that option (4) branches because SCIP decides
>     automatically not checking all the fractional solutions. Are we right?

Partially yes, linear constraints are enforced only after checking 
integrality.  However, separation of linear constraints happens on 
fractional solutions.  The reason why your constraints are not separated 
may be:


>   * To avoid other cuts we use the below function. Is it enough?
> 
>               SCIP_CALL( SCIPsetSeparating(scip, SCIP_PARAMSETTING_OFF, 
> TRUE) );
> 

This also turns off separation of the constraint handlers, so it is not 
what you want.  You need to turn "constraints/linear/sepafreq" back to 
the default at the end.


>   * What does confs mean in the interactive shell?

Number of conflict constraints created from infeasible nodes, also in 
strong branching in your case.

>   * How could we obtain the number of lazy constraints in (2)? Would
>     SCIPgetNCutsApplied(scip) be right?

Yes, this is the total number applied so far, but could include double 
counting for cuts separated locally.


>   * How could we obtain the number of user cuts in (4)?  Would 
>     SCIPgetNEnabledConss(scip) - SCIPgetNCheckConss(scip) be right?

No, rather like above.

I also noticed you are sometimes setting dynamic and modifiable to TRUE, 
you may want to double check this.

Best,
Ambros

> 
> Best,
> 
> Diego Ponce
> 
> www.us.es <http://www.us.es/>
> 
> Por favor considere el medio ambiente antes de imprimir este correo 
> electrónico.
> -
> Este correo electrónico y, en su caso, cualquier fichero anexo al mismo, 
> contiene información de carácter confidencial exclusivamente dirigida a 
> su destinatario o destinatarios. Si no es Vd. el destinatario del 
> mensaje, le ruego lo destruya sin hacer copia digital o física, 
> comunicando al emisor por esta misma vía la recepción del presente 
> mensaje. Gracias
> 
> 
> _______________________________________________
> Scip mailing list
> Scip at zib.de
> https://listserv.zib.de/mailman/listinfo/scip
> 


More information about the Scip mailing list