Changeset 285


Ignore:
Timestamp:
Jan 26, 2010 5:07:26 PM (10 years ago)
Author:
pbelotti
Message:

prevent ?/0 from being feasible

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Couenne/src/branch/infeasibility.cpp

    r259 r285  
    7777
    7878  if (jnlst_ -> ProduceOutput (J_DETAILED, J_BRANCHING)) {
    79     printf("index = %d up = %e down = %e bounds [%e,%e] brpt = %e\n",
     79    printf("index = %d up = %e down = %e bounds [%e,%e] brpt = %e inf = %e\n",
    8080           index, upEstimate_, downEstimate_,
    8181           info -> lower_ [index],
    82            info -> upper_ [index], brkPt);
     82           info -> upper_ [index], brkPt, retval);
    8383  }
    8484
     
    149149
    150150    double retval =
     151      ((infmax < 1.e20) ? // avoid returning zero infeasibility in
     152                          // almost fixed variables that are at some
     153                          // denominator (see example triv1.nl from
     154                          // Stefano Coniglio)
     155
     156                          // 1e20 is probably too optimistic, expect
     157                          // instances that fail (i.e. give -9.99e+12)
     158                          // for much smaller values
     159
    151160      // neglect it if variable has small bound interval (check
    152161      // x84=x83/x5 in csched1.nl)
    153       (1. - 1. / (1. + info -> upper_ [index] - info -> lower_ [index])) *
     162       (1. - 1. / (1. + info -> upper_ [index] - info -> lower_ [index])) : 1) *
    154163      // to consider maximum, minimum, and sum/avg of the infeasibilities
    155164      (weiSum * infsum +
Note: See TracChangeset for help on using the changeset viewer.