def preprocess_net(net, every_min, input_data_resolution=5):
    """ Function that mainly performs the following tasks:
            - Remove all previous loads modelled in net
              and create a new single load named as agg_load.
            - Adapts the ramps up/down according to the configured
              time to run OPF.
            - Change set up commitable for all gen as False
    
    Parameters
    ----------
    net : PyPSA instance
    every_min : int 
        [description]
    input_data_resolution : int, optional
        [description], by default 5
    
    Returns
    -------
    PyPSA instance
        Modified PyPSA grid
    """
    net.mremove('Load', names=net.loads.index)
    net.add('Load', name='agg_load', bus=net.buses.index.tolist()[0])
    steps = every_min / input_data_resolution
    net.generators.loc[:, (['ramp_limit_up', 'ramp_limit_down'])] *= steps
    net.generators.commitable = False
    return net
