def _compute_variables_indices(self):
        """
        Computes and saves the index location of each variable (as a list) in the objectives
        space and in the model space. If no categorical variables are available, these two are
        equivalent.
        """

        counter_objective = 0
        counter_model     = 0

        for variable in self.space_expanded:
            variable.set_index_in_objective([counter_objective])
            counter_objective +=1

            if variable.type is not 'categorical':
                variable.set_index_in_model([counter_model])
                counter_model +=1
            else:
                num_categories = len(variable.domain)
                variable.set_index_in_model(list(range(counter_model,counter_model + num_categories)))
                counter_model +=num_categories
Computes and saves the index location of each variable (as a list) in the objectives
        space and in the model space. If no categorical variables are available, these two are
        equivalent.