public void enumerate() {
        effectiveCounter = 0;
        feasibleCounter = 0;

        int j = -1;
        do {
            if (j >= 0) {
                cuts[j]--;
            }

            long unused = stockLength;
            int k = -1;
            for (int i = 0; i < cuts.length; i++) {
                if (i > j) {
                    long upperBound = unused / lengths[i];
                    cuts[i] = Math.min(upperBound, demands[i]);
                }

                unused -= cuts[i] * lengths[i];

                if (cuts[i] > 0) {
                    k = i;
                }
            }

            j = k;

            if (unused < stockLength) {
                feasibleCounter++;

                if (unused < minOrderLength) {
                    effectiveCounter++;
                }
            }
        }
        while (j >= 0);
    }