prop_orbitalfixing.c
Go to the documentation of this file.
24 * The method obtains symmetries from the symmetry presolver and then computes orbits of variables with respect to the
25 * subgroup of the symmetry group that stabilizes the variables branched to 1. Then one can fix all variables in an
26 * orbit to 0 or 1 if one of the other variables in the orbit is fixed to 0 or 1, respectively. Different from Margot,
27 * the subgroup is obtained by filtering out generators that do not individually stabilize the variables branched to 1.
33 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
49 #define PROP_DELAY FALSE /**< should propagation method be delayed, if other propagators found reductions? */
51 #define PROP_PRESOL_PRIORITY -1000000 /**< priority of the presolving method (>= 0: before, < 0: after constraint handlers) */
52 #define PROP_PRESOLTIMING SCIP_PRESOLTIMING_EXHAUSTIVE /* timing of the presolving method (fast, medium, or exhaustive) */
53 #define PROP_PRESOL_MAXROUNDS -1 /**< maximal number of presolving rounds the presolver participates in (-1: no limit) */
59 #define DEFAULT_ENABLEDAFTERRESTARTS FALSE /**< Run orbital fixing after a restart has occured? */
66 #define TABLE_EARLIEST_ORBITALFIXING SCIP_STAGE_SOLVING /**< output of the statistics table is only printed from this stage onwards */
108 {
121 SCIPverbMessage(scip, SCIP_VERBLEVEL_MINIMAL, file, " vars fixed to 0 :%11d\n", tabledata->propdata->nfixedzero);
122 SCIPverbMessage(scip, SCIP_VERBLEVEL_MINIMAL, file, " vars fixed to 1 :%11d\n", tabledata->propdata->nfixedone);
132 {
177 &(propdata->npermvars), &(propdata->permvars), &(propdata->nperms), &(propdata->perms), NULL, NULL) );
184 &(propdata->npermvars), &(propdata->permvars), &(propdata->nperms), &(propdata->perms), NULL, NULL) );
206 * Note that we do not have to distinguish between variables that have been fixed or branched to 1, since the
207 * stabilizer is with respect to the variables that have been branched to 1. Thus, if an orbit contains a variable that
208 * has been branched to 1, the whole orbit only contains variables that have been branched to 1 - and nothing can be
353 SCIP_Bool* success /**< pointer to store whether branching variables were computed successfully */
384 /* If we stopped due to a solving limit, it might happen that a non-root node has no domain changes, in all other
522 /* check whether moved variables have the same type (might have been aggregated in the meanwhile) */
525 (SCIPvarGetType(varv) == SCIP_VARTYPE_IMPLINT && SCIPvarGetType(varimg) == SCIP_VARTYPE_CONTINUOUS &&
528 (SCIPvarGetType(varv) == SCIP_VARTYPE_CONTINUOUS && SCIPvarGetType(varimg) == SCIP_VARTYPE_IMPLINT &&
560 SCIP_CALL( SCIPcomputeGroupOrbitsSymbreak(scip, permvars, npermvars, perms, nperms, activeperms, orbits, orbitbegins, &norbits) );
567 SCIP_CALL( performOrbitalFixing(scip, permvars, npermvars, orbits, orbitbegins, norbits, infeasible, &nfixedzero, &nfixedone) );
669 /** presolving initialization method of propagator (called when presolving is about to begin) */
823 * Note that this is relatively difficult to obtain: One needs to include all bounds of variables to would lead to a
824 * different orbit in which the variables that was propagated lies. This includes all variables that are moved by the
862 SCIP_CALL( SCIPincludePropBasic(scip, &prop, PROP_NAME, PROP_DESC, PROP_PRIORITY, PROP_FREQ, PROP_DELAY, PROP_TIMING, propExecOrbitalfixing, propdata) );
870 SCIP_CALL( SCIPsetPropPresol(scip, prop, propPresolOrbitalFixing, PROP_PRESOL_PRIORITY, PROP_PRESOL_MAXROUNDS, PROP_PRESOLTIMING) );
882 "timing of symmetry computation for orbital fixing (0 = before presolving, 1 = during presolving, 2 = at first call)",
SCIP_RETCODE SCIPsetPropPresol(SCIP *scip, SCIP_PROP *prop, SCIP_DECL_PROPPRESOL((*proppresol)), int presolpriority, int presolmaxrounds, SCIP_PRESOLTIMING presoltiming)
Definition: scip_prop.c:349
Definition: type_result.h:33
static SCIP_DECL_PROPINIT(propInitOrbitalfixing)
Definition: prop_orbitalfixing.c:613
SCIP_RETCODE SCIPtightenVarLb(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound, SCIP_Bool force, SCIP_Bool *infeasible, SCIP_Bool *tightened)
Definition: scip_var.c:5119
SCIP_RETCODE SCIPincludeTable(SCIP *scip, const char *name, const char *desc, SCIP_Bool active, SCIP_DECL_TABLECOPY((*tablecopy)), SCIP_DECL_TABLEFREE((*tablefree)), SCIP_DECL_TABLEINIT((*tableinit)), SCIP_DECL_TABLEEXIT((*tableexit)), SCIP_DECL_TABLEINITSOL((*tableinitsol)), SCIP_DECL_TABLEEXITSOL((*tableexitsol)), SCIP_DECL_TABLEOUTPUT((*tableoutput)), SCIP_TABLEDATA *tabledata, int position, SCIP_STAGE earlieststage)
Definition: scip_table.c:46
public methods for branch and bound tree
Definition: struct_scip.h:58
Definition: struct_var.h:151
Definition: type_result.h:49
Definition: struct_var.h:198
Definition: struct_var.h:82
static SCIP_DECL_PROPRESPROP(propRespropOrbitalfixing)
Definition: prop_orbitalfixing.c:829
static SCIP_DECL_PROPINITPRE(propInitpreOrbitalfixing)
Definition: prop_orbitalfixing.c:672
SCIP_RETCODE SCIPhashmapCreate(SCIP_HASHMAP **hashmap, BMS_BLKMEM *blkmem, int mapsize)
Definition: misc.c:2891
Definition: type_var.h:53
static SCIP_RETCODE performOrbitalFixing(SCIP *scip, SCIP_VAR **permvars, int npermvars, int *orbits, int *orbitbegins, int norbits, SCIP_Bool *infeasible, int *nfixedzero, int *nfixedone)
Definition: prop_orbitalfixing.c:213
SCIP_RETCODE SCIPhashmapInsertInt(SCIP_HASHMAP *hashmap, void *origin, int image)
Definition: misc.c:3009
SCIP_RETCODE SCIPcomputeGroupOrbitsSymbreak(SCIP *scip, SCIP_VAR **permvars, int npermvars, int **perms, int nperms, SCIP_Shortbool *activeperms, int *orbits, int *orbitbegins, int *norbits)
Definition: presol_symbreak.c:1391
SCIP_RETCODE SCIPtightenVarUb(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound, SCIP_Bool force, SCIP_Bool *infeasible, SCIP_Bool *tightened)
Definition: scip_var.c:5235
presolver for adding symmetry breaking constraints
SCIP_Bool SCIPisEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
Definition: scip_numerics.c:516
SCIP_RETCODE SCIPaddIntParam(SCIP *scip, const char *name, const char *desc, int *valueptr, SCIP_Bool isadvanced, int defaultvalue, int minvalue, int maxvalue, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)
Definition: scip_param.c:155
Definition: struct_tree.h:132
SCIP_Bool SCIPhashmapExists(SCIP_HASHMAP *hashmap, void *origin)
Definition: misc.c:3240
Definition: struct_misc.h:127
public methods for displaying statistic tables
static SCIP_DECL_PROPEXIT(propExitOrbitalfixing)
Definition: prop_orbitalfixing.c:640
Definition: type_result.h:35
SCIP_RETCODE SCIPgetGeneratorsSymmetry(SCIP *scip, SYM_SPEC symspecrequire, SYM_SPEC symspecrequirefixed, SCIP_Bool recompute, int *npermvars, SCIP_VAR ***permvars, int *nperms, int ***perms, SCIP_Real *log10groupsize, SCIP_Bool *binvaraffected)
Definition: presol_symmetry.c:1589
SCIP_RETCODE SCIPgetIntParam(SCIP *scip, const char *name, int *value)
Definition: scip_param.c:341
Definition: type_retcode.h:33
Definition: type_stat.h:33
static SCIP_DECL_PROPFREE(propFreeOrbitalfixing)
Definition: prop_orbitalfixing.c:594
Definition: type_result.h:42
void SCIPverbMessage(SCIP *scip, SCIP_VERBLEVEL msgverblevel, FILE *file, const char *formatstr,...)
Definition: scip_message.c:296
Definition: struct_prop.h:37
static SCIP_RETCODE getSymmetries(SCIP *scip, SCIP_PROPDATA *propdata)
Definition: prop_orbitalfixing.c:150
static SCIP_DECL_PROPPRESOL(propPresolOrbitalFixing)
Definition: prop_orbitalfixing.c:707
static SCIP_RETCODE computeBranchingVariables(SCIP *scip, int nvars, SCIP_HASHMAP *varmap, SCIP_Shortbool *b1, SCIP_Bool *success)
Definition: prop_orbitalfixing.c:349
SCIP_RETCODE SCIPsetPropInit(SCIP *scip, SCIP_PROP *prop, SCIP_DECL_PROPINIT((*propinit)))
Definition: scip_prop.c:253
Definition: type_var.h:55
SCIP_BOUNDCHGTYPE SCIPboundchgGetBoundchgtype(SCIP_BOUNDCHG *boundchg)
Definition: var.c:16647
static SCIP_DECL_PROPEXEC(propExecOrbitalfixing)
Definition: prop_orbitalfixing.c:764
Definition: type_message.h:43
SCIP_RETCODE SCIPincludePropOrbitalfixing(SCIP *scip)
Definition: prop_orbitalfixing.c:840
propagator for orbital fixing
SCIP_BOUNDCHG * SCIPdomchgGetBoundchg(SCIP_DOMCHG *domchg, int pos)
Definition: var.c:16685
static SCIP_DECL_TABLEFREE(tableFreeOrbitalfixing)
Definition: prop_orbitalfixing.c:132
static SCIP_RETCODE propagateOrbitalFixing(SCIP *scip, SCIP_PROPDATA *propdata, SCIP_Bool *infeasible, int *nprop)
Definition: prop_orbitalfixing.c:436
static SCIP_DECL_TABLEOUTPUT(tableOutputOrbitalfixing)
Definition: prop_orbitalfixing.c:108
SCIP_RETCODE SCIPprintNodeRootPath(SCIP *scip, SCIP_NODE *node, FILE *file)
Definition: scip_tree.c:574
SCIP_RETCODE SCIPsetPropResprop(SCIP *scip, SCIP_PROP *prop, SCIP_DECL_PROPRESPROP((*propresprop)))
Definition: scip_prop.c:382
SCIP_RETCODE SCIPgetPermvarsObjSymmetry(SCIP *scip, SCIP_Real **permvarsobj)
Definition: presol_symmetry.c:1676
presolver for storing symmetry information about current problem
SCIP_RETCODE SCIPsetPropFree(SCIP *scip, SCIP_PROP *prop, SCIP_DECL_PROPFREE((*propfree)))
Definition: scip_prop.c:237
Definition: type_set.h:44
int SCIPhashmapGetImageInt(SCIP_HASHMAP *hashmap, void *origin)
Definition: misc.c:3098
SCIP_RETCODE SCIPsetPropInitpre(SCIP *scip, SCIP_PROP *prop, SCIP_DECL_PROPINITPRE((*propinitpre)))
Definition: scip_prop.c:317
Definition: objbenders.h:33
SCIP_RETCODE SCIPsetPropExit(SCIP *scip, SCIP_PROP *prop, SCIP_DECL_PROPEXIT((*propexit)))
Definition: scip_prop.c:269
Definition: type_result.h:39
SCIP_RETCODE SCIPaddBoolParam(SCIP *scip, const char *name, const char *desc, SCIP_Bool *valueptr, SCIP_Bool isadvanced, SCIP_Bool defaultvalue, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)
Definition: scip_param.c:129
Definition: type_var.h:74
SCIP_RETCODE SCIPincludePropBasic(SCIP *scip, SCIP_PROP **propptr, const char *name, const char *desc, int priority, int freq, SCIP_Bool delay, SCIP_PROPTIMING timingmask, SCIP_DECL_PROPEXEC((*propexec)), SCIP_PROPDATA *propdata)
Definition: scip_prop.c:184
Definition: type_var.h:58