Skip to content

Instantly share code, notes, and snippets.

@thetric
thetric / PizzaConf.java
Created June 3, 2020 12:34
Spicy pizza configurator
import org.chocosolver.solver.Model;
import org.chocosolver.solver.Solver;
import org.chocosolver.solver.constraints.Constraint;
import org.chocosolver.solver.exception.ContradictionException;
import org.chocosolver.solver.variables.BoolVar;
import org.chocosolver.solver.variables.IntVar;
public class PizzaConf {
Model m = new Model();
Solver s = m.getSolver();
@thetric
thetric / QuickXplain.java
Created April 30, 2020 13:42
QuickXplain.java
import org.chocosolver.solver.Model;
import org.chocosolver.solver.constraints.Constraint;
import org.chocosolver.solver.exception.ContradictionException;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashSet;
import java.util.List;
//QuickXPlain Algorithm "Ulrich Junker"
@thetric
thetric / NonLinearReverting.java
Created April 30, 2020 13:41
NonLinearReverting.java
import org.chocosolver.solver.Model;
import org.chocosolver.solver.constraints.Constraint;
import org.chocosolver.solver.exception.ContradictionException;
import org.chocosolver.solver.variables.IntVar;
import java.util.List;
public class NonLinearReverting {
public static void main(String[] args) throws ContradictionException {
// the final output of both methods should be the same