* the current solution from the set of possible solutions
* @return current solution
*/
private Solution nonTrivialSolution() {
try {
final SATSolver cnf = translation.cnf();
options.reporter().solvingCNF(translation.numPrimaryVariables(), cnf.numberOfVariables(), cnf.numberOfClauses());
final long startSolve = System.currentTimeMillis();
final boolean isSat = cnf.solve();
final long endSolve = System.currentTimeMillis();
final Statistics stats = new Statistics(translation, translTime, endSolve - startSolve);
if (isSat) {
// extract the current solution; can't use the sat(..) method because it frees the sat solver
final Solution sol = Solution.satisfiable(stats, padInstance(translation.interpret(), bounds));
// add the negation of the current model to the solver
final int primary = translation.numPrimaryVariables();
final int[] notModel = new int[primary];
for(int i = 1; i <= primary; i++) {
notModel[i-1] = cnf.valueOf(i) ? -i : i;
}
cnf.addClause(notModel);
return sol;
} else {
formula = null; bounds = null; // unsat, no more solutions, free up some space
return unsat(translation, stats);
}