Changes from releases/0.92.1 at r1588 to releases/0.92.2 at r1588


Ignore:
Location:
releases/0.92.2
Files:
76 edited

Legend:

Unmodified
Added
Removed
  • releases/0.92.2/Dip

  • releases/0.92.2/Dip/README

    r1588 r1588  
    3636CHANGELOG
    3737=========
     38
     39## Release 0.92.2
     40 * Get rid of pesky global variable DecompInf
     41 * Fix bugs in wedding planner example
     42 * Fix bugs in DipPy to allow returning no solutions, even when an exact
     43   subprobem solver is used and to allow no branching candidates when
     44   branching.
    3845
    3946## Release 0.92.1
  • releases/0.92.2/Dip/configure

    r1588 r1588  
    11#! /bin/sh
    22# Guess values for system-dependent variables and create Makefiles.
    3 # Generated by GNU Autoconf 2.59 for Dip 0.92.1.
     3# Generated by GNU Autoconf 2.59 for Dip 0.92.2.
    44#
    55# Report bugs to <dip@lists.coin-or.org>.
     
    441441PACKAGE_NAME='Dip'
    442442PACKAGE_TARNAME='dip'
    443 PACKAGE_VERSION='0.92.1'
    444 PACKAGE_STRING='Dip 0.92.1'
     443PACKAGE_VERSION='0.92.2'
     444PACKAGE_STRING='Dip 0.92.2'
    445445PACKAGE_BUGREPORT='dip@lists.coin-or.org'
    446446
     
    10171017  # This message is too long to be a string in the A/UX 3.1 sh.
    10181018  cat <<_ACEOF
    1019 \`configure' configures Dip 0.92.1 to adapt to many kinds of systems.
     1019\`configure' configures Dip 0.92.2 to adapt to many kinds of systems.
    10201020
    10211021Usage: $0 [OPTION]... [VAR=VALUE]...
     
    10831083if test -n "$ac_init_help"; then
    10841084  case $ac_init_help in
    1085      short | recursive ) echo "Configuration of Dip 0.92.1:";;
     1085     short | recursive ) echo "Configuration of Dip 0.92.2:";;
    10861086   esac
    10871087  cat <<\_ACEOF
     
    12941294if $ac_init_version; then
    12951295  cat <<\_ACEOF
    1296 Dip configure 0.92.1
     1296Dip configure 0.92.2
    12971297generated by GNU Autoconf 2.59
    12981298
     
    13251325running configure, to aid debugging if configure makes a mistake.
    13261326
    1327 It was created by Dip $as_me 0.92.1, which was
     1327It was created by Dip $as_me 0.92.2, which was
    13281328generated by GNU Autoconf 2.59.  Invocation command line was
    13291329
     
    18511851
    18521852# Capture libtool library version, if given.
    1853  coin_libversion=7:1:6
     1853 coin_libversion=7:2:6
    18541854
    18551855
     
    45814581# Define the identity of the package.
    45824582 PACKAGE='dip'
    4583  VERSION='0.92.1'
     4583 VERSION='0.92.2'
    45844584
    45854585
     
    2697326973cat >&5 <<_CSEOF
    2697426974
    26975 This file was extended by Dip $as_me 0.92.1, which was
     26975This file was extended by Dip $as_me 0.92.2, which was
    2697626976generated by GNU Autoconf 2.59.  Invocation command line was
    2697726977
     
    2703927039cat >>$CONFIG_STATUS <<_ACEOF
    2704027040ac_cs_version="\\
    27041 Dip config.status 0.92.1
     27041Dip config.status 0.92.2
    2704227042configured by $0, generated by GNU Autoconf 2.59,
    2704327043  with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
  • releases/0.92.2/Dip/configure.ac

    r1588 r1588  
    2121
    2222# name of project, version number, contact info
    23 AC_INIT([Dip],[0.92.1],[dip@lists.coin-or.org])
     23AC_INIT([Dip],[0.92.2],[dip@lists.coin-or.org])
    2424
    2525# copyright for configure script
     
    6161# externals.  The following macro ensures that those externals are
    6262# retrieved by svn if they are not there yet.
    63 AC_COIN_PROJECTDIR_INIT(Dip,7:1:6)
     63AC_COIN_PROJECTDIR_INIT(Dip,7:2:6)
    6464
    6565# Check if user wants to produce debugging code
  • releases/0.92.2/Dip/examples/AP3/AP3_DecompApp.cpp

    r1588 r1588  
    479479   for(ind2 = 0; ind2 < dimension; ind2++){
    480480      for(ind3 = 0; ind3 < dimension; ind3++){
    481          min_cost  = DecompInf;
     481         min_cost  = m_infinity;
    482482         min_index = 0;
    483483         for(ind1 = 0; ind1 < dimension; ind1++){     
     
    490490         m_assigncostMin [ind2][ind3] = min_cost;
    491491         m_assignindexMin[ind2][ind3] = min_index;
    492          CoinAssert(min_cost < (DecompInf/2.0));
     492         CoinAssert(min_cost < (m_infinity/2.0));
    493493      }
    494494   }
  • releases/0.92.2/Dip/examples/AP3/AP3_Instance.h

    r1588 r1588  
    134134      m_nrowsFull(0),
    135135      m_assigncost(0),
    136       m_optBound(DecompInf)
     136      m_optBound(COIN_DBL_MAX)
    137137      {}
    138138   
     
    143143      m_nrowsFull(0),
    144144      m_assigncost(0),
    145       m_optBound(DecompInf)
     145      m_optBound(COIN_DBL_MAX)
    146146     {
    147147       readInstance(fileName);
  • releases/0.92.2/Dip/examples/ATM/ATM_DecompApp.cpp

    r1588 r1588  
    172172   }
    173173   
    174    UtilFillN(&model->colUB[0] + getColOffset_fp(), nPairs, DecompInf);
     174   UtilFillN(&model->colUB[0] + getColOffset_fp(), nPairs, m_infinity);
    175175   
    176176   //Another case of needing extreme rays??
    177    //UtilFillN(&model->colUB[0] + getColOffset_x3(), nAtms,  DecompInf);
     177   //UtilFillN(&model->colUB[0] + getColOffset_x3(), nAtms,  m_infinity);
    178178   UtilFillN(&model->colUB[0] + getColOffset_x3(), nAtms,  1000.0);
    179179
     
    320320         row.insert(colIndex_z (atmIndex,t),  1.0);
    321321         row.insert(colIndex_x1(atmIndex,t), -1.0);
    322          model->appendRow(row, -DecompInf, 0.0, rowName);
     322         model->appendRow(row, -m_infinity, 0.0, rowName);
    323323         nRows++;
    324324      }
     
    344344         row1.insert(colIndex_z (atmIndex,t),  1.0);
    345345         row1.insert(colIndex_x1(atmIndex,t), -1.0);
    346          model->appendRow(row1, -DecompInf, 0.0, rowName1);
     346         model->appendRow(row1, -m_infinity, 0.0, rowName1);
    347347         
    348348         row2.insert(colIndex_z (atmIndex,t),  1.0);
    349349         row2.insert(colIndex_x2(atmIndex)  , -1.0);
    350          model->appendRow(row2, -DecompInf, 0.0, rowName2);
     350         model->appendRow(row2, -m_infinity, 0.0, rowName2);
    351351         
    352352         row3.insert(colIndex_z (atmIndex,t),  1.0);
    353353         row3.insert(colIndex_x1(atmIndex,t), -1.0);
    354354         row3.insert(colIndex_x2(atmIndex)  , -1.0);
    355          model->appendRow(row3, -1.0, DecompInf, rowName3);
     355         model->appendRow(row3, -1.0, m_infinity, rowName3);
    356356         
    357357         nRows+=3;         
     
    379379      for(t = 0; t < m_appParam.NumSteps; t++)
    380380         row.insert(colIndex_x1(atmIndex,t), 1.0);
    381       model->appendRow(row, -DecompInf, 1.0, rowName);
     381      model->appendRow(row, -m_infinity, 1.0, rowName);
    382382   }
    383383   return 1;
     
    409409      pairIndex++;
    410410   }
    411    model->appendRow(row, -DecompInf, K_a[atmIndex], rowName);
     411   model->appendRow(row, -m_infinity, K_a[atmIndex], rowName);
    412412   return 1;
    413413}
     
    460460      string rowName = "budget(d_"
    461461         + m_instance.getDateName(d) + ")";
    462       model->appendRow(rowsD[d], -DecompInf, B_d[d], rowName);
     462      model->appendRow(rowsD[d], -m_infinity, B_d[d], rowName);
    463463   }
    464464   UTIL_DELARR(rowsD);
     
    713713      rowLink.insert(colIndex_v (pairIndex), -w_ad[*vi]);
    714714      model->M->appendRow(rowLink);
    715       model->rowLB.push_back(-DecompInf);
     715      model->rowLB.push_back(-m_infinity);
    716716      model->rowUB.push_back(0.0);
    717717      model->rowNames.push_back(rowNameLink);   
     
    865865      rowLink.insert(colIndex_fm(pairIndex), 1.0);
    866866      rowLink.insert(colIndex_v (pairIndex), -w_ad[*vi]);
    867       model->appendRow(rowLink, -DecompInf, 0.0, rowNameLink);
     867      model->appendRow(rowLink, -m_infinity, 0.0, rowNameLink);
    868868      nRows++;   
    869869   
     
    872872   
    873873   string rowNameBudget = "budget(d_" + m_instance.getDateName(d) + ")";
    874    model->appendRow(rowBudget, -DecompInf, B_d[d], rowNameBudget);
     874   model->appendRow(rowBudget, -m_infinity, B_d[d], rowNameBudget);
    875875   nRows++;
    876876
     
    10251025      rowLink.insert(colIndex_fm(pairIndex), 1.0);
    10261026      rowLink.insert(colIndex_v (pairIndex), -w_ad[*vi]);
    1027       model->appendRow(rowLink, -DecompInf, 0.0, rowNameLink);
     1027      model->appendRow(rowLink, -m_infinity, 0.0, rowNameLink);
    10281028      nRows++;   
    10291029
     
    10331033   for(d = 0; d < nDates; d++){   
    10341034      string rowNameBudget = "budget(d_" + m_instance.getDateName(d) + ")";
    1035       model->appendRow(rowBudget[d], -DecompInf, B_d[d], rowNameBudget);
     1035      model->appendRow(rowBudget[d], -m_infinity, B_d[d], rowNameBudget);
    10361036      nRows++;
    10371037   }
  • releases/0.92.2/Dip/examples/ATM/ATM_Main.cpp

    r1588 r1588  
    2525//===========================================================================//
    2626#include "UtilTimer.h"
    27 
    28 double DecompInf = COIN_DBL_MAX;
    2927
    3028//===========================================================================//
  • releases/0.92.2/Dip/examples/GAP/GAP_DecompApp3.cpp

    r1588 r1588  
    219219      }
    220220
    221       model->appendRow(row, -DecompInf, capacity[i], rowName);
     221      model->appendRow(row, -m_infinity, capacity[i], rowName);
    222222   }
    223223
  • releases/0.92.2/Dip/examples/GAP/GAP_DecompApp4.cpp

    r1588 r1588  
    261261      }
    262262
    263       model->appendRow(row, -DecompInf, capacity[i], rowName);
     263      model->appendRow(row, -m_infinity, capacity[i], rowName);
    264264   }
    265265
  • releases/0.92.2/Dip/examples/GAP/GAP_Instance.cpp

    r1588 r1588  
    9696            m_bestKnownLB = bestUpperBound;
    9797         } else {
    98             m_bestKnownLB = -DecompInf;
     98            m_bestKnownLB = -COIN_DBL_MAX;
    9999         }
    100100
  • releases/0.92.2/Dip/examples/GAP/GAP_Main.cpp

    r1588 r1588  
    2828//===========================================================================//
    2929#include "UtilTimer.h"
    30 
    31 double DecompInf = COIN_DBL_MAX;
    3230
    3331//===========================================================================//
  • releases/0.92.2/Dip/examples/MAD/MAD_DecompApp.cpp

    r1588 r1588  
    254254   //--- set the col upper and lower bounds
    255255   //---
    256    UtilFillN(modelCoreCl->rowLB,    m_beta,  -DecompInf);
     256   UtilFillN(modelCoreCl->rowLB,    m_beta,  -m_infinity);
    257257   UtilFillN(modelCoreCl->rowUB,    m_beta,  static_cast<double>(m_kappa));
    258258   UtilFillN(modelCoreCl->colLB,    n_cols,  0.0);
     
    407407   //--- set the col upper and lower bounds
    408408   //---
    409    UtilFillN(modelRelaxCl->rowLB, modelRelaxCl->M->getNumRows(),  -DecompInf);
     409   UtilFillN(modelRelaxCl->rowLB, modelRelaxCl->M->getNumRows(),  -m_infinity);
    410410   UtilFillN(modelRelaxCl->rowUB, modelRelaxCl->M->getNumRows(),  1.0);
    411411   UtilFillN(modelRelaxCl->colLB, n_cols,                         0.0);
     
    526526   //---
    527527   double kappa = static_cast<double>(m_kappa);
    528    UtilFillN(modelCoreCl->rowLB,    m_nOrigRows,  -DecompInf);
     528   UtilFillN(modelCoreCl->rowLB,    m_nOrigRows,  -m_infinity);
    529529   UtilFillN(modelCoreCl->rowUB,    m_nOrigRows,  1.0);
    530    UtilFillN(modelCoreCl->rowLB,    m_beta,       -DecompInf);
     530   UtilFillN(modelCoreCl->rowLB,    m_beta,       -m_infinity);
    531531   UtilFillN(modelCoreCl->rowUB,    m_beta,       kappa);
    532532   UtilFillN(modelCoreCl->colLB,    n_cols,       0.0);
     
    680680   //--- set the col upper and lower bounds
    681681   //---
    682    UtilFillN(modelRelaxCl->rowLB, modelRelaxCl->M->getNumRows(),  -DecompInf);
     682   UtilFillN(modelRelaxCl->rowLB, modelRelaxCl->M->getNumRows(),  -m_infinity);
    683683   UtilFillN(modelRelaxCl->rowUB, modelRelaxCl->M->getNumRows(),  1.0);
    684684   UtilFillN(modelRelaxCl->colLB, n_cols,                         0.0);
  • releases/0.92.2/Dip/examples/MCF/MCF_DecompApp.cpp

    r1588 r1588  
    177177   //---
    178178   UtilFillN(model->colLB, numCols,  0.0);
    179    UtilFillN(model->colUB, numCols,  DecompInf);
     179   UtilFillN(model->colUB, numCols,  m_infinity);
    180180
    181181   for (a = 0; a < numArcs; a++) {
     
    192192
    193193      //TODO: any issue with range constraints?
    194       model->appendRow(row, -DecompInf, arcUB);
     194      model->appendRow(row, -m_infinity, arcUB);
    195195      string rowNameUB = "capUB(" +
    196196                         UtilIntToStr(a)            + "_" +
     
    198198                         UtilIntToStr(arcs[a].head) + ")";
    199199      model->rowNames.push_back(rowNameUB);
    200       model->appendRow(row, arcLB,  DecompInf);
     200      model->appendRow(row, arcLB,  m_infinity);
    201201      string rowNameLB = "capLB(" +
    202202                         UtilIntToStr(a)            + "_" +
  • releases/0.92.2/Dip/examples/MCF/MCF_Main.cpp

    r1588 r1588  
    2525//===========================================================================//
    2626#include "UtilTimer.h"
    27 
    28 double DecompInf = COIN_DBL_MAX;
    2927
    3028//===========================================================================//
  • releases/0.92.2/Dip/examples/MILP/MILP_Main.cpp

    r1588 r1588  
    2525//===========================================================================//
    2626#include "UtilTimer.h"
    27 
    28 double DecompInf = COIN_DBL_MAX;
    2927
    3028//===========================================================================//
  • releases/0.92.2/Dip/examples/MILPBlock/MILPBlock_DecompApp.cpp

    r1588 r1588  
    379379      var->setBlockId(indexPair.second);
    380380
    381       var->print(m_osLog, colNames);
     381      var->print(m_infinity, m_osLog, colNames);
    382382
    383383      initVars.push_back(var);
  • releases/0.92.2/Dip/examples/MILPBlock/MILPBlock_Main.cpp

    r1588 r1588  
    2525//===========================================================================//
    2626#include "UtilTimer.h"
    27 
    28 double DecompInf = COIN_DBL_MAX;
    2927
    3028//===========================================================================//
  • releases/0.92.2/Dip/examples/MMKP/MMKP_DecompApp.cpp

    r1588 r1588  
    352352         }
    353353      }
    354       model->appendRow(rowK, -DecompInf, capacity[*vi]);
     354      model->appendRow(rowK, -m_infinity, capacity[*vi]);
    355355   }
    356356     
     
    459459         }
    460460      }
    461       model->appendRow(rowK, -DecompInf, capacity[*vi]);
     461      model->appendRow(rowK, -m_infinity, capacity[*vi]);
    462462   }
    463463
  • releases/0.92.2/Dip/examples/MMKP/MMKP_Instance.cpp

    r1588 r1588  
    191191            m_bestKnownLB = bestUpperBound;
    192192         else
    193             m_bestKnownLB = -DecompInf;
     193            m_bestKnownLB = COIN_DBL_MAX;
    194194         m_bestKnownUB     = bestUpperBound;
    195195         m_isProvenOptimal = isProvenOptimal;
  • releases/0.92.2/Dip/examples/MMKP/MMKP_Main.cpp

    r1588 r1588  
    2525//===========================================================================//
    2626#include "UtilTimer.h"
    27 
    28 double DecompInf = COIN_DBL_MAX;
    2927
    3028using namespace std;
  • releases/0.92.2/Dip/examples/SDPUC/SDPUC_DecompApp.cpp

    r1588 r1588  
    222222   //--- create the rows and set the col/row bounds
    223223   //---
    224    UtilFillN(model->colLB, numCols,  -DecompInf);
    225    UtilFillN(model->colUB, numCols,  DecompInf);
     224   UtilFillN(model->colLB, numCols,  -m_infinity);
     225   UtilFillN(model->colUB, numCols,  m_infinity);
    226226   
    227227   for(a = 0; a < numArcs; a++){
     
    278278 
    279279         //TODO: any issue with range constraint
    280          model->appendRow(row1, 0.0, DecompInf, rowName1_1);  //add MP1_constraints (arc investments)
     280         model->appendRow(row1, 0.0, m_infinity, rowName1_1);  //add MP1_constraints (arc investments)
    281281         
    282          model->appendRow(row1, -DecompInf, 1.0, rowName1_2);  //add MP1_constraints (arc investments)
     282         model->appendRow(row1, -m_infinity, 1.0, rowName1_2);  //add MP1_constraints (arc investments)
    283283         if(arcs[a].tail == 0) {   //ONLY for supply arcs (!!)
    284             model->appendRow(row2, 0.0, DecompInf, rowName2_1);  //add MP2_constraints (arc commitment)
    285             model->appendRow(row2, -DecompInf, 1.0, rowName2_2);  //add MP2_constraints (arc commitment)
     284            model->appendRow(row2, 0.0, m_infinity, rowName2_1);  //add MP2_constraints (arc commitment)
     285            model->appendRow(row2, -m_infinity, 1.0, rowName2_2);  //add MP2_constraints (arc commitment)
    286286         }
    287          model->appendRow(rowFix_y1, 1.0, DecompInf, rowNameFix);  //add fix y1 vars
    288          //model->appendRow(y2upper1, 0.0, DecompInf, std::string("y2-upperbound-1"));  //add upperbounds on y2
    289          //model->appendRow(y2upper2, -1.0, DecompInf, std::string("y2-upperbound-2"));  //..to strengthen formulation
     287         model->appendRow(rowFix_y1, 1.0, m_infinity, rowNameFix);  //add fix y1 vars
     288         //model->appendRow(y2upper1, 0.0, m_infinity, std::string("y2-upperbound-1"));  //add upperbounds on y2
     289         //model->appendRow(y2upper2, -1.0, m_infinity, std::string("y2-upperbound-2"));  //..to strengthen formulation
    290290      }
    291291   }
     
    506506      std::string rowName = "balance_" + UtilIntToStr(i) + "_" + UtilIntToStr(tpId);
    507507      if(i == source) {
    508          model->appendRow(row, -DecompInf, 0.0, rowName);
     508         model->appendRow(row, -m_infinity, 0.0, rowName);
    509509      }
    510510      else {
     
    534534      std::string rowNameLB = "lb_" + UtilIntToStr(a) + "_" + UtilIntToStr(tpId);
    535535      std::string rowNameUB = "ub_" + UtilIntToStr(a) + "_" + UtilIntToStr(tpId);
    536       model->appendRow(rowLB, 0.0, DecompInf, rowNameLB);
    537       model->appendRow(rowUB, -DecompInf, 0.0, rowNameUB);
     536      model->appendRow(rowLB, 0.0, m_infinity, rowNameLB);
     537      model->appendRow(rowUB, -m_infinity, 0.0, rowNameUB);
    538538
    539539      //set kirchoffs voltage constraints for ac-arcs
     
    560560         std::string rowNameK1 = "k1_" + UtilIntToStr(a) + "_" + UtilIntToStr(tpId);
    561561         std::string rowNameK2 = "k2_" + UtilIntToStr(a) + "_" + UtilIntToStr(tpId);
    562          model->appendRow(rowK1, -DecompInf, bigM, rowNameK1);
    563          model->appendRow(rowK2, -bigM, DecompInf, rowNameK2);
     562         model->appendRow(rowK1, -m_infinity, bigM, rowNameK1);
     563         model->appendRow(rowK2, -bigM, m_infinity, rowNameK2);
    564564      }
    565565
     
    611611   for(i = 0; i < numNodes; i++){
    612612      colIndex = col_thetaStartIndex + tpId * numNodes + i;
    613       model->colLB[colIndex] = -DecompInf;
    614       model->colUB[colIndex] =  DecompInf;
     613      model->colLB[colIndex] = -m_infinity;
     614      model->colUB[colIndex] =  m_infinity;
    615615      model->activeColumns.push_back(colIndex);
    616616   } 
  • releases/0.92.2/Dip/examples/SDPUC/SDPUC_Main.cpp

    r1588 r1588  
    2525//===========================================================================//
    2626#include "UtilTimer.h"
    27 
    28 double DecompInf = COIN_DBL_MAX;
    2927
    3028//===========================================================================//
  • releases/0.92.2/Dip/examples/SmallIP/SmallIP_DecompApp.cpp

    r1588 r1588  
    105105   //---
    106106   double   rowLB1[numRows1] = {13.0, 1.0, -3.0, -27.0, -5.0, -4.0};
    107    std::fill_n(back_inserter(m_modelPart1.rowUB), numRows1, DecompInf);
     107   std::fill_n(back_inserter(m_modelPart1.rowUB), numRows1, m_infinity);
    108108   std::copy  (rowLB1, rowLB1 + numRows1, back_inserter(m_modelPart1.rowLB));
    109109
     
    124124   //---
    125125   double   rowLB2[numRows2] = {-8.0, 0.3, 4.5, 9.5, -3.0};
    126    std::fill_n(back_inserter(m_modelPart2.rowUB), numRows2, DecompInf);
     126   std::fill_n(back_inserter(m_modelPart2.rowUB), numRows2, m_infinity);
    127127   std::copy  (rowLB2, rowLB2 + numRows2, back_inserter(m_modelPart2.rowLB));
    128128
     
    232232         rc.setRow(cut);     
    233233         rc.setLb(rhs[r]);
    234          rc.setUb(DecompInf);
     234         rc.setUb(m_infinity);
    235235     
    236236         DecompCutOsi * decompCut = new DecompCutOsi(rc);
  • releases/0.92.2/Dip/examples/SmallIP/SmallIP_Main.cpp

    r1588 r1588  
    2727#include "DecompAlgoPC.h"
    2828#include "DecompAlgoRC.h"
    29 
    30 double DecompInf = COIN_DBL_MAX;
    3129
    3230//===========================================================================//
  • releases/0.92.2/Dip/examples/TSP/TSP_CutGen.cpp

    r1588 r1588  
    3838
    3939      if(S.size() >= 2){
    40          TSP_SubtourCut * sec_cut = new TSP_SubtourCut(inS, S);
     40         TSP_SubtourCut * sec_cut = new TSP_SubtourCut(inS, S, m_infinity);
    4141         
    4242         UTIL_DEBUG(m_param.LogDebugLevel, 3,
    43                     sec_cut->print();
     43                    sec_cut->print(m_infinity);
    4444                    );
    4545         newCuts.push_back(sec_cut);     
  • releases/0.92.2/Dip/examples/TSP/TSP_DecompApp.cpp

    r1588 r1588  
    210210      }
    211211      modelCS->rowLB.push_back(2.0);
    212       modelCS->rowUB.push_back(DecompInf);
     212      modelCS->rowUB.push_back(m_infinity);
    213213      modelCS->M->appendRow(row);
    214214   }
     
    372372   }
    373373   
    374    const double bigM     = DecompInf;   
     374   const double bigM     = m_infinity;   
    375375   int          exchange = 0;
    376376   vector< pair<int,double> >::iterator vpi = edge_cost.begin();
  • releases/0.92.2/Dip/examples/TSP/TSP_Main.cpp

    r1588 r1588  
    2525//===========================================================================//
    2626#include "UtilTimer.h"
    27 
    28 double DecompInf = COIN_DBL_MAX;
    2927
    3028//===========================================================================//
  • releases/0.92.2/Dip/examples/TSP/TSP_SubtourCut.cpp

    r1588 r1588  
    8282
    8383/*-------------------------------------------------------------------------*/
    84 void TSP_SubtourCut::setBounds(){
     84void TSP_SubtourCut::setBounds(double infinity){
    8585   switch(m_type){
    8686   case ACROSS:
    8787      setLowerBound(2.0);
    88       setUpperBound(DecompInf);
     88      setUpperBound(infinity);
    8989      break;
    9090   case SIDE:
    91       setLowerBound(-DecompInf);
     91      setLowerBound(-infinity);
    9292      setUpperBound(static_cast<int>(m_S.size()) - 1.0);
    9393      break;
     
    133133
    134134/*-------------------------------------------------------------------------*/
    135 void TSP_SubtourCut::print(ostream * os) const{
     135void TSP_SubtourCut::print(double infinity, ostream * os) const{
    136136   double lb, ub;
    137137   switch(m_type){
     
    168168   lb = getLowerBound();
    169169   ub = getUpperBound();
    170    if(lb > -DecompInf){
     170   if(lb > -infinity){
    171171      (*os) << "\tm_lb\t" << lb;
    172172   }
     
    174174      (*os) << "\tm_lb\t-INF";
    175175   }
    176    if(ub < DecompInf){
     176   if(ub < infinity){
    177177      (*os) << "\tm_ub\t" << ub;
    178178   }
  • releases/0.92.2/Dip/examples/TSP/TSP_SubtourCut.h

    r1588 r1588  
    4343   //these (pure virutal) methods are inherited from DecompCut
    4444   virtual void expandCutToRow(CoinPackedVector * row);
    45    virtual void setBounds();
     45   virtual void setBounds(double infinity);
    4646
    4747   //these (virutal) methods are inherited from DecompCut
    48    virtual void print(ostream * os = &cout) const;
     48   virtual void print(double infinity, ostream * os = &cout) const;
    4949   virtual bool isSame(const DecompCut * cut) const;
    5050
     
    5656
    5757public:
    58    TSP_SubtourCut(const vector<bool> & inS,
    59                   const cutType        type = ACROSS){
     58   TSP_SubtourCut(const vector<bool> & inS,
     59                  double infinity,
     60                  const cutType type = ACROSS){
    6061      m_inS     = inS;
    6162      m_storage = BITSET;
    6263      m_nverts  = static_cast<int>(m_inS.size());
    6364      m_type    = type;
    64       setBounds();
     65      setBounds(infinity);
    6566      init();
    6667   };
     
    6869   TSP_SubtourCut(const vector<bool> & inS,
    6970                  const vector<int>  & S,
    70                   const cutType        type){
     71                  double infinity,
     72                  const cutType type){
    7173      m_inS     = inS;
    7274      m_S       = S;
     
    7476      m_nverts  = static_cast<int>(m_inS.size());
    7577      m_type    = type;
    76       setBounds();
     78      setBounds(infinity);
    7779      init();
    7880   };
    7981
    8082   TSP_SubtourCut(const vector<bool> & inS,
    81                   const vector<int>  & S){
     83                  const vector<int>  & S,
     84                  double infinity){
    8285      m_inS     = inS;
    8386      m_S       = S;
     
    8588      m_nverts  = static_cast<int>(m_inS.size());
    8689      setCutType();
    87       setBounds();
     90      setBounds(infinity);
    8891      init();
    8992   };
  • releases/0.92.2/Dip/examples/VRP/VRP_CVRPsep.h

    r1588 r1588  
    197197
    198198
    199    void createVrpCuts(DecompCutList & newCuts){
     199   void createVrpCuts(DecompCutList & newCuts, double infinity){
    200200      int i, j;
    201201      const UtilGraphLib & graphLib = m_vrp->m_graphLib;
     
    218218                     inS.set(CP->IntList[j]);
    219219               }
    220                VRP_GSECCut * cut = new VRP_GSECCut(inS, demand, capacity);
     220               VRP_GSECCut * cut = new VRP_GSECCut(inS, demand, capacity,
     221                                                   infinity);
    221222               //cut->print();
    222223               //double lb = cut->getLowerBound();
  • releases/0.92.2/Dip/examples/VRP/VRP_Concorde.h

    r1588 r1588  
    363363
    364364   int solveTSP(vector<int>    & vrpRouteInd,
    365                 vector<double> & vrpRouteEls){
     365                vector<double> & vrpRouteEls,
     366                double infinity){
    366367
    367368
     
    424425      int    nOrigVerts = graphLib.n_vertices;
    425426      int    nCustomers = nOrigVerts - 1;
    426       double upbound    = DecompInf;
    427       double optval     = DecompInf;     
     427      double upbound    = infinity;
     428      double optval     = infinity;     
    428429
    429430      //---
  • releases/0.92.2/Dip/examples/VRP/VRP_DecompApp.cpp

    r1588 r1588  
    325325   //---  create DecompCuts from CVRPsep cuts
    326326   //---
    327    m_cvrpSep.createVrpCuts(newCuts);
     327   m_cvrpSep.createVrpCuts(newCuts, m_infinity);
    328328
    329329   UtilPrintFuncEnd(m_osLog, m_classTag,
     
    361361      //--- solve the TSP
    362362      //---     
    363       status = m_concorde.solveTSP(vrpRouteInd, vrpRouteEls);
     363      status = m_concorde.solveTSP(vrpRouteInd, vrpRouteEls, m_infinity);
    364364      assert(!status);
    365365
  • releases/0.92.2/Dip/examples/VRP/VRP_GSECCut.cpp

    r1588 r1588  
    101101
    102102/*-------------------------------------------------------------------------*/
    103 void VRP_GSECCut::setBounds(){
     103void VRP_GSECCut::setBounds(double infinity){
    104104
    105105   //(i)   ACROSS:     2 * ceil( sum{i in S} d_i / C )
     
    113113   case ACROSS:
    114114      setLowerBound(2.0 * bin);
    115       setUpperBound(DecompInf);
     115      setUpperBound(infinity);
    116116      break;
    117117   case SIDE:
    118       setLowerBound(-DecompInf);
     118      setLowerBound(-infinity);
    119119      setUpperBound(getSize() - bin);
    120120      break;
    121121   case SIDE_COMPL:
    122       setLowerBound(-DecompInf);
     122      setLowerBound(-infinity);
    123123      setUpperBound(((m_nverts - 1) - getSize()) - bin);
    124124      break;
     
    130130   /*
    131131   cout << "in setBounds LB: ";
    132    if(getLowerBound() > -(DecompInf/2))
     132   if(getLowerBound() > -(infinity/2))
    133133      cout << getLowerBound();
    134134   else
    135135      cout << "-inf";
    136136   cout << "in setBounds UB: ";
    137    if(getUpperBound() < (DecompInf/2))
     137   if(getUpperBound() < (infinity/2))
    138138      cout << getUpperBound();
    139139   else
  • releases/0.92.2/Dip/examples/VRP/VRP_GSECCut.h

    r1588 r1588  
    6464   //these (pure virutal) methods are inherited from DecompCut
    6565   virtual void expandCutToRow(CoinPackedVector * row);
    66    virtual void setBounds(); 
     66   virtual void setBounds(double infinity); 
    6767 
    6868   //these (virutal) methods are inherited from DecompCut
     
    8282               const int              * vertex_wt,
    8383               const int                capacity,
     84               const double             infinity,
    8485               const int                demandS = 0) :
    8586      m_classTag("VRP-GSEC"),
     
    9394      setCutType();
    9495      setDemand(vertex_wt);
    95       setBounds();
     96      setBounds(infinity);
    9697   }
    9798
  • releases/0.92.2/Dip/examples/VRP/VRP_Main.cpp

    r1588 r1588  
    2525#include "DecompAlgoRC.h"
    2626//===========================================================================//
    27 
    28 double DecompInf = COIN_DBL_MAX;
    2927
    3028//===========================================================================//
  • releases/0.92.2/Dip/examples/VRP/VRP_SPPRC.cpp

    r1588 r1588  
    8282      }
    8383   }
    84    model->appendRow(rowCap, -DecompInf, capacity);
     84   model->appendRow(rowCap, -m_infinity, capacity);
    8585
    8686   //---
  • releases/0.92.2/Dip/setup.py

    r1588 r1588  
    88
    99PROJECT = 'coinor.dippy'
    10 VERSION = '1.92.1'
     10VERSION = '1.92.2'
    1111URL = 'https://projects.coin-or.org/Dip/wiki/DipPy'
    1212AUTHOR_EMAIL = u''
     
    108108                   sources,
    109109                   libraries=libraries,
    110                    include_dirs=[join(coin_install_dir, 'include', 'coin')],
     110                   include_dirs=[join(coin_install_dir, 'include', 'coin'),
     111                                 '/usr/local/gurobi/linux64/include',
     112                                 '/usr/local/cplex/include/ilcplex'],
    111113                   library_dirs=lib_dirs,
    112114                   define_macros=macros)]
  • releases/0.92.2/Dip/src

  • releases/0.92.2/Dip/src/AlpsDecompModel.cpp

    r1588 r1588  
    9595      gapVal      = ALPS_MAX(0, feasBound - relBound);
    9696      currAbsGap_ = ALPS_MAX(0, gapVal);
    97       currRelGap_ = 100.0 * UtilCalculateGap(relBound, feasBound);
     97      currRelGap_ = 100.0 * UtilCalculateGap(relBound, feasBound,
     98                                             m_decompAlgo->getInfinity());
    9899   }
    99100
  • releases/0.92.2/Dip/src/AlpsDecompTreeNode.cpp

    r1588 r1588  
    133133   double parentObjValue  = getQuality();
    134134   double primalTolerance = 1.0e-6;
    135    double globalLB        = -DecompInf;
    136    double globalUB        =  DecompInf;
     135   double globalLB        = -decompAlgo->getInfinity();
     136   double globalUB        =  decompAlgo->getInfinity();
    137137   double thisQuality;
    138138   AlpsTreeNode*         bestNode  = NULL;
     
    225225
    226226         for (c = 0; c < n_cols; c++) {
    227             lbsInf[c] = -DecompInf;
    228             ubsInf[c] =  DecompInf;
     227            lbsInf[c] = -decompAlgo->getInfinity();
     228            ubsInf[c] =  decompAlgo->getInfinity();
    229229            //printf("root c:%d lb=%g ub=%g\n",
    230230            //   c, lbs[c], ubs[c]);
     
    244244   currentUB = getKnowledgeBroker()->getIncumbentValue();
    245245   decompAlgo->setObjBoundIP(currentUB);//??
    246    gap      = DecompInf;
     246   gap      = decompAlgo->getInfinity();
    247247   globalUB = getKnowledgeBroker()->getIncumbentValue();
    248248
     
    254254      //---
    255255      //TODO: cutoffIncrement (currentUB-cutoffIncrement)
    256       gap = UtilCalculateGap(globalLB, globalUB);
     256      gap = UtilCalculateGap(globalLB, globalUB, decompAlgo->getInfinity());
    257257
    258258      if (gap <= relTolerance) {
     
    304304
    305305      //watch tolerance here... if quality is close enough, fathom it
    306       gap = UtilCalculateGap(thisQuality, currentUB);
     306      gap = UtilCalculateGap(thisQuality, currentUB, decompAlgo->getInfinity());
    307307
    308308      //if(gap <= relTolerance){
  • releases/0.92.2/Dip/src/Decomp.h

    r1588 r1588  
    4848//---
    4949//--- include some standard COIN headers (depending on LP solver)
    50 //---   depending on LP solver, set:
    51 //---      OsiLp, OsiIp, and DecompInf
     50//---   depending on LP solver
    5251//---
    5352#include "CoinError.hpp"
     
    5554#include "CoinPackedVector.hpp"
    5655#include "CoinPackedMatrix.hpp"
    57 
    58 extern double DecompInf;
    5956
    6057#ifdef DIP_HAS_CLP
  • releases/0.92.2/Dip/src/DecompAlgo.cpp

    r1588 r1588  
    4141using namespace std;
    4242
    43 double DecompInf = COIN_DBL_MAX;
    44 
    4543//===========================================================================//
    4644
     
    303301
    304302   m_masterSI = getOsiLpSolverInterface();
     303   m_infinity = m_masterSI->getInfinity();
    305304
    306305   CoinAssertHint(m_masterSI, "Error: Out of Memory");
     
    361360
    362361         m_cutgenObjCutInd = m_cutgenSI->getNumRows();
    363          m_cutgenSI->addRow(objCut, -DecompInf, DecompInf);
     362         m_cutgenSI->addRow(objCut, -m_infinity, m_infinity);
    364363      }
    365364   }
     
    955954      colNames.push_back(colName);
    956955      UTIL_DEBUG(m_param.LogDebugLevel, 5,
    957                  (*li)->print(m_osLog, m_app);
     956                 (*li)->print(m_infinity, m_osLog, m_app);
    958957                );
    959958      //---
     
    995994      masterM->appendCol(*sparseCol);
    996995      colLB[colIndex]    = 0.0;
    997       colUB[colIndex]    = DecompInf;
     996      colUB[colIndex]    = m_infinity;
    998997      objCoeff[colIndex] = 0.0;       //PHASE I
    999998      //---
     
    10461045   if (isZeroFeas) {
    10471046      for (r = 0; r < m_numConvexCon; r++) {
    1048          masterRowLB.push_back(-DecompInf);
     1047         masterRowLB.push_back(-m_infinity);
    10491048         masterRowUB.push_back(1.0);
    10501049      }
     
    12531252   colBeg.push_back(static_cast<CoinBigIndex>(colBeg.size()));
    12541253   colLB    = 0.0;
    1255    colUB    = DecompInf;
     1254   colUB    = m_infinity;
    12561255   objCoeff = 1.0;
    12571256   m_masterColType.push_back(colType);
     
    14641463         //x <= u
    14651464         j = modelCore->integerVars[i];
    1466          modelCore->rowLB.push_back(-DecompInf);
     1465         modelCore->rowLB.push_back(-m_infinity);
    14671466         modelCore->rowUB.push_back(colUBCore[j]);
    14681467         sense = 'L';
     
    14771476         j = modelCore->integerVars[i - nIntVars];
    14781477         modelCore->rowLB.push_back(colLBCore[j]);
    1479          modelCore->rowUB.push_back(DecompInf);
     1478         modelCore->rowUB.push_back(m_infinity);
    14801479         sense = 'G';
    14811480         rhs   = colLBCore[j];
     
    14941493                                            rowInd + i,
    14951494                                            rowEls + i,
    1496                                             sense, rhs);
     1495                                            sense, rhs,
     1496                                            m_infinity);
    14971497      modelCore->rowHash.push_back(rowHash);
    14981498   }
     
    15981598   //---
    15991599   UTIL_MSG(m_param.LogLevel, 2,
    1600             double gap = UtilCalculateGap(globalLB, globalUB);
     1600            double gap = UtilCalculateGap(globalLB, globalUB, m_infinity);
    16011601            (*m_osLog)
    16021602            << "Process Node " << nodeIndex
     
    16541654   //m_nodeStats.objBest.first  = globalLB;
    16551655   //if(m_param.DualStab)
    1656    m_nodeStats.objBest.first  = -DecompInf;
     1656   m_nodeStats.objBest.first  = -m_infinity;
    16571657   //else
    16581658   //m_nodeStats.objBest.first  = globalLB;
     
    24192419                  (*m_osLog) << "Set masterColIndex=" << masterColIndex
    24202420                             << " UB to 0" << endl;
    2421                   (*li)->print(m_osLog, modelCore->getColNames());
     2421                  (*li)->print(m_infinity, m_osLog, modelCore->getColNames());
    24222422               }
    24232423            }
     
    24272427            //---
    24282428            if (colUB[masterColIndex] <= 0) {
    2429                m_masterSI->setColBounds(masterColIndex, 0.0, DecompInf);
     2429               m_masterSI->setColBounds(masterColIndex, 0.0, m_infinity);
    24302430
    24312431               if (m_param.LogDebugLevel >= 4) {
    24322432                  (*m_osLog) << "Set masterColIndex=" << masterColIndex
    24332433                             << " UB to INF" << endl;
    2434                   (*li)->print(m_osLog, modelCore->getColNames());
     2434                  (*li)->print(m_infinity, m_osLog, modelCore->getColNames());
    24352435               }
    24362436            }
     
    25942594   case PHASE_PRICE1:
    25952595   case PHASE_PRICE2:
    2596       m_masterSI->setDblParam(OsiDualObjectiveLimit, DecompInf);
     2596      m_masterSI->setDblParam(OsiDualObjectiveLimit, m_infinity);
    25972597
    25982598      if (m_param.SolveMasterUpdateAlgo == DecompDualSimplex) {
     
    27562756      //--- presolve off
    27572757      //---
    2758       m_masterSI->setDblParam(OsiDualObjectiveLimit, DecompInf);
     2758      m_masterSI->setDblParam(OsiDualObjectiveLimit, m_infinity);
    27592759      m_masterSI->setHintParam(OsiDoPresolveInResolve, false, OsiHintDo);
    27602760      m_masterSI->resolve();
     
    34523452      aveC = UtilAve(objCoeff, nCoreCols);
    34533453      attempts = 0;
    3454       DecompSolverResult subprobResult;//nCoreCols);
     3454      DecompSolverResult subprobResult(m_infinity);//nCoreCols);
    34553455
    34563456      while ((nInitVars < limit) && (attempts < limit2)) {
     
    35493549      DecompAlgoC cpm(m_app, *m_utilParam);
    35503550      cpm.m_param.CutDC = 2;
    3551       cpm.processNode(0, -DecompInf, DecompInf);
     3551      cpm.processNode(0, -m_infinity, m_infinity);
    35523552      //---
    35533553      //--- copy the vars generated in passes of DC into initVars
     
    39813981      } else {
    39823982         m_masterSI->setObjCoeff(i, 1.0);
    3983          m_masterSI->setColBounds(i, 0.0, DecompInf);
     3983         m_masterSI->setColBounds(i, 0.0, m_infinity);
    39843984      }
    39853985   }
     
    47534753   }
    47544754
    4755    //vector<double>       mostNegRCvec(m_numConvexCon, DecompInf);
     4755   //vector<double>       mostNegRCvec(m_numConvexCon, m_infinity);
    47564756   vector<double>       mostNegRCvec(m_numConvexCon, 0);
    4757    DecompSolverResult   solveResult;
     4757   DecompSolverResult   solveResult(m_infinity);
    47584758
    47594759   //---
     
    48144814         DecompSubModel&    subModel        = getModelRelax(subprobIndex);
    48154815         double             alpha           = u[nBaseCoreRows + subprobIndex];
    4816          DecompSolverResult solveResult;
     4816         DecompSolverResult solveResult(m_infinity);
    48174817
    48184818#ifdef _OPENMP
     
    52415241
    52425242   for (it = newVars.begin(); it != newVars.end(); it++) {
    5243    (*it)->print(m_osLog, m_app);
     5243      (*it)->print(m_infinity, m_osLog, m_app);
    52445244   }
    52455245             );
     
    55665566         UTIL_DEBUG(m_app->m_param.LogDebugLevel, 3,
    55675567                    (*m_osLog) << "Duplicate variable, already in vars!!\n";
    5568                     (*li)->print(m_osLog,
     5568                    (*li)->print(m_infinity,
     5569                                 m_osLog,
    55695570                                 modelCore->getColNames(),
    55705571                                 NULL);
     
    55725573         UTIL_DEBUG(m_app->m_param.LogDebugLevel, 5,
    55735574                    (*m_osLog) << "\nVAR POOL:\n";
    5574                     m_varpool.print(m_osLog);
     5575                    m_varpool.print(m_infinity, m_osLog);
    55755576                    (*m_osLog) << "\nVARS:\n";
    55765577                    printVars(m_osLog);
     
    57045705   UTIL_DEBUG(m_app->m_param.LogDebugLevel, 10,
    57055706              (*m_osLog) << "\nVAR POOL BEFORE:\n";
    5706               m_varpool.print(m_osLog);
     5707              m_varpool.print(m_infinity, m_osLog);
    57075708              (*m_osLog) << "\nVARS BEFORE:\n";
    57085709              printVars(m_osLog);
     
    58275828   UTIL_DEBUG(m_app->m_param.LogDebugLevel, 10,
    58285829              (*m_osLog) << "\nVAR POOL AFTER:\n";
    5829               m_varpool.print(m_osLog);
     5830              m_varpool.print(m_infinity, m_osLog);
    58305831              (*m_osLog) << "\nVARS AFTER:\n";
    58315832              printVars(m_osLog);
     
    58765877      //--- set the hash string (for quick duplicate checks)
    58775878      //---
    5878       (*li)->setStringHash(row);
     5879      (*li)->setStringHash(row, m_infinity);
    58795880#if 0
    58805881      bool isOptViolated = false;
     
    60766077         modelCore->rowLB.push_back(rlb[index]);
    60776078         modelCore->rowUB.push_back(rub[index]);
    6078          UtilBoundToSense(rlb[index], rub[index], DecompInf,
     6079         UtilBoundToSense(rlb[index], rub[index], m_infinity,
    60796080                          sense, rhs, range);
    60806081         modelCore->rowRhs.push_back(rhs);
     
    65456546            var->setBlockId(whichBlock);
    65466547            UTIL_DEBUG(m_app->m_param.LogDebugLevel, 5,
    6547                        var->print(););
     6548                       var->print(m_infinity););
    65486549            vars.push_back(var);
    65496550         }
     
    65786579                       (*m_osLog) << "Check that var satisifes relax matrix "
    65796580                       << whichBlock << endl;
    6580                        (*it)->print();
     6581                       (*it)->print(m_infinity);
    65816582                      );
    65826583            (*it)->fillDenseArr(n_origCols, xTemp);
     
    66876688                    (*m_osLog) << "LAMBDA[" << colIndex << "]: " << lamSol;
    66886689
    6689                     if (nColNames)
    6690                     (*li)->print(m_osLog, colNames);
    6691          else {
    6692             (*li)->print(m_osLog);
    6693             }
    6694                    );
     6690                    if (nColNames){
     6691                       (*li)->print(m_infinity, m_osLog, colNames);
     6692                    }
     6693                    else {
     6694                       (*li)->print(m_infinity, m_osLog);
     6695                    }
     6696                    );
    66956697         CoinPackedVector& v = (*li)->m_s;
    66966698         const int*     inds  = v.getIndices();
     
    67856787      double masterLB  = objBound.thisBound;
    67866788      //double masterLB  = m_nodeStats.objBest.first;
    6787       double masterGap = UtilCalculateGap(masterLB, masterUB);
     6789      double masterGap = UtilCalculateGap(masterLB, masterUB, m_infinity);
    67886790
    67896791      //printf("Check tailoff, masterLB=%g masterUB=%g masterGap=%g\n",
     
    67986800   int    len       = 0;
    67996801   double prevBound = (*it).bestBound;
    6800    double diff      =  DecompInf;
     6802   double diff      =  m_infinity;
    68016803   double sumDiff   = 0.0;
    68026804   double aveDiff   = 0.0;
  • releases/0.92.2/Dip/src/DecompAlgo.h

    r1588 r1588  
    9292
    9393   /**
     94    * The value of "infinity"
     95    */
     96   double m_infinity;
     97
     98   /**
    9499    * The current algorithm phase.
    95100    */
     
    302307    */
    303308   virtual DecompStatus processNode(const AlpsDecompTreeNode* node,
    304                                     const double globalLB = -DecompInf,
    305                                     const double globalUB =  DecompInf);
     309                                    const double globalLB,
     310                                    const double globalUB);
    306311
    307312   /**
     
    398403   }
    399404
    400 
     405   /**
     406    * Return the value of infinity
     407    */
     408   double getInfinity() {
     409      return m_infinity;
     410   }
    401411
    402412   //................................
    403413   //TODO............................
    404414   //................................
    405 
    406 
    407 
    408415
    409416   virtual bool isDone() {
     
    499506   /*double calculateGap(double boundLB,
    500507               double boundUB) const {
    501       double gap = DecompInf;
    502       if(boundLB > -DecompInf && boundUB < DecompInf){
     508      double gap = m_infinity;
     509      if(boundLB > -m_infinity && boundUB < m_infinity){
    503510    if(boundLB != 0.0)
    504511       gap = fabs(boundUB-boundLB)/fabs(boundLB);
     
    780787   inline double getMasterObjValue() const {
    781788      if (!m_masterSI) {
    782          return -DecompInf;
     789         return -m_infinity;
    783790      }
    784791
     
    804811    */
    805812   inline const double getGlobalGap() const {
    806       return UtilCalculateGap(m_globalLB, m_globalUB);
     813      return UtilCalculateGap(m_globalLB, m_globalUB, m_infinity);
    807814   }
    808815
     
    811818    */
    812819   inline const double getNodeIPGap() const {
    813       return UtilCalculateGap(getObjBestBoundLB(), getObjBestBoundUB());
     820      return UtilCalculateGap(getObjBestBoundLB(), getObjBestBoundUB(), m_infinity);
    814821   }
    815822
     
    824831         const DecompObjBound& objBound
    825832         = m_nodeStats.objHistoryBound[nHistorySize - 1];
    826          return UtilCalculateGap(getObjBestBoundLB(), objBound.thisBoundUB);
     833         return UtilCalculateGap(getObjBestBoundLB(), objBound.thisBoundUB, m_infinity);
    827834      } else {
    828          return DecompInf;
     835         return m_infinity;
    829836      }
    830837   }
     
    874881      }
    875882
    876       DecompObjBound objBound;
     883      DecompObjBound objBound(m_infinity);
    877884      objBound.phase         = m_phase == PHASE_PRICE1 ? 1 : 2;
    878885      objBound.cutPass       = m_nodeStats.cutCallsTotal;
     
    909916      //--- copy the last continuous history, adjust the time
    910917      //---
    911       DecompObjBound   objBoundIP;
     918      DecompObjBound   objBoundIP(m_infinity);
    912919      DecompObjBound* objBoundLP = m_nodeStats.getLastBound();
    913920
     
    979986      m_algo       (algo),
    980987      m_status     (STAT_UNKNOWN),
     988      m_infinity   (COIN_DBL_MAX),
    981989      m_phase      (PHASE_UNKNOWN),
    982990      m_phaseLast  (PHASE_UNKNOWN),
     
    10001008      m_cutpool    (),
    10011009      m_xhat       (0),
    1002       m_cutoffUB   (DecompInf),
     1010      m_cutoffUB   (m_infinity),
    10031011      m_xhatIPFeas (),
    10041012      m_xhatIPBest (NULL),
     
    10101018      m_colLBNode(NULL),
    10111019      m_colUBNode(NULL),
    1012       m_relGap(DecompInf),
     1020      m_relGap(m_infinity),
    10131021      m_stopCriteria(DecompStopNo),
    1014       m_masterObjLast(DecompInf),
     1022      m_masterObjLast(m_infinity),
    10151023      m_firstPhase2Call(false),
    10161024      m_isStrongBranch(false),
  • releases/0.92.2/Dip/src/DecompAlgoD.cpp

    r1588 r1588  
    5151      int    len       = 0;
    5252      double prevBound = (*it);
    53       double diff      = DecompInf;
     53      double diff      = m_infinity;
    5454      double sumDiff   = 0.0;
    5555      double aveDiff   = 0.0;
     
    151151   //--- pick the alpha that maximizes the violation
    152152   //---
    153    double alpha = -DecompInf;
     153   double alpha = -m_infinity;
    154154
    155155   for (b = 0; b < m_numConvexCon; b++) {
     
    178178
    179179      rowCut.setRow(cut);
    180       rowCut.setLb(-DecompInf);
     180      rowCut.setLb(-m_infinity);
    181181      rowCut.setUb(-alpha);
    182182      DecompCutOsi* decompCut = new DecompCutOsi(rowCut);
    183       decompCut->setStringHash();//constructor should do!
     183      decompCut->setStringHash(m_infinity);//constructor should do!
    184184      //decompCut->print(m_osLog);
    185185      (*m_newCuts).push_back(decompCut);
     
    480480      M->appendCol(artColPlus);
    481481      colLB[col_index] = 0.0;
    482       colUB[col_index] = DecompInf;
     482      colUB[col_index] = m_infinity;
    483483      obj[col_index]   = 1.0;
    484484      colNamePlus      = "sP(c_" + UtilIntToStr(col_index)
     
    488488      M->appendCol(artColMinus);
    489489      colLB[col_index] = 0.0;
    490       colUB[col_index] = DecompInf;
     490      colUB[col_index] = m_infinity;
    491491      obj[col_index]   = 1.0;
    492492      colNameMinus = "sM(c_" + UtilIntToStr(col_index)
     
    527527      colNames.push_back(colName);
    528528      UTIL_DEBUG(m_param.LogDebugLevel, 5,
    529                  (*li)->print(m_osLog, m_app);
     529                 (*li)->print(m_infinity, m_osLog, m_app);
    530530                );
    531531      //---
     
    556556      masterM->appendCol(*sparseCol);
    557557      colLB[colIndex]    = 0.0;
    558       colUB[colIndex]    = DecompInf;
     558      colUB[colIndex]    = m_infinity;
    559559      objCoeff[colIndex] = 0.0; //for D, we are in PHASEI the whole time
    560560      //---
  • releases/0.92.2/Dip/src/DecompAlgoD.h

    r1588 r1588  
    116116      m_param.RoundPriceItersLimit = 1000;
    117117      m_param.SolveMasterAsMip      = 0;
    118       processNode(NULL);
     118      processNode(NULL, m_infinity, m_infinity);
    119119   }
    120120
  • releases/0.92.2/Dip/src/DecompAlgoPC.cpp

    r1588 r1588  
    269269      double masterUB  = objBound.thisBoundUB;
    270270      double masterLB  = m_nodeStats.objBest.first;
    271       double masterGap = DecompInf;
    272 
    273       if (masterUB > -DecompInf &&
    274             masterUB <  DecompInf) {
     271      double masterGap = m_infinity;
     272
     273      if (masterUB > -m_infinity &&
     274            masterUB <  m_infinity) {
    275275         if (masterUB != 0.0) {
    276276            masterGap = fabs(masterUB - masterLB) / masterUB;
     
    604604   //--- set the master-onlys (that are integral) to integer
    605605   //---
    606    int          colIndex;
     606   int         colIndex;
    607607   const char* intMarkerCore  = modelCore->getIntegerMark();
    608608
     
    624624                          m_nodeStats.priceCallsTotal);
    625625
    626    DecompSolverResult    result;
     626   DecompSolverResult    result(m_infinity);
    627627
    628628   if (m_param.DecompIPSolver == "SYMPHONY"){
     
    11631163   //--- set time back
    11641164   //---
    1165    status = CPXsetdblparam(cpxEnv, CPX_PARAM_TILIM, DecompInf);
     1165   status = CPXsetdblparam(cpxEnv, CPX_PARAM_TILIM, m_infinity);
    11661166
    11671167   if (status)
     
    12381238      //--- set the hash string (for quick duplicate checks)
    12391239      //---
    1240       (*li)->setStringHash(row);
     1240      (*li)->setStringHash(row, m_infinity);
    12411241      //bool isOptViolated = false;
    12421242      //for(i = 0; i < m_optPoint.size(); i++){
     
    15191519      //TODO: make this a function
    15201520      UtilBoundToSense(rlb[index], rub[index],
    1521                        DecompInf, sense, rhs, range);
     1521                       m_infinity, sense, rhs, range);
    15221522      modelCore->rowLB.push_back(rlb[index]);
    15231523      modelCore->rowUB.push_back(rub[index]);
  • releases/0.92.2/Dip/src/DecompAlgoRC.cpp

    r1588 r1588  
    117117      M->appendCol(*sparseCol);
    118118      colLB[col_index] = 0.0; //THINK: (*li)->getLowerBound();
    119       colUB[col_index] = DecompInf; //THINK: (*li)->getUpperBound(); //FIX!!
     119      colUB[col_index] = m_infinity; //THINK: (*li)->getUpperBound(); //FIX!!
    120120      obj[col_index]   = (*li)->getOriginalCost(); //c.s
    121121      col_index++;
     
    144144
    145145   if (isZeroFeas) {
    146       masterRowLB.push_back(-DecompInf);
     146      masterRowLB.push_back(-m_infinity);
    147147      masterRowUB.push_back(1.0);
    148148   } else {
     
    315315   //really only returning one var here...
    316316   //for RC, doesn't have to be negative??
    317    mostNegReducedCost = DecompInf;//bad name here
     317   mostNegReducedCost = m_infinity;//bad name here
    318318   //TODO: whenever a cut is added, if doing RC, you need to add an
    319319   //element to u.... do we need to override gen cuts just for that?
     
    418418   UTIL_DEBUG(m_app->m_param.LogDebugLevel, 3,
    419419              (*m_osLog) << "\nshat: ";
    420               shatVar->print(m_osLog);
     420              shatVar->print(m_infinity, m_osLog);
    421421             );
    422422   //make this part of class, else realloc every iter...
  • releases/0.92.2/Dip/src/DecompAlgoRC.h

    r1588 r1588  
    131131      m_u        (),
    132132      m_rc       (NULL),
    133       m_UB       (DecompInf),
    134       m_LB       (-DecompInf),
     133      m_UB       (m_infinity),
     134      m_LB       (-m_infinity),
    135135      m_cntSameLB(0),
    136136      m_iter     (0),
  • releases/0.92.2/Dip/src/DecompApp.cpp

    r1588 r1588  
    1414
    1515#include "DecompApp.h"
     16#include "DecompAlgo.h"
    1617#include "DecompVar.h"
    1718#include "DecompConfig.h"
     
    741742                                     origCost);
    742743      var->setBlockId(indexPair.second);
    743       var->print(m_osLog, colNames);
     744      var->print(m_decompAlgo->getInfinity(), m_osLog, colNames);
    744745      initVars.push_back(var);
    745746      printf("Adding initial variable with origCost = %g\n", origCost);
     
    17171718}
    17181719
     1720//===========================================================================//
     1721void DecompApp::setModelRelax(DecompConstraintSet* model,
     1722                              const std::string    modelName,
     1723                              const int            blockId) {
     1724   if (model && !model->hasPrepRun()) {
     1725      model->prepareModel(m_infinity);
     1726   }
     1727   
     1728   //---
     1729   //--- make sure this block has not been set yet
     1730   //---
     1731   std::map<int, DecompModel>::iterator mit = m_modelRelax.find(blockId);
     1732   
     1733   if (mit != m_modelRelax.end()) {
     1734      std::cerr << "Block " << blockId << " relaxation has already been set. "
     1735                << "Only one relaxation definition can be used at one time."
     1736                << std::endl;
     1737      throw UtilException("Multiple relaxation definitions",
     1738                          "setModelRelax", "DecompApp");
     1739   }
     1740   
     1741   DecompModel appModel(model, modelName, blockId, *m_utilParam);
     1742   m_modelRelax.insert(std::make_pair(blockId, appModel));
     1743}
     1744
     1745//===========================================================================//
     1746void DecompApp::setModelRelaxNest(DecompConstraintSet* model,
     1747                                  const std::string    modelName,
     1748                                  const int            blockId) {
     1749   assert(model);
     1750   
     1751   if (!model->hasPrepRun()) {
     1752      model->prepareModel(m_infinity);
     1753   }
     1754   
     1755   DecompModel appModel(model, modelName, blockId, *m_utilParam);
     1756   m_modelRelaxNest[blockId].push_back(appModel);
     1757}
     1758
    17191759// --------------------------------------------------------------------- //
    1720 void DecompApp::setDecompInf(){
     1760void DecompApp::setInfinity(){
    17211761   if (m_param.DecompLPSolver == "Clp"){
    17221762#ifdef DIP_HAS_CLP
    1723       DecompInf = OsiClpInfinity;
     1763      m_infinity = OsiClpInfinity;
    17241764#else
    17251765      throw UtilException("Clp selected as solver, but it's not available",
     
    17281768   }else if (m_param.DecompLPSolver == "CPLEX"){
    17291769#ifdef DIP_HAS_CPX
    1730       DecompInf = CPX_INFBOUND;
     1770      m_infinity = CPX_INFBOUND;
    17311771#else
    17321772      throw UtilException("CPLEX selected as solver, but it's not available",
     
    17351775   }else if (m_param.DecompLPSolver == "Gurobi"){
    17361776#ifdef DIP_HAS_GRB
    1737       DecompInf = GRB_INFINITY;
     1777      m_infinity = GRB_INFINITY;
    17381778#else
    17391779      throw UtilException("Gurobi selected as solver, but it's not available",
  • releases/0.92.2/Dip/src/DecompApp.h

    r1588 r1588  
    1 
    21//===========================================================================//
    32// This file is part of the DIP Solver Framework.                            //
     
    141140   int m_threadIndex;
    142141
     142   /** The value of infinity **/
     143   
     144   double m_infinity;
     145
    143146public:
    144147   /**
     
    192195   }
    193196
    194    void setDecompInf();
    195 
    196197   /**
    197198    * Set the model core constraint matrix.
     
    207208
    208209      if (!model->hasPrepRun()) {
    209          model->prepareModel(true);
     210         model->prepareModel(m_infinity, true);
    210211      }
    211212
     
    238239    * not deriving the function DecompApp::solveRelaxed.
    239240    */
    240    inline void setModelRelax(DecompConstraintSet* model,
    241                              const std::string    modelName = "",
    242                              const int            blockId   = 0) {
    243       if (model && !model->hasPrepRun()) {
    244          model->prepareModel();
    245       }
    246 
    247       //---
    248       //--- make sure this block has not been set yet
    249       //---
    250       std::map<int, DecompModel>::iterator mit = m_modelRelax.find(blockId);
    251 
    252       if (mit != m_modelRelax.end()) {
    253          std::cerr << "Block " << blockId << " relaxation has already been set. "
    254                    << "Only one relaxation definition can be used at one time."
    255                    << std::endl;
    256          throw UtilException("Multiple relaxation definitions",
    257                              "setModelRelax", "DecompApp");
    258       }
    259 
    260       DecompModel appModel(model, modelName, blockId, *m_utilParam);
    261       m_modelRelax.insert(std::make_pair(blockId, appModel));
    262    }
     241   void setModelRelax(DecompConstraintSet* model,
     242                      const std::string    modelName = "",
     243                      const int            blockId   = 0);
    263244
    264245   /**
     
    266247    *  (for a particular block).
    267248    */
    268    inline void setModelRelaxNest(DecompConstraintSet* model,
    269                                  const std::string    modelName,
    270                                  const int            blockId = 0) {
    271       assert(model);
    272 
    273       if (!model->hasPrepRun()) {
    274          model->prepareModel();
    275       }
    276 
    277       DecompModel appModel(model, modelName, blockId, *m_utilParam);
    278       m_modelRelaxNest[blockId].push_back(appModel);
    279    }
     249   void setModelRelaxNest(DecompConstraintSet* model,
     250                          const std::string    modelName,
     251                          const int            blockId = 0);
    280252
    281253   /**
     
    392364                                      const std::vector<std::string>& colNames,
    393365                                      const double*          solution,
    394                                       std::ostream*               os = &std::cout) const;
     366                                      std::ostream*          os = &std::cout) const;
    395367
    396368   /**
     
    456428
    457429   const CoinPackedMatrix* getMatrix() { return m_matrix; }
     430
     431   /** Set the value of infinity **/
     432   
     433   void setInfinity();
    458434
    459435public:
     
    487463
    488464      startupLog();
     465
     466      setInfinity();
    489467   };
    490468
  • releases/0.92.2/Dip/src/DecompConstraintSet.cpp

    r1588 r1588  
    2121
    2222//===========================================================================//
    23 void DecompConstraintSet::prepareModel(bool modelIsCore)
     23void DecompConstraintSet::prepareModel(double infinity, bool modelIsCore)
    2424{
    2525   //---
     
    4747   int numColsOrig = getNumColsOrig();
    4848   UtilPrintMemUsage(&cout, 2, 2);
    49    checkSenseAndBound();
     49   checkSenseAndBound(infinity);
    5050
    5151   if (modelIsCore) {
    52       createRowHash();
     52      createRowHash(infinity);
    5353   }
    5454
     
    147147
    148148//===========================================================================//
    149 void DecompConstraintSet::createRowHash()
     149void DecompConstraintSet::createRowHash(double infinity)
    150150{
    151151   int    r;
     
    161161                                     rmat_els + rmat_beg[r],
    162162                                     rowSense[r],
    163                                      rowRhs[r]);
     163                                     rowRhs[r],
     164                                     infinity);
    164165      rowHash.push_back(strHash);
    165166   }
     
    167168
    168169//===========================================================================//
    169 void DecompConstraintSet::checkSenseAndBound()
     170void DecompConstraintSet::checkSenseAndBound(double infinity)
    170171{
    171172   assert(rowLB.size() + rowRhs.size() > 0);
     
    173174
    174175   if (rowLB.size() > 0 && rowRhs.size() == 0) {
    175       boundsToSenses();
     176      boundsToSenses(infinity);
    176177   } else if (rowLB.size() == 0 && rowRhs.size() > 0) {
    177       sensesToBounds();
     178      sensesToBounds(infinity);
    178179   }
    179180
     
    184185
    185186//===========================================================================//
    186 void DecompConstraintSet::sensesToBounds()
     187void DecompConstraintSet::sensesToBounds(double infinity)
    187188{
    188189   double rlb, rub;
     
    193194   for (int r = 0; r < n_rows; r++) {
    194195      UtilSenseToBound(rowSense[r], rowRhs[r], 0.0,//TODO
    195                        DecompInf, rlb, rub);
     196                       infinity, rlb, rub);
    196197      rowLB.push_back(rlb);
    197198      rowUB.push_back(rub);
     
    200201
    201202//===========================================================================//
    202 void DecompConstraintSet::boundsToSenses()
     203void DecompConstraintSet::boundsToSenses(double infinity)
    203204{
    204205   char   sense;
     
    209210
    210211   for (int r = 0; r < n_rows; r++) {
    211       UtilBoundToSense(rowLB[r], rowUB[r], DecompInf,
     212      UtilBoundToSense(rowLB[r], rowUB[r], infinity,
    212213                       sense, rhs, range);
    213214      rowRhs.push_back(rhs);
  • releases/0.92.2/Dip/src/DecompConstraintSet.h

    r1588 r1588  
    6060   std::map<int, int> m_origToSparse;
    6161   std::map<int, int> m_sparseToOrig;
     62   double        m_infinity;
    6263
    6364public:
     
    132133
    133134public:
    134    void prepareModel(bool modelIsCore = false);
    135    void createRowHash();
    136    void checkSenseAndBound();
    137    void sensesToBounds();
    138    void boundsToSenses();
     135   void prepareModel(double infinity, bool modelIsCore = false);
     136   void createRowHash(double infinity);
     137   void checkSenseAndBound(double infinity);
     138   void sensesToBounds(double infinity);
     139   void boundsToSenses(double infinity);
    139140   void fixNonActiveColumns();
    140141   CoinPackedMatrix* sparseToOrigMatrix();
     
    200201      prepHasRun       (false),
    201202      m_isSparse       (false),
    202       m_numColsOrig    (0) {
     203      m_numColsOrig    (0),
     204      m_infinity       (){
    203205   };
    204206
  • releases/0.92.2/Dip/src/DecompCut.h

    r1588 r1588  
    8282
    8383   //now it is essentially a DecompCutOsi
    84    virtual void     setStringHash(CoinPackedVector* row) {
     84   virtual void     setStringHash(CoinPackedVector* row, double infinity) {
    8585      //the user can override this if they can do it faster... also
    8686      //should link up with isSame
     
    8888      double rhs, range;
    8989      UtilBoundToSense(getLowerBound(),
    90                        getUpperBound(), DecompInf,
     90                       getUpperBound(), infinity,
    9191                       sense, rhs, range);
    9292      m_strHash = UtilCreateStringHash(row->getNumElements(),
    9393                                       row->getIndices(),
    9494                                       row->getElements(),
    95                                        sense, rhs);
     95                                       sense, rhs, infinity);
    9696      //need backup for user
    9797      //throw CoinError("Method was invoked but not overridden.",
  • releases/0.92.2/Dip/src/DecompCutOsi.h

    r1588 r1588  
    4444   //is this an expensive operation?
    4545   //temp fix
    46    char sense() const {
     46   char sense(double infinity) const {
    4747      double lb_ = m_osiCut.lb();
    4848      double ub_ = m_osiCut.ub();
     
    5050      if      ( lb_ == ub_ ) {
    5151         return 'E';
    52       } else if ( lb_ == -DecompInf && ub_ == DecompInf ) {
     52      } else if ( lb_ == -infinity && ub_ == infinity ) {
    5353         return 'N';
    54       } else if ( lb_ == -DecompInf ) {
     54      } else if ( lb_ == -infinity ) {
    5555         return 'L';
    56       } else if ( ub_ == DecompInf ) {
     56      } else if ( ub_ == infinity ) {
    5757         return 'G';
    5858      } else {
     
    6161   }
    6262
    63    double rhs() const {
     63   double rhs(double infinity) const {
    6464      double lb_ = m_osiCut.lb();
    6565      double ub_ = m_osiCut.ub();
     
    6767      if      ( lb_ == ub_ ) {
    6868         return ub_;
    69       } else if ( lb_ == -DecompInf && ub_ == DecompInf ) {
     69      } else if ( lb_ == -infinity && ub_ == infinity ) {
    7070         return 0.0;
    71       } else if ( lb_ == -DecompInf ) {
     71      } else if ( lb_ == -infinity ) {
    7272         return ub_;
    73       } else if ( ub_ == DecompInf ) {
     73      } else if ( ub_ == infinity ) {
    7474         return lb_;
    7575      } else {
     
    7878   }
    7979
    80    void setStringHash() {
     80   void setStringHash(double infinity) {
    8181      //we cannot trust osi row cuts sense, since cpx and clp have different infinities...
    8282      m_strHash = UtilCreateStringHash(m_osiCut.row().getNumElements(),
     
    8484                                       m_osiCut.row().getElements(),
    8585                                       //m_osiCut.sense(),
    86                                        sense(),
     86                                       sense(infinity),
    8787                                       //m_osiCut.rhs()
    88                                        rhs()
     88                                       rhs(infinity),
     89                                       infinity
    8990                                      );
    9091      //ranges?
    9192   }
    92    void setStringHash(CoinPackedVector* row) {
     93   void setStringHash(CoinPackedVector* row, double infinity) {
    9394      m_strHash = UtilCreateStringHash(row->getNumElements(),
    9495                                       row->getIndices(),
    9596                                       row->getElements(),
    9697                                       //m_osiCut.sense(),
    97                                        sense(),
     98                                       sense(infinity),
    9899                                       //m_osiCut.rhs()
    99                                        rhs()
     100                                       rhs(infinity),
     101                                       infinity
    100102                                      );
    101103      //ranges?
  • releases/0.92.2/Dip/src/DecompDebug.cpp

    r1588 r1588  
    737737   for (it = m_vars.begin(); it != m_vars.end(); it++) {
    738738      (*os) << "VAR " << var_index++ << " : ";
    739       (*it)->print(os, m_app);
     739      (*it)->print(m_infinity, os, m_app);
    740740      (*os) << endl;
    741741   }
     
    878878                    << " rcLP: "   << rcLPi
    879879                    << endl;
    880          (*it)->print(m_osLog, modelCore->colNames,
     880         (*it)->print(m_infinity, m_osLog, modelCore->colNames,
    881881                      const_cast<double*>(redCostX));
    882882         (*m_osLog) << "******** ERROR ********" << endl;
     
    898898                       << " objCalc: " << objCalc
    899899                       << endl;
    900             (*it)->print(m_osLog, modelCore->colNames,
     900            (*it)->print(m_infinity, m_osLog, modelCore->colNames,
    901901                         const_cast<double*>(origObjective));
    902902            (*m_osLog) << "******** ERROR ********" << endl;
     
    933933         //---   x-space, next, look at the same calculation in lambda-space
    934934         //---
    935          (*it)->print(m_osLog, modelCore->colNames,
     935         (*it)->print(m_infinity, m_osLog, modelCore->colNames,
    936936                      const_cast<double*>(redCostX));
    937937         (*m_osLog) << "******** ERROR ********" << endl;
     
    942942         double* uA2    = new double[nCoreCols];
    943943         modelCore->M->transposeTimes(u_adjusted, uA2);
    944          (*it)->print(m_osLog, modelCore->colNames,
     944         (*it)->print(m_infinity, m_osLog, modelCore->colNames,
    945945                      const_cast<double*>(uA2));
    946946         UTIL_DELARR(uA2);
     
    10151015   DecompVarList dummy;
    10161016   int           i, nNodes;
    1017    double        objLB      = -DecompInf;
    1018    double        objUB      =  DecompInf;
     1017   double        objLB      = -m_infinity;
     1018   double        objUB      =  m_infinity;
    10191019   int           logIpLevel = m_param.LogIpLevel;
    10201020   DecompConstraintSet* modelCore = m_modelCore.getModel();
     
    10301030   //--- create a results object
    10311031   //---
    1032    DecompSolverResult* result = new DecompSolverResult();
     1032   DecompSolverResult* result = new DecompSolverResult(m_infinity);
    10331033   //---
    10341034   //--- create the master problem
  • releases/0.92.2/Dip/src/DecompMain.cpp

    r1588 r1588  
    4242DecompSolverResult* solveDirect(const DecompApp& decompApp);
    4343
    44 extern double DecompInf;
    45 
    4644//===========================================================================//
    4745
     
    7270      //---
    7371      DecompApp milp(utilParam);
    74       //Ugly hack, make DecompInf a class variable eventually
    75       milp.setDecompInf();
    7672
    7773      // get the current working Directory.
     
    464460           << "OptiGap       = " << setw(10)
    465461           << UtilDblToStr(UtilCalculateGap(alpsModel.getGlobalLB(),
    466                                             alpsModel.getGlobalUB()), 5)
     462                                            alpsModel.getGlobalUB(),
     463                                            milp.getDecompAlgo()->getInfinity()), 5)
    467464           << endl
    468465           << "Nodes         = "
     
    639636   int numCols    = decompApp.m_mpsIO.getNumCols();
    640637   int nNodes;
    641    double objLB   = -DecompInf;
    642    double objUB   = DecompInf;
     638   double objLB   = -m_problemSI->getInfinity();
     639   double objUB   = m_problemSI->getInfinity();
    643640   double timeLimit = decompApp.m_param.TimeLimit;
    644641   UtilTimer timer;
    645642   timer.start();
    646    DecompSolverResult* result = new DecompSolverResult();
     643   DecompSolverResult* result = new DecompSolverResult(m_problemSI->getInfinity());
    647644   if (decompApp.m_param.DecompIPSolver == "Cbc"){
    648645#ifdef DIP_HAS_CBC
  • releases/0.92.2/Dip/src/DecompSolverResult.h

    r1588 r1588  
    6262    * Default constructors.
    6363    */
    64    DecompSolverResult():
     64   DecompSolverResult(double infinity):
    6565      m_solStatus (-1),
    6666      m_solStatus2(-1),
    67       m_objLB     (-DecompInf),
    68       m_objUB     ( DecompInf),
     67      m_objLB     (-infinity),
     68      m_objUB     ( infinity),
    6969      m_isOptimal (false),
    7070      m_isUnbounded (false),
     
    7373   }
    7474
    75    DecompSolverResult(const DecompSolution* solution):
     75 DecompSolverResult(const DecompSolution* solution, double infinity):
    7676      m_solStatus (-1),
    7777      m_solStatus2(-1),
    78       m_objLB     (-DecompInf),
    79       m_objUB     ( DecompInf),
     78      m_objLB     (-infinity),
     79      m_objUB     ( infinity),
    8080      m_isOptimal (false),
    8181      m_isUnbounded (false),
  • releases/0.92.2/Dip/src/DecompStats.h

    r1588 r1588  
    7676
    7777public:
    78    DecompObjBound() :
     78   DecompObjBound(double infinity) :
    7979      phase      (0),
    8080      cutPass    (0),
    8181      pricePass  (0),
    8282      timeStamp  (0.0),
    83       thisBound  (-DecompInf),
    84       thisBoundUB( DecompInf),
    85       bestBound  (-DecompInf),
    86       thisBoundIP( DecompInf),
    87       bestBoundIP( DecompInf) {
     83      thisBound  (-infinity),
     84      thisBoundUB( infinity),
     85      bestBound  (-infinity),
     86      thisBoundIP( infinity),
     87      bestBoundIP( infinity) {
    8888   }
    8989
     
    164164   int    priceCallsRound;
    165165
     166   /**
     167    * Value of infinity
     168    */
     169   double m_infinity;
     170
    166171public:
    167172   void init() {
    168173      objHistoryBound.clear();
    169       objBest.first   = -DecompInf;
    170       objBest.second  =  DecompInf;
     174      objBest.first   = -m_infinity;
     175      objBest.second  =  m_infinity;
    171176      nodeIndex       =  0;
    172177      cutsThisRound   =  0;
     
    191196   }
    192197   inline void resetBestLB() {
    193       objBest.first = -DecompInf;
     198      objBest.first = -m_infinity;
    194199   }
    195200   inline DecompObjBound* getLastBound() {
     
    203208   }
    204209   inline double getLastBoundThis() {
    205       double           thisBound = -DecompInf;
     210      double           thisBound = -m_infinity;
    206211      DecompObjBound* lastBound = getLastBound();
    207212
     
    216221   DecompNodeStats() :
    217222      objHistoryBound(),
    218       objBest        () {
     223      objBest        (),
     224      m_infinity     (COIN_DBL_MAX) {
    219225      init();
    220226   }
  • releases/0.92.2/Dip/src/DecompVar.cpp

    r1588 r1588  
    7171// --------------------------------------------------------------------- //
    7272void
    73 DecompVar::print(ostream*    os,
    74                  DecompApp* app) const
     73DecompVar::print(double      infinity,
     74                 ostream*    os,
     75                 DecompApp*  app) const
    7576{
    7677   double lb = getLowerBound();
     
    8283         << " colIndex: " << m_colMasterIndex;
    8384
    84    if (lb > -DecompInf) {
     85   if (lb > -infinity) {
    8586      (*os) << " lb:  "    << getLowerBound();
    8687   } else {
     
    8889   }
    8990
    90    if (ub < DecompInf) {
     91   if (ub < infinity) {
    9192      (*os) << " ub:  "    << getUpperBound();
    9293   } else {
     
    100101// --------------------------------------------------------------------- //
    101102void
    102 DecompVar::print(ostream*               os,
    103                  const vector<string>& colNames,
     103DecompVar::print(double                 infinity,
     104                 ostream*               os,
     105                 const vector<string>&  colNames,
    104106                 const double*          value) const
    105107{
     
    112114         << " colIndex: " << m_colMasterIndex;
    113115
    114    if (lb > -DecompInf) {
     116   if (lb > -infinity) {
    115117      (*os) << " lb:  "    << getLowerBound();
    116118   } else {
     
    118120   }
    119121
    120    if (ub < DecompInf) {
     122   if (ub < infinity) {
    121123      (*os) << " ub:  "    << getUpperBound();
    122124   } else {
  • releases/0.92.2/Dip/src/DecompVar.h

    r1588 r1588  
    6161   }
    6262   inline double getUpperBound()     const {
    63       return DecompInf;   //TODO
     63      return COIN_DBL_MAX;   //TODO
    6464   }
    6565   inline std::string getStrHash()        const {
     
    142142
    143143public:
    144    virtual void  print(std::ostream*    os  = &std::cout,
     144   virtual void  print(double infinity,
     145                       std::ostream*    os  = &std::cout,
    145146                       DecompApp* app = 0) const;
    146    virtual void  print(std::ostream*               os,
     147   virtual void  print(double infinity,
     148                       std::ostream*               os,
    147149                       const std::vector<std::string>& colNames,
    148150                       const double*          value    = NULL) const;
  • releases/0.92.2/Dip/src/DecompVarPool.cpp

    r1588 r1588  
    238238
    239239// --------------------------------------------------------------------- //
    240 void DecompVarPool::print(ostream* os) const
     240void DecompVarPool::print(double infinity, ostream* os) const
    241241{
    242242   vector<DecompWaitingCol>::const_iterator vi;
    243243
    244244   for (vi = begin(); vi != end(); vi++) {
    245       (*vi).getVarPtr()->print(os);
    246    }
    247 }
     245      (*vi).getVarPtr()->print(infinity, os);
     246   }
     247}
  • releases/0.92.2/Dip/src/DecompVarPool.h

    r1588 r1588  
    4949   }
    5050
    51    void print(std::ostream* os = &std::cout) const;  //THINK: virtual??
     51   void print(double infinity, std::ostream* os = &std::cout) const;  //THINK: virtual??
    5252   void reExpand(const DecompConstraintSet& modelCore,
    5353                 const double                tolZero);
  • releases/0.92.2/Dip/src/UtilHash.cpp

    r1588 r1588  
    8888string UtilCreateStringHash(const int      len,
    8989                            const int*     ind,
    90                             const double* els,
     90                            const double*  els,
    9191                            const char     sense,
    9292                            const double   rhs,
    93                             const int      precision)
     93                            double         infinity,
     94                            const int      precision)
    9495{
    9596   stringstream ss;
    9697   ss << setprecision(precision);
    9798
    98    if (rhs >= DecompInf) {
     99   if (rhs >= infinity) {
    99100      ss << "INF";
    100    } else if (rhs <= -DecompInf) {
     101   } else if (rhs <= -infinity) {
    101102      ss << "-INF";
    102103   } else {
  • releases/0.92.2/Dip/src/UtilHash.h

    r1588 r1588  
    3636                                 const char     sense,
    3737                                 const double   rhs,
     38                                 const double   infinity,
    3839                                 const int      precision = 6);
    3940
  • releases/0.92.2/Dip/src/UtilMacrosDecomp.h

    r1588 r1588  
    160160 */
    161161inline double UtilCalculateGap(const double boundLB,
    162                                const double boundUB)
     162                               const double boundUB,
     163                               double infinity)
    163164{
    164    double gap = DecompInf;
     165   double gap = infinity;
    165166
    166    if (boundLB > -DecompInf && boundUB < DecompInf) {
     167   if (boundLB > -infinity && boundUB < infinity) {
    167168      if (boundLB != 0.0) {
    168169         gap = fabs(boundUB - boundLB) / fabs(boundLB);
  • releases/0.92.2/Dip/src/UtilParameters.cpp

    r1588 r1588  
    226226{
    227227   string    keyname ("");
     228   if (sSection == ""){
     229      sSection = "DECOMP";
     230   }
    228231   keyname  = UtilStrToLower(UtilStrTrim(sSection));
    229232   keyname += "@";
  • releases/0.92.2/Dip/src/config_dip_default.h

    r1588 r1588  
    1919
    2020/* Version number of project */
    21 #define DIP_VERSION "0.92.1"
     21#define DIP_VERSION "0.92.2"
    2222
    2323/* Major Version number of project */
     
    2828
    2929/* Release Version number of project */
    30 #define DIP_VERSION_RELEASE 1
     30#define DIP_VERSION_RELEASE 2
    3131
    3232/* Define to 1 if the Clp package is available */
  • releases/0.92.2/Dip/src/dippy/DippyDecompAlgo.cpp

    r1588 r1588  
    4444      ret_val = algo->DecompAlgo::chooseBranchSet(downBranchLB, downBranchUB, upBranchLB, upBranchUB);
    4545     
    46       // No branching set was returned. This shouldn't happen
    47       assert(ret_val == true);
     46      // Original comment: No branching set was returned. This shouldn't happen
     47      // tkr 11/11/15: Actually, it can happen if the solution is integral, but not feasible.
     48      // This happens sometimes when column generation is halted because of tailoff and
     49      // the solution to the relaxation is feasible. I'm leaving the commented code here for
     50      // posterity
     51      //assert(ret_val == true);
    4852
    49       if (!ret_val){
    50          throw UtilException("No branch set found in prob.chooseBranchSet()",
    51                              "chooseBranchSet", "DippyDecompAlgo");
    52       }
     53      //if (!ret_val){
     54      // throw UtilException("No branch set found in prob.chooseBranchSet()",
     55      //                     "chooseBranchSet", "DippyDecompAlgo");
     56      //}
     57
    5358      if (downBranchUB.size() > 0) {
    5459         PyObject* downBranchVar, * upBranchVar;
  • releases/0.92.2/Dip/src/dippy/DippyDecompApp.cpp

    r1588 r1588  
    6868
    6969      if (pRowLb == Py_None) {
    70          lb = -DecompInf;
     70         lb = -m_infinity;
    7171      } else {
    7272         lb = PyFloat_AsDouble(pRowLb);
     
    7474
    7575      if (pRowUb == Py_None) {
    76          ub = DecompInf;
     76         ub = m_infinity;
    7777      } else {
    7878         ub = PyFloat_AsDouble(pRowUb);
     
    121121
    122122      if (pColLb == Py_None) {
    123          lb = -DecompInf;
     123         lb = -m_infinity;
    124124      } else {
    125125         lb = PyFloat_AsDouble(pColLb);
     
    127127
    128128      if (pColUb == Py_None) {
    129          ub = DecompInf;
     129         ub = m_infinity;
    130130      } else {
    131131         ub = PyFloat_AsDouble(pColUb);
     
    237237
    238238         if (pRowLb == Py_None) {
    239             lb = -DecompInf;
     239            lb = -m_infinity;
    240240         } else {
    241241            lb = PyFloat_AsDouble(pRowLb);
     
    243243
    244244         if (pRowUb == Py_None) {
    245             ub = DecompInf;
     245            ub = m_infinity;
    246246         } else {
    247247            ub = PyFloat_AsDouble(pRowUb);
     
    349349   int nVars = PyObject_Length(pVarList);
    350350
    351    if (nVars == 0) {
    352       throw UtilException("Empty variable list", "solveRelaxed", "DippyDecompApp");
    353    }
     351   // In the new design, we need to allow the possibility that the user will solve
     352   // the problem exactly, but not find any solutions with reduced costs zero
     353   // The below is is commented out and left in the source for posterity
     354   // tkr 11/11/15
     355   //if (nVars == 0) {
     356   //   throw UtilException("Empty variable list", "solveRelaxed", "DippyDecompApp");
     357   //}
    354358
    355359   // solveRelaxed returns 3-tuples (cost, reduced cost, dictionary of (variable, value) pairs)
     
    466470      }
    467471
    468       lb = (pLb == Py_None) ? -DecompInf : PyFloat_AsDouble(pLb);
    469       ub = (pUb == Py_None) ?  DecompInf : PyFloat_AsDouble(pUb);
     472      lb = (pLb == Py_None) ? -m_infinity : PyFloat_AsDouble(pLb);
     473      ub = (pUb == Py_None) ?  m_infinity : PyFloat_AsDouble(pUb);
    470474      int*     varInds = NULL;
    471475      double* varVals = NULL;
  • releases/0.92.2/Dip/src/dippy/DippySolve.cpp

    r1588 r1588  
    2929#endif
    3030
     31#ifndef DECOMP_INF_DEFINED
     32#define DECOMP_INF_DEFINED
    3133double DecompInf = COIN_DBL_MAX;
     34#else
     35extern double DecompInf;
     36#endif
    3237
    3338DLLEXPORT PyObject* Solve(PyObject* self, PyObject* args)
  • releases/0.92.2/Dip/src/dippy/dippy.py

    r1588 r1588  
    848848                dvs_with_costs = []
    849849                for var in dvs:
    850                     print var
    851850                    if isinstance(var, dict):
    852851                        cost = sum(self.objective[i]*var[i] for i in var
  • releases/0.92.2/Dip/src/dippy/examples/wedding/wedding.py

    r1588 r1588  
    1717    import coinor.dippy as dippy
    1818    from coinor.dippy import DipSolStatOptimal
     19
     20debug_print = False
    1921
    2022max_tables = 5
     
    102104                      for g in possible_table]
    103105        var_values.append((happy[table], table_happiness))
    104         dvs.append(var_values)
    105         print 'Table: ', table, 'Happiness: ', table_happiness, 'RC: ', rc
    106         return DipSolStatOptimal, dvs
     106        dvs.append(dict(var_values))
     107        if debug_print:
     108            print 'Table: ', table, 'Happiness: ', table_happiness, 'RC: ', rc
     109    return DipSolStatOptimal, dvs
    107110
    108111seating_model.relaxed_solver = relaxed_solver
     
    115118        'doPriceCut' : '1',
    116119        'CutCGL' : '1',
    117         'generateInitVars' : '1',
     120        #'generateInitVars' : '1',
    118121    })
    119122
  • releases/0.92.2/README.md

    r1588 r1588  
    3333# CHANGELOG
    3434
     35## Release 0.92.2
     36 * Get rid of pesky global variable DecompInf
     37 * Fix bugs in wedding planner example
     38 * Fix bugs in DipPy to allow returning no solutions, even when an exact
     39   subprobem solver is used and to allow no branching candidates when
     40   branching.
     41
    3542## Release 0.92.1
    3643 * Fixed problem with dependency linking
     
    4047 * Renamed classes, functions, and parameters more intuitively
    4148 * Eliminated unnecessary "MILP" parameter section and joined it to "DECOMP," as well as making "DECOMP" the default parameter section name.
    42  * Changed parameter setting mechanism to make it possible to pass parameters directly to solvers using native names.
     49 
     50 * Changed parameter setting mechanism to make it possible to pass parameters
     51   directly to solvers using native names.
    4352 * Added interface to Gurobi
    4453 * Added ability to select solver at run-time rather than compile-time.
     54 * In DipPy, the user can now return a status in the subproblem solve to
     55   indicate whether the subproblem was solved exactly. Previously, DipPy
     56   solved the subproblem to optimality internally whenever no solution was
     57   returned, which is unnecessary if the user's subproblem solver is exact. It
     58   also means that the user was previously required to provide a full
     59   description of the subproblem.
    4560
    4661## Release 0.91.4
  • releases/0.92.2/configure

    r1588 r1588  
    22# From configure.ac 0.8.
    33# Guess values for system-dependent variables and create Makefiles.
    4 # Generated by GNU Autoconf 2.59 for Dip 0.92.1.
     4# Generated by GNU Autoconf 2.59 for Dip 0.92.2.
    55#
    66# Report bugs to <dip@lists.coin-or.org>.
     
    442442PACKAGE_NAME='Dip'
    443443PACKAGE_TARNAME='dip'
    444 PACKAGE_VERSION='0.92.1'
    445 PACKAGE_STRING='Dip 0.92.1'
     444PACKAGE_VERSION='0.92.2'
     445PACKAGE_STRING='Dip 0.92.2'
    446446PACKAGE_BUGREPORT='dip@lists.coin-or.org'
    447447
     
    10451045  # This message is too long to be a string in the A/UX 3.1 sh.
    10461046  cat <<_ACEOF
    1047 \`configure' configures Dip 0.92.1 to adapt to many kinds of systems.
     1047\`configure' configures Dip 0.92.2 to adapt to many kinds of systems.
    10481048
    10491049Usage: $0 [OPTION]... [VAR=VALUE]...
     
    11111111if test -n "$ac_init_help"; then
    11121112  case $ac_init_help in
    1113      short | recursive ) echo "Configuration of Dip 0.92.1:";;
     1113     short | recursive ) echo "Configuration of Dip 0.92.2:";;
    11141114   esac
    11151115  cat <<\_ACEOF
     
    13231323if $ac_init_version; then
    13241324  cat <<\_ACEOF
    1325 Dip configure 0.92.1
     1325Dip configure 0.92.2
    13261326generated by GNU Autoconf 2.59
    13271327
     
    13541354running configure, to aid debugging if configure makes a mistake.
    13551355
    1356 It was created by Dip $as_me 0.92.1, which was
     1356It was created by Dip $as_me 0.92.2, which was
    13571357generated by GNU Autoconf 2.59.  Invocation command line was
    13581358
     
    51275127# Define the identity of the package.
    51285128 PACKAGE='dip'
    5129  VERSION='0.92.1'
     5129 VERSION='0.92.2'
    51305130
    51315131
     
    2291922919cat >&5 <<_CSEOF
    2292022920
    22921 This file was extended by Dip $as_me 0.92.1, which was
     22921This file was extended by Dip $as_me 0.92.2, which was
    2292222922generated by GNU Autoconf 2.59.  Invocation command line was
    2292322923
     
    2297722977cat >>$CONFIG_STATUS <<_ACEOF
    2297822978ac_cs_version="\\
    22979 Dip config.status 0.92.1
     22979Dip config.status 0.92.2
    2298022980configured by $0, generated by GNU Autoconf 2.59,
    2298122981  with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
  • releases/0.92.2/configure.ac

    r1588 r1588  
    2020
    2121# name of project, version number, contact info
    22 AC_INIT([Dip],[0.92.1],[dip@lists.coin-or.org])
     22AC_INIT([Dip],[0.92.2],[dip@lists.coin-or.org])
    2323
    2424# copyright for configure script
Note: See TracChangeset for help on using the changeset viewer.