lemon/glpk.cc
changeset 1177 3c00344f49c9
parent 1063 1782aa72495a
     1.1 --- a/lemon/glpk.cc	Mon Jul 16 16:21:40 2018 +0200
     1.2 +++ b/lemon/glpk.cc	Wed Oct 17 19:14:07 2018 +0200
     1.3 @@ -2,7 +2,7 @@
     1.4   *
     1.5   * This file is a part of LEMON, a generic C++ optimization library.
     1.6   *
     1.7 - * Copyright (C) 2003-2010
     1.8 + * Copyright (C) 2003-2013
     1.9   * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
    1.10   * (Egervary Research Group on Combinatorial Optimization, EGRES).
    1.11   *
    1.12 @@ -582,6 +582,15 @@
    1.13      }
    1.14    }
    1.15  
    1.16 +  void GlpkBase::_write(std::string file, std::string format) const
    1.17 +  {
    1.18 +    if(format == "MPS")
    1.19 +      glp_write_mps(lp, GLP_MPS_FILE, 0, file.c_str());
    1.20 +    else if(format == "LP")
    1.21 +      glp_write_lp(lp, 0, file.c_str());
    1.22 +    else throw UnsupportedFormatError(format);
    1.23 +  }
    1.24 +
    1.25    GlpkBase::FreeEnvHelper GlpkBase::freeEnvHelper;
    1.26  
    1.27    // GlpkLp members
    1.28 @@ -998,4 +1007,6 @@
    1.29  
    1.30    const char* GlpkMip::_solverName() const { return "GlpkMip"; }
    1.31  
    1.32 +
    1.33 +
    1.34  } //END OF NAMESPACE LEMON