Changeset 966 for trunk


Ignore:
Timestamp:
May 30, 2013 3:41:07 PM (7 years ago)
Author:
pbelotti
Message:

show true cutoff when it appears. fix minor leak in FP.

Location:
trunk/Couenne/src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Couenne/src/heuristics/CouenneFPFindSolution.cpp

    r961 r966  
    8484    milp_ -> messageHandler () -> setLogLevel (0);
    8585
    86      if (problem_ -> nIntVars () > 0) milp_ -> branchAndBound ();
    87      else                             milp_ -> initialSolve ();
     86    if (problem_ -> nIntVars () > 0) milp_ -> branchAndBound ();
     87    else                             milp_ -> initialSolve ();
    8888
    89      if (!iSol)
    90        iSol = new CouNumber [problem_ -> nVars ()];
     89    if (!iSol)
     90      iSol = new CouNumber [problem_ -> nVars ()];
    9191
    92      if (milp_ -> getColSolution ())
    93        CoinCopyN (milp_ -> getColSolution (), problem_ -> nVars (), iSol);
    94      else {
     92    if (milp_ -> getColSolution ())
     93      CoinCopyN (milp_ -> getColSolution (), problem_ -> nVars (), iSol);
     94    else {
    9595
    96        if (iSol)
    97          delete [] iSol;
    98        iSol = NULL;
    99      }
     96      if (iSol)
     97        delete [] iSol;
     98      iSol = NULL;
     99    }
    100100
    101      obj = milp_ -> getObjValue ();
     101    obj = milp_ -> getObjValue ();
    102102  }
    103103
  • trunk/Couenne/src/heuristics/CouenneFPscipSolve.cpp

    r961 r966  
    464464        for(int i=1; i<nscipsols && nstoredsols < 10 &&
    465465              SCIPgetSolOrigObj(scip,scipsols[i]) <= cutoffbound; i++){
    466           double* tmpsol;
    467 
    468           tmpsol = new CouNumber [nvars];
     466
     467          double* tmpsol = new CouNumber [nvars];
    469468           
    470469          // get solution values
    471470          SCIP_CALL( SCIPgetSolVals(scip, scipsols[i], problem_ -> nVars (), vars, tmpsol) );
    472471          CouenneFPsolution couennesol = CouenneFPsolution (problem_, tmpsol);
     472
     473          delete [] tmpsol;
    473474
    474475          // add solutions to the pool if they are not in the tabu list
  • trunk/Couenne/src/heuristics/CouenneFeasPump.hpp

    r893 r966  
    110110
    111111    /// admits a (possibly fractional) solution and fixes the integer
    112     /// components in the nonlinear problem for later
    113     /// re-solve. Returns false if restriction infeasible, true
    114     /// otherwise
     112    /// components in the nonlinear problem for later re-solve.
     113    /// Returns false if restriction infeasible, true otherwise
    115114    bool fixIntVariables (const double *sol);
    116115
  • trunk/Couenne/src/main/BonCouenne.cpp

    r963 r966  
    9696
    9797#ifdef COIN_HAS_SCIP
     98  //SCIPlpiSwitchSetDefaultSolver();
    9899  SCIPlpiSwitchSetSolver(SCIP_LPISW_CLP);
    99100#endif
  • trunk/Couenne/src/problem/problem.cpp

    r940 r966  
    327327
    328328    //if (fabs (cutoff - pcutoff_ -> getCutOff ()) > (1 + fabs (cutoff)) * 2 * SafeCutoff) // avoid too many printouts
    329     Jnlst () -> Printf (Ipopt::J_ERROR, J_PROBLEM, "Couenne: new cutoff value %.10e\n", cutoff);
     329    Jnlst () -> Printf (Ipopt::J_ERROR, J_COUENNE, "Couenne: new cutoff value %.10e (%g seconds)\n", cutoff, CoinCpuTime ());
    330330                        //pcutoff_ -> getCutOff ());
    331331
Note: See TracChangeset for help on using the changeset viewer.