diff -r d8475431bbbb -r 8e85e6bbefdf lemon/lp_cplex.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lemon/lp_cplex.h Mon May 23 04:48:14 2005 +0000 @@ -0,0 +1,112 @@ +/* -*- C++ -*- + * lemon/lp_cplex.h - Part of LEMON, a generic C++ optimization library + * + * Copyright (C) 2005 Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport + * (Egervary Research Group on Combinatorial Optimization, EGRES). + * + * Permission to use, modify and distribute this software is granted + * provided that this copyright notice appears in all copies. For + * precise terms see the accompanying LICENSE file. + * + * This software is provided "AS IS" with no warranty of any kind, + * express or implied, and with no claim as to its suitability for any + * purpose. + * + */ + +#ifndef LEMON_LP_CPLEX_H +#define LEMON_LP_CPLEX_H + +///\file +///\brief Header of the LEMON-CPLEX lp solver interface. + +#include + +extern "C" { +#include +} + +namespace lemon { + + + /// \brief Interface for the CPLEX solver + /// + /// This class implements an interface for the CPLEX LP solver. + class LpCplex : public LpSolverBase { + + public: + + typedef LpSolverBase Parent; + + /// \e + int status; + CPXENVptr env; + CPXLPptr lp; + + + /// \e + LpCplex(); + /// \e + ~LpCplex(); + + protected: + virtual LpSolverBase &_newLp(); + virtual LpSolverBase &_copyLp(); + + virtual int _addCol(); + virtual int _addRow(); + virtual void _eraseCol(int i); + virtual void _eraseRow(int i); + virtual void _setRowCoeffs(int i, + int length, + const int * indices, + const Value * values ); + virtual void _setColCoeffs(int i, + int length, + const int * indices, + const Value * values); + virtual void _setCoeff(int row, int col, Value value); + virtual void _setColLowerBound(int i, Value value); + virtual void _setColUpperBound(int i, Value value); +// virtual void _setRowLowerBound(int i, Value value); +// virtual void _setRowUpperBound(int i, Value value); + virtual void _setRowBounds(int i, Value lower, Value upper); + virtual void _setObjCoeff(int i, Value obj_coef); + virtual void _clearObj(); + ///\e + + ///\bug Unimplemented + /// + virtual SolveExitStatus _solve(); + ///\e + + ///\bug Unimplemented + /// + virtual Value _getPrimal(int i); + ///\e + + ///\bug Unimplemented + /// + virtual Value _getPrimalValue(); + ///\e + + ///\bug Unimplemented + /// + virtual SolutionStatus _getPrimalStatus(); + + ///\e + + ///\bug Unimplemented + /// + virtual void _setMax(); + ///\e + + ///\bug Unimplemented + /// + virtual void _setMin(); + + }; +} //END OF NAMESPACE LEMON + +#endif //LEMON_LP_CPLEX_H +