edisgo.flex_opt.costs ===================== .. py:module:: edisgo.flex_opt.costs Functions --------- .. autoapisummary:: edisgo.flex_opt.costs.grid_expansion_costs edisgo.flex_opt.costs.line_expansion_costs edisgo.flex_opt.costs.transformer_expansion_costs Module Contents --------------- .. py:function:: grid_expansion_costs(edisgo_obj, without_generator_import=False) Calculates topology expansion costs for each reinforced transformer and line in kEUR. .. attribute:: edisgo_obj :type: :class:`~.EDisGo` .. attribute:: without_generator_import If True excludes lines that were added in the generator import to connect new generators to the topology from calculation of topology expansion costs. Default: False. :type: bool :returns: DataFrame containing type and costs plus in the case of lines the line length and number of parallel lines of each reinforced transformer and line. Index of the DataFrame is the name of either line or transformer. Columns are the following: type : str Transformer size or cable name total_costs : float Costs of equipment in kEUR. For lines the line length and number of parallel lines is already included in the total costs. quantity : int For transformers quantity is always one, for lines it specifies the number of parallel lines. line_length : float Length of line or in case of parallel lines all lines in km. voltage_level : str {'lv' | 'mv' | 'mv/lv'} Specifies voltage level the equipment is in. mv_feeder : :class:`~.network.components.Line` First line segment of half-ring used to identify in which feeder the network expansion was conducted in. :rtype: `pandas.DataFrame` .. rubric:: Notes Total network expansion costs can be obtained through self.grid_expansion_costs.total_costs.sum(). .. py:function:: line_expansion_costs(edisgo_obj, lines_names=None) Returns costs for earthwork and per added cable in kEUR as well as voltage level for chosen lines. :param edisgo_obj: eDisGo object :type edisgo_obj: :class:`~.EDisGo` :param lines_names: List of names of lines to return cost information for. If None, it is returned for all lines in :attr:`~.network.topology.Topology.lines_df`. :type lines_names: None or list(str) :returns: **costs** -- Dataframe with names of lines in index and columns 'costs_earthworks' with earthwork costs in kEUR, 'costs_cable' with costs per cable/line in kEUR, and 'voltage_level' with information on voltage level the line is in. :rtype: :pandas:`pandas.DataFrame` .. py:function:: transformer_expansion_costs(edisgo_obj, transformer_names=None) Returns costs per transformer in kEUR as well as voltage level they are in. :param edisgo_obj: eDisGo object :type edisgo_obj: :class:`~.EDisGo` :param transformer_names: List of names of transformers to return cost information for. If None, it is returned for all transformers in :attr:`~.network.topology.Topology.transformers_df` and :attr:`~.network.topology.Topology.transformers_hvmv_df`. :type transformer_names: None or list(str) :returns: **costs** -- Dataframe with names of transformers in index and columns 'costs' with costs per transformer in kEUR and 'voltage_level' with information on voltage level the transformer is in. :rtype: :pandas:`pandas.DataFrame`