Skip to content

Model configuration schema

Calliope configuration class.

  • init (object): All configuration options used when initialising a Calliope model. Cannot contain additional properties.

    • name: Model name. Default: null.

      • Any of

        • string

        • null

    • calliope_version: Calliope framework version this model is intended for. Default: null.

      • Any of

        • string

        • null

    • broadcast_input_data (boolean): If True, single data entries in YAML indexed data will be broadcast across all index items. Otherwise, the number of data entries needs to match the number of index items. Defaults to False to mitigate unexpected broadcasting when applying overrides. Default: false.

    • subset (object): Dimension subsets.

      • ^[^_^\d][\w]*$

        • Any of

          • array: Length must be at least 1.

            • Items

              • Any of

                • string

                • integer

                • number

          • null

    • resample (object): Dimension resampling settings.

      • ^[^_^\d][\w]*$

        • Any of

          • string

          • null

    • time_cluster: Setting to cluster the timeseries. Must reference the name of an input data array. Default: null.

      • Any of

        • string: Must match pattern: ^[^_^\d][\w]*$ (Test).

        • null

    • datetime_format (string): Timestamp format of all time series data with datetime dtype when read from file. 'ISO8601' means '%Y-%m-%d %H:%M:%S'. Default: "ISO8601".

    • date_format (string): Datestamp format of all time series data with date dtype when read from file. 'ISO8601' means '%Y-%m-%d'. Default: "ISO8601".

    • distance_unit (string): Unit of transmission link distance (m - metres, km - kilometres). Automatically derived distances from lat/lon coordinates will be given in this unit. Must be one of: "km" or "m". Default: "km".

    • mode (string): Mode in which to run the optimisation. Triggers additional processing and appends additional math formulations. Math order: base -> mode. Must be one of: "base", "operate", or "spores". Default: "base".

    • extra_math (array): List of math entries to be applied on top of the base math and mode math. The list items must have been defined as keys in math_paths (see below). Math order: base -> mode -> extra. Items must be unique.

      • Items (string)
    • math_paths (object): Math paths settings.

      • ^[^_^\d][\w]*$ (string, format: path)
    • pre_validate_math_strings (boolean): If true, the Calliope math definition will be scanned for parsing errors at model initialisation, i.e., before undertaking the much more expensive operation of building the optimisation problem. It is switched off by default to reduce overall build time. Default: false.

  • build (object): Base configuration options used when building a Calliope optimisation problem (calliope.Model.build). Cannot contain additional properties.

    • backend (string): Module with which to build the optimisation problem. Must be one of: "pyomo" or "gurobi". Default: "pyomo".

    • ensure_feasibility (boolean): Whether to include decision variables in the model which will meet unmet demand or consume unused supply in the model so that the optimisation solves successfully. This should only be used as a debugging option (as any unmet demand/unused supply is a sign of improper model formulation). Default: false.

    • objective (string): Name of internal objective function to use, from those defined in the pre-defined math and any applied additional math. Default: "min_cost_optimisation".

    • operate (object): Operate mode configuration options used when building a Calliope optimisation problem (calliope.Model.build). Cannot contain additional properties.

      • window (string): Operate mode rolling window, given as a pandas frequency string. See here for a list of frequency aliases. Default: "24h".

      • horizon (string): Operate mode rolling horizon, given as a pandas frequency string. See here for a list of frequency aliases. Must be ≥ window. Default: "48h".

  • solve (object): Base configuration options used when solving a Calliope optimisation problem (calliope.Model.solve). Cannot contain additional properties.

    • postprocessing_active (boolean): If enabled, all active postprocessing functions will be run after the model solves. Default: true.

    • save_logs: If given, should be a path to a directory in which to save optimisation logs. Default: null.

      • Any of

        • string, format: path

        • null

    • shadow_prices (array): Names of model constraints. Items must be unique.

      • Items (string)
    • solver (string): Solver to use. Any solvers that have Pyomo interfaces can be used. Refer to the Pyomo documentation for the latest list. Default: "cbc".

    • solver_io: Some solvers have different interfaces that perform differently. For instance, setting solver_io="python" when using the solver gurobi tends to reduce the time to send the optimisation problem to the solver. Default: null.

      • Any of

        • string

        • null

    • solver_options (object): Any solver options, as key-value pairs, to pass to the chosen solver. Can contain additional properties.

    • spores (object): SPORES configuration options used when solving a Calliope optimisation problem (calliope.Model.solve). Cannot contain additional properties.

      • scoring_algorithm (string): Algorithm to apply to update the SPORES score between iterations. For more information on each option, see Lombardi et al. (2023). Must be one of: "integer", "relative_deployment", "random", or "evolving_average". Default: "integer".

      • number (integer): SPORES mode number of iterations after the initial base run. Default: 3.

      • save_per_spore_path: If None, the SPORES results will only be available in calliope.Model.results once all iterations (defined by number) have completed. If a path, as well as consolidating the SPORES results in calliope.Model.results, individual SPORES will be saved to file immediately after the iteration has completed. Default: null.

        • Any of

          • string, format: path

          • null

      • use_latest_results (boolean): If the model already contains base mode results, use them as the baseline results and start with SPORES iterations immediately. If the model already contains spores mode results, use the most recent results and continue with the remaining SPORES iterations immediately. Default: false.

      • tracking_parameter: If given, an input parameter name with which to filter technologies for consideration in SPORES scoring. Default: null.

        • Any of

          • string

          • null

      • score_threshold_factor (number): A factor to apply to flow capacities above which they will increment the SPORES score. E.g., if the previous iteration flow capacity was 100 then, with a threshold value of 0.1, only capacities above 10 in the current iteration will cause the SPORES score to increase for that technology at that node. If, say, the current iteration's capacity is 8 then the SPORES score will not change for that technology so it will not be further penalised on the next iteration. Minimum: 0. Default: 0.1.

    • zero_threshold (number): On postprocessing the optimisation results, values smaller than this threshold will be considered as optimisation artefacts and will be set to zero. Default: 1e-10.