AC all different in the SAT solver; change the way integer variables are encoded on top of boolean variables in the SAT solver; change protobuf utilities

This commit is contained in:
Laurent Perron
2017-06-08 12:33:16 +02:00
parent 382d9939b3
commit 6609fac882
40 changed files with 1227 additions and 581 deletions

View File

@@ -51,7 +51,6 @@ DEFINE_string(params, "",
"them (i.e. in case of conflicts, --params wins)");
using operations_research::FullProtocolMessageAsString;
using operations_research::ReadFileToProto;
using operations_research::glop::GetProblemStatusString;
using operations_research::glop::GlopParameters;
using operations_research::glop::LinearProgram;
@@ -103,7 +102,7 @@ int main(int argc, char* argv[]) {
continue;
}
} else {
ReadFileToProto(file_name, &model_proto);
file::ReadFileToProto(file_name, &model_proto);
MPModelProtoToLinearProgram(model_proto, &linear_program);
}
if (FLAGS_mps_dump_problem) {

View File

@@ -33,7 +33,7 @@
#include "ortools/lp_data/lp_data.h"
#include "ortools/lp_data/mps_reader.h"
#include "ortools/lp_data/proto_utils.h"
#include "ortools/util/proto_tools.h"
#include "ortools/util/file_util.h"
DEFINE_string(input, "", "REQUIRED: Input file name.");
DEFINE_string(solver, "glop",
@@ -164,8 +164,8 @@ void Run() {
LinearProgramToMPModelProto(linear_program_fixed, &model_proto);
}
} else {
ReadFileToProto(FLAGS_input, &model_proto);
ReadFileToProto(FLAGS_input, &request_proto);
file::ReadFileToProto(FLAGS_input, &model_proto);
file::ReadFileToProto(FLAGS_input, &request_proto);
// If the input proto is in binary format, both ReadFileToProto could return
// true. Instead use the actual number of variables found to test the
// correct format of the input.