Skip to content

Commit

Permalink
Extract XLSX common code from conference scheduling example
Browse files Browse the repository at this point in the history
  • Loading branch information
ge0ffrey committed May 25, 2018
1 parent 3bba38d commit 9d68792
Show file tree
Hide file tree
Showing 18 changed files with 517 additions and 363 deletions.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Expand Up @@ -19,13 +19,10 @@
import java.io.File; import java.io.File;
import java.math.BigInteger; import java.math.BigInteger;
import java.math.RoundingMode; import java.math.RoundingMode;
import java.util.Arrays;


import com.google.common.math.BigIntegerMath; import com.google.common.math.BigIntegerMath;
import org.optaplanner.core.api.domain.solution.PlanningSolution; import org.optaplanner.core.api.domain.solution.PlanningSolution;
import org.optaplanner.examples.common.app.LoggingMain; import org.optaplanner.examples.common.app.LoggingMain;
import org.optaplanner.examples.common.business.ProblemFileComparator;
import org.optaplanner.persistence.common.api.domain.solution.SolutionFileIO;


/** /**
* @param <Solution_> the solution type, the class with the {@link PlanningSolution} annotation * @param <Solution_> the solution type, the class with the {@link PlanningSolution} annotation
Expand All @@ -49,18 +46,18 @@ public boolean isInputFileDirectory() {


public static abstract class InputBuilder extends LoggingMain { public static abstract class InputBuilder extends LoggingMain {


public static BigInteger factorial(int base) { }
if (base > 100000) {
// Calculation takes too long
return null;
}
BigInteger value = BigInteger.ONE;
for (int i = 1; i <= base; i++) {
value = value.multiply(BigInteger.valueOf(i));
}
return value;
}


public static BigInteger factorial(int base) {
if (base > 100000) {
// Calculation takes too long
return null;
}
BigInteger value = BigInteger.ONE;
for (int i = 1; i <= base; i++) {
value = value.multiply(BigInteger.valueOf(i));
}
return value;
} }


public static String getFlooredPossibleSolutionSize(BigInteger possibleSolutionSize) { public static String getFlooredPossibleSolutionSize(BigInteger possibleSolutionSize) {
Expand Down

0 comments on commit 9d68792

Please sign in to comment.