revamp and simplify swig support, force typed enums for C# and Java for all except the constraint_solver/routing module; port examples; Fix SAT on very large problems
This commit is contained in:
@@ -39,10 +39,10 @@ public class CsIntegerProgramming
|
||||
ct.SetCoefficient(x1, 3);
|
||||
ct.SetCoefficient(x2, 2);
|
||||
|
||||
int resultStatus = solver.Solve();
|
||||
Solver.ResultStatus resultStatus = solver.Solve();
|
||||
|
||||
// Check that the problem has an optimal solution.
|
||||
if (resultStatus != Solver.OPTIMAL)
|
||||
if (resultStatus != Solver.ResultStatus.OPTIMAL)
|
||||
{
|
||||
Console.WriteLine("The problem does not have an optimal solution!");
|
||||
return;
|
||||
@@ -78,10 +78,10 @@ public class CsIntegerProgramming
|
||||
solver.Minimize(x1 + 2 * x2);
|
||||
solver.Add(2 * x2 + 3 * x1 >= 17);
|
||||
|
||||
int resultStatus = solver.Solve();
|
||||
Solver.ResultStatus resultStatus = solver.Solve();
|
||||
|
||||
// Check that the problem has an optimal solution.
|
||||
if (resultStatus != Solver.OPTIMAL)
|
||||
if (resultStatus != Solver.ResultStatus.OPTIMAL)
|
||||
{
|
||||
Console.WriteLine("The problem does not have an optimal solution!");
|
||||
return;
|
||||
|
||||
@@ -57,10 +57,10 @@ public class CsLinearProgramming
|
||||
Console.WriteLine("Number of variables = " + solver.NumVariables());
|
||||
Console.WriteLine("Number of constraints = " + solver.NumConstraints());
|
||||
|
||||
int resultStatus = solver.Solve();
|
||||
Solver.ResultStatus resultStatus = solver.Solve();
|
||||
|
||||
// Check that the problem has an optimal solution.
|
||||
if (resultStatus != Solver.OPTIMAL) {
|
||||
if (resultStatus != Solver.ResultStatus.OPTIMAL) {
|
||||
Console.WriteLine("The problem does not have an optimal solution!");
|
||||
return;
|
||||
}
|
||||
@@ -120,10 +120,10 @@ public class CsLinearProgramming
|
||||
Console.WriteLine(model);
|
||||
}
|
||||
|
||||
int resultStatus = solver.Solve();
|
||||
Solver.ResultStatus resultStatus = solver.Solve();
|
||||
|
||||
// Check that the problem has an optimal solution.
|
||||
if (resultStatus != Solver.OPTIMAL) {
|
||||
if (resultStatus != Solver.ResultStatus.OPTIMAL) {
|
||||
Console.WriteLine("The problem does not have an optimal solution!");
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user