Skip to content

Calculation Time

Typical Computation Times for Tutorials

TOP-Energy achieves optimal computing times with the Gurobi solver, for which the license is included.

The times (start, end, runtime) of the last simulation are given in the Simulation form.

Shorten the Simulation Time

First of all, it should be noted that the computing time required is a highly individual quantity. It depends both on the complexity of the project and on the computing capacities available.

If the simulation of an energy system takes an unusually long time, it must be checked whether modeling errors are responsible for the significantly longer simulation time. Possible error sources are explained below.

Asynchronous Time Series

The usually used hourly resolved time series of one year (with a total of 8760 time steps) are no problem for the software. Even half-hourly or quarter-hourly resolved time series are no obstacle for projects with manageable complexity.

However, if the different time series of a project contain different points in time that are not synchronized a large number of additional data points are interpolated.

Example

Time series 1 contains times in the hourly grid at 00:00, 01:00, 02:00, etc.

The time series 2 contains times in the hourly grid at 00:15, 01:15, 02:15, etc.

TOP-Energy interpolates the missing values, since only matching times are simulated. The result is a time series with the times 00:00, 00:15, 01:00, 01:15, 02:00, 02:15, etc.

The Simulator message 8277 provides the following note on the addition of inconsistent time series:

The time steps of the input time series do not coincide. Altogether . . . data points were completed.

From the interpolation results a higher resolution of the time series, which is not desired in most cases. It does not provide more detailed information about the energy system but extends the necessary computing time. Therefore, the addition of time steps should be prevented by synchronizing time series with the ETA before simulation.

If the time series are too large for the working memory, the following warning appears in a pop-up window before the simulation (see also the following figure):

Memory limit reached

The simulation requires more than 1 GB available memory. Please reduce the simulation model or the size of the input time series. Otherwise errors might occur or the software may crash during the simulation. Do you really want to proceed?

This message notes the problem may be too big. In this case, the time series should be synchronized or shortened if possible.
If the high number of data points for the project is necessary, the simulation can be continued regardless of the message.

Too Large Time Frame (look-ahead)

For some models it is necessary to specify a suitable Look-ahead (time frame for calculation), so that it can be optimized with a forward-looking operation mode.

Please make sure that you did not inadvertently enter a wrong number. The time frame must be adequate. An unfavorably selected time frame extends the simulation time.

Calculation Time Required for Simulation/Optimization

A simulation runs through several independent steps, which can be traced in detail in the log file of the Simulator window.

A large part of the required computing time is taken up by optimization. This proportion is particularly large for time-coupled systems.

In the right part of the Simulator window, the Progress of linear optimization is displayed in more detail under Overview → Processing information. After the linear optimization progress reaches 100 %, the varying iteration numbers for the current equation system are displayed until the simulation is complete.

In some cases, iteration can also be the cause of long solution times. The location of the respective bottleneck depends on the individual project.

Optimization

Solver

The use of the Gurobi solver provides the best conditions for short calculation times, and there is no need to activate parallelization separately, as in earlier TOP-Energy versions. In addition, the settings of the solver are relevant for the computation time, especially the Gap for termination and the Termination time, the maximum time for solving above which the calculation process is cancelled. The lower the Gap for the solver termination is selected, the longer the optimization can take.

An accuracy of 2 % may be sufficient for a project. Selecting this value may save simulation time.

Modeling: Limit Maximum Capacity (Big M value)

In the TOP-Energy model, it can be advantageous to lower the barriers to the optimization problem (Big M values). For this purpose, the standard very high values for maximum outputs (e.g., Maximum power output and Maximum power input in the Electricity Supplier, maximum outputs in the Heat Transfer components) are reduced to the amounts occurring in the project.

In systems of equations for mixed-integer optimization problems, so-called Big M method is often used. In simplified terms, inequalities are formulated in such a way that a binary variable is linked to a large limit value. However, it is advisable to select these limits as low as possible because large size differences in the target function contributions of the optimization are always numerically unfavorable. The default values in the component templates are very large so that a physical barrier does not actually become effective. In practice, these values can be found as limit values in the following components, among others:

  • (Electricity-) Supplier,
  • All heat exchangers (Heat Transfer),
  • Components of heat and cooling distribution networks (Heat Supply/_Distribution Network, Cooling Supply/_Distribution Network),
  • Components of balance relaxation (Error Analysis), and
  • Components of Programmable Control, containing Big M.

The maximum power output is several megawatts as standard and can be reduced in most applications without any problems.

The appropriate limitation of the Big M values also has a positive effect on the required computing time in many cases. Therefore, these measures are generally recommended!

The following figure shows how you can set the Maximum power transfer in the Technical input data.

Errors caused by unfavorable Big M values are signalled by error message 8358.

Newton Iteration Problem

After solving the optimization problem, the solution of a nonlinear algebraic equation system with the Newton solver can follow. This is the case when you simulate with the Material properties Temperature dependent or Considering composition. The simulation progress bar stops at a certain value (usually around 80 %) as soon as the optimization has been completed (display in the Simulator window: Overview → Processing information → Progress of linear optimization 100 %), and the Iterations for the current equation system are repeatedly incremented from 0. The following settings can be helpful here:

If components with combustion (e.g., Hot Water Boiler, CHP, Gas Turbine) are present in the project and you simulate with the Fuel material property Considering composition, it is numerically favorable to specify the Air ratio (air-fuel ratio, AFR) in the Technical input data under Combustion calculation. Instead, selecting Constant air flow rate or Estimated exhaust gas temperature may cause more iterations.

For the simulation of heat circuits with the Material property Temperature dependent, enter the Flow temperatures in the Technical input data under Transfer medium (water). These outlet temperatures should always be selected correctly according to the applicable conventions: All flow temperatures must be higher than all return temperatures.

In the Settings of the Simulation in the Simulation form, you can enable the Advanced solution search. Although the Advanced solution search process tends to be slower, it can prevent numerical problems that may occur in rare cases, such as negative mass flows in very complicated circuits.
Back To Top