topotherm.single_timestep ========================= .. py:module:: topotherm.single_timestep .. autoapi-nested-parse:: This module contains the optimization models for the single-timestep district heating network design. Functions --------- - ``annuity`` : Calculate the annuity factor. - ``model`` : Create the optimization model for the single time-step operation. Functions --------- .. autoapisummary:: topotherm.single_timestep.annuity topotherm.single_timestep.model Module Contents --------------- .. py:function:: annuity(c_i, n) Calculate the annuity factor. :param c_i: Interest rate. :type c_i: float :param n: Number of years. :type n: float :returns: Annuity factor. :rtype: float .. py:function:: model(matrices, sets, regression_inst, regression_losses, economics, optimization_mode) Create the optimization model for the thermo-hydraulic coupled with single time step operation. :param matrices: Dictionary with the matrices of the district heating network with keys ``a_i``, ``a_p``, ``a_c``, ``l_i``, ``position``, ``q_c``. :type matrices: dict :param sets: Dictionary with the sets for the optimization, obtained from ``matrices``. :type sets: dict :param regression_inst: Dictionary with the regression coefficients for the thermal capacity. :type regression_inst: dict :param regression_losses: Dictionary with the regression coefficients for the heat losses. :type regression_losses: dict :param economics: Object with the economic parameters. :type economics: topotherm.settings.Economics :param optimization_mode: Optimization mode, either ``'economic'`` for economic or ``'forced'`` for forced operation. :type optimization_mode: str :returns: pyomo model. :rtype: pyomo.environ.ConcreteModel