lemon/cplex.h
changeset 1184 3c00344f49c9
parent 1092 dceba191c00d
     1.1 --- a/lemon/cplex.h	Mon Jul 16 16:21:40 2018 +0200
     1.2 +++ b/lemon/cplex.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-2009
     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 @@ -23,6 +23,7 @@
    1.13  ///\brief Header of the LEMON-CPLEX lp solver interface.
    1.14  
    1.15  #include <lemon/lp_base.h>
    1.16 +#include <lemon/bits/lock.h>
    1.17  
    1.18  struct cpxenv;
    1.19  struct cpxlp;
    1.20 @@ -40,7 +41,11 @@
    1.21    private:
    1.22      cpxenv* _env;
    1.23      mutable int* _cnt;
    1.24 +    mutable bits::Lock* _cnt_lock;
    1.25  
    1.26 +    void incCnt();
    1.27 +    void decCnt();
    1.28 +    
    1.29    public:
    1.30  
    1.31      /// \brief This exception is thrown when the license check is not
    1.32 @@ -150,6 +155,8 @@
    1.33  
    1.34      bool _message_enabled;
    1.35  
    1.36 +    void _write(std::string file, std::string format) const;
    1.37 +
    1.38    public:
    1.39  
    1.40      /// Returns the used \c CplexEnv instance
    1.41 @@ -170,6 +177,19 @@
    1.42      /// Returns the cplex problem object
    1.43      const cpxlp* cplexLp() const { return _prob; }
    1.44  
    1.45 +#ifdef DOXYGEN
    1.46 +    /// Write the problem or the solution to a file in the given format
    1.47 +
    1.48 +    /// This function writes the problem or the solution
    1.49 +    /// to a file in the given format.
    1.50 +    /// Trying to write in an unsupported format will trigger
    1.51 +    /// \ref lemon::LpBase::UnsupportedFormatError "UnsupportedFormatError".
    1.52 +    /// \param file The file path
    1.53 +    /// \param format The output file format.
    1.54 +    /// Supportted formats are "MPS", "LP" and "SOL".
    1.55 +    void write(std::string file, std::string format = "MPS") const {}
    1.56 +#endif
    1.57 +
    1.58    };
    1.59  
    1.60    /// \brief Interface for the CPLEX LP solver