Skip to content

Commit

Permalink
Merge branch 'reflection-symmetries' into 'master'
Browse files Browse the repository at this point in the history
Reflection symmetries and new detection mechanism

See merge request integer/scip!3127
  • Loading branch information
Christopher Hojny committed Dec 4, 2023
2 parents c401f5b + 13300f8 commit 4d71c0f
Show file tree
Hide file tree
Showing 63 changed files with 15,323 additions and 9,710 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ Features
- updated statistics on NLP relaxation; information on convexity of NLP has been added
- added new bandit method (EXP.3-IX) that is the new default of the ALNS heuristic
- added dialog to display recognized permutation symmetries ("display symmetry")
- The symmetry detection code has been completely restructured. Instead of completely encoding symmetry information in
prop_symmetry.c, there is a new callback for constraint handlers, which returns symmetry relevant information by
encoding a constraint as a node and edge colored graph. This way, also custom constraint handlers can provide
symmetry information.
- added special presolving step for logicor and set covering/packing for constraints with two variables and one independent variable
- increased the depth field of the tree structure from 16 to 30 bits and the max depth of the search tree from 65534 to 1073741822
- added new cut selector plugin called cutsel_ensemble. Performs a superset of hybrid cutsel. Implements new filtering methods and scoring options.
Expand Down Expand Up @@ -52,6 +56,7 @@ Interface changes
The callback is called if option constraints/nonlinear/linearizeheursol is enabled.
- The callback for copying problem data SCIP_DECL_PROBCOPY() now has a parameter "original" indicating whether the original
or transformed problem should be copied. Similarly, SCIPprobCopy() in prob.h/c has such a parameter.
- Added CONSGETPERMSYMGRAPH and CONSGETSIGNEDPERMSYMGRAPH callback for constraint handlers, which provides symmetry information about constraints to SCIP.

### Deleted and changed API methods

Expand Down Expand Up @@ -141,6 +146,9 @@ Interface changes

### Data structures

- new data structure SYM_GRAPH to encode symmetry information from a constraint
- new data structure SYM_EXPRDATA to encode symmetry information from expressions

Deleted files
-------------

Expand Down
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ set(SCIP_VERSION_MAJOR 8)
set(SCIP_VERSION_MINOR 1)
set(SCIP_VERSION_PATCH 0)
set(SCIP_VERSION_SUB 5)
set(SCIP_VERSION_API 111)
set(SCIP_VERSION_API 112)

project(SCIP
VERSION ${SCIP_VERSION_MAJOR}.${SCIP_VERSION_MINOR}.${SCIP_VERSION_PATCH}.${SCIP_VERSION_SUB}
Expand Down Expand Up @@ -149,7 +149,7 @@ if(SYM STREQUAL "bliss")
set(SYM_PIC_LIBRARIES libbliss)
elseif(SYM STREQUAL "sbliss")
message(STATUS "Support SYM: sassy+bliss")
set(sym symmetry/compute_symmetry_sassy_bliss.cpp)
set(sym symmetry/compute_symmetry_sassy_bliss.cpp symmetry/build_sassy_graph.cpp)

# configure bliss
set(BUILD_SHARED_LIBS OFF)
Expand Down Expand Up @@ -211,7 +211,7 @@ elseif(SYM STREQUAL "nauty")
set(SYM_PIC_LIBRARIES libnauty)
elseif(SYM STREQUAL "snauty")
message(STATUS "Support SYM: sassy+nauty")
set(sym symmetry/compute_symmetry_sassy_nauty.cpp)
set(sym symmetry/compute_symmetry_sassy_nauty.cpp symmetry/build_sassy_graph.cpp)

if(SHARED)
set(PIC_FLAG "CFLAGS='-fPIC'")
Expand Down
8 changes: 6 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,8 @@ endif

SYMOPTIONS += sbliss
ifeq ($(SYM),sbliss)
SYMOBJ = symmetry/compute_symmetry_sassy_bliss.o
SYMOBJ = symmetry/build_sassy_graph.o
SYMOBJ += symmetry/compute_symmetry_sassy_bliss.o
SYMOBJFILES = $(addprefix $(LIBOBJDIR)/,$(SYMOBJ))
SYMSRC = $(addprefix $(SRCDIR)/,$(SYMOBJ:.o=.cpp))
ifeq ($(BLISSEXTERNAL),false)
Expand Down Expand Up @@ -429,7 +430,8 @@ endif

SYMOPTIONS += snauty
ifeq ($(SYM),snauty)
SYMOBJ = symmetry/compute_symmetry_sassy_nauty.o
SYMOBJ = symmetry/build_sassy_graph.o
SYMOBJ += symmetry/compute_symmetry_sassy_nauty.o
SYMOBJFILES = $(addprefix $(LIBOBJDIR)/,$(SYMOBJ))
SYMSRC = $(addprefix $(SRCDIR)/,$(SYMOBJ:.o=.cpp))
ifeq ($(NAUTYEXTERNAL),false)
Expand Down Expand Up @@ -932,6 +934,7 @@ SCIPLIBOBJ = scip/boundstore.o \
scip/solve.o \
scip/stat.o \
scip/symmetry.o \
scip/symmetry_graph.o \
scip/symmetry_orbitopal.o \
scip/symmetry_orbital.o \
scip/symmetry_lexred.o \
Expand Down Expand Up @@ -1314,6 +1317,7 @@ ifneq ($(DFLAGS),)
-include $(OBJSCIPOBJFILES:.o=.d)
-include $(LPILIBOBJFILES:.o=.d)
-include $(TPILIBOBJFILES:.o=.d)
-include $(SYMOBJFILES:.o=.d)
else
ifeq ($(VERBOSE),true)
$(info No compilation dependencies. If changing header files, do a make clean before building.)
Expand Down
49 changes: 33 additions & 16 deletions applications/Scheduler/src/cons_optcumulative.c
Original file line number Diff line number Diff line change
Expand Up @@ -4104,6 +4104,7 @@ SCIP_RETCODE SCIPincludeConshdlrOptcumulative(
SCIP_CONSHDLRDATA* conshdlrdata;
SCIP_EVENTHDLR* eventhdlrbinvars;
SCIP_EVENTHDLR* eventhdlrintvars;
SCIP_CONSHDLR* conshdlr;

/* create event handler for bound change events */
SCIP_CALL( SCIPincludeEventhdlrBasic(scip, &eventhdlrbinvars, EVENTHDLR_BINVARS_NAME, EVENTHDLR_BINVARS_DESC,
Expand All @@ -4117,22 +4118,38 @@ SCIP_RETCODE SCIPincludeConshdlrOptcumulative(
SCIP_CALL( conshdlrdataCreate(scip, &conshdlrdata, eventhdlrbinvars, eventhdlrintvars) );

/* include constraint handler */
SCIP_CALL( SCIPincludeConshdlr(scip, CONSHDLR_NAME, CONSHDLR_DESC,
CONSHDLR_SEPAPRIORITY, CONSHDLR_ENFOPRIORITY, CONSHDLR_CHECKPRIORITY,
CONSHDLR_SEPAFREQ, CONSHDLR_PROPFREQ, CONSHDLR_EAGERFREQ, CONSHDLR_MAXPREROUNDS,
CONSHDLR_DELAYSEPA, CONSHDLR_DELAYPROP, CONSHDLR_NEEDSCONS,
CONSHDLR_PROP_TIMING, CONSHDLR_PRESOLTIMING,
conshdlrCopyOptcumulative,
consFreeOptcumulative, consInitOptcumulative, consExitOptcumulative,
consInitpreOptcumulative, consExitpreOptcumulative, consInitsolOptcumulative, consExitsolOptcumulative,
consDeleteOptcumulative, consTransOptcumulative, consInitlpOptcumulative,
consSepalpOptcumulative, consSepasolOptcumulative, consEnfolpOptcumulative, consEnforelaxOptcomulative, consEnfopsOptcumulative, consCheckOptcumulative,
consPropOptcumulative, consPresolOptcumulative, consRespropOptcumulative, consLockOptcumulative,
consActiveOptcumulative, consDeactiveOptcumulative,
consEnableOptcumulative, consDisableOptcumulative,
consDelvarsOptcumulative, consPrintOptcumulative, consCopyOptcumulative, consParseOptcumulative,
NULL, NULL, NULL,
conshdlrdata) );
SCIP_CALL( SCIPincludeConshdlrBasic(scip, &conshdlr, CONSHDLR_NAME, CONSHDLR_DESC,
CONSHDLR_ENFOPRIORITY, CONSHDLR_CHECKPRIORITY, CONSHDLR_EAGERFREQ, CONSHDLR_NEEDSCONS,
consEnfolpOptcumulative, consEnfopsOptcumulative, consCheckOptcumulative,
consLockOptcumulative, conshdlrdata) );

/* set non-fundamental callbacks via specific setter functions */
SCIP_CALL( SCIPsetConshdlrCopy(scip, conshdlr, conshdlrCopyOptcumulative, consCopyOptcumulative) );
SCIP_CALL( SCIPsetConshdlrInit(scip, conshdlr, consInitOptcumulative) );
SCIP_CALL( SCIPsetConshdlrExit(scip, conshdlr, consExitOptcumulative) );
SCIP_CALL( SCIPsetConshdlrInitpre(scip, conshdlr, consInitpreOptcumulative) );
SCIP_CALL( SCIPsetConshdlrExitpre(scip, conshdlr, consExitpreOptcumulative) );
SCIP_CALL( SCIPsetConshdlrInitlp(scip, conshdlr, consInitlpOptcumulative) );
SCIP_CALL( SCIPsetConshdlrInitsol(scip, conshdlr, consInitsolOptcumulative) );
SCIP_CALL( SCIPsetConshdlrExitsol(scip, conshdlr, consExitsolOptcumulative) );
SCIP_CALL( SCIPsetConshdlrActive(scip, conshdlr, consActiveOptcumulative) );
SCIP_CALL( SCIPsetConshdlrDelete(scip, conshdlr, consDeactiveOptcumulative) );
SCIP_CALL( SCIPsetConshdlrEnable(scip, conshdlr, consEnableOptcumulative) );
SCIP_CALL( SCIPsetConshdlrDisable(scip, conshdlr, consDisableOptcumulative) );
SCIP_CALL( SCIPsetConshdlrDelvars(scip, conshdlr, consDelvarsOptcumulative) );
SCIP_CALL( SCIPsetConshdlrFree(scip, conshdlr, consFreeOptcumulative) );
SCIP_CALL( SCIPsetConshdlrDelete(scip, conshdlr, consDeleteOptcumulative) );
SCIP_CALL( SCIPsetConshdlrParse(scip, conshdlr, consParseOptcumulative) );
SCIP_CALL( SCIPsetConshdlrPresol(scip, conshdlr, consPresolOptcumulative,
CONSHDLR_MAXPREROUNDS, CONSHDLR_PRESOLTIMING) );
SCIP_CALL( SCIPsetConshdlrPrint(scip, conshdlr, consPrintOptcumulative) );
SCIP_CALL( SCIPsetConshdlrProp(scip, conshdlr, consPropOptcumulative, CONSHDLR_PROPFREQ,
CONSHDLR_DELAYPROP, CONSHDLR_PROP_TIMING) );
SCIP_CALL( SCIPsetConshdlrResprop(scip, conshdlr, consRespropOptcumulative) );
SCIP_CALL( SCIPsetConshdlrSepa(scip, conshdlr, consSepalpOptcumulative, consSepasolOptcumulative,
CONSHDLR_SEPAFREQ, CONSHDLR_SEPAPRIORITY, CONSHDLR_DELAYSEPA) );
SCIP_CALL( SCIPsetConshdlrTrans(scip, conshdlr, consTransOptcumulative) );
SCIP_CALL( SCIPsetConshdlrEnforelax(scip, conshdlr, consEnforelaxOptcomulative) );

/* add optcumulative constraint handler parameters */
SCIP_CALL( SCIPaddBoolParam(scip,
Expand Down
Loading

0 comments on commit 4d71c0f

Please sign in to comment.