Skip to content

Library content

​ The Calibration library contains more than one type of content: custom function(s), a custom web app as well as a Modelica package. The main components and functions in this library are listed below.

Custom Function: Calibrate🔗

A custom function used to calibrate an experiment. It minimizes differences between a given reference result and the output of a specified experiment. This is the core functionality of the calibration library and can be accessed via the custom function selector. The Nelder-Mead method is used under the hood to solve the calibration problem. Parallel execution is used to speed up algorithm iteration, therefore a larger profile with more cores will speed up execution of the calibration problem.

Calibrate - Arguments🔗

Argument Description
xtol Change in parameter values between iterations acceptable for convergence
ftol Change in objective value acceptable between iterations for convergence
max_iter Maximum number of iterations allowed
max_fail Maximum allowed number of failed cases (operating conditions) during a function evaluation. The objective function will evaluate to infinity if more than max_fail cases fail. Cannot be higher than the number of cases in the reference result. Failed cases do not contribute towards the objective function.
output What stage of the calibration to output as result. Possible values are calibration, baseline and initialization. More info here.
baseline_result Case result to use for definition of the analysis to be used for calibration experiment. More info here.
reference_result Experiment result to use as calibration target. More info here.
reference_variables Reference variables to use for calibration. More info here.
calibration_parameters Parameters to calibrate. More info here.

Calibrate - Output🔗

After completion, a result entry with the following content is generated:

  • Summary Case
  • Calibrated Results
  • An artifact with an HTML report

See Analyzing the results for more detailed information.

Custom Web App: Reference file loader🔗

A custom app where data files can be uploaded to serve as reference results in the calibration process. The result generated by this app can be used as the "reference result" within the Calibrate function. Accessed from the "Apps"-menu.

Custom Function: Generate reference result🔗

Custom function that can be used as an alternative to Reference file loader if the result file to be used is uploaded into a resource folder inside the active workspace.

Generate reference result - Arguments🔗

Argument Description
file_uri URI to file to be used. Supported data formats are .csv and .xlsx. For .xlsx-files, the first sheet will always be used. File needs to be uploaded to a resource folder.
baseline_result Experiment to be used as baseline for the calibration. Used to identify what is operating conditions and what is reference output from the data file.

Generate reference result - Output🔗

From every row in the data file a case result is written with the data from the row. The first column will always be used as index column and used for naming the cases.

A summary case is generated with log output.

Custom Function: Steady state with derivatives🔗

This function is a steady-state simulation analysis that can also be used with models targeting dynamic simulations, unlike the built-in steady state function. It solves directly for the model's state variables's derivatives equalling zero, instead of doing a dynamic simulation until steady-state has been reached. This approach can be useful in speeding up the calibration processes for dynamic models.

Steady state with derivatives - Arguments🔗

Argument Description
exclude_states Glob patterns for states to exclude from steady state problem, separated by spaces

Examples🔗

The modelica package includes a collection of examples to demonstrate how to use the calibration tools effectively. These examples provide practical guidance on implementing calibration processes.