public void generateConstraints(int d, ArrayList<Constraint> candidateKomb, ArrayList<ArrayList<Constraint>> candidatesList) {
	if (d == candidatesList.size()) {
		Constraint c = new Constraint(this,candidateKomb);
//	@@@
//		if (this.instance.checkConstraintsState(c) < 3) {
			if (!exists(c) && c.isValid()) {
				this.addConstraint(c);
//				this.instance.updateConstraintsState(c);
			} 
//		} else {
//			System.out.println("generateConstraints(I):HEURISTIC RULE:FORBIDDEN CONSTRAINT:"+c);
//		}
		return;
	  }
		for (int k = 0; k < candidatesList.get(d).size(); k++) {
			ArrayList<Constraint> copyCandidateKomb = new ArrayList<Constraint>(candidateKomb);
			Constraint nextCandidate = candidatesList.get(d).get(k);
			if (d>0) {
				Constraint previousCandidate = candidateKomb.get(d-1);
				int firstfree =  previousCandidate.getFirstFreePosition();
				int lastfree = nextCandidate.getLastFreePosition();
				if (lastfree-firstfree>=0) {
					copyCandidateKomb.add(nextCandidate);
					generateConstraints(d + 1, copyCandidateKomb, candidatesList);
				}
			} else {
				copyCandidateKomb.add(nextCandidate);
				generateConstraints(d + 1, copyCandidateKomb, candidatesList);
			}
	  }
	  return;
	}