# HG changeset patch # User Alpar Juttner # Date 2009-01-12 13:26:02 # Node ID 9b082b3fb33fd90819c0ba56df10f59e56dbe3c3 # Parent 08d495d480899a56e5065a17058edb9e9ad325fc Rename Lp*/Mip* to *Lp/*Mip diff --git a/lemon/clp.cc b/lemon/clp.cc --- a/lemon/clp.cc +++ b/lemon/clp.cc @@ -21,13 +21,13 @@ namespace lemon { - LpClp::LpClp() { + ClpLp::ClpLp() { _prob = new ClpSimplex(); _init_temporals(); messageLevel(MESSAGE_NO_OUTPUT); } - LpClp::LpClp(const LpClp& other) { + ClpLp::ClpLp(const ClpLp& other) { _prob = new ClpSimplex(*other._prob); rows = other.rows; cols = other.cols; @@ -35,17 +35,17 @@ messageLevel(MESSAGE_NO_OUTPUT); } - LpClp::~LpClp() { + ClpLp::~ClpLp() { delete _prob; _clear_temporals(); } - void LpClp::_init_temporals() { + void ClpLp::_init_temporals() { _primal_ray = 0; _dual_ray = 0; } - void LpClp::_clear_temporals() { + void ClpLp::_clear_temporals() { if (_primal_ray) { delete[] _primal_ray; _primal_ray = 0; @@ -56,79 +56,79 @@ } } - LpClp* LpClp::_newSolver() const { - LpClp* newlp = new LpClp; + ClpLp* ClpLp::_newSolver() const { + ClpLp* newlp = new ClpLp; return newlp; } - LpClp* LpClp::_cloneSolver() const { - LpClp* copylp = new LpClp(*this); + ClpLp* ClpLp::_cloneSolver() const { + ClpLp* copylp = new ClpLp(*this); return copylp; } - const char* LpClp::_solverName() const { return "LpClp"; } + const char* ClpLp::_solverName() const { return "ClpLp"; } - int LpClp::_addCol() { + int ClpLp::_addCol() { _prob->addColumn(0, 0, 0, -COIN_DBL_MAX, COIN_DBL_MAX, 0.0); return _prob->numberColumns() - 1; } - int LpClp::_addRow() { + int ClpLp::_addRow() { _prob->addRow(0, 0, 0, -COIN_DBL_MAX, COIN_DBL_MAX); return _prob->numberRows() - 1; } - void LpClp::_eraseCol(int c) { + void ClpLp::_eraseCol(int c) { _col_names_ref.erase(_prob->getColumnName(c)); _prob->deleteColumns(1, &c); } - void LpClp::_eraseRow(int r) { + void ClpLp::_eraseRow(int r) { _row_names_ref.erase(_prob->getRowName(r)); _prob->deleteRows(1, &r); } - void LpClp::_eraseColId(int i) { + void ClpLp::_eraseColId(int i) { cols.eraseIndex(i); cols.shiftIndices(i); } - void LpClp::_eraseRowId(int i) { + void ClpLp::_eraseRowId(int i) { rows.eraseIndex(i); rows.shiftIndices(i); } - void LpClp::_getColName(int c, std::string& name) const { + void ClpLp::_getColName(int c, std::string& name) const { name = _prob->getColumnName(c); } - void LpClp::_setColName(int c, const std::string& name) { + void ClpLp::_setColName(int c, const std::string& name) { _prob->setColumnName(c, const_cast(name)); _col_names_ref[name] = c; } - int LpClp::_colByName(const std::string& name) const { + int ClpLp::_colByName(const std::string& name) const { std::map::const_iterator it = _col_names_ref.find(name); return it != _col_names_ref.end() ? it->second : -1; } - void LpClp::_getRowName(int r, std::string& name) const { + void ClpLp::_getRowName(int r, std::string& name) const { name = _prob->getRowName(r); } - void LpClp::_setRowName(int r, const std::string& name) { + void ClpLp::_setRowName(int r, const std::string& name) { _prob->setRowName(r, const_cast(name)); _row_names_ref[name] = r; } - int LpClp::_rowByName(const std::string& name) const { + int ClpLp::_rowByName(const std::string& name) const { std::map::const_iterator it = _row_names_ref.find(name); return it != _row_names_ref.end() ? it->second : -1; } - void LpClp::_setRowCoeffs(int ix, ExprIterator b, ExprIterator e) { + void ClpLp::_setRowCoeffs(int ix, ExprIterator b, ExprIterator e) { std::map coeffs; int n = _prob->clpMatrix()->getNumCols(); @@ -156,7 +156,7 @@ } } - void LpClp::_getRowCoeffs(int ix, InsertIterator b) const { + void ClpLp::_getRowCoeffs(int ix, InsertIterator b) const { int n = _prob->clpMatrix()->getNumCols(); const int* indices = _prob->clpMatrix()->getIndices(); @@ -173,7 +173,7 @@ } } - void LpClp::_setColCoeffs(int ix, ExprIterator b, ExprIterator e) { + void ClpLp::_setColCoeffs(int ix, ExprIterator b, ExprIterator e) { std::map coeffs; CoinBigIndex begin = _prob->clpMatrix()->getVectorStarts()[ix]; @@ -196,7 +196,7 @@ } } - void LpClp::_getColCoeffs(int ix, InsertIterator b) const { + void ClpLp::_getColCoeffs(int ix, InsertIterator b) const { CoinBigIndex begin = _prob->clpMatrix()->getVectorStarts()[ix]; CoinBigIndex end = begin + _prob->clpMatrix()->getVectorLengths()[ix]; @@ -209,11 +209,11 @@ } } - void LpClp::_setCoeff(int ix, int jx, Value value) { + void ClpLp::_setCoeff(int ix, int jx, Value value) { _prob->modifyCoefficient(ix, jx, value); } - LpClp::Value LpClp::_getCoeff(int ix, int jx) const { + ClpLp::Value ClpLp::_getCoeff(int ix, int jx) const { CoinBigIndex begin = _prob->clpMatrix()->getVectorStarts()[ix]; CoinBigIndex end = begin + _prob->clpMatrix()->getVectorLengths()[ix]; @@ -228,43 +228,43 @@ } } - void LpClp::_setColLowerBound(int i, Value lo) { + void ClpLp::_setColLowerBound(int i, Value lo) { _prob->setColumnLower(i, lo == - INF ? - COIN_DBL_MAX : lo); } - LpClp::Value LpClp::_getColLowerBound(int i) const { + ClpLp::Value ClpLp::_getColLowerBound(int i) const { double val = _prob->getColLower()[i]; return val == - COIN_DBL_MAX ? - INF : val; } - void LpClp::_setColUpperBound(int i, Value up) { + void ClpLp::_setColUpperBound(int i, Value up) { _prob->setColumnUpper(i, up == INF ? COIN_DBL_MAX : up); } - LpClp::Value LpClp::_getColUpperBound(int i) const { + ClpLp::Value ClpLp::_getColUpperBound(int i) const { double val = _prob->getColUpper()[i]; return val == COIN_DBL_MAX ? INF : val; } - void LpClp::_setRowLowerBound(int i, Value lo) { + void ClpLp::_setRowLowerBound(int i, Value lo) { _prob->setRowLower(i, lo == - INF ? - COIN_DBL_MAX : lo); } - LpClp::Value LpClp::_getRowLowerBound(int i) const { + ClpLp::Value ClpLp::_getRowLowerBound(int i) const { double val = _prob->getRowLower()[i]; return val == - COIN_DBL_MAX ? - INF : val; } - void LpClp::_setRowUpperBound(int i, Value up) { + void ClpLp::_setRowUpperBound(int i, Value up) { _prob->setRowUpper(i, up == INF ? COIN_DBL_MAX : up); } - LpClp::Value LpClp::_getRowUpperBound(int i) const { + ClpLp::Value ClpLp::_getRowUpperBound(int i) const { double val = _prob->getRowUpper()[i]; return val == COIN_DBL_MAX ? INF : val; } - void LpClp::_setObjCoeffs(ExprIterator b, ExprIterator e) { + void ClpLp::_setObjCoeffs(ExprIterator b, ExprIterator e) { int num = _prob->clpMatrix()->getNumCols(); for (int i = 0; i < num; ++i) { _prob->setObjectiveCoefficient(i, 0.0); @@ -274,7 +274,7 @@ } } - void LpClp::_getObjCoeffs(InsertIterator b) const { + void ClpLp::_getObjCoeffs(InsertIterator b) const { int num = _prob->clpMatrix()->getNumCols(); for (int i = 0; i < num; ++i) { Value coef = _prob->getObjCoefficients()[i]; @@ -285,42 +285,42 @@ } } - void LpClp::_setObjCoeff(int i, Value obj_coef) { + void ClpLp::_setObjCoeff(int i, Value obj_coef) { _prob->setObjectiveCoefficient(i, obj_coef); } - LpClp::Value LpClp::_getObjCoeff(int i) const { + ClpLp::Value ClpLp::_getObjCoeff(int i) const { return _prob->getObjCoefficients()[i]; } - LpClp::SolveExitStatus LpClp::_solve() { + ClpLp::SolveExitStatus ClpLp::_solve() { return _prob->primal() >= 0 ? SOLVED : UNSOLVED; } - LpClp::SolveExitStatus LpClp::solvePrimal() { + ClpLp::SolveExitStatus ClpLp::solvePrimal() { return _prob->primal() >= 0 ? SOLVED : UNSOLVED; } - LpClp::SolveExitStatus LpClp::solveDual() { + ClpLp::SolveExitStatus ClpLp::solveDual() { return _prob->dual() >= 0 ? SOLVED : UNSOLVED; } - LpClp::SolveExitStatus LpClp::solveBarrier() { + ClpLp::SolveExitStatus ClpLp::solveBarrier() { return _prob->barrier() >= 0 ? SOLVED : UNSOLVED; } - LpClp::Value LpClp::_getPrimal(int i) const { + ClpLp::Value ClpLp::_getPrimal(int i) const { return _prob->primalColumnSolution()[i]; } - LpClp::Value LpClp::_getPrimalValue() const { + ClpLp::Value ClpLp::_getPrimalValue() const { return _prob->objectiveValue(); } - LpClp::Value LpClp::_getDual(int i) const { + ClpLp::Value ClpLp::_getDual(int i) const { return _prob->dualRowSolution()[i]; } - LpClp::Value LpClp::_getPrimalRay(int i) const { + ClpLp::Value ClpLp::_getPrimalRay(int i) const { if (!_primal_ray) { _primal_ray = _prob->unboundedRay(); LEMON_ASSERT(_primal_ray != 0, "Primal ray is not provided"); @@ -328,7 +328,7 @@ return _primal_ray[i]; } - LpClp::Value LpClp::_getDualRay(int i) const { + ClpLp::Value ClpLp::_getDualRay(int i) const { if (!_dual_ray) { _dual_ray = _prob->infeasibilityRay(); LEMON_ASSERT(_dual_ray != 0, "Dual ray is not provided"); @@ -336,7 +336,7 @@ return _dual_ray[i]; } - LpClp::VarStatus LpClp::_getColStatus(int i) const { + ClpLp::VarStatus ClpLp::_getColStatus(int i) const { switch (_prob->getColumnStatus(i)) { case ClpSimplex::basic: return BASIC; @@ -356,7 +356,7 @@ } } - LpClp::VarStatus LpClp::_getRowStatus(int i) const { + ClpLp::VarStatus ClpLp::_getRowStatus(int i) const { switch (_prob->getColumnStatus(i)) { case ClpSimplex::basic: return BASIC; @@ -377,7 +377,7 @@ } - LpClp::ProblemType LpClp::_getPrimalType() const { + ClpLp::ProblemType ClpLp::_getPrimalType() const { if (_prob->isProvenOptimal()) { return OPTIMAL; } else if (_prob->isProvenPrimalInfeasible()) { @@ -389,7 +389,7 @@ } } - LpClp::ProblemType LpClp::_getDualType() const { + ClpLp::ProblemType ClpLp::_getDualType() const { if (_prob->isProvenOptimal()) { return OPTIMAL; } else if (_prob->isProvenDualInfeasible()) { @@ -401,7 +401,7 @@ } } - void LpClp::_setSense(LpClp::Sense sense) { + void ClpLp::_setSense(ClpLp::Sense sense) { switch (sense) { case MIN: _prob->setOptimizationDirection(1); @@ -412,7 +412,7 @@ } } - LpClp::Sense LpClp::_getSense() const { + ClpLp::Sense ClpLp::_getSense() const { double dir = _prob->optimizationDirection(); if (dir > 0.0) { return MIN; @@ -421,7 +421,7 @@ } } - void LpClp::_clear() { + void ClpLp::_clear() { delete _prob; _prob = new ClpSimplex(); rows.clear(); @@ -430,7 +430,7 @@ _clear_temporals(); } - void LpClp::messageLevel(MessageLevel m) { + void ClpLp::messageLevel(MessageLevel m) { _prob->setLogLevel(static_cast(m)); } diff --git a/lemon/clp.h b/lemon/clp.h --- a/lemon/clp.h +++ b/lemon/clp.h @@ -39,7 +39,7 @@ /// Clp library is an object oriented lp solver library developed at /// the IBM. The CLP is part of the COIN-OR package and it can be /// used with Common Public License. - class LpClp : public LpSolver { + class ClpLp : public LpSolver { protected: ClpSimplex* _prob; @@ -50,11 +50,11 @@ public: /// \e - LpClp(); + ClpLp(); /// \e - LpClp(const LpClp&); + ClpLp(const ClpLp&); /// \e - ~LpClp(); + ~ClpLp(); protected: @@ -66,8 +66,8 @@ protected: - virtual LpClp* _newSolver() const; - virtual LpClp* _cloneSolver() const; + virtual ClpLp* _newSolver() const; + virtual ClpLp* _cloneSolver() const; virtual const char* _solverName() const; diff --git a/lemon/cplex.cc b/lemon/cplex.cc --- a/lemon/cplex.cc +++ b/lemon/cplex.cc @@ -438,25 +438,25 @@ cols.clear(); } - // LpCplex members + // CplexLp members - LpCplex::LpCplex() + CplexLp::CplexLp() : LpBase(), CplexBase(), LpSolver() {} - LpCplex::LpCplex(const CplexEnv& env) + CplexLp::CplexLp(const CplexEnv& env) : LpBase(), CplexBase(env), LpSolver() {} - LpCplex::LpCplex(const LpCplex& other) + CplexLp::CplexLp(const CplexLp& other) : LpBase(), CplexBase(other), LpSolver() {} - LpCplex::~LpCplex() {} + CplexLp::~CplexLp() {} - LpCplex* LpCplex::_newSolver() const { return new LpCplex; } - LpCplex* LpCplex::_cloneSolver() const {return new LpCplex(*this); } + CplexLp* CplexLp::_newSolver() const { return new CplexLp; } + CplexLp* CplexLp::_cloneSolver() const {return new CplexLp(*this); } - const char* LpCplex::_solverName() const { return "LpCplex"; } + const char* CplexLp::_solverName() const { return "CplexLp"; } - void LpCplex::_clear_temporals() { + void CplexLp::_clear_temporals() { _col_status.clear(); _row_status.clear(); _primal_ray.clear(); @@ -472,7 +472,7 @@ // value does not necessarily mean that a solution exists. Use query // routines CPXsolninfo, CPXgetstat, and CPXsolution to obtain // further information about the status of the optimization. - LpCplex::SolveExitStatus LpCplex::convertStatus(int status) { + CplexLp::SolveExitStatus CplexLp::convertStatus(int status) { #if CPX_VERSION >= 800 if (status == 0) { switch (CPXgetstat(cplexEnv(), _prob)) { @@ -505,45 +505,45 @@ #endif } - LpCplex::SolveExitStatus LpCplex::_solve() { + CplexLp::SolveExitStatus CplexLp::_solve() { _clear_temporals(); return convertStatus(CPXlpopt(cplexEnv(), _prob)); } - LpCplex::SolveExitStatus LpCplex::solvePrimal() { + CplexLp::SolveExitStatus CplexLp::solvePrimal() { _clear_temporals(); return convertStatus(CPXprimopt(cplexEnv(), _prob)); } - LpCplex::SolveExitStatus LpCplex::solveDual() { + CplexLp::SolveExitStatus CplexLp::solveDual() { _clear_temporals(); return convertStatus(CPXdualopt(cplexEnv(), _prob)); } - LpCplex::SolveExitStatus LpCplex::solveBarrier() { + CplexLp::SolveExitStatus CplexLp::solveBarrier() { _clear_temporals(); return convertStatus(CPXbaropt(cplexEnv(), _prob)); } - LpCplex::Value LpCplex::_getPrimal(int i) const { + CplexLp::Value CplexLp::_getPrimal(int i) const { Value x; CPXgetx(cplexEnv(), _prob, &x, i, i); return x; } - LpCplex::Value LpCplex::_getDual(int i) const { + CplexLp::Value CplexLp::_getDual(int i) const { Value y; CPXgetpi(cplexEnv(), _prob, &y, i, i); return y; } - LpCplex::Value LpCplex::_getPrimalValue() const { + CplexLp::Value CplexLp::_getPrimalValue() const { Value objval; CPXgetobjval(cplexEnv(), _prob, &objval); return objval; } - LpCplex::VarStatus LpCplex::_getColStatus(int i) const { + CplexLp::VarStatus CplexLp::_getColStatus(int i) const { if (_col_status.empty()) { _col_status.resize(CPXgetnumcols(cplexEnv(), _prob)); CPXgetbase(cplexEnv(), _prob, &_col_status.front(), 0); @@ -559,11 +559,11 @@ return UPPER; default: LEMON_ASSERT(false, "Wrong column status"); - return LpCplex::VarStatus(); + return CplexLp::VarStatus(); } } - LpCplex::VarStatus LpCplex::_getRowStatus(int i) const { + CplexLp::VarStatus CplexLp::_getRowStatus(int i) const { if (_row_status.empty()) { _row_status.resize(CPXgetnumrows(cplexEnv(), _prob)); CPXgetbase(cplexEnv(), _prob, 0, &_row_status.front()); @@ -581,11 +581,11 @@ return UPPER; default: LEMON_ASSERT(false, "Wrong row status"); - return LpCplex::VarStatus(); + return CplexLp::VarStatus(); } } - LpCplex::Value LpCplex::_getPrimalRay(int i) const { + CplexLp::Value CplexLp::_getPrimalRay(int i) const { if (_primal_ray.empty()) { _primal_ray.resize(CPXgetnumcols(cplexEnv(), _prob)); CPXgetray(cplexEnv(), _prob, &_primal_ray.front()); @@ -593,7 +593,7 @@ return _primal_ray[i]; } - LpCplex::Value LpCplex::_getDualRay(int i) const { + CplexLp::Value CplexLp::_getDualRay(int i) const { if (_dual_ray.empty()) { } @@ -686,7 +686,7 @@ void statusSwitch(CPXENVptr,int&){} #endif - LpCplex::ProblemType LpCplex::_getPrimalType() const { + CplexLp::ProblemType CplexLp::_getPrimalType() const { // Unboundedness not treated well: the following is from cplex 9.0 doc // About Unboundedness @@ -768,7 +768,7 @@ // CPX_STAT_OPTIMAL_RELAXED // CPX_STAT_UNBOUNDED - LpCplex::ProblemType LpCplex::_getDualType() const { + CplexLp::ProblemType CplexLp::_getDualType() const { int stat = CPXgetstat(cplexEnv(), _prob); #if CPX_VERSION >= 800 switch (stat) { @@ -795,9 +795,9 @@ #endif } - // MipCplex members + // CplexMip members - MipCplex::MipCplex() + CplexMip::CplexMip() : LpBase(), CplexBase(), MipSolver() { #if CPX_VERSION < 800 @@ -807,7 +807,7 @@ #endif } - MipCplex::MipCplex(const CplexEnv& env) + CplexMip::CplexMip(const CplexEnv& env) : LpBase(), CplexBase(env), MipSolver() { #if CPX_VERSION < 800 @@ -818,17 +818,17 @@ } - MipCplex::MipCplex(const MipCplex& other) + CplexMip::CplexMip(const CplexMip& other) : LpBase(), CplexBase(other), MipSolver() {} - MipCplex::~MipCplex() {} + CplexMip::~CplexMip() {} - MipCplex* MipCplex::_newSolver() const { return new MipCplex; } - MipCplex* MipCplex::_cloneSolver() const {return new MipCplex(*this); } + CplexMip* CplexMip::_newSolver() const { return new CplexMip; } + CplexMip* CplexMip::_cloneSolver() const {return new CplexMip(*this); } - const char* MipCplex::_solverName() const { return "MipCplex"; } + const char* CplexMip::_solverName() const { return "CplexMip"; } - void MipCplex::_setColType(int i, MipCplex::ColTypes col_type) { + void CplexMip::_setColType(int i, CplexMip::ColTypes col_type) { // Note If a variable is to be changed to binary, a call to CPXchgbds // should also be made to change the bounds to 0 and 1. @@ -847,7 +847,7 @@ } } - MipCplex::ColTypes MipCplex::_getColType(int i) const { + CplexMip::ColTypes CplexMip::_getColType(int i) const { char t; CPXgetctype (cplexEnv(), _prob, &t, i, i); switch (t) { @@ -862,7 +862,7 @@ } - MipCplex::SolveExitStatus MipCplex::_solve() { + CplexMip::SolveExitStatus CplexMip::_solve() { int status; status = CPXmipopt (cplexEnv(), _prob); if (status==0) @@ -873,7 +873,7 @@ } - MipCplex::ProblemType MipCplex::_getType() const { + CplexMip::ProblemType CplexMip::_getType() const { int stat = CPXgetstat(cplexEnv(), _prob); @@ -909,13 +909,13 @@ // has a feasible solution. } - MipCplex::Value MipCplex::_getSol(int i) const { + CplexMip::Value CplexMip::_getSol(int i) const { Value x; CPXgetmipx(cplexEnv(), _prob, &x, i, i); return x; } - MipCplex::Value MipCplex::_getSolValue() const { + CplexMip::Value CplexMip::_getSolValue() const { Value objval; CPXgetmipobjval(cplexEnv(), _prob, &objval); return objval; diff --git a/lemon/cplex.h b/lemon/cplex.h --- a/lemon/cplex.h +++ b/lemon/cplex.h @@ -160,16 +160,16 @@ /// /// This class implements an interface for the CPLEX LP solver. ///\ingroup lp_group - class LpCplex : public CplexBase, public LpSolver { + class CplexLp : public CplexBase, public LpSolver { public: /// \e - LpCplex(); + CplexLp(); /// \e - LpCplex(const CplexEnv&); + CplexLp(const CplexEnv&); /// \e - LpCplex(const LpCplex&); + CplexLp(const CplexLp&); /// \e - virtual ~LpCplex(); + virtual ~CplexLp(); private: @@ -186,8 +186,8 @@ protected: - virtual LpCplex* _cloneSolver() const; - virtual LpCplex* _newSolver() const; + virtual CplexLp* _cloneSolver() const; + virtual CplexLp* _newSolver() const; virtual const char* _solverName() const; @@ -222,21 +222,21 @@ /// /// This class implements an interface for the CPLEX MIP solver. ///\ingroup lp_group - class MipCplex : public CplexBase, public MipSolver { + class CplexMip : public CplexBase, public MipSolver { public: /// \e - MipCplex(); + CplexMip(); /// \e - MipCplex(const CplexEnv&); + CplexMip(const CplexEnv&); /// \e - MipCplex(const MipCplex&); + CplexMip(const CplexMip&); /// \e - virtual ~MipCplex(); + virtual ~CplexMip(); protected: - virtual MipCplex* _cloneSolver() const; - virtual MipCplex* _newSolver() const; + virtual CplexMip* _cloneSolver() const; + virtual CplexMip* _newSolver() const; virtual const char* _solverName() const; diff --git a/lemon/glpk.cc b/lemon/glpk.cc --- a/lemon/glpk.cc +++ b/lemon/glpk.cc @@ -522,33 +522,33 @@ cols.clear(); } - // LpGlpk members + // GlpkLp members - LpGlpk::LpGlpk() + GlpkLp::GlpkLp() : LpBase(), GlpkBase(), LpSolver() { messageLevel(MESSAGE_NO_OUTPUT); } - LpGlpk::LpGlpk(const LpGlpk& other) + GlpkLp::GlpkLp(const GlpkLp& other) : LpBase(other), GlpkBase(other), LpSolver(other) { messageLevel(MESSAGE_NO_OUTPUT); } - LpGlpk* LpGlpk::_newSolver() const { return new LpGlpk; } - LpGlpk* LpGlpk::_cloneSolver() const { return new LpGlpk(*this); } + GlpkLp* GlpkLp::_newSolver() const { return new GlpkLp; } + GlpkLp* GlpkLp::_cloneSolver() const { return new GlpkLp(*this); } - const char* LpGlpk::_solverName() const { return "LpGlpk"; } + const char* GlpkLp::_solverName() const { return "GlpkLp"; } - void LpGlpk::_clear_temporals() { + void GlpkLp::_clear_temporals() { _primal_ray.clear(); _dual_ray.clear(); } - LpGlpk::SolveExitStatus LpGlpk::_solve() { + GlpkLp::SolveExitStatus GlpkLp::_solve() { return solvePrimal(); } - LpGlpk::SolveExitStatus LpGlpk::solvePrimal() { + GlpkLp::SolveExitStatus GlpkLp::solvePrimal() { _clear_temporals(); glp_smcp smcp; @@ -573,7 +573,7 @@ return SOLVED; } - LpGlpk::SolveExitStatus LpGlpk::solveDual() { + GlpkLp::SolveExitStatus GlpkLp::solveDual() { _clear_temporals(); glp_smcp smcp; @@ -599,19 +599,19 @@ return SOLVED; } - LpGlpk::Value LpGlpk::_getPrimal(int i) const { + GlpkLp::Value GlpkLp::_getPrimal(int i) const { return glp_get_col_prim(lp, i); } - LpGlpk::Value LpGlpk::_getDual(int i) const { + GlpkLp::Value GlpkLp::_getDual(int i) const { return glp_get_row_dual(lp, i); } - LpGlpk::Value LpGlpk::_getPrimalValue() const { + GlpkLp::Value GlpkLp::_getPrimalValue() const { return glp_get_obj_val(lp); } - LpGlpk::VarStatus LpGlpk::_getColStatus(int i) const { + GlpkLp::VarStatus GlpkLp::_getColStatus(int i) const { switch (glp_get_col_stat(lp, i)) { case GLP_BS: return BASIC; @@ -625,11 +625,11 @@ return FIXED; default: LEMON_ASSERT(false, "Wrong column status"); - return LpGlpk::VarStatus(); + return GlpkLp::VarStatus(); } } - LpGlpk::VarStatus LpGlpk::_getRowStatus(int i) const { + GlpkLp::VarStatus GlpkLp::_getRowStatus(int i) const { switch (glp_get_row_stat(lp, i)) { case GLP_BS: return BASIC; @@ -643,11 +643,11 @@ return FIXED; default: LEMON_ASSERT(false, "Wrong row status"); - return LpGlpk::VarStatus(); + return GlpkLp::VarStatus(); } } - LpGlpk::Value LpGlpk::_getPrimalRay(int i) const { + GlpkLp::Value GlpkLp::_getPrimalRay(int i) const { if (_primal_ray.empty()) { int row_num = glp_get_num_rows(lp); int col_num = glp_get_num_cols(lp); @@ -699,7 +699,7 @@ return _primal_ray[i]; } - LpGlpk::Value LpGlpk::_getDualRay(int i) const { + GlpkLp::Value GlpkLp::_getDualRay(int i) const { if (_dual_ray.empty()) { int row_num = glp_get_num_rows(lp); @@ -771,7 +771,7 @@ return _dual_ray[i]; } - LpGlpk::ProblemType LpGlpk::_getPrimalType() const { + GlpkLp::ProblemType GlpkLp::_getPrimalType() const { if (glp_get_status(lp) == GLP_OPT) return OPTIMAL; switch (glp_get_prim_stat(lp)) { @@ -788,11 +788,11 @@ return INFEASIBLE; default: LEMON_ASSERT(false, "Wrong primal type"); - return LpGlpk::ProblemType(); + return GlpkLp::ProblemType(); } } - LpGlpk::ProblemType LpGlpk::_getDualType() const { + GlpkLp::ProblemType GlpkLp::_getDualType() const { if (glp_get_status(lp) == GLP_OPT) return OPTIMAL; switch (glp_get_dual_stat(lp)) { @@ -809,31 +809,31 @@ return INFEASIBLE; default: LEMON_ASSERT(false, "Wrong primal type"); - return LpGlpk::ProblemType(); + return GlpkLp::ProblemType(); } } - void LpGlpk::presolver(bool b) { + void GlpkLp::presolver(bool b) { lpx_set_int_parm(lp, LPX_K_PRESOL, b ? 1 : 0); } - void LpGlpk::messageLevel(MessageLevel m) { + void GlpkLp::messageLevel(MessageLevel m) { _message_level = m; } - // MipGlpk members + // GlpkMip members - MipGlpk::MipGlpk() + GlpkMip::GlpkMip() : LpBase(), GlpkBase(), MipSolver() { messageLevel(MESSAGE_NO_OUTPUT); } - MipGlpk::MipGlpk(const MipGlpk& other) + GlpkMip::GlpkMip(const GlpkMip& other) : LpBase(), GlpkBase(other), MipSolver() { messageLevel(MESSAGE_NO_OUTPUT); } - void MipGlpk::_setColType(int i, MipGlpk::ColTypes col_type) { + void GlpkMip::_setColType(int i, GlpkMip::ColTypes col_type) { switch (col_type) { case INTEGER: glp_set_col_kind(lp, i, GLP_IV); @@ -844,7 +844,7 @@ } } - MipGlpk::ColTypes MipGlpk::_getColType(int i) const { + GlpkMip::ColTypes GlpkMip::_getColType(int i) const { switch (glp_get_col_kind(lp, i)) { case GLP_IV: case GLP_BV: @@ -855,7 +855,7 @@ } - MipGlpk::SolveExitStatus MipGlpk::_solve() { + GlpkMip::SolveExitStatus GlpkMip::_solve() { glp_smcp smcp; glp_init_smcp(&smcp); @@ -901,7 +901,7 @@ } - MipGlpk::ProblemType MipGlpk::_getType() const { + GlpkMip::ProblemType GlpkMip::_getType() const { switch (glp_get_status(lp)) { case GLP_OPT: switch (glp_mip_status(lp)) { @@ -915,7 +915,7 @@ return OPTIMAL; default: LEMON_ASSERT(false, "Wrong problem type."); - return MipGlpk::ProblemType(); + return GlpkMip::ProblemType(); } case GLP_NOFEAS: return INFEASIBLE; @@ -928,24 +928,24 @@ } default: LEMON_ASSERT(false, "Wrong problem type."); - return MipGlpk::ProblemType(); + return GlpkMip::ProblemType(); } } - MipGlpk::Value MipGlpk::_getSol(int i) const { + GlpkMip::Value GlpkMip::_getSol(int i) const { return glp_mip_col_val(lp, i); } - MipGlpk::Value MipGlpk::_getSolValue() const { + GlpkMip::Value GlpkMip::_getSolValue() const { return glp_mip_obj_val(lp); } - MipGlpk* MipGlpk::_newSolver() const { return new MipGlpk; } - MipGlpk* MipGlpk::_cloneSolver() const {return new MipGlpk(*this); } + GlpkMip* GlpkMip::_newSolver() const { return new GlpkMip; } + GlpkMip* GlpkMip::_cloneSolver() const {return new GlpkMip(*this); } - const char* MipGlpk::_solverName() const { return "MipGlpk"; } + const char* GlpkMip::_solverName() const { return "GlpkMip"; } - void MipGlpk::messageLevel(MessageLevel m) { + void GlpkMip::messageLevel(MessageLevel m) { _message_level = m; } diff --git a/lemon/glpk.h b/lemon/glpk.h --- a/lemon/glpk.h +++ b/lemon/glpk.h @@ -119,13 +119,13 @@ /// /// This class implements an interface for the GLPK LP solver. ///\ingroup lp_group - class LpGlpk : public GlpkBase, public LpSolver { + class GlpkLp : public GlpkBase, public LpSolver { public: ///\e - LpGlpk(); + GlpkLp(); ///\e - LpGlpk(const LpGlpk&); + GlpkLp(const GlpkLp&); private: @@ -136,8 +136,8 @@ protected: - virtual LpGlpk* _cloneSolver() const; - virtual LpGlpk* _newSolver() const; + virtual GlpkLp* _cloneSolver() const; + virtual GlpkLp* _newSolver() const; virtual const char* _solverName() const; @@ -203,18 +203,18 @@ /// /// This class implements an interface for the GLPK MIP solver. ///\ingroup lp_group - class MipGlpk : public GlpkBase, public MipSolver { + class GlpkMip : public GlpkBase, public MipSolver { public: ///\e - MipGlpk(); + GlpkMip(); ///\e - MipGlpk(const MipGlpk&); + GlpkMip(const GlpkMip&); protected: - virtual MipGlpk* _cloneSolver() const; - virtual MipGlpk* _newSolver() const; + virtual GlpkMip* _cloneSolver() const; + virtual GlpkMip* _newSolver() const; virtual const char* _solverName() const; diff --git a/lemon/lp.h b/lemon/lp.h --- a/lemon/lp.h +++ b/lemon/lp.h @@ -51,8 +51,8 @@ ///The default LP solver. ///\ingroup lp_group /// - ///Currently, it is either \c LpGlpk, \c LpCplex, \c LpSoplex or \c LpClp - typedef LpGlpk Lp; + ///Currently, it is either \c GlpkLp, \c CplexLp, \c SoplexLp or \c ClpLp + typedef GlpkLp Lp; ///The default MIP solver identifier @@ -66,25 +66,25 @@ ///The default MIP solver. ///\ingroup lp_group /// - ///Currently, it is either \c MipGlpk or \c MipCplex - typedef MipGlpk Mip; + ///Currently, it is either \c GlpkMip or \c CplexMip + typedef GlpkMip Mip; #else #ifdef HAVE_GLPK # define LEMON_DEFAULT_LP GLPK - typedef LpGlpk Lp; + typedef GlpkLp Lp; # define LEMON_DEFAULT_MIP GLPK - typedef MipGlpk Mip; + typedef GlpkMip Mip; #elif HAVE_CPLEX # define LEMON_DEFAULT_LP CPLEX - typedef LpCplex Lp; + typedef CplexLp Lp; # define LEMON_DEFAULT_MIP CPLEX - typedef MipCplex Mip; + typedef CplexMip Mip; #elif HAVE_SOPLEX # define DEFAULT_LP SOPLEX - typedef LpSoplex Lp; + typedef SoplexLp Lp; #elif HAVE_CLP # define DEFAULT_LP CLP - typedef LpClp Lp; + typedef ClpLp Lp; #endif #endif diff --git a/lemon/soplex.cc b/lemon/soplex.cc --- a/lemon/soplex.cc +++ b/lemon/soplex.cc @@ -26,15 +26,15 @@ ///\brief Implementation of the LEMON-SOPLEX lp solver interface. namespace lemon { - LpSoplex::LpSoplex() { + SoplexLp::SoplexLp() { soplex = new soplex::SoPlex; } - LpSoplex::~LpSoplex() { + SoplexLp::~SoplexLp() { delete soplex; } - LpSoplex::LpSoplex(const LpSoplex& lp) { + SoplexLp::SoplexLp(const SoplexLp& lp) { rows = lp.rows; cols = lp.cols; @@ -49,24 +49,24 @@ } - void LpSoplex::_clear_temporals() { + void SoplexLp::_clear_temporals() { _primal_values.clear(); _dual_values.clear(); } - LpSoplex* LpSoplex::_newSolver() const { - LpSoplex* newlp = new LpSoplex(); + SoplexLp* SoplexLp::_newSolver() const { + SoplexLp* newlp = new SoplexLp(); return newlp; } - LpSoplex* LpSoplex::_cloneSolver() const { - LpSoplex* newlp = new LpSoplex(*this); + SoplexLp* SoplexLp::_cloneSolver() const { + SoplexLp* newlp = new SoplexLp(*this); return newlp; } - const char* LpSoplex::_solverName() const { return "LpSoplex"; } + const char* SoplexLp::_solverName() const { return "SoplexLp"; } - int LpSoplex::_addCol() { + int SoplexLp::_addCol() { soplex::LPCol c; c.setLower(-soplex::infinity); c.setUpper(soplex::infinity); @@ -77,7 +77,7 @@ return soplex->nCols() - 1; } - int LpSoplex::_addRow() { + int SoplexLp::_addRow() { soplex::LPRow r; r.setLhs(-soplex::infinity); r.setRhs(soplex::infinity); @@ -89,7 +89,7 @@ } - void LpSoplex::_eraseCol(int i) { + void SoplexLp::_eraseCol(int i) { soplex->removeCol(i); _col_names_ref.erase(_col_names[i]); _col_names[i] = _col_names.back(); @@ -97,7 +97,7 @@ _col_names.pop_back(); } - void LpSoplex::_eraseRow(int i) { + void SoplexLp::_eraseRow(int i) { soplex->removeRow(i); _row_names_ref.erase(_row_names[i]); _row_names[i] = _row_names.back(); @@ -105,20 +105,20 @@ _row_names.pop_back(); } - void LpSoplex::_eraseColId(int i) { + void SoplexLp::_eraseColId(int i) { cols.eraseIndex(i); cols.relocateIndex(i, cols.maxIndex()); } - void LpSoplex::_eraseRowId(int i) { + void SoplexLp::_eraseRowId(int i) { rows.eraseIndex(i); rows.relocateIndex(i, rows.maxIndex()); } - void LpSoplex::_getColName(int c, std::string &name) const { + void SoplexLp::_getColName(int c, std::string &name) const { name = _col_names[c]; } - void LpSoplex::_setColName(int c, const std::string &name) { + void SoplexLp::_setColName(int c, const std::string &name) { _col_names_ref.erase(_col_names[c]); _col_names[c] = name; if (!name.empty()) { @@ -126,7 +126,7 @@ } } - int LpSoplex::_colByName(const std::string& name) const { + int SoplexLp::_colByName(const std::string& name) const { std::map::const_iterator it = _col_names_ref.find(name); if (it != _col_names_ref.end()) { @@ -136,11 +136,11 @@ } } - void LpSoplex::_getRowName(int r, std::string &name) const { + void SoplexLp::_getRowName(int r, std::string &name) const { name = _row_names[r]; } - void LpSoplex::_setRowName(int r, const std::string &name) { + void SoplexLp::_setRowName(int r, const std::string &name) { _row_names_ref.erase(_row_names[r]); _row_names[r] = name; if (!name.empty()) { @@ -148,7 +148,7 @@ } } - int LpSoplex::_rowByName(const std::string& name) const { + int SoplexLp::_rowByName(const std::string& name) const { std::map::const_iterator it = _row_names_ref.find(name); if (it != _row_names_ref.end()) { @@ -159,7 +159,7 @@ } - void LpSoplex::_setRowCoeffs(int i, ExprIterator b, ExprIterator e) { + void SoplexLp::_setRowCoeffs(int i, ExprIterator b, ExprIterator e) { for (int j = 0; j < soplex->nCols(); ++j) { soplex->changeElement(i, j, 0.0); } @@ -168,7 +168,7 @@ } } - void LpSoplex::_getRowCoeffs(int i, InsertIterator b) const { + void SoplexLp::_getRowCoeffs(int i, InsertIterator b) const { const soplex::SVector& vec = soplex->rowVector(i); for (int k = 0; k < vec.size(); ++k) { *b = std::make_pair(vec.index(k), vec.value(k)); @@ -176,7 +176,7 @@ } } - void LpSoplex::_setColCoeffs(int j, ExprIterator b, ExprIterator e) { + void SoplexLp::_setColCoeffs(int j, ExprIterator b, ExprIterator e) { for (int i = 0; i < soplex->nRows(); ++i) { soplex->changeElement(i, j, 0.0); } @@ -185,7 +185,7 @@ } } - void LpSoplex::_getColCoeffs(int i, InsertIterator b) const { + void SoplexLp::_getColCoeffs(int i, InsertIterator b) const { const soplex::SVector& vec = soplex->colVector(i); for (int k = 0; k < vec.size(); ++k) { *b = std::make_pair(vec.index(k), vec.value(k)); @@ -193,55 +193,55 @@ } } - void LpSoplex::_setCoeff(int i, int j, Value value) { + void SoplexLp::_setCoeff(int i, int j, Value value) { soplex->changeElement(i, j, value); } - LpSoplex::Value LpSoplex::_getCoeff(int i, int j) const { + SoplexLp::Value SoplexLp::_getCoeff(int i, int j) const { return soplex->rowVector(i)[j]; } - void LpSoplex::_setColLowerBound(int i, Value value) { + void SoplexLp::_setColLowerBound(int i, Value value) { LEMON_ASSERT(value != INF, "Invalid bound"); soplex->changeLower(i, value != -INF ? value : -soplex::infinity); } - LpSoplex::Value LpSoplex::_getColLowerBound(int i) const { + SoplexLp::Value SoplexLp::_getColLowerBound(int i) const { double value = soplex->lower(i); return value != -soplex::infinity ? value : -INF; } - void LpSoplex::_setColUpperBound(int i, Value value) { + void SoplexLp::_setColUpperBound(int i, Value value) { LEMON_ASSERT(value != -INF, "Invalid bound"); soplex->changeUpper(i, value != INF ? value : soplex::infinity); } - LpSoplex::Value LpSoplex::_getColUpperBound(int i) const { + SoplexLp::Value SoplexLp::_getColUpperBound(int i) const { double value = soplex->upper(i); return value != soplex::infinity ? value : INF; } - void LpSoplex::_setRowLowerBound(int i, Value lb) { + void SoplexLp::_setRowLowerBound(int i, Value lb) { LEMON_ASSERT(lb != INF, "Invalid bound"); soplex->changeRange(i, lb != -INF ? lb : -soplex::infinity, soplex->rhs(i)); } - LpSoplex::Value LpSoplex::_getRowLowerBound(int i) const { + SoplexLp::Value SoplexLp::_getRowLowerBound(int i) const { double res = soplex->lhs(i); return res == -soplex::infinity ? -INF : res; } - void LpSoplex::_setRowUpperBound(int i, Value ub) { + void SoplexLp::_setRowUpperBound(int i, Value ub) { LEMON_ASSERT(ub != -INF, "Invalid bound"); soplex->changeRange(i, soplex->lhs(i), ub != INF ? ub : soplex::infinity); } - LpSoplex::Value LpSoplex::_getRowUpperBound(int i) const { + SoplexLp::Value SoplexLp::_getRowUpperBound(int i) const { double res = soplex->rhs(i); return res == soplex::infinity ? INF : res; } - void LpSoplex::_setObjCoeffs(ExprIterator b, ExprIterator e) { + void SoplexLp::_setObjCoeffs(ExprIterator b, ExprIterator e) { for (int j = 0; j < soplex->nCols(); ++j) { soplex->changeObj(j, 0.0); } @@ -250,7 +250,7 @@ } } - void LpSoplex::_getObjCoeffs(InsertIterator b) const { + void SoplexLp::_getObjCoeffs(InsertIterator b) const { for (int j = 0; j < soplex->nCols(); ++j) { Value coef = soplex->obj(j); if (coef != 0.0) { @@ -260,15 +260,15 @@ } } - void LpSoplex::_setObjCoeff(int i, Value obj_coef) { + void SoplexLp::_setObjCoeff(int i, Value obj_coef) { soplex->changeObj(i, obj_coef); } - LpSoplex::Value LpSoplex::_getObjCoeff(int i) const { + SoplexLp::Value SoplexLp::_getObjCoeff(int i) const { return soplex->obj(i); } - LpSoplex::SolveExitStatus LpSoplex::_solve() { + SoplexLp::SolveExitStatus SoplexLp::_solve() { _clear_temporals(); @@ -284,7 +284,7 @@ } } - LpSoplex::Value LpSoplex::_getPrimal(int i) const { + SoplexLp::Value SoplexLp::_getPrimal(int i) const { if (_primal_values.empty()) { _primal_values.resize(soplex->nCols()); soplex::Vector pv(_primal_values.size(), &_primal_values.front()); @@ -293,7 +293,7 @@ return _primal_values[i]; } - LpSoplex::Value LpSoplex::_getDual(int i) const { + SoplexLp::Value SoplexLp::_getDual(int i) const { if (_dual_values.empty()) { _dual_values.resize(soplex->nRows()); soplex::Vector dv(_dual_values.size(), &_dual_values.front()); @@ -302,11 +302,11 @@ return _dual_values[i]; } - LpSoplex::Value LpSoplex::_getPrimalValue() const { + SoplexLp::Value SoplexLp::_getPrimalValue() const { return soplex->objValue(); } - LpSoplex::VarStatus LpSoplex::_getColStatus(int i) const { + SoplexLp::VarStatus SoplexLp::_getColStatus(int i) const { switch (soplex->getBasisColStatus(i)) { case soplex::SPxSolver::BASIC: return BASIC; @@ -324,7 +324,7 @@ } } - LpSoplex::VarStatus LpSoplex::_getRowStatus(int i) const { + SoplexLp::VarStatus SoplexLp::_getRowStatus(int i) const { switch (soplex->getBasisRowStatus(i)) { case soplex::SPxSolver::BASIC: return BASIC; @@ -342,7 +342,7 @@ } } - LpSoplex::Value LpSoplex::_getPrimalRay(int i) const { + SoplexLp::Value SoplexLp::_getPrimalRay(int i) const { if (_primal_ray.empty()) { _primal_ray.resize(soplex->nCols()); soplex::Vector pv(_primal_ray.size(), &_primal_ray.front()); @@ -351,7 +351,7 @@ return _primal_ray[i]; } - LpSoplex::Value LpSoplex::_getDualRay(int i) const { + SoplexLp::Value SoplexLp::_getDualRay(int i) const { if (_dual_ray.empty()) { _dual_ray.resize(soplex->nRows()); soplex::Vector dv(_dual_ray.size(), &_dual_ray.front()); @@ -360,7 +360,7 @@ return _dual_ray[i]; } - LpSoplex::ProblemType LpSoplex::_getPrimalType() const { + SoplexLp::ProblemType SoplexLp::_getPrimalType() const { switch (soplex->status()) { case soplex::SPxSolver::OPTIMAL: return OPTIMAL; @@ -373,7 +373,7 @@ } } - LpSoplex::ProblemType LpSoplex::_getDualType() const { + SoplexLp::ProblemType SoplexLp::_getDualType() const { switch (soplex->status()) { case soplex::SPxSolver::OPTIMAL: return OPTIMAL; @@ -386,7 +386,7 @@ } } - void LpSoplex::_setSense(Sense sense) { + void SoplexLp::_setSense(Sense sense) { switch (sense) { case MIN: soplex->changeSense(soplex::SPxSolver::MINIMIZE); @@ -396,7 +396,7 @@ } } - LpSoplex::Sense LpSoplex::_getSense() const { + SoplexLp::Sense SoplexLp::_getSense() const { switch (soplex->spxSense()) { case soplex::SPxSolver::MAXIMIZE: return MAX; @@ -404,11 +404,11 @@ return MIN; default: LEMON_ASSERT(false, "Wrong sense."); - return LpSoplex::Sense(); + return SoplexLp::Sense(); } } - void LpSoplex::_clear() { + void SoplexLp::_clear() { soplex->clear(); _col_names.clear(); _col_names_ref.clear(); diff --git a/lemon/soplex.h b/lemon/soplex.h --- a/lemon/soplex.h +++ b/lemon/soplex.h @@ -43,7 +43,7 @@ /// developed at the Konrad-Zuse-Zentrum f�r Informationstechnik /// Berlin (ZIB). You can find detailed information about it at the /// http://soplex.zib.de address. - class LpSoplex : public LpSolver { + class SoplexLp : public LpSolver { private: soplex::SoPlex* soplex; @@ -68,16 +68,16 @@ public: /// \e - LpSoplex(); + SoplexLp(); /// \e - LpSoplex(const LpSoplex&); + SoplexLp(const SoplexLp&); /// \e - ~LpSoplex(); + ~SoplexLp(); protected: - virtual LpSoplex* _newSolver() const; - virtual LpSoplex* _cloneSolver() const; + virtual SoplexLp* _newSolver() const; + virtual SoplexLp* _cloneSolver() const; virtual const char* _solverName() const; diff --git a/test/lp_test.cc b/test/lp_test.cc --- a/test/lp_test.cc +++ b/test/lp_test.cc @@ -362,7 +362,7 @@ #ifdef HAVE_GLPK { - LpGlpk lp_glpk1,lp_glpk2; + GlpkLp lp_glpk1,lp_glpk2; lpTest(lp_glpk1); aTest(lp_glpk2); } @@ -370,7 +370,7 @@ #ifdef HAVE_CPLEX try { - LpCplex lp_cplex1,lp_cplex2; + CplexLp lp_cplex1,lp_cplex2; lpTest(lp_cplex1); aTest(lp_cplex2); } catch (CplexEnv::LicenseError& error) { @@ -385,7 +385,7 @@ #ifdef HAVE_SOPLEX { - LpSoplex lp_soplex1,lp_soplex2; + SoplexLp lp_soplex1,lp_soplex2; lpTest(lp_soplex1); aTest(lp_soplex2); } @@ -393,7 +393,7 @@ #ifdef HAVE_CLP { - LpClp lp_clp1,lp_clp2; + ClpLp lp_clp1,lp_clp2; lpTest(lp_clp1); aTest(lp_clp2); } diff --git a/test/mip_test.cc b/test/mip_test.cc --- a/test/mip_test.cc +++ b/test/mip_test.cc @@ -112,14 +112,14 @@ #ifdef HAVE_GLPK { - MipGlpk mip1; + GlpkMip mip1; aTest(mip1); } #endif #ifdef HAVE_CPLEX try { - MipCplex mip2; + CplexMip mip2; aTest(mip2); } catch (CplexEnv::LicenseError& error) { #ifdef LEMON_FORCE_CPLEX_CHECK