| ... | ... |
@@ -134,50 +134,48 @@ |
| 134 | 134 |
|
| 135 | 135 |
private: |
| 136 | 136 |
|
| 137 | 137 |
mutable std::vector<double> _primal_ray; |
| 138 | 138 |
mutable std::vector<double> _dual_ray; |
| 139 | 139 |
|
| 140 | 140 |
void _clear_temporals(); |
| 141 | 141 |
|
| 142 | 142 |
protected: |
| 143 | 143 |
|
| 144 | 144 |
virtual const char* _solverName() const; |
| 145 | 145 |
|
| 146 | 146 |
virtual SolveExitStatus _solve(); |
| 147 | 147 |
virtual Value _getPrimal(int i) const; |
| 148 | 148 |
virtual Value _getDual(int i) const; |
| 149 | 149 |
|
| 150 | 150 |
virtual Value _getPrimalValue() const; |
| 151 | 151 |
|
| 152 | 152 |
virtual VarStatus _getColStatus(int i) const; |
| 153 | 153 |
virtual VarStatus _getRowStatus(int i) const; |
| 154 | 154 |
|
| 155 | 155 |
virtual Value _getPrimalRay(int i) const; |
| 156 | 156 |
virtual Value _getDualRay(int i) const; |
| 157 | 157 |
|
| 158 |
///\todo It should be clarified |
|
| 159 |
/// |
|
| 160 | 158 |
virtual ProblemType _getPrimalType() const; |
| 161 | 159 |
virtual ProblemType _getDualType() const; |
| 162 | 160 |
|
| 163 | 161 |
public: |
| 164 | 162 |
|
| 165 | 163 |
///Solve with primal simplex |
| 166 | 164 |
SolveExitStatus solvePrimal(); |
| 167 | 165 |
|
| 168 | 166 |
///Solve with dual simplex |
| 169 | 167 |
SolveExitStatus solveDual(); |
| 170 | 168 |
|
| 171 | 169 |
///Turns on or off the presolver |
| 172 | 170 |
|
| 173 | 171 |
///Turns on (\c b is \c true) or off (\c b is \c false) the presolver |
| 174 | 172 |
/// |
| 175 | 173 |
///The presolver is off by default. |
| 176 | 174 |
void presolver(bool b); |
| 177 | 175 |
|
| 178 | 176 |
///Enum for \c messageLevel() parameter |
| 179 | 177 |
enum MessageLevel {
|
| 180 | 178 |
/// no output (default value) |
| 181 | 179 |
MESSAGE_NO_OUTPUT = 0, |
| 182 | 180 |
/// error messages only |
| 183 | 181 |
MESSAGE_ERROR_MESSAGE = 1, |
| ... | ... |
@@ -184,54 +184,42 @@ |
| 184 | 184 |
///\e |
| 185 | 185 |
virtual VarStatus _getRowStatus(int i) const; |
| 186 | 186 |
|
| 187 | 187 |
///\e |
| 188 | 188 |
virtual const char* _solverName() const; |
| 189 | 189 |
|
| 190 | 190 |
}; |
| 191 | 191 |
|
| 192 | 192 |
/// \brief Skeleton class for a MIP solver interface |
| 193 | 193 |
/// |
| 194 | 194 |
///This class does nothing, but it can serve as a skeleton when |
| 195 | 195 |
///implementing an interface to new solvers. |
| 196 | 196 |
///\ingroup lp_group |
| 197 | 197 |
class MipSkeleton : public MipSolver, public SkeletonSolverBase {
|
| 198 | 198 |
public: |
| 199 | 199 |
///\e |
| 200 | 200 |
MipSkeleton() : MipSolver(), SkeletonSolverBase() {}
|
| 201 | 201 |
///\e |
| 202 | 202 |
virtual MipSkeleton* newSolver() const; |
| 203 | 203 |
///\e |
| 204 | 204 |
virtual MipSkeleton* cloneSolver() const; |
| 205 | 205 |
|
| 206 | 206 |
protected: |
| 207 | 207 |
///\e |
| 208 |
|
|
| 209 |
///\bug Wrong interface |
|
| 210 |
/// |
|
| 211 | 208 |
virtual SolveExitStatus _solve(); |
| 212 | 209 |
|
| 213 | 210 |
///\e |
| 214 |
|
|
| 215 |
///\bug Wrong interface |
|
| 216 |
/// |
|
| 217 | 211 |
virtual Value _getSol(int i) const; |
| 218 | 212 |
|
| 219 | 213 |
///\e |
| 220 |
|
|
| 221 |
///\bug Wrong interface |
|
| 222 |
/// |
|
| 223 | 214 |
virtual Value _getSolValue() const; |
| 224 | 215 |
|
| 225 | 216 |
///\e |
| 226 |
|
|
| 227 |
///\bug Wrong interface |
|
| 228 |
/// |
|
| 229 | 217 |
virtual ProblemType _getType() const; |
| 230 | 218 |
|
| 231 | 219 |
///\e |
| 232 | 220 |
virtual const char* _solverName() const; |
| 233 | 221 |
}; |
| 234 | 222 |
|
| 235 | 223 |
} //namespace lemon |
| 236 | 224 |
|
| 237 | 225 |
#endif |
0 comments (0 inline)