Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

lp_cplex.h

Go to the documentation of this file.
00001 /* -*- C++ -*-
00002  * lemon/lp_cplex.h - Part of LEMON, a generic C++ optimization library
00003  *
00004  * Copyright (C) 2005 Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
00005  * (Egervary Research Group on Combinatorial Optimization, EGRES).
00006  *
00007  * Permission to use, modify and distribute this software is granted
00008  * provided that this copyright notice appears in all copies. For
00009  * precise terms see the accompanying LICENSE file.
00010  *
00011  * This software is provided "AS IS" with no warranty of any kind,
00012  * express or implied, and with no claim as to its suitability for any
00013  * purpose.
00014  *
00015  */
00016 
00017 #ifndef LEMON_LP_CPLEX_H
00018 #define LEMON_LP_CPLEX_H
00019 
00022 
00023 #include <lemon/lp_base.h>
00024 
00025 extern "C" {
00026 #include <ilcplex/cplex.h>
00027 }
00028 
00029 namespace lemon {
00030 
00031 
00035   class LpCplex : public LpSolverBase {
00036 
00037   public:
00038 
00039     typedef LpSolverBase Parent;
00040     
00042     int status;
00043     CPXENVptr env;
00044     CPXLPptr lp;
00045 
00046 
00048     LpCplex();
00050     ~LpCplex();
00051 
00052   protected:
00053     virtual LpSolverBase &_newLp();
00054     virtual LpSolverBase &_copyLp();
00055 
00056     virtual int _addCol();
00057     virtual int _addRow();
00058     virtual void _eraseCol(int i);
00059     virtual void _eraseRow(int i);
00060     virtual void _setRowCoeffs(int i, 
00061                                int length,
00062                                const int   * indices, 
00063                                const Value   * values );
00064     virtual void _setColCoeffs(int i, 
00065                                int length,
00066                                const int   * indices, 
00067                                const Value   * values);
00068     virtual void _setCoeff(int row, int col, Value value);
00069     virtual void _setColLowerBound(int i, Value value);
00070     virtual void _setColUpperBound(int i, Value value);
00071 //     virtual void _setRowLowerBound(int i, Value value);
00072 //     virtual void _setRowUpperBound(int i, Value value);
00073     virtual void _setRowBounds(int i, Value lower, Value upper);
00074     virtual void _setObjCoeff(int i, Value obj_coef);
00075     virtual void _clearObj();
00077     
00078     virtual SolveExitStatus _solve();
00079 
00080     virtual Value _getPrimal(int i);
00081 
00082     
00083     virtual Value _getPrimalValue();
00084     
00085     virtual SolutionStatus _getPrimalStatus();
00086     virtual SolutionStatus _getDualStatus();
00087     virtual ProblemTypes _getProblemType();
00088 
00089     
00090     virtual void _setMax();
00091     virtual void _setMin();
00092 
00093   };
00094 } //END OF NAMESPACE LEMON
00095 
00096 #endif //LEMON_LP_CPLEX_H
00097 

Generated on Sat Aug 27 14:14:53 2005 for LEMON by  doxygen 1.4.4