import choco.kernel.model.constraints.Constraint; import static choco.Choco.*; import choco.cp.model.CPModel; import choco.cp.solver.CPSolver; import choco.kernel.model.Model; import choco.kernel.model.variables.integer.IntegerVariable; public class Ramsey { public static void main(String[] args) { Model m = new CPModel(); int nNodes = Integer.parseInt(args[0]); int nColours = Integer.parseInt(args[1]); // linkColour is an nNodes by nNodes matrix of colours of links between nodes. // The colour of the link between node i and node j is linkColour[i][j] // The colour is represented by an integer. // Only the upper triangle (excluding main diagonal) will be used IntegerVariable[][] linkColour = new IntegerVariable[nNodes][nNodes]; // Create upper triangular matrix of edge colours: for (int i=0; i