1.1 --- a/lemon/cplex.cc Wed Mar 18 16:18:05 2009 +0000
1.2 +++ b/lemon/cplex.cc Thu Mar 19 08:40:34 2009 +0100
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-2008
1.8 + * Copyright (C) 2003-2009
1.9 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
1.10 * (Egervary Research Group on Combinatorial Optimization, EGRES).
1.11 *
1.12 @@ -441,13 +441,13 @@
1.13 // CplexLp members
1.14
1.15 CplexLp::CplexLp()
1.16 - : LpBase(), CplexBase(), LpSolver() {}
1.17 + : LpBase(), LpSolver(), CplexBase() {}
1.18
1.19 CplexLp::CplexLp(const CplexEnv& env)
1.20 - : LpBase(), CplexBase(env), LpSolver() {}
1.21 + : LpBase(), LpSolver(), CplexBase(env) {}
1.22
1.23 CplexLp::CplexLp(const CplexLp& other)
1.24 - : LpBase(), CplexBase(other), LpSolver() {}
1.25 + : LpBase(), LpSolver(), CplexBase(other) {}
1.26
1.27 CplexLp::~CplexLp() {}
1.28
1.29 @@ -798,7 +798,7 @@
1.30 // CplexMip members
1.31
1.32 CplexMip::CplexMip()
1.33 - : LpBase(), CplexBase(), MipSolver() {
1.34 + : LpBase(), MipSolver(), CplexBase() {
1.35
1.36 #if CPX_VERSION < 800
1.37 CPXchgprobtype(cplexEnv(), _prob, CPXPROB_MIP);
1.38 @@ -808,7 +808,7 @@
1.39 }
1.40
1.41 CplexMip::CplexMip(const CplexEnv& env)
1.42 - : LpBase(), CplexBase(env), MipSolver() {
1.43 + : LpBase(), MipSolver(), CplexBase(env) {
1.44
1.45 #if CPX_VERSION < 800
1.46 CPXchgprobtype(cplexEnv(), _prob, CPXPROB_MIP);
1.47 @@ -819,7 +819,7 @@
1.48 }
1.49
1.50 CplexMip::CplexMip(const CplexMip& other)
1.51 - : LpBase(), CplexBase(other), MipSolver() {}
1.52 + : LpBase(), MipSolver(), CplexBase(other) {}
1.53
1.54 CplexMip::~CplexMip() {}
1.55
2.1 --- a/lemon/cplex.h Wed Mar 18 16:18:05 2009 +0000
2.2 +++ b/lemon/cplex.h Thu Mar 19 08:40:34 2009 +0100
2.3 @@ -2,7 +2,7 @@
2.4 *
2.5 * This file is a part of LEMON, a generic C++ optimization library.
2.6 *
2.7 - * Copyright (C) 2003-2008
2.8 + * Copyright (C) 2003-2009
2.9 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
2.10 * (Egervary Research Group on Combinatorial Optimization, EGRES).
2.11 *
2.12 @@ -78,7 +78,7 @@
2.13 /// \brief Base interface for the CPLEX LP and MIP solver
2.14 ///
2.15 /// This class implements the common interface of the CPLEX LP and
2.16 - /// MIP solvers.
2.17 + /// MIP solvers.
2.18 /// \ingroup lp_group
2.19 class CplexBase : virtual public LpBase {
2.20 protected:
2.21 @@ -235,10 +235,13 @@
2.22 /// \e
2.23 virtual ~CplexMip();
2.24
2.25 + /// \e
2.26 + virtual CplexMip* cloneSolver() const;
2.27 + /// \e
2.28 + virtual CplexMip* newSolver() const;
2.29 +
2.30 protected:
2.31
2.32 - virtual CplexMip* _cloneSolver() const;
2.33 - virtual CplexMip* _newSolver() const;
2.34
2.35 virtual const char* _solverName() const;
2.36
3.1 --- a/lemon/glpk.cc Wed Mar 18 16:18:05 2009 +0000
3.2 +++ b/lemon/glpk.cc Thu Mar 19 08:40:34 2009 +0100
3.3 @@ -2,7 +2,7 @@
3.4 *
3.5 * This file is a part of LEMON, a generic C++ optimization library.
3.6 *
3.7 - * Copyright (C) 2003-2008
3.8 + * Copyright (C) 2003-2009
3.9 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
3.10 * (Egervary Research Group on Combinatorial Optimization, EGRES).
3.11 *
3.12 @@ -531,12 +531,12 @@
3.13 // GlpkLp members
3.14
3.15 GlpkLp::GlpkLp()
3.16 - : LpBase(), GlpkBase(), LpSolver() {
3.17 + : LpBase(), LpSolver(), GlpkBase() {
3.18 messageLevel(MESSAGE_NO_OUTPUT);
3.19 }
3.20
3.21 GlpkLp::GlpkLp(const GlpkLp& other)
3.22 - : LpBase(other), GlpkBase(other), LpSolver(other) {
3.23 + : LpBase(other), LpSolver(other), GlpkBase(other) {
3.24 messageLevel(MESSAGE_NO_OUTPUT);
3.25 }
3.26
3.27 @@ -830,12 +830,12 @@
3.28 // GlpkMip members
3.29
3.30 GlpkMip::GlpkMip()
3.31 - : LpBase(), GlpkBase(), MipSolver() {
3.32 + : LpBase(), MipSolver(), GlpkBase() {
3.33 messageLevel(MESSAGE_NO_OUTPUT);
3.34 }
3.35
3.36 GlpkMip::GlpkMip(const GlpkMip& other)
3.37 - : LpBase(), GlpkBase(other), MipSolver() {
3.38 + : LpBase(), MipSolver(), GlpkBase(other) {
3.39 messageLevel(MESSAGE_NO_OUTPUT);
3.40 }
3.41
4.1 --- a/test/lp_test.cc Wed Mar 18 16:18:05 2009 +0000
4.2 +++ b/test/lp_test.cc Thu Mar 19 08:40:34 2009 +0100
4.3 @@ -2,7 +2,7 @@
4.4 *
4.5 * This file is a part of LEMON, a generic C++ optimization library.
4.6 *
4.7 - * Copyright (C) 2003-2008
4.8 + * Copyright (C) 2003-2009
4.9 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
4.10 * (Egervary Research Group on Combinatorial Optimization, EGRES).
4.11 *
4.12 @@ -365,7 +365,7 @@
4.13 void cloneTest()
4.14 {
4.15 //Test for clone/new
4.16 -
4.17 +
4.18 LP* lp = new LP();
4.19 LP* lpnew = lp->newSolver();
4.20 LP* lpclone = lp->cloneSolver();
4.21 @@ -393,6 +393,7 @@
4.22 CplexLp lp_cplex1,lp_cplex2;
4.23 lpTest(lp_cplex1);
4.24 aTest(lp_cplex2);
4.25 + cloneTest<CplexLp>();
4.26 } catch (CplexEnv::LicenseError& error) {
4.27 #ifdef LEMON_FORCE_CPLEX_CHECK
4.28 check(false, error.what());
4.29 @@ -401,7 +402,6 @@
4.30 std::cerr << "Cplex license check failed, lp check skipped" << std::endl;
4.31 #endif
4.32 }
4.33 - cloneTest<CplexLp>();
4.34 #endif
4.35
4.36 #ifdef HAVE_SOPLEX
5.1 --- a/test/mip_test.cc Wed Mar 18 16:18:05 2009 +0000
5.2 +++ b/test/mip_test.cc Thu Mar 19 08:40:34 2009 +0100
5.3 @@ -2,7 +2,7 @@
5.4 *
5.5 * This file is a part of LEMON, a generic C++ optimization library.
5.6 *
5.7 - * Copyright (C) 2003-2008
5.8 + * Copyright (C) 2003-2009
5.9 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
5.10 * (Egervary Research Group on Combinatorial Optimization, EGRES).
5.11 *
5.12 @@ -109,7 +109,7 @@
5.13 template<class MIP>
5.14 void cloneTest()
5.15 {
5.16 -
5.17 +
5.18 MIP* mip = new MIP();
5.19 MIP* mipnew = mip->newSolver();
5.20 MIP* mipclone = mip->cloneSolver();
5.21 @@ -133,6 +133,7 @@
5.22 try {
5.23 CplexMip mip2;
5.24 aTest(mip2);
5.25 + cloneTest<CplexMip>();
5.26 } catch (CplexEnv::LicenseError& error) {
5.27 #ifdef LEMON_FORCE_CPLEX_CHECK
5.28 check(false, error.what());
5.29 @@ -141,7 +142,6 @@
5.30 std::cerr << "Cplex license check failed, lp check skipped" << std::endl;
5.31 #endif
5.32 }
5.33 - cloneTest<CplexMip>();
5.34 #endif
5.35
5.36 return 0;