Changeset 988 for trunk


Ignore:
Timestamp:
Aug 4, 2013 4:59:18 PM (6 years ago)
Author:
pbelotti
Message:

minor fixes

Location:
trunk/Couenne/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Couenne/src/couenne.opt

    r730 r988  
    3939# Values: 0 for quiet, 11 for excessive output [0..11]
    4040
    41 branching_print_level       0 # Output level for braching code in Couenne.
     41branching_print_level       0 # Output level for branching code in Couenne.
    4242boundtightening_print_level 0 # Output level for bound tightening code in Couenne
    4343convexifying_print_level    0 # Output level for convexifying code in Couenne
  • trunk/Couenne/src/heuristics/BonNlpHeuristic.hpp

    r488 r988  
    1919namespace Couenne {
    2020
    21   /** An heuristic to call an NlpSolver if all CouenneObjects are
    22       close to be satisfied (for other integer objects, rounding is
    23       performed, is SOS are not satisfied does not run).
     21  /** A heuristic to call an NlpSolver if all CouenneObjects are close
     22      to be satisfied (for other integer objects, rounding is
     23      performed, if SOS's are not satisfied it does not run).
    2424   */
    2525
  • trunk/Couenne/src/heuristics/CouenneFeasPump.cpp

    r899 r988  
    224224    CouenneFPsolution checkedSol (problem_, iSol, false); // false is for not allocating space for this
    225225
    226     if (tabuPool_. find (checkedSol) != tabuPool_ . end ()) {
     226    if (tabuPool_. find (checkedSol) == tabuPool_ . end ())
     227
     228      tabuPool_. insert (CouenneFPsolution (problem_, iSol)); // only insertion to tabu pool: we check its feasibility now
     229
     230    else {
    227231
    228232      problem_ -> Jnlst () -> Printf (J_WARNING, J_NLPHEURISTIC, "FP: found solution is tabu\n");
     
    311315#define RND_DECR_EXPONENT .5
    312316
    313             if (iSol [i] >= lb [i] - 1.) down =      1. / pow (1. + (downMoves += 1.), RND_DECR_EXPONENT);
    314             if (iSol [i] <= ub [i] + 1.) up   = 1. - 1. / pow (1. + (upMoves   += 1.), RND_DECR_EXPONENT);
     317            if (iSol [i] >= lb [i] + 1.) down =      1. / pow (1. + (downMoves += 1.), RND_DECR_EXPONENT);
     318            if (iSol [i] <= ub [i] - 1.) up   = 1. - 1. / pow (1. + (upMoves   += 1.), RND_DECR_EXPONENT);
    315319
    316320            if      (rnd < down) iSol [i] -= 1.;
     
    319323        }
    320324      }
    321     } else tabuPool_. insert (CouenneFPsolution (problem_, iSol)); // only insertion to tabu pool: we check its feasibility now
     325    }
    322326
    323327    problem_ -> Jnlst () -> Printf (J_WARNING, J_NLPHEURISTIC, "FP: checking IP solution for feasibility\n");
  • trunk/Couenne/src/standardize/constrStandardize.cpp

    r882 r988  
    158158                                  p -> domain (), aSign);
    159159
    160 //      if (p -> Jnlst () -> ProduceOutput (Ipopt::J_ALL, J_REFORMULATE)) {
    161 
    162 //        printf ("AuxSet:\n");
    163 //        for (std::set <exprAux *, compExpr>::iterator i = p -> AuxSet () -> begin ();
    164 //             i != p -> AuxSet () -> end (); ++i)
    165 //          if ((*i) -> Image () == NULL) {
    166 //            (*i) -> print (); printf (" does not have an image!!!\n");
    167 //          } else {
    168 //            printf ("-- "); (*i) -> print (); printf (" := ");
    169 //            (*i) -> Image () -> print (); printf ("\n");
    170 //          }
    171 //      }
     160        if (p -> Jnlst () -> ProduceOutput (Ipopt::J_ALL, J_REFORMULATE)) {
     161
     162          printf ("AuxSet:\n");
     163          for (std::set <exprAux *, compExpr>::iterator i = p -> AuxSet () -> begin ();
     164               i != p -> AuxSet () -> end (); ++i)
     165            if ((*i) -> Image () == NULL) {
     166              (*i) -> print (); printf (" does not have an image!!!\n");
     167            } else {
     168              printf ("-- "); (*i) -> print (); printf (" := ");
     169              (*i) -> Image () -> print (); printf ("\n");
     170            }
     171        }
    172172
    173173        std::set <exprAux *, compExpr>::iterator i = p -> AuxSet () -> end ();
Note: See TracChangeset for help on using the changeset viewer.