def BRM_control_brick_wall_penalty(new_position,low_bounds,up_bounds):
    """
    Bondary control function (Brick wall penalty).
    If any parameter of a vector falls beyond the pre-defined lower or upper bounds, objective function value of the vector is made high enough (by afixed big number) to guarantee that it never gets selected [1].
    
    [1] K. Price, R. Storn, and J. Lampinen, Differential Evolution—A Practical Approach to Global Optimization. Berlin, Germany: Springer, 2005.

    Parameters:
        new_position: array
            The solution array
        low_bounds: array
            Array containing the lowest boundaries the solution array might have for one particle
        up_bounds: array
            Array containing the highest boundaries the solution array might have for one particle

    Returns: array
        The new solution array after checking if solution values are within the boundaries
    """

    # Brick wall penalty
    for i in range(len(new_position)):
        if new_position[i]>up_bounds[i] or new_position[i]<low_bounds[i]:
            return new_position, 1000000
    return new_position, 0