Skip to content

Commit

Permalink
Drop COIN_HAS_NTY from public header CbcModel.hpp (#593)
Browse files Browse the repository at this point in the history
COIN_HAS_NTY is only defined during compilation of Cbc but is used in
public header CbcModel.hpp

* Fixes bug introduced in 1e6e301
* Closes #591
* Also, fixes the Github workflow so that we're building with nuaty on Linux, as was intended.
* Eliminate zapRootSymmetry(), since it is not defined or used.

---------

Co-authored-by: Ted Ralphs <[email protected]>
  • Loading branch information
jschueller and tkralphs authored Apr 18, 2023
1 parent 1857fd6 commit 2fac983
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 10 deletions.
1 change: 1 addition & 0 deletions .github/workflows/linux-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ jobs:
ADD_BUILD_ARGS=()
ADD_BUILD_ARGS+=( --tests main --enable-relocatable )
ADD_BUILD_ARGS+=( --verbosity 2 )
[[ ${{ matrix.os }} == ubuntu* ]] && ADD_ARGS+=( --with-nauty-incdir=/usr/include/x86_64-linux-gnu/nauty --with-nauty-lib="-L/usr/lib/ -lnauty" )
[[ ${{ matrix.build_static }} == "true" ]] && \
ADD_BUILD_ARGS+=( --static --with-lapack='-llapack -lblas -lgfortran -lquadmath -lm' )
bash coinbrew/coinbrew fetch ${{ github.event.repository.name }} --skip-update \
Expand Down
4 changes: 0 additions & 4 deletions Cbc/src/CbcModel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5870,10 +5870,8 @@ CbcModel::CbcModel()
, lastHeuristic_(NULL)
, fastNodeDepth_(-1)
, eventHandler_(NULL)
#ifdef COIN_HAS_NTY
, symmetryInfo_(NULL)
, rootSymmetryInfo_(NULL)
#endif
, numberObjects_(0)
, object_(NULL)
, ownObjects_(true)
Expand Down Expand Up @@ -6043,10 +6041,8 @@ CbcModel::CbcModel(const OsiSolverInterface &rhs)
, lastHeuristic_(NULL)
, fastNodeDepth_(-1)
, eventHandler_(NULL)
#ifdef COIN_HAS_NTY
, symmetryInfo_(NULL)
, rootSymmetryInfo_(NULL)
#endif
, numberObjects_(0)
, object_(NULL)
, ownObjects_(true)
Expand Down
7 changes: 1 addition & 6 deletions Cbc/src/CbcModel.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2609,7 +2609,7 @@ class CbcModel {
{
maximumNumberIterations_ = value;
}
#ifdef COIN_HAS_NTY

/// Symmetry information
inline CbcSymmetry *symmetryInfo() const
{
Expand All @@ -2627,9 +2627,6 @@ class CbcModel {
{
return rootSymmetryInfo_;
}
/// get rid of all
void zapRootSymmetry();
#endif
/// Set depth for fast nodes
inline void setFastNodeDepth(int value)
{
Expand Down Expand Up @@ -3115,12 +3112,10 @@ class CbcModel {
#else
CbcEventHandler *eventHandler_;
#endif
#ifdef COIN_HAS_NTY
/// Symmetry information
CbcSymmetry *symmetryInfo_;
/// Root symmetry information
CbcSymmetry *rootSymmetryInfo_;
#endif
/// Total number of objects
int numberObjects_;

Expand Down

0 comments on commit 2fac983

Please sign in to comment.