change LNS protocol, port examples; bump nuspec version to 2.1.xxxx; various improvements to the solvers

This commit is contained in:
Laurent Perron
2015-11-20 11:32:37 +01:00
parent 0534021274
commit b412d19805
50 changed files with 575 additions and 961 deletions

View File

@@ -27,18 +27,17 @@ import com.google.ortools.linearsolver.MPVariable;
public class IntegerProgramming {
static { System.loadLibrary("jniortools"); }
private static MPSolver createSolver (String solverType) {
try {
return new MPSolver("IntegerProgrammingExample",
MPSolver.OptimizationProblemType.valueOf(solverType));
} catch (java.lang.IllegalArgumentException e) {
return null;
}
private static MPSolver createSolver (String solverType)
throws java.lang.IllegalArgumentException {
return new MPSolver("IntegerProgrammingExample",
MPSolver.OptimizationProblemType.valueOf(solverType));
}
private static void runIntegerProgrammingExample(String solverType) {
MPSolver solver = createSolver(solverType);
if (solver == null) {
MPSolver solver = null;
try {
solver = createSolver(solverType);
} catch (java.lang.IllegalArgumentException e) {
System.out.println("Could not create solver " + solverType);
return;
}