Add soplex support to scripts/bootstrap.sh plus...
it checks whether cbc and soplex are installed at the given prefix.
1 /* -*- mode: C++; indent-tabs-mode: nil; -*-
3 * This file is a part of LEMON, a generic C++ optimization library.
5 * Copyright (C) 2003-2008
6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
7 * (Egervary Research Group on Combinatorial Optimization, EGRES).
9 * Permission to use, modify and distribute this software is granted
10 * provided that this copyright notice appears in all copies. For
11 * precise terms see the accompanying LICENSE file.
13 * This software is provided "AS IS" with no warranty of any kind,
14 * express or implied, and with no claim as to its suitability for any
19 #ifndef LEMON_SOPLEX_H
20 #define LEMON_SOPLEX_H
23 ///\brief Header of the LEMON-SOPLEX lp solver interface.
28 #include <lemon/lp_base.h>
30 // Forward declaration
39 /// \brief Interface for the SOPLEX solver
41 /// This class implements an interface for the SoPlex LP solver.
42 /// The SoPlex library is an object oriented lp solver library
43 /// developed at the Konrad-Zuse-Zentrum für Informationstechnik
44 /// Berlin (ZIB). You can find detailed information about it at the
45 /// <tt>http://soplex.zib.de</tt> address.
46 class SoplexLp : public LpSolver {
49 soplex::SoPlex* soplex;
51 std::vector<std::string> _col_names;
52 std::map<std::string, int> _col_names_ref;
54 std::vector<std::string> _row_names;
55 std::map<std::string, int> _row_names_ref;
59 // these values cannot be retrieved element by element
60 mutable std::vector<Value> _primal_values;
61 mutable std::vector<Value> _dual_values;
63 mutable std::vector<Value> _primal_ray;
64 mutable std::vector<Value> _dual_ray;
66 void _clear_temporals();
73 SoplexLp(const SoplexLp&);
77 virtual SoplexLp* newSolver() const;
79 virtual SoplexLp* cloneSolver() const;
83 virtual const char* _solverName() const;
85 virtual int _addCol();
86 virtual int _addRow();
87 virtual int _addRow(Value l, ExprIterator b, ExprIterator e, Value u);
89 virtual void _eraseCol(int i);
90 virtual void _eraseRow(int i);
92 virtual void _eraseColId(int i);
93 virtual void _eraseRowId(int i);
95 virtual void _getColName(int col, std::string& name) const;
96 virtual void _setColName(int col, const std::string& name);
97 virtual int _colByName(const std::string& name) const;
99 virtual void _getRowName(int row, std::string& name) const;
100 virtual void _setRowName(int row, const std::string& name);
101 virtual int _rowByName(const std::string& name) const;
103 virtual void _setRowCoeffs(int i, ExprIterator b, ExprIterator e);
104 virtual void _getRowCoeffs(int i, InsertIterator b) const;
106 virtual void _setColCoeffs(int i, ExprIterator b, ExprIterator e);
107 virtual void _getColCoeffs(int i, InsertIterator b) const;
109 virtual void _setCoeff(int row, int col, Value value);
110 virtual Value _getCoeff(int row, int col) const;
112 virtual void _setColLowerBound(int i, Value value);
113 virtual Value _getColLowerBound(int i) const;
114 virtual void _setColUpperBound(int i, Value value);
115 virtual Value _getColUpperBound(int i) const;
117 virtual void _setRowLowerBound(int i, Value value);
118 virtual Value _getRowLowerBound(int i) const;
119 virtual void _setRowUpperBound(int i, Value value);
120 virtual Value _getRowUpperBound(int i) const;
122 virtual void _setObjCoeffs(ExprIterator b, ExprIterator e);
123 virtual void _getObjCoeffs(InsertIterator b) const;
125 virtual void _setObjCoeff(int i, Value obj_coef);
126 virtual Value _getObjCoeff(int i) const;
128 virtual void _setSense(Sense sense);
129 virtual Sense _getSense() const;
131 virtual SolveExitStatus _solve();
132 virtual Value _getPrimal(int i) const;
133 virtual Value _getDual(int i) const;
135 virtual Value _getPrimalValue() const;
137 virtual Value _getPrimalRay(int i) const;
138 virtual Value _getDualRay(int i) const;
140 virtual VarStatus _getColStatus(int i) const;
141 virtual VarStatus _getRowStatus(int i) const;
143 virtual ProblemType _getPrimalType() const;
144 virtual ProblemType _getDualType() const;
146 virtual void _clear();
148 void _messageLevel(MessageLevel m);
149 void _applyMessageLevel();
155 } //END OF NAMESPACE LEMON
157 #endif //LEMON_SOPLEX_H