Fix uncapacited_facility_location example

note: calling setNumThreads() when SCIP is compiled without
parallel support make the solver returning error.
This commit is contained in:
Mizux Seiha
2020-07-15 15:51:56 +02:00
parent a3f8f7f206
commit cda6cc5da3

View File

@@ -139,7 +139,8 @@ static void UncapacitatedFacilityLocation(int32 facilities,
std::cout << "LP-Model:\n" << lp_string << std::endl;
}
// Set options and solve
solver.SetNumThreads(8);
if (optimization_problem_type != MPSolver::SCIP_MIXED_INTEGER_PROGRAMMING)
solver.SetNumThreads(8);
solver.EnableOutput();
const MPSolver::ResultStatus result_status = solver.Solve();
// Check that the problem has an optimal solution.