def set_stop(lattice, s):
    """
    Sets the stop longitudinal position s by removing any existing stop elements,
    and inserting a new stop element at the beginning. 
    
    Returns a tuple:
        lattice, list of removed_eles
    """
    lat = []
    removed_eles = []
    for ele in lattice:
        if ele['type'] == 'stop':
            removed_eles.append(ele)
            
        else:
            lat.append(ele)
            
    stop_ele = {'name':'stop_1', 'type':'stop', 's':s}        
    lat.append(stop_ele)
    return lat, removed_eles