lemon/glpk.h
changeset 1184 3c00344f49c9
parent 1074 97d978243703
child 1130 0759d974de81
     1.1 --- a/lemon/glpk.h	Mon Jul 16 16:21:40 2018 +0200
     1.2 +++ b/lemon/glpk.h	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 @@ -115,6 +115,8 @@
    1.13  
    1.14      virtual void _messageLevel(MessageLevel level);
    1.15  
    1.16 +    virtual void _write(std::string file, std::string format) const;
    1.17 +
    1.18    private:
    1.19  
    1.20      static void freeEnv();
    1.21 @@ -144,6 +146,19 @@
    1.22      ///Returns the variable identifier understood by GLPK.
    1.23      int lpxCol(Col c) const { return cols(id(c)); }
    1.24  
    1.25 +#ifdef DOXYGEN
    1.26 +    /// Write the problem or the solution to a file in the given format
    1.27 +
    1.28 +    /// This function writes the problem or the solution
    1.29 +    /// to a file in the given format.
    1.30 +    /// Trying to write in an unsupported format will trigger
    1.31 +    /// \ref LpBase::UnsupportedFormatError.
    1.32 +    /// \param file The file path
    1.33 +    /// \param format The output file format.
    1.34 +    /// Supportted formats are "MPS" and "LP".
    1.35 +    void write(std::string file, std::string format = "MPS") const {}
    1.36 +#endif
    1.37 +
    1.38    };
    1.39  
    1.40    /// \brief Interface for the GLPK LP solver