Skip to content

Instantly share code, notes, and snippets.

@thetric
thetric / PizzaConf.java
Created Jun 3, 2020
Spicy pizza configurator
View PizzaConf.java
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();
View 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 Apr 30, 2020
NonLinearReverting.java
View 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