Changeset 733


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

Feasibility pump on continuous NLP as well -- possibly exploiting distance

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk

    • Property svn:externals
      •  

        old new  
        1 BuildTools        https://projects.coin-or.org/svn/BuildTools/stable/0.7
        2 ThirdParty/ASL    https://projects.coin-or.org/svn/BuildTools/ThirdParty/ASL/stable/1.2
        3 ThirdParty/Blas   https://projects.coin-or.org/svn/BuildTools/ThirdParty/Blas/stable/1.2
        4 ThirdParty/HSL    https://projects.coin-or.org/svn/BuildTools/ThirdParty/HSL/stable/1.3
        5 ThirdParty/Lapack https://projects.coin-or.org/svn/BuildTools/ThirdParty/Lapack/stable/1.3
         1BuildTools  https://projects.coin-or.org/svn/BuildTools/stable/0.7
         2ThirdParty/ASL  https://projects.coin-or.org/svn/BuildTools/ThirdParty/ASL/stable/1.2
         3ThirdParty/Blas  https://projects.coin-or.org/svn/BuildTools/ThirdParty/Blas/stable/1.2
         4ThirdParty/HSL  https://projects.coin-or.org/svn/BuildTools/ThirdParty/HSL/stable/1.3
         5ThirdParty/Lapack  https://projects.coin-or.org/svn/BuildTools/ThirdParty/Lapack/stable/1.3
        66ThirdParty/Mumps  https://projects.coin-or.org/svn/BuildTools/ThirdParty/Mumps/stable/1.4
        77ThirdParty/Metis  https://projects.coin-or.org/svn/BuildTools/ThirdParty/Metis/stable/1.2
        8 ThirdParty/SoPlex https://projects.coin-or.org/svn/BuildTools/ThirdParty/SoPlex/stable/1.0
        9 ThirdParty/SCIP   https://projects.coin-or.org/svn/BuildTools/ThirdParty/SCIP/stable/1.0
        10 CoinUtils         https://projects.coin-or.org/svn/CoinUtils/stable/2.8/CoinUtils
        11 Cbc               https://projects.coin-or.org/svn/Cbc/stable/2.7/Cbc
        12 Cgl               https://projects.coin-or.org/svn/Cgl/stable/0.57/Cgl
        13 Clp               https://projects.coin-or.org/svn/Clp/stable/1.14/Clp
        14 Osi               https://projects.coin-or.org/svn/Osi/stable/0.105/Osi
        15 Ipopt             https://projects.coin-or.org/svn/Ipopt/stable/3.10/Ipopt
        16 Bonmin            https://projects.coin-or.org/svn/Bonmin/stable/1.5/Bonmin
         8ThirdParty/SoPlex  https://projects.coin-or.org/svn/BuildTools/ThirdParty/SoPlex/stable/1.0
         9ThirdParty/SCIP  https://projects.coin-or.org/svn/BuildTools/ThirdParty/SCIP/stable/1.0
         10CoinUtils  https://projects.coin-or.org/svn/CoinUtils/stable/2.8/CoinUtils
         11Cbc  https://projects.coin-or.org/svn/Cbc/stable/2.7/Cbc
         12Cgl  https://projects.coin-or.org/svn/Cgl/stable/0.57/Cgl
         13Clp  https://projects.coin-or.org/svn/Clp/stable/1.14/Clp
         14Osi  https://projects.coin-or.org/svn/Osi/stable/0.105/Osi
         15Ipopt  https://projects.coin-or.org/svn/Ipopt/stable/3.10/Ipopt
         16Bonmin  https://projects.coin-or.org/svn/Bonmin/stable/1.5/Bonmin
  • trunk/Couenne/src/heuristics/CouenneFPFindSolution.cpp

    r720 r733  
    6666  int depth = (model_ -> currentNode ()) ? model_ -> currentNode () -> depth () : 0;
    6767
    68   if (useSCIP_) {
     68  if (useSCIP_ && problem_ -> nIntVars () > 0) { // if LP, use Clp below
    6969
    7070     SCIP* scip;
     
    456456  else
    457457#endif     
    458    {
    459       milp_ -> branchAndBound ();
    460 
    461       if (!sol)
    462         sol = new CouNumber [problem_ -> nVars ()];
    463 
    464       if (milp_ -> getColSolution ())
    465         CoinCopyN (milp_ -> getColSolution (), problem_ -> nVars (), sol);
    466       else {
    467 
    468         if (sol)
    469           delete [] sol;
    470         sol = NULL;
    471       }
    472 
    473       obj = milp_ -> getObjValue ();
    474    }
     458  {
     459
     460     if (problem_ -> nIntVars () > 0) milp_ -> branchAndBound ();
     461     else                             milp_ -> initialSolve ();
     462
     463     if (!sol)
     464       sol = new CouNumber [problem_ -> nVars ()];
     465
     466     if (milp_ -> getColSolution ())
     467       CoinCopyN (milp_ -> getColSolution (), problem_ -> nVars (), sol);
     468     else {
     469
     470       if (sol)
     471         delete [] sol;
     472       sol = NULL;
     473     }
     474
     475     obj = milp_ -> getObjValue ();
     476  }
    475477
    476478  return obj;
  • trunk/Couenne/src/heuristics/CouenneFPcreateMILP.cpp

    r732 r733  
    5959  // in the objective)
    6060
    61   lp -> setObjCoeff (fp -> Problem () -> Obj (0) -> Body () -> Index (), 0.);
     61  int objInd = fp -> Problem () -> Obj (0) -> Body () -> Index ();
     62
     63  if (objInd >= 0)
     64    lp -> setObjCoeff (objInd, 0.);
    6265
    6366  return lp;
     
    101104  // set objective coefficient if we are using a little Objective FP
    102105
    103   if (isMILP && (fp -> multObjFMILP () > 0.))
    104     lp -> setObjCoeff (fp -> Problem () -> Obj (0) -> Body () -> Index (),
    105                        fp -> multObjFMILP ());
     106  if (isMILP && (fp -> multObjFMILP () > 0.)) {
     107
     108    int objInd = fp -> Problem () -> Obj (0) -> Body () -> Index ();
     109
     110    if (objInd >= 0)
     111      lp -> setObjCoeff (objInd, fp -> multObjFMILP ());
     112  }
    106113
    107114  if (isMILP &&
     
    181188    n      = fp -> Problem () -> nVars ();
    182189
    183   assert (objInd >= 0);
     190  //assert (objInd >= 0);
    184191
    185192  double *val = hessian -> val ();
     
    232239  // do it directly on hessian
    233240
    234   A [objInd * (n+1)] = maxElem * GRADIENT_WEIGHT * n;
     241  if (objInd >= 0)
     242    A [objInd * (n+1)] = maxElem * GRADIENT_WEIGHT * n;
    235243
    236244  // call Lapack/Blas routines
  • trunk/Couenne/src/heuristics/CouenneFeasPump.cpp

    r720 r733  
    4141  const int depth = (model_ -> currentNode ()) ? model_ -> currentNode () -> depth () : 0;
    4242
    43   if ((problem_ -> nIntVars () <= 0) ||                   // feas pump on NLP? Not yet...
     43  if (//(problem_ -> nIntVars () <= 0) ||                   // feas pump on NLP? Why not?
    4444      (CoinCpuTime () > problem_ -> getMaxCpuTime ()) ||  // don't start if time is out
    4545      ((numberSolvePerLevel_ >= 0) &&                     // stop FP after a certain level
     
    224224          } while( !pool_ -> Set ().empty() );
    225225
    226       } else if ((tabuMgt_ == FP_TABU_CUT   ||  (pool_ -> Set (). empty ()) && iSol)) {
     226      } else if (((tabuMgt_ == FP_TABU_CUT)   || 
     227                  ((pool_ -> Set (). empty ()) && iSol))) {
    227228
    228229        OsiCuts cs;
Note: See TracChangeset for help on using the changeset viewer.