COIN-OR::LEMON - Graph Library

Changeset 2605:852361980706 in lemon-0.x for lemon/lp_soplex.cc


Ignore:
Timestamp:
04/08/08 18:01:28 (16 years ago)
Author:
Balazs Dezso
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@3488
Message:

Bug fixes in LP solvers

  • the copyLp is clarified
  • newLp and copyLp gives back pointers
  • cplex gives back empty string for variables without name
  • cplex row and column retrieval
  • added macro for soplex
File:
1 edited

Legend:

Unmodified
Added
Removed
  • lemon/lp_soplex.cc

    r2553 r2605  
    3737    delete soplex;
    3838  }
    39  
    40   LpSolverBase &LpSoplex::_newLp() {
     39
     40  LpSoplex::LpSoplex(const LpSoplex& lp) : LpSolverBase() {
     41    rows = lp.rows;
     42    rows.setIdHandler(relocateIdHandler);
     43
     44    cols = lp.cols;
     45    cols.setIdHandler(relocateIdHandler);
     46
     47    soplex = new soplex::SoPlex;
     48    (*static_cast<soplex::SPxLP*>(soplex)) = *(lp.soplex);
     49
     50    colNames = lp.colNames;
     51    invColNames = lp.invColNames;
     52
     53    primal_value = lp.primal_value;
     54    dual_value = lp.dual_value;
     55
     56  }
     57 
     58  LpSolverBase* LpSoplex::_newLp() {
    4159    LpSoplex* newlp = new LpSoplex();
    42     return *newlp;
    43   }
    44 
    45   LpSolverBase &LpSoplex::_copyLp() {
    46     LpSoplex* newlp = new LpSoplex();
    47     (*static_cast<soplex::SPxLP*>(newlp->soplex)) = *soplex;
    48     return *newlp;
     60    return newlp;
     61  }
     62
     63  LpSolverBase* LpSoplex::_copyLp() {
     64    LpSoplex* newlp = new LpSoplex(*this);
     65    return newlp;
    4966  }
    5067
Note: See TracChangeset for help on using the changeset viewer.