Changeset 2051 for trunk


Ignore:
Timestamp:
Jul 20, 2014 1:56:25 PM (5 years ago)
Author:
forrest
Message:

fix stupid bug in orbital branching

Location:
trunk/Cbc/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Cbc/src/CbcModel.cpp

    r2048 r2051  
    22902290      symmetryInfo_->setupSymmetry(*continuousSolver_);
    22912291      int numberGenerators = symmetryInfo_->statsOrbits(this,0);
    2292       if (!numberGenerators) {
     2292      if (!numberGenerators&&(moreSpecialOptions2_&(128|256))!=(128|256)) {
    22932293        delete symmetryInfo_;
    22942294        symmetryInfo_=NULL;
     2295        moreSpecialOptions2_ &= ~(128|256);
     2296      }
     2297      if ((moreSpecialOptions2_&(128|256))==(128|256)) {
    22952298        moreSpecialOptions2_ &= ~128;
    22962299      }
  • trunk/Cbc/src/CbcNode.cpp

    r2048 r2051  
    38633863        if (orbits && orbits[kColumn]>=0) {
    38643864          int numberUsefulOrbits = symmetryInfo->numberUsefulObjects();
     3865          if (solver->messageHandler()->logLevel() > 1)
     3866            printf("Orbital Branching on %d - way %d n %d\n",kColumn,way(),numberUsefulOrbits);
    38653867          if (numberUsefulOrbits<1000) {
    38663868            delete branch_;
  • trunk/Cbc/src/CbcSymmetry.cpp

    r2049 r2051  
    99 * This file is licensed under the Eclipse Public License (EPL)
    1010 */
    11 
     11//#define PRINT_MORE 1
    1212#include <stdio.h>
    1313
     
    108108  } else {
    109109    returnCode = nauty_info_->getNumGenerators();
    110     if (returnCode)
     110    if (returnCode) {
    111111      sprintf (general,"Nauty: %d orbits, %d generators, group size: %g - dense size %d, sparse %d - going %s",
    112112               nauty_info_->getNumOrbits(),
     
    114114               nauty_info_ -> getGroupSize (),
    115115               whichOrbit_[0],whichOrbit_[1],nauty_info_->isSparse() ? "sparse" : "dense");
    116     else
    117       sprintf(general,"Nauty did not find any useful orbits");
     116    } else {
     117      if ((model->moreSpecialOptions2()&(128|256))!=(128|256))
     118        sprintf(general,"Nauty did not find any useful orbits");
     119      else
     120        sprintf(general,"Nauty did not find any useful orbits - but keeping Nauty on");
     121    }
    118122  }
    119123  model->messageHandler()->message(CBC_GENERAL,
     
    618622      if (status[i]!='0'&&status[i]!='1') {
    619623        int iOrbit=alternativeOrbits[i];
     624        if (iOrbit<0)
     625          continue;
    620626        for (int j=i+1;j<numberColumns;j++) {
    621627          if (status[j]=='0'&&alternativeOrbits[j]==iOrbit) {
Note: See TracChangeset for help on using the changeset viewer.