def get_changed_vars_threshold(current_changed_vars, max_changed_vars):
    """Calculates the constraint 1 (g1), where the number of variables 
    (columns) changed must be less than or equal to the limit defined by
    max_changed_vars.

    :param current_changed_vars: the number of variables changed per individual
    :type current_changed_vars: numpy.array
    :param max_changed_vars: the maximum allowed number of changed variables
    :type max_changed_vars: Integer
    
    :return: an array containing the result of the constraint comparison. Each 
        element represents the results for an individual
    :rtype: np.array
    """
    # g1: current_changed_vars needs to be less than or equal to max_changed_var
    return current_changed_vars - max_changed_vars