lemon/glpk.cc
changeset 1063 1782aa72495a
parent 989 38e1d4383262
child 1092 dceba191c00d
     1.1 --- a/lemon/glpk.cc	Sat Jul 21 10:18:57 2012 +0200
     1.2 +++ b/lemon/glpk.cc	Fri Jul 20 17:09:01 2012 +0200
     1.3 @@ -582,6 +582,15 @@
     1.4      }
     1.5    }
     1.6  
     1.7 +  void GlpkBase::_write(std::string file, std::string format) const
     1.8 +  {
     1.9 +    if(format == "MPS")
    1.10 +      glp_write_mps(lp, GLP_MPS_FILE, 0, file.c_str());
    1.11 +    else if(format == "LP")
    1.12 +      glp_write_lp(lp, 0, file.c_str());
    1.13 +    else throw UnsupportedFormatError(format);
    1.14 +  }
    1.15 +
    1.16    GlpkBase::FreeEnvHelper GlpkBase::freeEnvHelper;
    1.17  
    1.18    // GlpkLp members
    1.19 @@ -998,4 +1007,6 @@
    1.20  
    1.21    const char* GlpkMip::_solverName() const { return "GlpkMip"; }
    1.22  
    1.23 +
    1.24 +
    1.25  } //END OF NAMESPACE LEMON