lemon/cplex.cc
changeset 561 6e0525ec5355
parent 540 9db62975c32b
child 576 745e182d0139
equal deleted inserted replaced
2:49dcec20627e 3:d07259082b4d
     1 /* -*- mode: C++; indent-tabs-mode: nil; -*-
     1 /* -*- mode: C++; indent-tabs-mode: nil; -*-
     2  *
     2  *
     3  * This file is a part of LEMON, a generic C++ optimization library.
     3  * This file is a part of LEMON, a generic C++ optimization library.
     4  *
     4  *
     5  * Copyright (C) 2003-2008
     5  * Copyright (C) 2003-2009
     6  * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
     6  * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
     7  * (Egervary Research Group on Combinatorial Optimization, EGRES).
     7  * (Egervary Research Group on Combinatorial Optimization, EGRES).
     8  *
     8  *
     9  * Permission to use, modify and distribute this software is granted
     9  * Permission to use, modify and distribute this software is granted
    10  * provided that this copyright notice appears in all copies. For
    10  * provided that this copyright notice appears in all copies. For
   439   }
   439   }
   440 
   440 
   441   // CplexLp members
   441   // CplexLp members
   442 
   442 
   443   CplexLp::CplexLp()
   443   CplexLp::CplexLp()
   444     : LpBase(), CplexBase(), LpSolver() {}
   444     : LpBase(), LpSolver(), CplexBase() {}
   445 
   445 
   446   CplexLp::CplexLp(const CplexEnv& env)
   446   CplexLp::CplexLp(const CplexEnv& env)
   447     : LpBase(), CplexBase(env), LpSolver() {}
   447     : LpBase(), LpSolver(), CplexBase(env) {}
   448 
   448 
   449   CplexLp::CplexLp(const CplexLp& other)
   449   CplexLp::CplexLp(const CplexLp& other)
   450     : LpBase(), CplexBase(other), LpSolver() {}
   450     : LpBase(), LpSolver(), CplexBase(other) {}
   451 
   451 
   452   CplexLp::~CplexLp() {}
   452   CplexLp::~CplexLp() {}
   453 
   453 
   454   CplexLp* CplexLp::newSolver() const { return new CplexLp; }
   454   CplexLp* CplexLp::newSolver() const { return new CplexLp; }
   455   CplexLp* CplexLp::cloneSolver() const {return new CplexLp(*this); }
   455   CplexLp* CplexLp::cloneSolver() const {return new CplexLp(*this); }
   796   }
   796   }
   797 
   797 
   798   // CplexMip members
   798   // CplexMip members
   799 
   799 
   800   CplexMip::CplexMip()
   800   CplexMip::CplexMip()
   801     : LpBase(), CplexBase(), MipSolver() {
   801     : LpBase(), MipSolver(), CplexBase() {
   802 
   802 
   803 #if CPX_VERSION < 800
   803 #if CPX_VERSION < 800
   804     CPXchgprobtype(cplexEnv(),  _prob, CPXPROB_MIP);
   804     CPXchgprobtype(cplexEnv(),  _prob, CPXPROB_MIP);
   805 #else
   805 #else
   806     CPXchgprobtype(cplexEnv(),  _prob, CPXPROB_MILP);
   806     CPXchgprobtype(cplexEnv(),  _prob, CPXPROB_MILP);
   807 #endif
   807 #endif
   808   }
   808   }
   809 
   809 
   810   CplexMip::CplexMip(const CplexEnv& env)
   810   CplexMip::CplexMip(const CplexEnv& env)
   811     : LpBase(), CplexBase(env), MipSolver() {
   811     : LpBase(), MipSolver(), CplexBase(env) {
   812 
   812 
   813 #if CPX_VERSION < 800
   813 #if CPX_VERSION < 800
   814     CPXchgprobtype(cplexEnv(),  _prob, CPXPROB_MIP);
   814     CPXchgprobtype(cplexEnv(),  _prob, CPXPROB_MIP);
   815 #else
   815 #else
   816     CPXchgprobtype(cplexEnv(),  _prob, CPXPROB_MILP);
   816     CPXchgprobtype(cplexEnv(),  _prob, CPXPROB_MILP);
   817 #endif
   817 #endif
   818 
   818 
   819   }
   819   }
   820 
   820 
   821   CplexMip::CplexMip(const CplexMip& other)
   821   CplexMip::CplexMip(const CplexMip& other)
   822     : LpBase(), CplexBase(other), MipSolver() {}
   822     : LpBase(), MipSolver(), CplexBase(other) {}
   823 
   823 
   824   CplexMip::~CplexMip() {}
   824   CplexMip::~CplexMip() {}
   825 
   825 
   826   CplexMip* CplexMip::newSolver() const { return new CplexMip; }
   826   CplexMip* CplexMip::newSolver() const { return new CplexMip; }
   827   CplexMip* CplexMip::cloneSolver() const {return new CplexMip(*this); }
   827   CplexMip* CplexMip::cloneSolver() const {return new CplexMip(*this); }