Changeset 23


Ignore:
Timestamp:
Nov 9, 2008 11:46:58 AM (13 years ago)
Author:
pbelotti
Message:

fixed test file and assertion in VT

Location:
trunk/Couenne
Files:
4 edited

Legend:

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

    r1 r23  
    7777    fx = (*(reference_ -> Image ())) ();
    7878
    79   if (dependence.size () == 0) { // this is a top level auxiliary,
    80                                  // nowhere an independent
    81 
    82     // that means, for VT, that letting w vary and keeping everything
    83     // else constant we return the difference between current value
    84     // and value of function at this point
     79  if (dependence.size () == 0) {
     80
     81    // this is a top level auxiliary, nowhere an independent, OR all
     82    // auxiliaries depending on it have a linear expression
     83
     84    // that means, for VT, that by letting w vary and keeping
     85    // everything else constant
     86
     87    // we return the difference between current value and value of
     88    // function at this point
    8589
    8690    // these variables may also be disabled in BonCouenneSetup.cpp
    8791
    88     assert (reference_ -> Type () == AUX); // otherwise, this is an isolated variable
    89 
    90     // check if this w=f(x) is used nowhere and is feasible
    91     retval = upEstimate_ = downEstimate_ = maxInf = checkInfeasibility (info);
     92    retval = (reference_ -> Type () == AUX) ? // if this is an isolated variable
     93      // check if this w=f(x) is used nowhere and is feasible
     94      (upEstimate_ = downEstimate_ = maxInf = checkInfeasibility (info)) :
     95      0.;
    9296
    9397  } else {
  • trunk/Couenne/src/problem/writeGAMS.cpp

    r1 r23  
    2727  // header //////////////////////////////////////////////////////////////
    2828
    29   f << "* MINLP Written by Couenne (https://projects.coin-or.org/Bonmin/wiki/BonCouenne)" << std::endl
     29  f << "* MINLP Written by Couenne (https://projects.coin-or.org/Couenne)" << std::endl
    3030    << "* problem name: " << problemName_ << std::endl
    3131    << "* " << nVars () << " variables, " << nCons () << " constraints" << std::endl << std::endl;
  • trunk/Couenne/test/data/prod.nl

    r13 r23  
    1 g3 0 1 0        # problem sq
     1g3 0 1 0        # problem prod
    22 2 1 1 0 0      # vars, constraints, objectives, ranges, eqns
    33 1 1    # nonlinear constraints, objectives
    44 0 0    # network constraints: nonlinear, linear
    5  0 0 2  # nonlinear vars in constraints, objectives, both
     5 2 2 2  # nonlinear vars in constraints, objectives, both
    66 0 0 0 1        # linear network variables; functions; arith, flags
    77 0 0 0 0 0      # discrete variables: binary, integer, nonlinear (b,c,o)
    8  0 1    # nonzeros in Jacobian, gradients
     8 2 2    # nonzeros in Jacobian, gradients
    99 0 0    # max name lengths: constraints, variables
    1010 0 0 0 0 0      # common exprs: b,c,o,c1,o1
     11C0
     12o2
     13v0
     14v1
    1115O0 0
    1216o2
    1317v0
    1418v1
    15 C0
    16 o2
    17 v0
    18 v1
     19r
     202 20
    1921b
    20220 2 5
    21230 2 5
    22 r
    23 2 20
    2424k1
    25 0
    26 G0 1
     251
     26J0 2
    27270 0
     281 0
     29G0 2
     300 0
     311 0
  • trunk/Couenne/test/grandTest.sh.in

    r21 r23  
    4141        rm -f $name
    4242        rm -f couenne.opt
     43        rm -f `dirname $j`/`basename $j .nl`.sol
    4344
    4445    done
Note: See TracChangeset for help on using the changeset viewer.