remove MPSolver::IsLPFormat
This commit is contained in:
@@ -2541,7 +2541,6 @@ class Solver {
|
||||
DecisionBuilder* const first_solution,
|
||||
LocalSearchPhaseParameters* const parameters);
|
||||
|
||||
|
||||
// Solution Pool.
|
||||
SolutionPool* MakeDefaultSolutionPool();
|
||||
|
||||
|
||||
@@ -3132,5 +3132,4 @@ DecisionBuilder* Solver::MakeLocalSearchPhase(
|
||||
parameters->limit(),
|
||||
parameters->filters()));
|
||||
}
|
||||
|
||||
} // namespace operations_research
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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());
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user