Changeset 744 for stable/0.2


Ignore:
Timestamp:
Jul 22, 2011 3:20:52 PM (9 years ago)
Author:
pbelotti
Message:

merge changeset 742 in trunk: fix bug in exprLog::gradientNorm(). check for objective function

Location:
stable/0.2/Couenne/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • stable/0.2/Couenne/src/branch/doStrongBranching.cpp

    r547 r744  
    4141}
    4242
    43 
    44 //namespace Bonmin {
    4543
    4644  /**  This is a utility function which does strong branching on
     
    458456    return returnCode;
    459457  }
    460 //}
  • stable/0.2/Couenne/src/expression/operators/exprLog.cpp

    r159 r744  
    9999CouNumber exprLog::gradientNorm (const double *x) {
    100100  return (argument_ -> Index () < 0) ? 0. :
    101     1. / (CoinMin (1 / COUENNE_INFINITY, x [argument_ -> Index ()]));
     101    1. / (CoinMax (1. / COUENNE_INFINITY, x [argument_ -> Index ()]));
    102102}
    103103
  • stable/0.2/Couenne/src/readnl/readnl.cpp

    r201 r744  
    195195  // objective functions /////////////////////////////////////////////////////////////
    196196
     197  if (n_obj == 0) {
     198
     199    // strange, no objective function. Add one equal to zero
     200
     201    jnlst_ -> Printf (Ipopt::J_ERROR, J_PROBLEM, "Couenne: warning, no objective function found\nAdded fictitious function f(x)=0\n");     
     202    addObjective (new exprConst (0.), "min");
     203  }
     204
    197205  for (int i = 0; i < n_obj; i++) {
    198206
Note: See TracChangeset for help on using the changeset viewer.