topotherm.multiple_timestep

This module contains the optimization models for the multiple-timestep district heating network design.

The module contains the following functions:
  • annuity: Calculate the annuity factor

  • model: Create the optimization model for the multiple time steps operation

Functions

annuity(c_i, n)

Calculate the annuity factor.

model(matrices, sets, regression_inst, ...)

Create the optimization model for the thermo-hydraulic system with

Module Contents

topotherm.multiple_timestep.annuity(c_i, n)[source]

Calculate the annuity factor.

Parameters:
  • c_i (float) – Interest rate (as a decimal, e.g. 0.05 for 5%).

  • n (float) – Number of years.

Returns:

Annuity factor.

Return type:

float

Examples

Calculate the annuity factor for a 5% interest rate over 10 years:

>>> annuity(0.05, 10)
0.129504...

With a higher interest rate (10%) and the same duration:

>>> annuity(0.10, 10)
0.162745...
topotherm.multiple_timestep.model(matrices, sets, regression_inst, regression_losses, economics, optimization_mode)[source]

Create the optimization model for the thermo-hydraulic system with multiple time step operation.

Parameters:
  • matrices (dict) – Matrices of the district heating network with keys a_i, a_p, a_c, l_i, position, q_c.

  • sets (dict) – Sets for the optimization, obtained from matrices.

  • regression_inst (dict) – Regression coefficients for the thermal capacity.

  • regression_losses (dict) – Regression coefficients for the heat losses.

  • economics (topotherm.settings.Economics) – Economic parameters of the system.

  • optimization_mode (str) – Optimization mode, either 'economic' for economic optimization or 'forced' for forced operation.

Returns:

Multiple time-step optimization model.

Return type:

pyo.ConcreteModel