pvpumpingsystem.sizing.sizing_minimize_npv

pvpumpingsystem.sizing.sizing_minimize_npv(pv_database, pump_database, weather_data, weather_metadata, pvps_fixture, llp_accepted=0.01, M_s_guess=None, M_p_guess=None, **kwargs)

Function returning the configuration of PV modules and pump that minimizes the net present value (NPV) of the system and ensures that the Loss of Load Probability (llp) is inferior to the ‘llp_accepted’.

It proceeds by sizing the number of PV module needed to respect ‘llp_accepted’ for each combination of pump and pv module. If the combination does not allow to respect ‘llp_accepted’ in any case, it is discarded. Then the combination with the lowest NPV is returned as the solution (first element of the tuple returned). All combinations details are also returned (second element of the tuple returned).

Parameters:
  • pv_database (list of strings,) – List of pv module names to try. If name is not eact, it will search a pv module database to find the best match.
  • pump_database (list of pvpumpingssytem.Pump objects) – List of motor-pump to try.
  • weather_data (pd.DataFrame) – Weather data of the location. Typically comes from pvlib.iotools.epw.read_epw()
  • weather_metadata (dict) – Weather file metadata of the location. Typically comes from pvlib.iotools.epw.read_epw()
  • pvps_fixture (pvpumpingsystem.PVPumpSystem object) – The PV pumping system to size.
  • llp_accepted (float, between 0 and 1) – Maximum Loss of Load Probability that can be accepted.
  • M_S_guess (integer,) – Estimated number of modules in series in the PV array. Will be sized by the function.
  • **kwargs (dict,) – Keyword arguments internally given to py:func:PVPumpSystem.run_model(). Made for giving the financial parameters of the project.
Returns:

First element is a pandas.DataFrame containing the configuration that minimizes the net present value (NPV) of the system. This first element can contain more than one configuration if multiple configurations have the exact same NPV which also turns to be the minimum. Second element is a pandas.DataFrame containing all configurations tested respecting the LLP.

Return type:

tuple