change CP-SAT C++ Api to call Build() on the model before solving; use log_search_progress parameters to display all log; enable this parameter in non C++ language; call InitGoogleLogging() automatically in non C++ languages
This commit is contained in:
@@ -398,7 +398,7 @@ class NetworkRoutingSolver {
|
||||
parameters.set_enumerate_all_solutions(true);
|
||||
model.Add(NewSatParameters(parameters));
|
||||
|
||||
SolveWithModel(cp_model, &model);
|
||||
SolveWithModel(cp_model.Build(), &model);
|
||||
}
|
||||
|
||||
// This method will fill the all_paths_ data structure. all_paths
|
||||
@@ -643,7 +643,7 @@ class NetworkRoutingSolver {
|
||||
}
|
||||
num_solutions++;
|
||||
}));
|
||||
const CpSolverResponse response = SolveWithModel(cp_model, &model);
|
||||
const CpSolverResponse response = SolveWithModel(cp_model.Build(), &model);
|
||||
return response.objective_value();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user