COIN-OR::LEMON - Graph Library

Ignore:
Timestamp:
02/01/05 13:53:30 (19 years ago)
Author:
marci
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@1510
Message:

lower and upper bound handling functions for rows

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/work/marci/lp/max_flow_expression.cc

    r1110 r1111  
    77#include <lemon/dimacs.h>
    88#include <lemon/time_measure.h>
    9 #include <lp_solver_wrapper_3.h>
     9#include <lp_solver_base.h>
    1010
    1111using std::cout;
     
    5252  PrimalMap<Edge, EdgeIndexMap> flow(lp, edge_index_map);
    5353
    54   // capacity function
     54  // nonnegativity of flow and capacity function
    5555  for (Graph::EdgeIt e(g); e!=INVALID; ++e) {
    5656    ColIt col_it=lp.addCol();
     
    5959    // if you change the order of the following two lines, the
    6060    // two runs of GLPK are extremely different
     61      lp.setColLowerBound(col_it, 0);
    6162      lp.setColUpperBound(col_it, cap[e]);
    62       lp.setColLowerBound(col_it, 0);
    6363  }
    6464 
     
    7373      lp.setObjCoeffs(expr);     
    7474    }
    75     // flow conservation
     75    // flow conservation constraints
    7676    if ((n!=s) && (n!=t)) {
    7777      RowIt row_it=lp.addRow();
    7878      lp.setRowCoeffs(row_it, expr);
    79       lp.setRowBounds(row_it, LPSolver::FIXED, 0.0, 0.0);
     79      lp.setRowLowerBound(row_it, 0.0);
     80      lp.setRowUpperBound(row_it, 0.0);
    8081    }
    8182  }
Note: See TracChangeset for help on using the changeset viewer.