Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/v80-bugfix'
Browse files Browse the repository at this point in the history
  • Loading branch information
scip-ci committed Nov 15, 2023
2 parents 1cfd809 + 7d11bb0 commit 0ee0f9b
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 35 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -225,18 +225,25 @@ Fixed bugs
- respect unboundedness in the computation of activity bounds in conflict.c to avoid invalid huge bounds due to small coefficients on unbounded variables
- 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

Performance improvements
------------------------

- Use sassy/bliss as default symmetry computation package.

Interface changes
-----------------

### Interfaces to external software

- added interface to nauty/traces for symmetry computation
- added interface to sassy, a preprocessor for symmetry computation
- The directory src/sassy contains the source code of sassy.

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

### Cmake

- added flag option "SYM=sbliss" for using sassy/bliss as a graph automorphism package
Expand All @@ -247,6 +254,11 @@ Performance improvements
- added flag option "sbliss" for SYM variable to specify which graph automorphism package should be used
- use SYM=sbliss by default, since sassy and bliss are now shipped with SCIP

Miscellaneous
-------------

- the parameter change callback is no longer called at the moment a parameter is created

@section RN804 SCIP 8.0.4
*************************

Expand Down
81 changes: 47 additions & 34 deletions src/scip/paramset.c
Original file line number Diff line number Diff line change
Expand Up @@ -640,7 +640,7 @@ SCIP_RETCODE paramCopyString(

/* get value of source parameter and copy it to target parameter */
value = SCIPparamGetString(sourceparam);
SCIP_CALL( SCIPparamSetString(targetparam, set, messagehdlr, value, TRUE) );
SCIP_CALL( SCIPparamSetString(targetparam, set, messagehdlr, value, FALSE, TRUE) );

return SCIP_OKAY;
}
Expand Down Expand Up @@ -1186,7 +1186,7 @@ SCIP_RETCODE paramCreateString(
SCIP_ALLOC( BMSduplicateMemoryArray(&(*param)->data.stringparam.defaultvalue, defaultvalue, strlen(defaultvalue)+1) );
(*param)->data.stringparam.curvalue = NULL;

SCIP_CALL( SCIPparamSetString(*param, NULL, messagehdlr, defaultvalue, TRUE) );
SCIP_CALL( SCIPparamSetString(*param, NULL, messagehdlr, defaultvalue, TRUE, TRUE) );

return SCIP_OKAY;
}
Expand Down Expand Up @@ -1412,7 +1412,7 @@ SCIP_RETCODE paramParseString(
/* remove the quotes */
valuestr[len-1] = '\0';
valuestr++;
SCIP_CALL( SCIPparamSetString(param, set, messagehdlr, valuestr, TRUE) );
SCIP_CALL( SCIPparamSetString(param, set, messagehdlr, valuestr, FALSE, TRUE) );

return SCIP_OKAY;
}
Expand Down Expand Up @@ -2135,7 +2135,7 @@ SCIP_RETCODE SCIPparamsetSetString(
}

/* set the parameter's current value */
SCIP_CALL( SCIPparamSetString(param, set, messagehdlr, value, TRUE) );
SCIP_CALL( SCIPparamSetString(param, set, messagehdlr, value, FALSE, TRUE) );

return SCIP_OKAY;
}
Expand Down Expand Up @@ -4550,15 +4550,17 @@ SCIP_RETCODE SCIPparamSetBool(
/* check if the parameter is not fixed */
SCIP_CALL_QUIET( paramTestFixed(param, messagehdlr) );

if( !initialize )
oldvalue = SCIPparamGetBool(param);

/* set the parameter's current value */
oldvalue = SCIPparamGetBool(param);
if( param->data.boolparam.valueptr != NULL )
*param->data.boolparam.valueptr = value;
else
param->data.boolparam.curvalue = value;

/* call the parameter's change information method */
if( param->paramchgd != NULL && set != NULL )
/* call the parameter's change information method, unless initializing */
if( !initialize && param->paramchgd != NULL && set != NULL )
{
SCIP_RETCODE retcode;

Expand All @@ -4567,9 +4569,9 @@ SCIP_RETCODE SCIPparamSetBool(
if( retcode == SCIP_PARAMETERWRONGVAL )
{
if( param->data.boolparam.valueptr != NULL )
*param->data.boolparam.valueptr = oldvalue;
*param->data.boolparam.valueptr = oldvalue; /*lint !e644*/
else
param->data.boolparam.curvalue = oldvalue;
param->data.boolparam.curvalue = oldvalue; /*lint !e644*/
}
else
{
Expand Down Expand Up @@ -4610,15 +4612,17 @@ SCIP_RETCODE SCIPparamSetInt(
/* check if the parameter is not fixed */
SCIP_CALL_QUIET( paramTestFixed(param, messagehdlr) );

if( !initialize )
oldvalue = SCIPparamGetInt(param);

/* set the parameter's current value */
oldvalue = SCIPparamGetInt(param);
if( param->data.intparam.valueptr != NULL )
*param->data.intparam.valueptr = value;
else
param->data.intparam.curvalue = value;

/* call the parameter's change information method */
if( param->paramchgd != NULL && set != NULL )
/* call the parameter's change information method, unless initialization */
if( !initialize && param->paramchgd != NULL && set != NULL )
{
SCIP_RETCODE retcode;

Expand All @@ -4627,9 +4631,9 @@ SCIP_RETCODE SCIPparamSetInt(
if( retcode == SCIP_PARAMETERWRONGVAL )
{
if( param->data.intparam.valueptr != NULL )
*param->data.intparam.valueptr = oldvalue;
*param->data.intparam.valueptr = oldvalue; /*lint !e644*/
else
param->data.intparam.curvalue = oldvalue;
param->data.intparam.curvalue = oldvalue; /*lint !e644*/
}
else
{
Expand Down Expand Up @@ -4670,15 +4674,17 @@ SCIP_RETCODE SCIPparamSetLongint(
/* check if the parameter is not fixed */
SCIP_CALL_QUIET( paramTestFixed(param, messagehdlr) );

if( !initialize )
oldvalue = SCIPparamGetLongint(param);

/* set the parameter's current value */
oldvalue = SCIPparamGetLongint(param);
if( param->data.longintparam.valueptr != NULL )
*param->data.longintparam.valueptr = value;
else
param->data.longintparam.curvalue = value;

/* call the parameter's change information method */
if( param->paramchgd != NULL && set != NULL )
/* call the parameter's change information method, unless initialization */
if( !initialize && param->paramchgd != NULL && set != NULL )
{
SCIP_RETCODE retcode;

Expand All @@ -4687,9 +4693,9 @@ SCIP_RETCODE SCIPparamSetLongint(
if( retcode == SCIP_PARAMETERWRONGVAL )
{
if( param->data.longintparam.valueptr != NULL )
*param->data.longintparam.valueptr = oldvalue;
*param->data.longintparam.valueptr = oldvalue; /*lint !e644*/
else
param->data.longintparam.curvalue = oldvalue;
param->data.longintparam.curvalue = oldvalue; /*lint !e644*/
}
else
{
Expand Down Expand Up @@ -4732,15 +4738,17 @@ SCIP_RETCODE SCIPparamSetReal(
/* check if the parameter is not fixed */
SCIP_CALL_QUIET( paramTestFixed(param, messagehdlr) );

if( !initialize )
oldvalue = SCIPparamGetReal(param);

/* set the parameter's current value */
oldvalue = SCIPparamGetReal(param);
if( param->data.realparam.valueptr != NULL )
*param->data.realparam.valueptr = value;
else
param->data.realparam.curvalue = value;

/* call the parameter's change information method */
if( param->paramchgd != NULL && set != NULL )
/* call the parameter's change information method, unless initializing */
if( !initialize && param->paramchgd != NULL && set != NULL )
{
SCIP_RETCODE retcode;

Expand All @@ -4749,9 +4757,9 @@ SCIP_RETCODE SCIPparamSetReal(
if( retcode == SCIP_PARAMETERWRONGVAL )
{
if( param->data.realparam.valueptr != NULL )
*param->data.realparam.valueptr = oldvalue;
*param->data.realparam.valueptr = oldvalue; /*lint !e644*/
else
param->data.realparam.curvalue = oldvalue;
param->data.realparam.curvalue = oldvalue; /*lint !e644*/
}
else
{
Expand Down Expand Up @@ -4791,15 +4799,17 @@ SCIP_RETCODE SCIPparamSetChar(

SCIP_CALL_QUIET( paramTestFixed(param, messagehdlr) );

if( !initialize )
oldvalue = SCIPparamGetChar(param);

/* set the parameter's current value */
oldvalue = SCIPparamGetChar(param);
if( param->data.charparam.valueptr != NULL )
*param->data.charparam.valueptr = value;
else
param->data.charparam.curvalue = value;

/* call the parameter's change information method */
if( param->paramchgd != NULL && set != NULL )
/* call the parameter's change information method, unless initializing */
if( !initialize && param->paramchgd != NULL && set != NULL )
{
SCIP_RETCODE retcode;

Expand All @@ -4808,9 +4818,9 @@ SCIP_RETCODE SCIPparamSetChar(
if( retcode == SCIP_PARAMETERWRONGVAL )
{
if( param->data.charparam.valueptr != NULL )
*param->data.charparam.valueptr = oldvalue;
*param->data.charparam.valueptr = oldvalue; /*lint !e644*/
else
param->data.charparam.curvalue = oldvalue;
param->data.charparam.curvalue = oldvalue; /*lint !e644*/
}
else
{
Expand All @@ -4833,6 +4843,7 @@ SCIP_RETCODE SCIPparamSetString(
SCIP_SET* set, /**< global SCIP settings, or NULL if param change method should not be called */
SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
const char* value, /**< new value of the parameter */
SCIP_Bool initialize, /**< is this the initialization of the parameter? */
SCIP_Bool quiet /**< should the parameter be set quiet (no output) */
)
{
Expand All @@ -4847,17 +4858,19 @@ SCIP_RETCODE SCIPparamSetString(
/* set the parameter's current value */
if( param->data.stringparam.valueptr != NULL )
{
oldvalue = *param->data.stringparam.valueptr;
if( !initialize )
oldvalue = *param->data.stringparam.valueptr;
SCIP_ALLOC( BMSduplicateMemoryArray(param->data.stringparam.valueptr, value, strlen(value)+1) );
}
else
{
oldvalue = param->data.stringparam.curvalue;
if( !initialize )
oldvalue = param->data.stringparam.curvalue;
SCIP_ALLOC( BMSduplicateMemoryArray(&param->data.stringparam.curvalue, value, strlen(value)+1) );
}

/* call the parameter's change information method */
if( param->paramchgd != NULL && set != NULL )
/* call the parameter's change information method, unless initializing */
if( !initialize && param->paramchgd != NULL && set != NULL )
{
SCIP_RETCODE retcode;

Expand Down Expand Up @@ -5014,7 +5027,7 @@ SCIP_RETCODE SCIPparamSetToDefault(
break;

case SCIP_PARAMTYPE_STRING:
SCIP_CALL( SCIPparamSetString(param, set, messagehdlr, SCIPparamGetStringDefault(param), TRUE) );
SCIP_CALL( SCIPparamSetString(param, set, messagehdlr, SCIPparamGetStringDefault(param), FALSE, TRUE) );
break;

default:
Expand Down
1 change: 1 addition & 0 deletions src/scip/paramset.h
Original file line number Diff line number Diff line change
Expand Up @@ -533,6 +533,7 @@ SCIP_RETCODE SCIPparamSetString(
SCIP_SET* set, /**< global SCIP settings, or NULL if param change method should not be called */
SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
const char* value, /**< new value of the parameter */
SCIP_Bool initialize, /**< is this the initialization of the parameter? */
SCIP_Bool quiet /**< should the parameter be set quiet (no output) */
);

Expand Down
2 changes: 1 addition & 1 deletion src/scip/set.c
Original file line number Diff line number Diff line change
Expand Up @@ -3439,7 +3439,7 @@ SCIP_RETCODE SCIPsetChgStringParam(
assert(set != NULL);
assert(param != NULL);

retcode = SCIPparamSetString(param, set, messagehdlr, value, TRUE);
retcode = SCIPparamSetString(param, set, messagehdlr, value, FALSE, TRUE);

if( retcode != SCIP_PARAMETERWRONGVAL )
{
Expand Down

0 comments on commit 0ee0f9b

Please sign in to comment.