Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/v90-bugfix'
Browse files Browse the repository at this point in the history
  • Loading branch information
scip-ci committed Dec 18, 2023
2 parents 946b3c7 + 284f6e9 commit 645d8fd
Show file tree
Hide file tree
Showing 9 changed files with 34 additions and 75 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,8 @@ Testing
-------
- changed `set lim obj` to `set lim objective` in ctest since `obj` is no longer unambiguous

- flush changes at the end of SCIPlpiSetBase() in lpi_grb.c to apply the newly set basis correctly

Build system
------------

Expand Down Expand Up @@ -284,6 +286,7 @@ Fixed bugs
- ensure positive sides of a linear constraint when recognizing a set partition in rangedRowSimplify() to account for redundancy issues
- relax numerical conditions for variable aggregations to avert invalid variable fixings
- fixed harmless read of uninitialized data when creating parameters
- fix call of SCIPnlpiOraclePrintProblem in nlpi_worhp

Performance improvements
------------------------
Expand Down
3 changes: 3 additions & 0 deletions src/lpi/lpi_grb.c
Original file line number Diff line number Diff line change
Expand Up @@ -4656,6 +4656,9 @@ SCIP_RETCODE SCIPlpiSetBase(
CHECK_ZERO( lpi->messagehdlr, GRBsetintattrarray(lpi->grbmodel, GRB_INT_ATTR_CBASIS, 0, nrows, lpi->rstat) );
CHECK_ZERO( lpi->messagehdlr, GRBsetintattrarray(lpi->grbmodel, GRB_INT_ATTR_VBASIS, 0, ncols+lpi->nrngrows, lpi->cstat) );

/* flush model changes */
CHECK_ZERO( lpi->messagehdlr, GRBupdatemodel(lpi->grbmodel) );

return SCIP_OKAY;
}

Expand Down
8 changes: 4 additions & 4 deletions src/scip/cons_orbitope.c
Original file line number Diff line number Diff line change
Expand Up @@ -2117,7 +2117,7 @@ SCIP_RETCODE resolvePropagation(

#ifdef SCIP_DEBUG
(void) SCIPsnprintf(tmpstr, SCIP_MAXSTRLEN, " (%d,%d)", p1, p2);
(void) strncat(str, tmpstr, SCIP_MAXSTRLEN);
(void) strncat(str, tmpstr, SCIP_MAXSTRLEN-1);
#endif

if ( cases[p1][p2] == 3 )
Expand Down Expand Up @@ -2189,7 +2189,7 @@ SCIP_RETCODE resolvePropagation(

#ifdef SCIP_DEBUG
(void) SCIPsnprintf(tmpstr, SCIP_MAXSTRLEN, " (%d,%d)", p1, p2);
(void) strncat(str, tmpstr, SCIP_MAXSTRLEN);
(void) strncat(str, tmpstr, SCIP_MAXSTRLEN-1);
#endif
}
#ifndef NDEBUG
Expand All @@ -2216,7 +2216,7 @@ SCIP_RETCODE resolvePropagation(
/* partitioning case */
#ifdef SCIP_DEBUG
(void) SCIPsnprintf(tmpstr, SCIP_MAXSTRLEN, " before bar: ");
(void) strncat(str, tmpstr, SCIP_MAXSTRLEN);
(void) strncat(str, tmpstr, SCIP_MAXSTRLEN-1);
#endif
/* add variables before the bar in the partitioning case */
for (k = 0; k < j; ++k)
Expand All @@ -2226,7 +2226,7 @@ SCIP_RETCODE resolvePropagation(
*result = SCIP_SUCCESS;
#ifdef SCIP_DEBUG
(void) SCIPsnprintf(tmpstr, SCIP_MAXSTRLEN, " (%d,%d)", i, k);
(void) strncat(str, tmpstr, SCIP_MAXSTRLEN);
(void) strncat(str, tmpstr, SCIP_MAXSTRLEN-1);
#endif
}

Expand Down
2 changes: 1 addition & 1 deletion src/scip/nlpi_worhp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1351,7 +1351,7 @@ SCIP_DECL_NLPISOLVE(nlpiSolveWorhp)
SCIP_CALL( handleNlpParam(scip, nlpi, par, param) );

#ifdef SCIP_DEBUG
SCIP_CALL( SCIPnlpiOraclePrintProblem(problem->oracle, nlpidata->messagehdlr, NULL) );
SCIP_CALL( SCIPnlpiOraclePrintProblem(scip, problem->oracle, NULL) );
#endif

/* set initial guess (if available) */
Expand Down
2 changes: 1 addition & 1 deletion src/scip/struct_cons.h
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ struct SCIP_Conshdlr
SCIP_DECL_CONSGETPERMSYMGRAPH((*consgetpermsymgraph)); /**< constraint get permutation symmetry detection graph method */
SCIP_DECL_CONSGETSIGNEDPERMSYMGRAPH((*consgetsignedpermsymgraph)); /**< constraint get signed permutation symmetry detection graph method */
SCIP_CONSHDLRDATA* conshdlrdata; /**< constraint handler data */
SCIP_CONS** conss; /**< array with all transformed constraints, active ones preceed inactive
SCIP_CONS** conss; /**< array with all transformed constraints, active ones precede inactive
* ones; a constraint is active if it is global and was not removed
* during presolving or it was added locally (in that case the local flag
* is TRUE) and the current node belongs to the corresponding sub tree */
Expand Down
8 changes: 4 additions & 4 deletions src/scip/symmetry.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@
#include "scip/scip.h"
#include "scip/cons_setppc.h"
#include "scip/cons_orbitope.h"
#include <scip/misc.h>
#include <symmetry/struct_symmetry.h>
#include <symmetry/type_symmetry.h>
#include "scip/misc.h"
#include "symmetry/struct_symmetry.h"
#include "symmetry/type_symmetry.h"


/** compute non-trivial orbits of symmetry group
Expand Down Expand Up @@ -964,7 +964,7 @@ SCIP_RETCODE SCIPcomputeComponentsSym(
SCIPdisjointsetFree(&componentstovar, SCIPblkmem(scip));

#ifdef SCIP_OUTPUT
printf("number of components: %d\n", propdata->ncomponents);
printf("number of components: %d\n", *ncomponents);
for (i = 0; i < *ncomponents; ++i)
{
printf("Component %d contains the following permutations:\n\t", i);
Expand Down
18 changes: 3 additions & 15 deletions src/symmetry/compute_symmetry_bliss.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,25 +151,13 @@ SCIP_Bool SYMcanComputeSymmetry(void)
}

/** return name of external program used to compute generators */
static
char* initStaticBlissName(void)
const char* SYMsymmetryGetName(void)
{
char* blissname = new char[100];
#ifdef BLISS_PATCH_PRESENT
(void) snprintf(blissname, 100, "bliss %sp", bliss::version);
return "bliss " BLISS_VERSION "p";
#else
(void) snprintf(blissname, 100, "bliss %s", bliss::version);
return "bliss " BLISS_VERSION;
#endif
return blissname;
}

/* static name for bliss */
static char* blissname = initStaticBlissName();

/** return name of external program used to compute generators */
const char* SYMsymmetryGetName(void)
{
return blissname;
}

/** return description of external program used to compute generators */
Expand Down
32 changes: 7 additions & 25 deletions src/symmetry/compute_symmetry_sassy_bliss.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -186,34 +186,13 @@ SCIP_Bool SYMcanComputeSymmetry(void)
}

/** return name of external program used to compute generators */
static
char* initStaticSymmetryName(void)
const char* SYMsymmetryGetName(void)
{
char* blissname = new char[100];
#ifdef BLISS_PATCH_PRESENT
(void) SCIPsnprintf(blissname, 100, "bliss %sp", bliss::version);
return "bliss " BLISS_VERSION "p";
#else
(void) SCIPsnprintf(blissname, 100, "bliss %s", bliss::version);
return "bliss " BLISS_VERSION;
#endif
return blissname;
}

/** return name of external program used to compute generators */
static
char* initStaticSymmetryAddName(void)
{
char* sassyname = new char[100];
(void) SCIPsnprintf(sassyname, 100, "sassy %d.%d", SASSY_VERSION_MAJOR, SASSY_VERSION_MINOR);
return sassyname;
}

static const char* symmetryname = initStaticSymmetryName();
static const char* symmetryaddname = initStaticSymmetryAddName();

/** return name of external program used to compute generators */
const char* SYMsymmetryGetName(void)
{
return symmetryname;
}

/** return description of external program used to compute generators */
Expand All @@ -222,10 +201,13 @@ const char* SYMsymmetryGetDesc(void)
return "Computing Graph Automorphisms by T. Junttila and P. Kaski (users.aalto.fi/~tjunttil/bliss)";
}

#define STR(x) #x
#define XSTR(x) STR(x)

/** return name of additional external program used for computing symmetries */
const char* SYMsymmetryGetAddName(void)
{
return symmetryaddname;
return "sassy " XSTR(SASSY_VERSION_MAJOR) "." XSTR(SASSY_VERSION_MINOR);
}

/** return description of additional external program used to compute symmetries */
Expand Down
33 changes: 8 additions & 25 deletions src/symmetry/compute_symmetry_sassy_nauty.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -197,35 +197,15 @@ SCIP_Bool SYMcanComputeSymmetry(void)
return TRUE;
}


/** return name of external program used to compute generators */
static
char* initStaticSymmetryName(void)
const char* SYMsymmetryGetName(void)
{
char* nautyname = new char[100];
#ifdef NAUTY
(void) SCIPsnprintf(nautyname, 100, "Nauty %d", NAUTYVERSION);
return "Nauty " NAUTYVERSION;
#else
(void) SCIPsnprintf(nautyname, 100, "Traces %d", NAUTYVERSION);
return "Traces " NAUTYVERSION;
#endif
return nautyname;
}

/** return name of external program used to compute generators */
static
char* initStaticSymmetryAddName(void)
{
char* sassyname = new char[100];
(void) SCIPsnprintf(sassyname, 100, "sassy %d.%d", SASSY_VERSION_MAJOR, SASSY_VERSION_MINOR);
return sassyname;
}

static const char* symmetryname = initStaticSymmetryName();
static const char* symmetryaddname = initStaticSymmetryAddName();

/** return name of external program used to compute generators */
const char* SYMsymmetryGetName(void)
{
return symmetryname;
}

/** return description of external program used to compute generators */
Expand All @@ -238,10 +218,13 @@ const char* SYMsymmetryGetDesc(void)
#endif
}

#define STR(x) #x
#define XSTR(x) STR(x)

/** return name of additional external program used for computing symmetries */
const char* SYMsymmetryGetAddName(void)
{
return symmetryaddname;
return "sassy " XSTR(SASSY_VERSION_MAJOR) "." XSTR(SASSY_VERSION_MINOR);
}

/** return description of additional external program used to compute symmetries */
Expand Down

0 comments on commit 645d8fd

Please sign in to comment.