remove MPSolver::IsLPFormat

This commit is contained in:
lperron@google.com
2011-11-07 18:51:12 +00:00
parent b3bea24e4e
commit 5281512d4d
6 changed files with 2 additions and 10 deletions

View File

@@ -2541,7 +2541,6 @@ class Solver {
DecisionBuilder* const first_solution,
LocalSearchPhaseParameters* const parameters);
// Solution Pool.
SolutionPool* MakeDefaultSolutionPool();

View File

@@ -3132,5 +3132,4 @@ DecisionBuilder* Solver::MakeLocalSearchPhase(
parameters->limit(),
parameters->filters()));
}
} // namespace operations_research

View File

@@ -229,7 +229,7 @@ void CBCInterface::SetOptimizationDirection(bool maximize) {
}
void CBCInterface::WriteModel(const string& filename) {
if (solver_->IsLPFormat(filename)) {
if (HasSuffixString(filename, ".lp")) {
osi_.writeLp(filename.c_str(), "");
} else {
// If filename does not end in ".gz", CBC will

View File

@@ -244,7 +244,7 @@ void GLPKInterface::Reset() {
}
void GLPKInterface::WriteModel(const string& filename) {
if (solver_->IsLPFormat(filename)) {
if (HasSuffixString(filename, ".lp")) {
glp_write_lp(lp_, NULL, filename.c_str());
} else {
glp_write_mps(lp_, GLP_MPS_DECK, NULL, filename.c_str());

View File

@@ -366,11 +366,6 @@ class MPSolver {
return write_model_filename_;
}
// Returns true if filename ends in ".lp".
bool IsLPFormat(const string &filename) {
return HasSuffixString (filename, ".lp");
}
void set_time_limit(int64 time_limit) {
DCHECK_GE(time_limit, 0);
time_limit_ = time_limit;

View File

@@ -405,7 +405,6 @@ namespace operations_research {
%rename (clearObjective) MPSolver::ClearObjective;
%rename (computeExactConditionNumber) MPSolver::ComputeExactConditionNumber;
%rename (init) MPSolver::Init;
%rename (isLpFormat) MPSolver::IsLPFormat;
%rename (loadModel) MPSolver::LoadModel;
%rename (makeBoolVar) MPSolver::MakeBoolVar;
%rename (makeIntVar) MPSolver::MakeIntVar;