Skip to content

Commit

Permalink
Merge branch 'rename-symmetry-methods-and-params' into 'master'
Browse files Browse the repository at this point in the history
Rename symmetry methods and params

See merge request integer/scip!3311
  • Loading branch information
Christopher Hojny committed Feb 1, 2024
2 parents 3bfa7dc + 60b794c commit 7ec2b8d
Show file tree
Hide file tree
Showing 23 changed files with 142 additions and 157 deletions.
8 changes: 4 additions & 4 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ Interface changes
- SCIPincludeObjConshdlr(), SCIPincludeConshdlr(), SCIPconshdlrCreate() receive two more arguments for the
conshdlr callbacks CONSGETPERMSYMGRAPH and CONSGETSIGNEDPERMSYMGRAPH
- removed SYM_VARTYPE, SYM_OPTYPE, SYM_CONSTTYPE, SYM_RHSTYPE, SYM_MATRIXDATA
- new parameter issigend for SCIPcomputeOrbitsSym()
- new parameter issigned for SCIPcomputeOrbitsSym()
- new parameter symtype for SCIPcomputeComponentsSym()
- new parameter symtype and permvardomaincenter for SCIPlexicographicReductionAddPermutation()
- replaced parameters matrixdata and exprdata of SYMcomputeSymmetryGenerators() by graph
Expand Down Expand Up @@ -133,12 +133,12 @@ Interface changes
- SCIPsetConshdlrGetPermsymGraph() and SCIPsetConshdlrGetSignedPermsymGraph() to set the (signed) permutation symmetry detection graph of a constraint
- SCIPconshdlrSupportsPermsymDetection() and SCIPconshdlrSupportsSignedPermsymDetection() to access whether a conshdlr supports detection of (signed) permutation symmetries
- new API functions for creating and manipulating a symmetry detection graph: SCIPcreateSymgraph(), SCIPfreeSymgraph(), SCIPcopySymgraph(), SCIPextendPermsymDetectionGraphLinear(),
SCIPaddSymgraphVarAggegration(), SCIPaddSymgraphOpnode(), SCIPaddSymgraphValnode(), SCIPaddSymgraphConsnode(), SCIPgetSymgraphVarnodeidx(), SCIPgetSymgraphNegatedVarnodeidx(),
SCIPaddSymgraphVarAggregation(), SCIPaddSymgraphOpnode(), SCIPaddSymgraphValnode(), SCIPaddSymgraphConsnode(), SCIPgetSymgraphVarnodeidx(), SCIPgetSymgraphNegatedVarnodeidx(),
SCIPupdateSymgraphLhs(), SCIPupdateSymgraphRhs(), SCIPfixSymgraphVarnode(), SCIPaddSymgraphEdge(), SCIPcomputeSymgraphColors(), SCIPgetSymgraphSymtype(), SCIPgetSymgraphVars(),
SCIPgetSymgraphNVars(), SCIPgetSymgraphNConsnodes(), SCIPgetSymgraphNNodes(), SCIPgetSymgraphNEdges(), SCIPgetSymgraphEdgeFirst(), SCIPgetSymgraphEdgeSecond(),
SCIPgetSymgraphVarnodeColor(), SCIPgetSymgraphNodeType(), SCIPgetSymgraphNodeColor(), SCIPisSymgraphEdgeColored(), SCIPgetSymgraphEdgeColor(), SCIPgetSymgraphNVarcolors(),
SCIPhasGraphUniqueEdgetype(), SCIPallocateSymgraphConsnodeperm(), SCIPcreateSymgraphConsnodeperm(), SCIPgetSymgraphConsnodeperm(), SCIPfreeSymgraphConsnodeperm(),
SCIPgetActiveVariables(), SCIPfreeSymDataExpr(), SCIPgetSymExprdataNConstants(), SCIPgetSymExprdataConstants(), SCIPgetCoefSymData(),
SCIPgetSymActiveVariables(), SCIPfreeSymDataExpr(), SCIPgetSymExprdataNConstants(), SCIPgetSymExprdataConstants(), SCIPgetCoefSymData(),
SCIPcreateSymOpNodeType(), SCIPgetSymOpNodeType()
- SCIPexprhdlrSetGetSymdata(), SCIPexprhdlrHasGetSymData(), SCIPgetSymDataExpr(), SCIPcallExprGetSymData() to access symmetry data of expressions
- SYMcheckGraphsAreIdentical() to check whether two symmetry detection graphs are identical
Expand All @@ -148,7 +148,7 @@ Interface changes
- new member SYM_NODETYPE_CONS in SYM_NODETYPE enum
- new members SYM_CONSOPTYPE_SUM, SYM_CONSOPTYPE_SLACK, SYM_CONSOPTYPE_COEF, SYM_CONSOPTYPE_RHS, SYM_CONSOPTYPE_LAST in SYM_CONSOPTYPE enum
- new defintion SCIP_DECL_EXPRGETSYMDATA
- new functions SCIPdetectSingleOrDoubleLexMatrices() and tryHandleDoubleLexMatrices()
- new function SCIPdetectSingleOrDoubleLexMatrices()

### Command line interface

Expand Down
2 changes: 1 addition & 1 deletion src/scip/cons_and.c
Original file line number Diff line number Diff line change
Expand Up @@ -3830,7 +3830,7 @@ SCIP_RETCODE addSymmetryInformation(
vals[nlocvars++] = 2.0;
assert(nlocvars <= nvars);

SCIP_CALL( SCIPgetActiveVariables(scip, symtype, &vars, &vals, &nlocvars, &constant, SCIPisTransformed(scip)) );
SCIP_CALL( SCIPgetSymActiveVariables(scip, symtype, &vars, &vals, &nlocvars, &constant, SCIPisTransformed(scip)) );

SCIP_CALL( SCIPextendPermsymDetectionGraphLinear(scip, graph, vars, vals,
nlocvars, cons, constant, constant, success) );
Expand Down
5 changes: 3 additions & 2 deletions src/scip/cons_bounddisjunction.c
Original file line number Diff line number Diff line change
Expand Up @@ -2013,7 +2013,8 @@ SCIP_RETCODE addSymmetryInformation(
nlocvars = 1;
constant = 0.0;

SCIP_CALL( SCIPgetActiveVariables(scip, symtype, &vars, &vals, &nlocvars, &constant, SCIPisTransformed(scip)) );
SCIP_CALL( SCIPgetSymActiveVariables(scip, symtype, &vars, &vals, &nlocvars, &constant,
SCIPisTransformed(scip)) );

/* add node and edge for bound on literal (bound adapted by constant) */
bound = consdata->boundtypes[i] == SCIP_BOUNDTYPE_UPPER ? consdata->bounds[i] : -consdata->bounds[i];
Expand All @@ -2032,7 +2033,7 @@ SCIP_RETCODE addSymmetryInformation(
}

/* add nodes and edges for variables in aggregation (ignore constant, has been treated above) */
SCIP_CALL( SCIPaddSymgraphVarAggegration(scip, graph, nodeidx, vars, vals, nlocvars, 0.0) );
SCIP_CALL( SCIPaddSymgraphVarAggregation(scip, graph, nodeidx, vars, vals, nlocvars, 0.0) );
}

SCIPfreeBufferArray(scip, &vals);
Expand Down
16 changes: 8 additions & 8 deletions src/scip/cons_cardinality.c
Original file line number Diff line number Diff line change
Expand Up @@ -3182,7 +3182,7 @@ SCIP_DECL_CONSGETPERMSYMGRAPH(consGetPermsymGraphCardinality)
nlocvars = 1;
constant = 0.0;

SCIP_CALL( SCIPgetActiveVariables(scip, SYM_SYMTYPE_PERM, &vars, &vals,
SCIP_CALL( SCIPgetSymActiveVariables(scip, SYM_SYMTYPE_PERM, &vars, &vals,
&nlocvars, &constant, SCIPisTransformed(scip)) );

/* check whether variable is (multi-)aggregated or negated */
Expand All @@ -3196,7 +3196,7 @@ SCIP_DECL_CONSGETPERMSYMGRAPH(consGetPermsymGraphCardinality)
SCIP_CALL( SCIPaddSymgraphEdge(scip, graph, pairnodeidx, nodeidx, FALSE, 0.0) );

/* add nodes and edges for variables in aggregation */
SCIP_CALL( SCIPaddSymgraphVarAggegration(scip, graph, nodeidx, vars, vals, nlocvars, constant) );
SCIP_CALL( SCIPaddSymgraphVarAggregation(scip, graph, nodeidx, vars, vals, nlocvars, constant) );
}
else if( nlocvars == 1 )
{
Expand All @@ -3211,7 +3211,7 @@ SCIP_DECL_CONSGETPERMSYMGRAPH(consGetPermsymGraphCardinality)
nlocvars = 1;
constant = 0.0;

SCIP_CALL( SCIPgetActiveVariables(scip, SYM_SYMTYPE_PERM, &vars, &vals,
SCIP_CALL( SCIPgetSymActiveVariables(scip, SYM_SYMTYPE_PERM, &vars, &vals,
&nlocvars, &constant, SCIPisTransformed(scip)) );

/* check whether variable is (multi-)aggregated or negated */
Expand All @@ -3225,7 +3225,7 @@ SCIP_DECL_CONSGETPERMSYMGRAPH(consGetPermsymGraphCardinality)
SCIP_CALL( SCIPaddSymgraphEdge(scip, graph, pairnodeidx, nodeidx, FALSE, 0.0) );

/* add nodes and edges for variables in aggregation */
SCIP_CALL( SCIPaddSymgraphVarAggegration(scip, graph, nodeidx, vars, vals, nlocvars, constant) );
SCIP_CALL( SCIPaddSymgraphVarAggregation(scip, graph, nodeidx, vars, vals, nlocvars, constant) );
}
else if( nlocvars == 1 )
{
Expand Down Expand Up @@ -3285,7 +3285,7 @@ SCIP_DECL_CONSGETSIGNEDPERMSYMGRAPH(consGetSignedPermsymGraphCardinality)

/* use SYM_SYMTYPE_PERM here to NOT center variable domains at 0, as the latter might not preserve
* cardinality constraints */
SCIP_CALL( SCIPgetActiveVariables(scip, SYM_SYMTYPE_PERM, &vars, &vals,
SCIP_CALL( SCIPgetSymActiveVariables(scip, SYM_SYMTYPE_PERM, &vars, &vals,
&nlocvars, &constant, SCIPisTransformed(scip)) );

/* check whether variable is (multi-) aggregated or negated */
Expand All @@ -3303,7 +3303,7 @@ SCIP_DECL_CONSGETSIGNEDPERMSYMGRAPH(consGetSignedPermsymGraphCardinality)

/* add nodes and edges for variables in aggregation, do not add edges to negated variables
* since this might not necessarily be a symmetry of the cardinality constraint; therefore,
* do not use SCIPaddSymgraphVarAggegration() */
* do not use SCIPaddSymgraphVarAggregation() */
for( j = 0; j < nlocvars; ++j )
{
nodeidx = SCIPgetSymgraphVarnodeidx(scip, graph, vars[j]);
Expand Down Expand Up @@ -3350,7 +3350,7 @@ SCIP_DECL_CONSGETSIGNEDPERMSYMGRAPH(consGetSignedPermsymGraphCardinality)
nlocvars = 1;
constant = 0.0;

SCIP_CALL( SCIPgetActiveVariables(scip, SYM_SYMTYPE_PERM, &vars, &vals,
SCIP_CALL( SCIPgetSymActiveVariables(scip, SYM_SYMTYPE_PERM, &vars, &vals,
&nlocvars, &constant, SCIPisTransformed(scip)) );

/* check whether variable is (multi-)aggregated or negated */
Expand All @@ -3364,7 +3364,7 @@ SCIP_DECL_CONSGETSIGNEDPERMSYMGRAPH(consGetSignedPermsymGraphCardinality)
SCIP_CALL( SCIPaddSymgraphEdge(scip, graph, pairnodeidx, nodeidx, FALSE, 0.0) );

/* add nodes and edges for variables in aggregation */
SCIP_CALL( SCIPaddSymgraphVarAggegration(scip, graph, nodeidx, vars, vals, nlocvars, constant) );
SCIP_CALL( SCIPaddSymgraphVarAggregation(scip, graph, nodeidx, vars, vals, nlocvars, constant) );
}
else if( nlocvars == 1 )
{
Expand Down
12 changes: 6 additions & 6 deletions src/scip/cons_indicator.c
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,7 @@ SCIP_RETCODE addSymmetryInformation(
nlocvars = nvarslincons;

constant = 0.0;
SCIP_CALL( SCIPgetActiveVariables(scip, symtype, &vars, &vals, &nlocvars, &constant, SCIPisTransformed(scip)) );
SCIP_CALL( SCIPgetSymActiveVariables(scip, symtype, &vars, &vals, &nlocvars, &constant, SCIPisTransformed(scip)) );

/* update lhs/rhs due to possible variable aggregation */
lhs -= constant;
Expand All @@ -536,7 +536,7 @@ SCIP_RETCODE addSymmetryInformation(
SCIP_CALL( SCIPaddSymgraphEdge(scip, graph, consnodeidx, opnodeidx, FALSE, 0.0) );

/* add nodes/edes for variables in linear constraint */
SCIP_CALL( SCIPaddSymgraphVarAggegration(scip, graph, opnodeidx, vars, vals, nlocvars, 0.0) );
SCIP_CALL( SCIPaddSymgraphVarAggregation(scip, graph, opnodeidx, vars, vals, nlocvars, 0.0) );

/* create nodes and edges for activation of constraint */
SCIP_CALL( SCIPaddSymgraphOpnode(scip, graph, (int) SYM_CONSOPTYPE_EQ, &eqnodeidx) ); /*lint !e641*/
Expand All @@ -548,7 +548,7 @@ SCIP_RETCODE addSymmetryInformation(
constant = 0.0;
nlocvars = 1;

SCIP_CALL( SCIPgetActiveVariables(scip, symtype, &vars, &vals, &nlocvars, &constant, SCIPisTransformed(scip)) );
SCIP_CALL( SCIPgetSymActiveVariables(scip, symtype, &vars, &vals, &nlocvars, &constant, SCIPisTransformed(scip)) );

/* activation of a constraint is modeled as weight of the edge to the activation variable */
actweight = consdata->activeone ? 1.0 : -1.0;
Expand All @@ -560,7 +560,7 @@ SCIP_RETCODE addSymmetryInformation(
SCIP_CALL( SCIPaddSymgraphEdge(scip, graph, eqnodeidx, opnodeidx, TRUE, actweight) );

/* add nodes and edges for variables in aggregation */
SCIP_CALL( SCIPaddSymgraphVarAggegration(scip, graph, opnodeidx, vars, vals, nlocvars, constant) );
SCIP_CALL( SCIPaddSymgraphVarAggregation(scip, graph, opnodeidx, vars, vals, nlocvars, constant) );
}
else if( nlocvars == 1 )
{
Expand Down Expand Up @@ -588,7 +588,7 @@ SCIP_RETCODE addSymmetryInformation(
constant = 0.0;
nlocvars = 1;

SCIP_CALL( SCIPgetActiveVariables(scip, symtype, &vars, &vals, &nlocvars, &constant, SCIPisTransformed(scip)) );
SCIP_CALL( SCIPgetSymActiveVariables(scip, symtype, &vars, &vals, &nlocvars, &constant, SCIPisTransformed(scip)) );

if( nlocvars > 1 || !SCIPisEQ(scip, vals[0], 1.0) || !SCIPisZero(scip, constant) )
{
Expand All @@ -597,7 +597,7 @@ SCIP_RETCODE addSymmetryInformation(
SCIP_CALL( SCIPaddSymgraphEdge(scip, graph, slacknodeidx, opnodeidx, FALSE, 0.0) );

/* add nodes and edges for variables in aggregation */
SCIP_CALL( SCIPaddSymgraphVarAggegration(scip, graph, opnodeidx, vars, vals, nlocvars, constant) );
SCIP_CALL( SCIPaddSymgraphVarAggregation(scip, graph, opnodeidx, vars, vals, nlocvars, constant) );
}
else if( nlocvars == 1 )
{
Expand Down
2 changes: 1 addition & 1 deletion src/scip/cons_knapsack.c
Original file line number Diff line number Diff line change
Expand Up @@ -12059,7 +12059,7 @@ SCIP_RETCODE addSymmetryInformation(
vals[i] = (SCIP_Real) consdata->weights[i];
}

SCIP_CALL( SCIPgetActiveVariables(scip, symtype, &vars, &vals, &nlocvars, &constant, SCIPisTransformed(scip)) );
SCIP_CALL( SCIPgetSymActiveVariables(scip, symtype, &vars, &vals, &nlocvars, &constant, SCIPisTransformed(scip)) );
rhs = (SCIP_Real) SCIPgetCapacityKnapsack(scip, cons) - constant;

SCIP_CALL( SCIPextendPermsymDetectionGraphLinear(scip, graph, vars, vals, nlocvars,
Expand Down
2 changes: 1 addition & 1 deletion src/scip/cons_linear.c
Original file line number Diff line number Diff line change
Expand Up @@ -15266,7 +15266,7 @@ SCIP_RETCODE addSymmetryInformation(
vals[i] = consdata->vals[i];
}

SCIP_CALL( SCIPgetActiveVariables(scip, symtype, &vars, &vals, &nlocvars, &constant, SCIPisTransformed(scip)) );
SCIP_CALL( SCIPgetSymActiveVariables(scip, symtype, &vars, &vals, &nlocvars, &constant, SCIPisTransformed(scip)) );
lhs = consdata->lhs - constant;
rhs = consdata->rhs - constant;

Expand Down
2 changes: 1 addition & 1 deletion src/scip/cons_linking.c
Original file line number Diff line number Diff line change
Expand Up @@ -2056,7 +2056,7 @@ SCIP_RETCODE addSymmetryInformation(
vars[consdata->nbinvars] = consdata->linkvar;
vals[consdata->nbinvars] = -1.0;

SCIP_CALL( SCIPgetActiveVariables(scip, symtype, &vars, &vals, &nlocvars, &constant, SCIPisTransformed(scip)) );
SCIP_CALL( SCIPgetSymActiveVariables(scip, symtype, &vars, &vals, &nlocvars, &constant, SCIPisTransformed(scip)) );

SCIP_CALL( SCIPextendPermsymDetectionGraphLinear(scip, graph, vars, vals, nlocvars,
cons, -constant, -constant, success) );
Expand Down
2 changes: 1 addition & 1 deletion src/scip/cons_logicor.c
Original file line number Diff line number Diff line change
Expand Up @@ -4081,7 +4081,7 @@ SCIP_RETCODE addSymmetryInformation(
vals[i] = 1.0;
}

SCIP_CALL( SCIPgetActiveVariables(scip, symtype, &vars, &vals, &nlocvars, &constant, SCIPisTransformed(scip)) );
SCIP_CALL( SCIPgetSymActiveVariables(scip, symtype, &vars, &vals, &nlocvars, &constant, SCIPisTransformed(scip)) );

SCIP_CALL( SCIPextendPermsymDetectionGraphLinear(scip, graph, vars, vals, nlocvars,
cons, 1.0 - constant, SCIPinfinity(scip), success) );
Expand Down
18 changes: 9 additions & 9 deletions src/scip/cons_nonlinear.c
Original file line number Diff line number Diff line change
Expand Up @@ -9477,7 +9477,7 @@ SCIP_RETCODE tryAddGadgetBilinearProductSignedPerm(
nlocvars = 1;
constant = 0.0;

SCIP_CALL( SCIPgetActiveVariables(scip, SYM_SYMTYPE_SIGNPERM, consvars, consvals, &nlocvars,
SCIP_CALL( SCIPgetSymActiveVariables(scip, SYM_SYMTYPE_SIGNPERM, consvars, consvals, &nlocvars,
&constant, SCIPconsIsTransformed(cons)) );

if( nlocvars != 1 || !SCIPisZero(scip, constant) )
Expand Down Expand Up @@ -9699,7 +9699,7 @@ SCIP_RETCODE tryAddGadgetEvenOperatorVariable(
nlocvars = 1;

SCIP_CALL( ensureLocVarsArraySize(scip, consvars, consvals, nlocvars, maxnconsvars) );
SCIP_CALL( SCIPgetActiveVariables(scip, SYM_SYMTYPE_SIGNPERM, consvars, consvals, &nlocvars, &constant,
SCIP_CALL( SCIPgetSymActiveVariables(scip, SYM_SYMTYPE_SIGNPERM, consvars, consvals, &nlocvars, &constant,
SCIPconsIsTransformed(cons)) );

/* skip multi-aggregated variables or variables with domain not centered at 0 */
Expand Down Expand Up @@ -9796,7 +9796,7 @@ SCIP_RETCODE tryAddGadgetEvenOperatorSum(
}
constant = SCIPgetConstantExprSum(child);

SCIP_CALL( SCIPgetActiveVariables(scip, SYM_SYMTYPE_SIGNPERM, consvars, consvals, &nlocvars, &constant,
SCIP_CALL( SCIPgetSymActiveVariables(scip, SYM_SYMTYPE_SIGNPERM, consvars, consvals, &nlocvars, &constant,
SCIPconsIsTransformed(cons)) );

/* we can only handle the case without constant and two variables with domain centered at origin */
Expand Down Expand Up @@ -10163,7 +10163,7 @@ SCIP_RETCODE tryAddGadgetSquaredDifference(
constant = 0.0;
nlocvars = 1;

SCIP_CALL( SCIPgetActiveVariables(scip, SYM_SYMTYPE_SIGNPERM, consvars, consvals,
SCIP_CALL( SCIPgetSymActiveVariables(scip, SYM_SYMTYPE_SIGNPERM, consvars, consvals,
&nlocvars, &constant, SCIPconsIsTransformed(cons)) );

if( nlocvars != 1 )
Expand All @@ -10179,7 +10179,7 @@ SCIP_RETCODE tryAddGadgetSquaredDifference(
constant2 = 0.0;
nlocvars = 1;

SCIP_CALL( SCIPgetActiveVariables(scip, SYM_SYMTYPE_SIGNPERM, consvars, consvals,
SCIP_CALL( SCIPgetSymActiveVariables(scip, SYM_SYMTYPE_SIGNPERM, consvars, consvals,
&nlocvars, &constant2, SCIPconsIsTransformed(cons)) );

if( nlocvars != 1 )
Expand Down Expand Up @@ -10393,7 +10393,7 @@ SCIP_RETCODE addSymmetryInformation(
consvals[0] = 1.0;
constant = 0.0;

SCIP_CALL( SCIPgetActiveVariables(scip, symtype, &consvars, &consvals,
SCIP_CALL( SCIPgetSymActiveVariables(scip, symtype, &consvars, &consvals,
&nconsvars, &constant, SCIPconsIsTransformed(cons)) );

/* check whether variable is aggregated */
Expand All @@ -10406,7 +10406,7 @@ SCIP_RETCODE addSymmetryInformation(

parentidx = thisidx;
}
SCIP_CALL( SCIPaddSymgraphVarAggegration(scip, graph, parentidx, consvars, consvals,
SCIP_CALL( SCIPaddSymgraphVarAggregation(scip, graph, parentidx, consvars, consvals,
nconsvars, constant) );
}
else if( SCIPisExprValue(scip, expr) )
Expand Down Expand Up @@ -10460,7 +10460,7 @@ SCIP_RETCODE addSymmetryInformation(

constant = SCIPgetConstantExprSum(expr);

SCIP_CALL( SCIPgetActiveVariables(scip, symtype, &consvars, &consvals,
SCIP_CALL( SCIPgetSymActiveVariables(scip, symtype, &consvars, &consvals,
&nlocvars, &constant, SCIPconsIsTransformed(cons)) );

SCIP_CALL( SCIPgetSymOpNodeType(scip, SCIPexprhdlrGetName(SCIPexprGetHdlr(expr)), &optype) );
Expand All @@ -10469,7 +10469,7 @@ SCIP_RETCODE addSymmetryInformation(
SCIP_CALL( SCIPaddSymgraphEdge(scip, graph, parentidx, sumidx, hasparentcoef, parentcoef) );

/* add the linear part of the sum */
SCIP_CALL( SCIPaddSymgraphVarAggegration(scip, graph, sumidx, consvars, consvals, nlocvars, constant) );
SCIP_CALL( SCIPaddSymgraphVarAggregation(scip, graph, sumidx, consvars, consvals, nlocvars, constant) );

SCIP_CALL( ensureOpenArraySizeSymdetect(scip, &openidx, nopenidx + 1, &maxnopenidx) );

Expand Down
2 changes: 1 addition & 1 deletion src/scip/cons_or.c
Original file line number Diff line number Diff line change
Expand Up @@ -1444,7 +1444,7 @@ SCIP_RETCODE addSymmetryInformation(
vals[nlocvars++] = 2.0;
assert(nlocvars <= nvars);

SCIP_CALL( SCIPgetActiveVariables(scip, symtype, &vars, &vals, &nlocvars, &constant, SCIPisTransformed(scip)) );
SCIP_CALL( SCIPgetSymActiveVariables(scip, symtype, &vars, &vals, &nlocvars, &constant, SCIPisTransformed(scip)) );

/* represent the OR constraint via the gadget for linear constraints and use the constant as lhs/rhs to
* distinguish different OR constraints (OR constraints do not have an intrinsic right-hand side)
Expand Down
2 changes: 1 addition & 1 deletion src/scip/cons_setppc.c
Original file line number Diff line number Diff line change
Expand Up @@ -7443,7 +7443,7 @@ SCIP_RETCODE addSymmetryInformation(
vals[i] = 1.0;
}

SCIP_CALL( SCIPgetActiveVariables(scip, symtype, &vars, &vals, &nlocvars, &constant, SCIPisTransformed(scip)) );
SCIP_CALL( SCIPgetSymActiveVariables(scip, symtype, &vars, &vals, &nlocvars, &constant, SCIPisTransformed(scip)) );

lhs = -SCIPinfinity(scip);
rhs = SCIPinfinity(scip);
Expand Down
Loading

0 comments on commit 7ec2b8d

Please sign in to comment.