public int location(T chromosome) {
        int[] position = new int[numberOfObjectives];

        for (int obj = 0; obj < numberOfObjectives; obj++) {
            if (chromosome.getObjective(obj) > upperLimits[obj] || chromosome.getObjective(obj) < lowerLimits[obj]) {
                return -1;
            } else if (chromosome.getObjective(obj) == lowerLimits[obj]) {
                position[obj] = 0;
            } else if (chromosome.getObjective(obj) == upperLimits[obj]) {
                position[obj] = ((int) Math.pow(2.0, numberOfBisections)) - 1;
            } else {
                double tmpSize = divisionSize[obj];
                double objectiveValue = chromosome.getObjective(obj);
                double account = lowerLimits[obj];
                int ranges = (int) Math.pow(2.0, numberOfBisections);
                for (int b = 0; b < numberOfBisections; b++) {
                    tmpSize /= 2.0;
                    ranges /= 2;
                    if (objectiveValue > (account + tmpSize)) {
                        position[obj] += ranges;
                        account += tmpSize;
                    }
                }
            }
        }

        int location = 0;
        for (int obj = 0; obj < numberOfObjectives; obj++) {
            location += position[obj] * Math.pow(2.0, obj * numberOfBisections);
        }
        return location;
    }