diff -r cd72eae05bdf -r 3c00344f49c9 lemon/cplex.h --- a/lemon/cplex.h Mon Jul 16 16:21:40 2018 +0200 +++ b/lemon/cplex.h Wed Oct 17 19:14:07 2018 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2009 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * @@ -23,6 +23,7 @@ ///\brief Header of the LEMON-CPLEX lp solver interface. #include +#include struct cpxenv; struct cpxlp; @@ -40,7 +41,11 @@ private: cpxenv* _env; mutable int* _cnt; + mutable bits::Lock* _cnt_lock; + void incCnt(); + void decCnt(); + public: /// \brief This exception is thrown when the license check is not @@ -150,6 +155,8 @@ bool _message_enabled; + void _write(std::string file, std::string format) const; + public: /// Returns the used \c CplexEnv instance @@ -170,6 +177,19 @@ /// Returns the cplex problem object const cpxlp* cplexLp() const { return _prob; } +#ifdef DOXYGEN + /// Write the problem or the solution to a file in the given format + + /// This function writes the problem or the solution + /// to a file in the given format. + /// Trying to write in an unsupported format will trigger + /// \ref lemon::LpBase::UnsupportedFormatError "UnsupportedFormatError". + /// \param file The file path + /// \param format The output file format. + /// Supportted formats are "MPS", "LP" and "SOL". + void write(std::string file, std::string format = "MPS") const {} +#endif + }; /// \brief Interface for the CPLEX LP solver