Skip to content

Pre-defined mathΒΆ

As of Calliope version 0.7, the math used to build optimisation problems is stored in YAML files. The pre-defined math is a re-implementation of the formerly hardcoded math formulation in this YAML format.

The pre-defined math for your chosen run mode is always applied to your model when you build the optimisation problem. We have also pre-defined some additional math, which you can optionally load into your model. For instance, the inter-cluster storage math allows you to track storage levels in technologies more accurately when you are using timeseries clustering in your model.

To load optional, pre-defined math on top of the base math, you can reference it by name (without the file extension) in your model configuration:

config:
  build:
    add_math: [storage_inter_cluster]

If you are running in the plan run mode, this will first apply all the plan pre-defined math, then the storage_inter_cluster pre-defined math. All pre-defined math YAML files can be found in math directory of the Calliope source code.

If you want to introduce new constraints, decision variables, or objectives, you can do so as part of the collection of YAML files describing your model. See the user-defined math section for an in-depth guide to applying your own math.

The pre-defined math can be explored in this section by selecting one of the options in the left-hand-side table of contents.