Changeset 993 for branches


Ignore:
Timestamp:
Jun 25, 2008 12:02:58 PM (11 years ago)
Author:
ladanyi
Message:

works???

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/dynamicbranching/dynamicbranching.cpp

    r992 r993  
    7979  double* getColLower;
    8080  double* getColUpper;
     81  double* getColSolution; // FIXME Not needed, just for debugging
    8182  double* getObjCoefficients;
    8283  double yb_plus_rl_minus_su;
     
    102103  getColUpper = new double[model.getNumCols()];
    103104  CoinDisjointCopyN(model.getColUpper(), model.getNumCols(), getColUpper);
     105  getColSolution = new double[model.getNumCols()];
     106  CoinDisjointCopyN(model.getColSolution(), model.getNumCols(), getColSolution);
    104107
    105108  getObjCoefficients = NULL;
     
    162165  delete[] getColLower;
    163166  delete[] getColUpper;
     167  delete[] getColSolution;
    164168  delete[] getObjCoefficients;
    165169}
     
    953957  const bool parent_is_down_child = parent_id == grandparent.child_down_;
    954958
    955   if (lpres.isProvenOptimal ||
    956       lpres.isIterationLimitReached) {
     959  if (lpres.isIterationLimitReached) {
     960    // THINK: should we do anything?
     961    return false;
     962  }
     963   
     964  if (lpres.isProvenOptimal) {
    957965    // THINK: should we do anything? like:
    958966#if 0
     
    15781586        }
    15791587
     1588        const bool mustResolve =
     1589          model.isDualObjectiveLimitReached() && !model.isProvenOptimal();
     1590        double oldlimit = 0;
     1591
     1592        if (mustResolve) {
     1593          // THINK: Something faster would be better...
     1594          model.getDblParam(OsiDualObjectiveLimit, oldlimit);
     1595          model.setDblParam(OsiDualObjectiveLimit, 1e100);
     1596          model.resolve();
     1597        }
    15801598        LPresult lpres(model);
     1599        if (mustResolve) {
     1600          model.setDblParam(OsiDualObjectiveLimit, oldlimit);
     1601        }
    15811602
    15821603        bool canSwitch = node.canSwitchParentWithGrandparent(which, lpres,
     
    16161637        if (cnt > 0) {
    16171638          model.resolve();
    1618           // This is horribly looking... Get rid of it when properly debugged...
     1639          // This is horribly looking... Get rid of it when properly
     1640          // debugged...
     1641          LPresult lpres1(model);
    16191642          assert(lpres.isAbandoned == model.isAbandoned());
    16201643          assert(lpres.isDualObjectiveLimitReached == model.isDualObjectiveLimitReached());
Note: See TracChangeset for help on using the changeset viewer.