pvcompare.main.apply_pvcompare

pvcompare.main.apply_pvcompare(storeys, country=None, latitude=None, longitude=None, year=None, static_inputs_directory=None, user_inputs_pvcompare_directory=None, user_inputs_mvs_directory=None, collections_mvs_inputs_directory=None, plot=False, pv_setup=None, overwrite_grid_parameters=True, overwrite_pv_parameters=True, overwrite_heat_parameters=True)[source]

Runs the main functionalities of pvcompare.

Loads weather data for the given year and location, calculates pv feed-in time series, as well as the nominal values /installation capacities based on the building parameters. Additionally, COPs are calculated if a heat pump is added to the energy system.

Parameters
  • storeys (int) – Number of storeys for which the demand is calculated.

  • country – Country of the location. Default: None.

  • latitude (float or None) – Latitude of country location in country. Default: None.

  • longitude (float or None) – Longitude of country location in country. Default: None.

  • year (int) – Year of the simulation. Default: None.

  • static_inputs_directory (str or None) – Path to pvcompare static inputs. If None, constants.DEFAULT_STATIC_INPUTS_DIRECTORY is used. Default: None.

  • user_inputs_pvcompare_directory (str or None) – Path to user input directory. If None, constants.DEFAULT_USER_INPUTS_PVCOMPARE_DIRECTORY is used. Default: None.

  • user_inputs_mvs_directory (str or None) – Path to input directory containing files that describe the energy system and that are an input to MVS. If None, constants.DEFAULT_USER_INPUTS_MVS_DIRECTORY is used. Default: None.

  • collections_mvs_inputs_directory (str or None) – Path to input data collection. Used in overwrite_mvs_energy_production_file(), there if None, it is set to constants.DEFAULT_COLLECTION_MVS_INPUTS_DIRECTORY.

  • plot (bool) – If True, plots of the PV feed-in time series are created in create_pv_components(). Default: False.

  • pv_setup (dict or None) – Specifies the PV technologies and their installation details used in the simulation. The dictionary contains columns: surface_type, technology, surface_azimuth, surface_tilt. A tilt of 0 resembles a vertical orientation. If pv_setup is None, it is loaded from the user_inputs_pvcompare_directory/pv_setup.cvs. Default: None.

  • overwrite_grid_parameters (bool) – If True, the following grid parameters are inserted into the MVS input csvs automatically: electricity price, feed-in tariff, CO2 emissions, renewable share, gas price. Default: True.

  • overwrite_pv_parameters (bool) – If True, the pv components in ‘energyProduction.csv’ are overwritten with default values from ‘data/user_inputs_collection/’ according to the pv plants defined in ‘pv_setup’. Default: True.

  • overwrite_heat_parameters (bool) – If True, existing COP time series of the heat pump will be overwritten with calculated time series of COP and existing fixed thermal losses absolute and relative will be overwritten with calculated time series of fixed thermal losses relative and absolute. Default: True.

Returns

Saves calculated time series to timeseries folder in user_inputs_mvs_directory and updates csv files in csv_elements folder.

Return type

None