Repository: calliope-project/calliope (language: python)

Issue:
Docstrings for math expression / where string helper functions
## Problem description

As of #411 we have new, YAML math formulations. Some of the math expressions rely on in-built helper functions. These need to be documented and added to the publicly available API docs in the calliope docs.

## Calliope version

v0.7.0-dev



Discussion / hints:

Fix patch:
diff --git a/calliope/backend/expression_parser.py b/calliope/backend/expression_parser.py
index 79d00d4dc..4417f2bcd 100644
--- a/calliope/backend/expression_parser.py
+++ b/calliope/backend/expression_parser.py
@@ -47,6 +47,7 @@
 import pyparsing as pp
 import xarray as xr
 
+from calliope.backend.helper_functions import ParsingHelperFunction
 from calliope.exceptions import BackendError
 
 if TYPE_CHECKING:
@@ -348,14 +349,14 @@ def __repr__(self) -> str:
 
     def eval(
         self,
-        helper_func_dict: dict[str, Callable],
+        helper_functions: dict[str, type[ParsingHelperFunction]],
         as_dict: bool = False,
         **eval_kwargs,
     ) -> Optional[Union[str, Callable]]:
         """
 
         Args:
-            helper_func_dict (dict[str, Callable]): Allowed helper functions.
+            helper_functions (dict[str, type[ParsingHelperFunction]]): Allowed helper functions.
             test (bool, optional):
                 If True, return a string with the helper function name rather than
                 collecting the helper function from the dictionary of functions.
@@ -369,15 +370,20 @@ def eval(
                 If test=True, only the helper function name is returned.
         """
 
-        if self.name not in helper_func_dict.keys():
+        if self.name not in helper_functions.keys():
             raise BackendError(
-                f"({eval_kwargs['equation_name']}, {self.instring}): Invalid helper function defined"
+                f"({eval_kwargs['equation_name']}, {self.instring}): Invalid helper function defined: {self.name}"
+            )
+        elif not isinstance(helper_functions[self.name], type(ParsingHelperFunction)):
+            raise TypeError(
+                f"({eval_kwargs['equation_name']}, {self.instring}): Helper function must be "
+                f"subclassed from calliope.backend.helper_functions.ParsingHelperFunction: {self.name}"
             )
         else:
             if as_dict:
                 return str(self.name)
             else:
-                return helper_func_dict[self.name](**eval_kwargs)
+                return helper_functions[self.name](**eval_kwargs)
 
 
 class EvalSlicedParameterOrVariable(EvalString):
diff --git a/calliope/backend/helper_functions.py b/calliope/backend/helper_functions.py
index bd25f0186..6b96c2067 100644
--- a/calliope/backend/helper_functions.py
+++ b/calliope/backend/helper_functions.py
@@ -1,277 +1,488 @@
 # Copyright (C) since 2013 Calliope contributors listed in AUTHORS.
 # Licensed under the Apache 2.0 License (see LICENSE file).
 
+"""
+helper_functions.py
+~~~~~~~~~~~~~~~~~~~
+
+Functions that can be used to process data in math `where` and `expression` strings.
+"""
 import re
-from typing import Callable, Union
+from abc import ABC, abstractmethod
+from typing import Any, Literal, Mapping, Union, overload
 
+import pandas as pd
 import xarray as xr
 
 from calliope.exceptions import BackendError
 
+_registry: dict[
+    Literal["where", "expression"], dict[str, type["ParsingHelperFunction"]]
+] = {"where": {}, "expression": {}}
 
-def inheritance(model_data, as_latex: bool = False, **kwargs):
-    def _as_latex(tech_group):
-        return rf"\text{{tech_group={tech_group}}}"
 
-    def _inheritance(tech_group):
-        # Only for base tech inheritance
-        return model_data.inheritance.str.endswith(tech_group)
+class ParsingHelperFunction(ABC):
+    def __init__(
+        self,
+        as_latex: bool = False,
+        **kwargs,
+    ) -> None:
+        """
+        Abstract helper function class, which all helper functions must subclass.
+        The abstract properties and methods defined here must be defined by all helper functions.
+
+        Args:
+            as_latex (bool, optional):
+                If True, will return a LaTeX math string on calling the class.
+                Defaults to False.
+        """
+        self._kwargs = kwargs
+        self._as_latex = as_latex
 
-    if as_latex:
-        return _as_latex
-    else:
-        return _inheritance
+    @property
+    @abstractmethod
+    def ALLOWED_IN(self) -> list[Literal["where", "expression"]]:
+        "List of parseable math strings that this function can be accessed from."
 
+    @property
+    @abstractmethod
+    def NAME(self) -> str:
+        "Helper function name that is used in the math expression/where string."
+
+    @abstractmethod
+    def as_latex(self, *args, **kwargs) -> str:
+        """
+        Method to update LaTeX math strings to include the action applied by the helper function.
+        This method is called when the class is initialised with ``as_latex=True``.
+        """
+
+    @abstractmethod
+    def as_array(self, *args, **kwargs) -> xr.DataArray:
+        """
+        Method to apply the helper function to provide an n-dimensional array output.
+        This method is called when the class is initialised with ``as_latex=False``.
+        """
 
-def where_sum(model_data, as_latex: bool = False, **kwargs):
-    def _where_sum(component, *, over):
-        to_return = model_data.get(component, xr.DataArray(False))
-        if to_return.any():
-            to_return = expression_sum()(to_return, over=over) > 0
+    def __call__(self, *args, **kwargs) -> Any:
+        """
+        When a helper function is accessed by evaluating a parsing string, this method is called.
+        The value of `as_latex` on initialisation of the class defines whether this method returns a string (``as_latex=True``) or :meth:xr.DataArray (``as_latex=False``)
+        """
+        if self._as_latex:
+            return self.as_latex(*args, **kwargs)
+        else:
+            return self.as_array(*args, **kwargs)
 
-        return to_return
+    def __init_subclass__(cls):
+        """
+        Override subclass definition in two ways:
+        1. Do not allow new helper functions to have a name that is already defined (be it a built-in function or a custom function).
+        2. Wrap helper function __call__ in a check for the function being allowed in specific parsing string types.
+        """
+        super().__init_subclass__()
+        for allowed in cls.ALLOWED_IN:
+            if cls.NAME in _registry[allowed].keys():
+                raise ValueError(
+                    f"`{allowed}` string helper function `{cls.NAME}` already exists"
+                )
+        for allowed in cls.ALLOWED_IN:
+            _registry[allowed][cls.NAME] = cls
+
+    @staticmethod
+    def _add_to_iterator(instring: str, iterator_converter: dict[str, str]) -> str:
+        """
+        Utility function for generating latex strings in multiple helper functions.
 
-    if as_latex:
-        return sum_as_latex
-    else:
-        return _where_sum
+        Find an iterator in the iterator substring of the component string
+        (anything wrapped in `_text{}`). Other parts of the iterator substring can be anything
+        except curly braces, e.g. the standalone `foo` will be found here and acted upon:
+        `\\textit{my_param}_\text{bar,foo,foo=bar,foo+1}`
 
+        Args:
+            instring (str): String in which the iterator substring can be found.
+            iterator_converter (dict[str, str]):
+                key: the iterator to search for.
+                val: The new string to **append** to the iterator name.
 
-def expression_sum(as_latex: bool = False, **kwargs):
-    def _expression_sum(component, *, over):
+        Returns:
+            str: `instring`, but with `iterator` replaced with `iterator + new_string`
         """
 
-        Slower method that uses the backend "quicksum" method:
+        def _replace_in_iterator(matched):
+            iterator_list = matched.group(2).split(",")
+            new_iterator_list = []
+            for it in iterator_list:
+                if it in iterator_converter:
+                    it += iterator_converter[it]
+                new_iterator_list.append(it)
 
-        to_sum_series = to_sum.to_series()
-        over = over if isinstance(over, list) else [over]
-        summed = backend_interface.sum(to_sum_series, over=over)
+            return matched.group(1) + ",".join(new_iterator_list) + matched.group(3)
 
-        if isinstance(summed, pd.Series):
-            to_return = xr.DataArray.from_series(summed)
-        else:
-            to_return = xr.DataArray(summed)
+        return re.sub(r"(_\\text{)([^{}]*?)(})", _replace_in_iterator, instring)
+
+    @staticmethod
+    def _instr(dim: str) -> str:
+        """
+        Utility function for generating latex strings in multiple helper functions.
 
         Args:
-            to_sum (_type_): _description_
-            over (_type_): _description_
+            dim (str): Dimension suffixed with a "s" (e.g., "techs")
 
         Returns:
-            _type_: _description_
+            str: LaTeX string for iterator in a set (e.g., "tech in techs")
         """
-        to_return = component.sum(over, min_count=1, skipna=True)
+        dim_singular = dim.removesuffix("s")
+        return rf"\text{{{dim_singular}}} \in \text{{{dim}}}"
 
-        return to_return
 
-    if as_latex:
-        return sum_as_latex
-    else:
-        return _expression_sum
+class Inheritance(ParsingHelperFunction):
+    #:
+    ALLOWED_IN = ["where"]
+    #:
+    NAME = "inheritance"
 
+    def as_latex(self, tech_group: str) -> str:
+        return rf"\text{{tech_group={tech_group}}}"
 
-def sum_as_latex(component: str, *, over: Union[str, list]) -> str:
-    """Shared utility function to generate the where and expression latex summation string
+    def as_array(self, tech_group: str) -> xr.DataArray:
+        """
+        Find all technologies which inherit from a particular technology group.
+        The technology group can be an abstract base group (e.g., `supply`, `storage`) or a user-defined technology group which itself inherits from one of the abstract base groups.
 
-    Args:
-        component (str): Component name to sum.
-        over (Union[str, list]): either one dimension or list of dimension names over which to sum. Each is expected to end in "s".
+        Args:
+            model_data (xr.Dataset): Calliope model data
+        """
+        inheritance_lists = (
+            self._kwargs["model_data"].inheritance.to_series().str.split(".")
+        )
+        return inheritance_lists.apply(lambda x: tech_group in x).to_xarray()
 
-    Returns:
-        str: Valid LaTeX math summation string.
-    """
 
-    def _instr(dim):
-        dim_singular = dim.removesuffix("s")
-        return rf"\text{{{dim_singular}}} \in \text{{{dim}}}"
+class WhereAny(ParsingHelperFunction):
+    # Class name doesn't match NAME to avoid a clash with typing.Any
+    #:
+    NAME = "any"
+    #:
+    ALLOWED_IN = ["where"]
+
+    def as_latex(self, array: str, *, over: Union[str, list[str]]) -> str:
+        if isinstance(over, str):
+            overstring = self._instr(over)
+        else:
+            foreach_string = r" \\ ".join(self._instr(i) for i in over)
+            overstring = rf"\substack{{{foreach_string}}}"
+        # Using bigvee for "collective-or"
+        return rf"\bigvee\limits_{{{overstring}}} ({array})"
+
+    def as_array(self, parameter: str, *, over: Union[str, list[str]]) -> xr.DataArray:
+        """
+        Reduce the boolean where array of a model parameter by applying `any` over some dimension(s).
+
+        Args:
+            parameter (str): Reference to a model input parameter
+            over (Union[str, list[str]]): dimension(s) over which to apply `any`.
+
+        Returns:
+            xr.DataArray:
+                If the parameter exists in the model, returns a boolean array with dimensions reduced by applying a boolean OR operation along the dimensions given in `over`.
+                If the parameter does not exist, returns a dimensionless False array.
+        """
+        if parameter in self._kwargs["model_data"].data_vars:
+            parameter_da = self._kwargs["model_data"][parameter]
+            with pd.option_context("mode.use_inf_as_na", True):
+                bool_parameter_da = (
+                    parameter_da.where(pd.notnull(parameter_da))  # type: ignore
+                    .notnull()
+                    .any(dim=over, keep_attrs=True)
+                )
+        else:
+            bool_parameter_da = xr.DataArray(False)
+        return bool_parameter_da
 
-    if isinstance(over, str):
-        overstring = _instr(over)
-    else:
-        foreach_string = r" \\ ".join(_instr(i) for i in over)
-        overstring = rf"\substack{{{foreach_string}}}"
-    return rf"\sum\limits_{{{overstring}}} ({component})"
 
+class Sum(ParsingHelperFunction):
+    #:
+    NAME = "sum"
+    #:
+    ALLOWED_IN = ["expression"]
 
-def squeeze_carriers(model_data, as_latex: bool = False, **kwargs):
-    def _as_latex(component, carrier_tier):
-        return rf"\sum\limits_{{\text{{carrier}} \in \text{{carrier_tier({carrier_tier})}}}} ({component})"
+    def as_latex(self, array: str, *, over: Union[str, list[str]]) -> str:
+        if isinstance(over, str):
+            overstring = self._instr(over)
+        else:
+            foreach_string = r" \\ ".join(self._instr(i) for i in over)
+            overstring = rf"\substack{{{foreach_string}}}"
+        return rf"\sum\limits_{{{overstring}}} ({array})"
+
+    def as_array(
+        self, array: xr.DataArray, *, over: Union[str, list[str]]
+    ) -> xr.DataArray:
+        """
+        Sum an expression array over the given dimension(s).
+
+        Args:
+            array (xr.DataArray): expression array
+            over (Union[str, list[str]]): dimension(s) over which to apply `sum`.
+
+        Returns:
+            xr.DataArray:
+                Array with dimensions reduced by applying a summation over the dimensions given in `over`.
+                NaNs are ignored (xarray.DataArray.sum arg: `skipna: True`) and if all values along the dimension(s) are NaN, the summation will lead to a NaN (xarray.DataArray.sum arg: `min_count=1`).
+        """
+        return array.sum(over, min_count=1, skipna=True)
+
+
+class ReduceCarrierDim(ParsingHelperFunction):
+    #:
+    NAME = "reduce_carrier_dim"
+    #:
+    ALLOWED_IN = ["expression"]
+
+    def as_latex(
+        self,
+        array: str,
+        carrier_tier: Literal["in", "out", "in_2", "out_2", "in_3", "out_3"],
+    ) -> str:
+        return rf"\sum\limits_{{\text{{carrier}} \in \text{{carrier_tier({carrier_tier})}}}} ({array})"
+
+    def as_array(
+        self,
+        array: xr.DataArray,
+        carrier_tier: Literal["in", "out", "in_2", "out_2", "in_3", "out_3"],
+    ) -> xr.DataArray:
+        """Reduce expression array data by selecting the carrier that corresponds to the given carrier tier and then dropping the `carriers` dimension.
 
-    def _squeeze_carriers(component, carrier_tier):
-        return expression_sum(**kwargs)(
-            component.where(
-                model_data.carrier.sel(carrier_tiers=carrier_tier).notnull()
+        Args:
+            array (xr.DataArray): Expression array.
+            carrier_tier (Literal["in", "out", "in_2", "out_2", "in_3", "out_3"]): Carrier tier on which to slice the model `exists` array to find the carrier that exists for the elements of `array`.
+
+        Returns:
+            xr.DataArray: `array` reduced by the `carriers` dimension.
+        """
+        return Sum(as_latex=self._as_latex, **self._kwargs)(
+            array.where(
+                self._kwargs["model_data"]
+                .carrier.sel(carrier_tiers=carrier_tier)
+                .notnull()
             ),
             over="carriers",
         )
 
-    if as_latex:
-        return _as_latex
-    else:
-        return _squeeze_carriers
 
+class ReducePrimaryCarrierDim(ParsingHelperFunction):
+    #:
+    NAME = "reduce_primary_carrier_dim"
+    #:
+    ALLOWED_IN = ["expression"]
+
+    def as_latex(self, array: str, carrier_tier: Literal["in", "out"]) -> str:
+        return rf"\sum\limits_{{\text{{carrier=primary_carrier_{carrier_tier}}}}} ({array})"
 
-def squeeze_primary_carriers(model_data, as_latex: bool = False, **kwargs):
-    def _as_latex(component, carrier_tier):
-        return rf"\sum\limits_{{\text{{carrier=primary_carrier_{carrier_tier}}}}} ({component})"
+    def as_array(
+        self, array: xr.DataArray, carrier_tier: Literal["in", "out"]
+    ) -> xr.DataArray:
+        """Reduce expression array data by selecting the carrier that corresponds to the primary carrier and then dropping the `carriers` dimension.
+        This function is only valid for `conversion_plus` technologies, so should only be included in a math component if the `where` string includes `inheritance(conversion_plus)` or an equivalent expression.
 
-    def _squeeze_primary_carriers(component, carrier_tier):
-        return expression_sum(**kwargs)(
-            component.where(
-                getattr(model_data, f"primary_carrier_{carrier_tier}").notnull()
+        Args:
+            array (xr.DataArray): Expression array.
+            carrier_tier (Literal["in", "out"]): Carrier tier to select one of the `primary_carrier_in`/`primary_carrier_out` arrays, in which the primary carrier for the technology is defined.
+
+
+        Returns:
+            xr.DataArray: `array` reduced by the `carriers` dimension.
+        """
+        return Sum(as_latex=self._as_latex, **self._kwargs)(
+            array.where(
+                getattr(
+                    self._kwargs["model_data"], f"primary_carrier_{carrier_tier}"
+                ).notnull()
             ),
             over="carriers",
         )
 
-    if as_latex:
-        return _as_latex
-    else:
-        return _squeeze_primary_carriers
 
+class SelectFromLookupArrays(ParsingHelperFunction):
+    #:
+    NAME = "select_from_lookup_arrays"
+    #:
+    ALLOWED_IN = ["expression"]
 
-def select_from_lookup_arrays(
-    model_data: xr.Dataset, as_latex: bool = False, **kwargs
-) -> Callable:
-    def _as_latex(component: str, **lookup_arrays: str):
+    def as_latex(self, array: str, **lookup_arrays: str) -> str:
         new_strings = {
             (iterator := dim.removesuffix("s")): rf"={array}[{iterator}]"
             for dim, array in lookup_arrays.items()
         }
-        component = add_to_iterator(component, new_strings)
-        return component
+        array = self._add_to_iterator(array, new_strings)
+        return array
 
-    def _select_from_lookup_arrays(
-        component: xr.DataArray, **lookup_arrays: xr.DataArray
+    def as_array(
+        self, array: xr.DataArray, **lookup_arrays: xr.DataArray
     ) -> xr.DataArray:
         """
         Apply vectorised indexing on an arbitrary number of an input array's dimensions.
 
         Args:
-            component (xr.DataArray): Array on which to apply vectorised indexing.
+            array (xr.DataArray): Array on which to apply vectorised indexing.
 
         Kwargs:
             lookup_arrays (dict[str, xr.DataArray]):
                 key: dimension on which to apply vectorised indexing
                 value: array whose values are either NaN or values from the dimension given in the key.
         Raises:
-            BackendError: `component` must be indexed over the dimensions given in the `lookup_arrays` dict keys.
+            BackendError: `array` must be indexed over the dimensions given in the `lookup_arrays` dict keys.
             BackendError: All `lookup_arrays` must be indexed over all the dimensions given in the `lookup_arrays` dict keys.
 
         Returns:
             xr.DataArray:
-                `component` with rearranged values (coordinates remain unchanged).
+                `array` with rearranged values (coordinates remain unchanged).
                 Any NaN index coordinates in the lookup arrays will be NaN in the returned array.
 
         Examples:
-        >>> coords = {"foo": ["A", "B", "C"]}
-        >>> component = xr.DataArray([1, 2, 3], coords=coords)
-        >>> lookup_array = xr.DataArray(
-                np.array(["B", "A", np.nan], dtype="O"), coords=coords, name="bar"
-            )
-        >>> model_data = xr.Dataset({"bar": lookup_array})
-        >>> select_from_lookup_arrays(model_data)(component, foo=lookup_array)
-        <xarray.DataArray 'bar' (foo: 3)>
-        array([ 2.,  1., nan])
-        Coordinates:
-        * foo      (foo) object 'A' 'B' 'C'
+            >>> coords = {"foo": ["A", "B", "C"]}
+            >>> array = xr.DataArray([1, 2, 3], coords=coords)
+            >>> lookup_array = xr.DataArray(np.array(["B", "A", np.nan], dtype="O"), coords=coords, name="bar")
+            >>> model_data = xr.Dataset({"bar": lookup_array})
+            >>> select_from_lookup_arrays = SelectFromLookupArrays(model_data=model_data)
+            >>> select_from_lookup_arrays(array, foo=lookup_array)
+            <xarray.DataArray 'bar' (foo: 3)>
+            array([ 2.,  1., nan])
+            Coordinates:
+            * foo      (foo) object 'A' 'B' 'C'
 
         The lookup array assigns the value at "B" to "A" and vice versa.
         "C" is masked since the lookup array value is NaN.
         """
 
         dims = set(lookup_arrays.keys())
-        missing_dims_in_component = dims.difference(component.dims)
+        missing_dims_in_component = dims.difference(array.dims)
         missing_dims_in_lookup_tables = any(
             dim not in lookup.dims for dim in dims for lookup in lookup_arrays.values()
         )
         if missing_dims_in_component:
             raise BackendError(
-                f"Cannot select items from `{component.name}` on the dimensions {dims} since the array is not indexed over the dimensions {missing_dims_in_component}"
+                f"Cannot select items from `{array.name}` on the dimensions {dims} since the array is not indexed over the dimensions {missing_dims_in_component}"
             )
         if missing_dims_in_lookup_tables:
             raise BackendError(
-                f"All lookup arrays used to select items from `{component.name}` must be indexed over the dimensions {dims}"
+                f"All lookup arrays used to select items from `{array.name}` must be indexed over the dimensions {dims}"
             )
 
         stacked_and_dense_lookup_arrays = {
             # Although we have the lookup array, its values are backend objects,
             # so we grab the same array from the unadulterated model data.
             # FIXME: do not add lookup tables as backend objects.
-            dim_name: model_data[lookup.name]
+            dim_name: self._kwargs["model_data"][lookup.name]
             # Stacking ensures that the dimensions on `component` are not reordered on calling `.sel()`.
             .stack(idx=list(dims))
             # Cannot select on NaNs, so we drop them all.
             .dropna("idx")
             for dim_name, lookup in lookup_arrays.items()
         }
-        sliced_component = component.sel(stacked_and_dense_lookup_arrays)
+        sliced_component = array.sel(stacked_and_dense_lookup_arrays)
 
         return (
             sliced_component.drop_vars(dims)
             .unstack("idx")
-            .reindex_like(component, copy=False)
+            .reindex_like(array, copy=False)
         )
 
-    if as_latex:
-        return _as_latex
-    else:
-        return _select_from_lookup_arrays
 
+class GetValAtIndex(ParsingHelperFunction):
+    #:
+    NAME = "get_val_at_index"
+    #:
+    ALLOWED_IN = ["expression", "where"]
 
-def get_val_at_index(model_data, as_latex: bool = False, **kwargs):
-    def _as_latex(*, dim, idx):
+    def as_latex(self, **dim_idx_mapping: str) -> str:
+        dim, idx = self._mapping_to_dim_idx(**dim_idx_mapping)
         return f"{dim}[{idx}]"
 
-    def _get_val_at_index(*, dim, idx):
-        return model_data.coords[dim][int(idx)]
+    def as_array(self, **dim_idx_mapping: int) -> xr.DataArray:
+        """Get value of a model dimension at a given integer index.
+        This function is primarily useful for timeseries data
 
-    if as_latex:
-        return _as_latex
-    else:
-        return _get_val_at_index
+        Keyword Args:
+            key (str): Model dimension in which to extract value.
+            value (int): Integer index of the value to extract (assuming zero-indexing).
 
+        Raises:
+            ValueError: Exactly one dimension:index mapping is expected.
 
-def roll(as_latex: bool = False, **kwargs):
-    def _as_latex(component, **roll_kwargs):
-        new_strings = {
-            k.removesuffix("s"): f"{-1 * int(v):+d}" for k, v in roll_kwargs.items()
-        }
-        component = add_to_iterator(component, new_strings)
-        return component
+        Returns:
+            xr.DataArray: Dimensionless array containing one value.
 
-    def _roll(component, **roll_kwargs):
-        roll_kwargs_int = {k: int(v) for k, v in roll_kwargs.items()}
-        return component.roll(roll_kwargs_int)
+        Examples:
+            >>> coords = {"timesteps": ["2000-01-01 00:00", "2000-01-01 01:00", "2000-01-01 02:00"]}
+            >>> model_data = xr.Dataset(coords=coords)
+            >>> get_val_at_index = GetValAtIndex(model_data=model_data)
+            >>> get_val_at_index(model_data)(timesteps=0)
+            <xarray.DataArray 'timesteps' ()>
+            array('2000-01-01 00:00', dtype='<U16')
+            Coordinates:
+                timesteps  <U16 '2000-01-01 00:00'
+            >>> get_val_at_index(model_data)(timesteps=-1)
+            <xarray.DataArray 'timesteps' ()>
+            array('2000-01-01 00:00', dtype='<U16')
+            Coordinates:
+                timesteps  <U16 '2000-01-01 02:00'
+        """
+        dim, idx = self._mapping_to_dim_idx(**dim_idx_mapping)
+        return self._kwargs["model_data"].coords[dim][int(idx)]
 
-    if as_latex:
-        return _as_latex
-    else:
-        return _roll
+    @overload
+    @staticmethod
+    def _mapping_to_dim_idx(**dim_idx_mapping: int) -> tuple[str, int]:
+        "used in as_array"
 
+    @overload
+    @staticmethod
+    def _mapping_to_dim_idx(**dim_idx_mapping: str) -> tuple[str, str]:
+        "used in as_latex"
 
-def add_to_iterator(instring: str, iterator_converter: dict[str, str]) -> str:
-    """Find an iterator in the iterator substring of the component string
-    (anything wrapped in `_text{}`). Other parts of the iterator substring can be anything
-    except curly braces, e.g. the standalone `foo` will be found here and acted upon:
-    `\\textit{my_param}_\text{bar,foo,foo=bar,foo+1}`
+    @staticmethod
+    def _mapping_to_dim_idx(**dim_idx_mapping) -> tuple[str, Union[str, int]]:
+        if len(dim_idx_mapping) != 1:
+            raise ValueError("Supply one (and only one) dimension:index mapping")
+        return next(iter(dim_idx_mapping.items()))
 
-    Args:
-        instring (str): String in which the iterator substring can be found.
-        iterator_converter (dict[str, str]):
-            key: the iterator to search for.
-            val: The new string to **append** to the iterator name.
 
-    Returns:
-        str: `instring`, but with `iterator` replaced with `iterator + new_string`
-    """
+class Roll(ParsingHelperFunction):
+    #:
+    NAME = "roll"
+    #:
+    ALLOWED_IN = ["expression"]
 
-    def _replace_in_iterator(matched):
-        iterator_list = matched.group(2).split(",")
-        new_iterator_list = []
-        for it in iterator_list:
-            if it in iterator_converter:
-                it += iterator_converter[it]
-            new_iterator_list.append(it)
+    def as_latex(self, array: str, **roll_kwargs: str) -> str:
+        new_strings = {
+            k.removesuffix("s"): f"{-1 * int(v):+d}" for k, v in roll_kwargs.items()
+        }
+        component = self._add_to_iterator(array, new_strings)
+        return component
+
+    def as_array(self, array: xr.DataArray, **roll_kwargs: int) -> xr.DataArray:
+        """
+        Roll (a.k.a., shift) the array along the given dimension(s) by the given number of places.
+        Rolling keeps the array index labels in the same position, but moves the data by the given number of places.
 
-        return matched.group(1) + ",".join(new_iterator_list) + matched.group(3)
+        Args:
+            array (xr.DataArray): Array on which to roll data.
+        Keyword Args:
+            key (str): name of dimension on which to roll.
+            value (int): number of places to roll data.
+
+        Returns:
+            xr.DataArray: `array` with rolled data.
 
-    return re.sub(r"(_\\text{)([^{}]*?)(})", _replace_in_iterator, instring)
+        Examples:
+            >>> array = xr.DataArray([1, 2, 3], coords={"foo": ["A", "B", "C"]})
+            >>> model_data = xr.Dataset({"bar": array})
+            >>> roll = Roll()
+            >>> roll("bar", foo=1)
+            <xarray.DataArray 'bar' (foo: 3)>
+            array([3, 1, 2])
+            Coordinates:
+            * foo      (foo) <U1 'A' 'B' 'C'
+        """
+        roll_kwargs_int: Mapping = {k: int(v) for k, v in roll_kwargs.items()}
+        return array.roll(roll_kwargs_int)
diff --git a/calliope/backend/parsing.py b/calliope/backend/parsing.py
index 948cb88c4..564aa6a79 100644
--- a/calliope/backend/parsing.py
+++ b/calliope/backend/parsing.py
@@ -15,20 +15,6 @@
 from calliope import exceptions
 from calliope.backend import backends, expression_parser, helper_functions, where_parser
 
-VALID_EXPRESSION_HELPER_FUNCTIONS: dict[str, Callable] = {
-    "sum": helper_functions.expression_sum,
-    "squeeze_carriers": helper_functions.squeeze_carriers,
-    "squeeze_primary_carriers": helper_functions.squeeze_primary_carriers,
-    "select_from_lookup_arrays": helper_functions.select_from_lookup_arrays,
-    "get_val_at_index": helper_functions.get_val_at_index,
-    "roll": helper_functions.roll,
-}
-VALID_WHERE_HELPER_FUNCTIONS: dict[str, Callable] = {
-    "inheritance": helper_functions.inheritance,
-    "sum": helper_functions.where_sum,
-    "get_val_at_index": helper_functions.get_val_at_index,
-}
-
 TRUE_ARRAY = xr.DataArray(True)
 
 
@@ -277,12 +263,11 @@ def evaluate_where(  # noqa: F811
                 If `as_latex` is False: Boolean array defining on which index items a parsed component should be built.
                 If `as_latex` is True: Valid LaTeX math string defining the "where" conditions using logic notation.
         """
-
         evaluated_wheres = [
             where[0].eval(
-                model_data=model_data,
-                helper_func_dict=VALID_WHERE_HELPER_FUNCTIONS,
+                helper_functions=helper_functions._registry["where"],
                 as_latex=as_latex,
+                model_data=model_data,
             )
             for where in self.where
         ]
@@ -346,11 +331,11 @@ def evaluate_expression(  # noqa: F811
             sub_expression_dict=self.sub_expressions,
             backend_interface=backend_interface,
             backend_dataset=backend_interface._dataset,
-            helper_func_dict=VALID_EXPRESSION_HELPER_FUNCTIONS,
             model_data=model_data,
             where=where,
             references=references if references is not None else set(),
             as_dict=False,
+            helper_functions=helper_functions._registry["expression"],
             as_latex=as_latex,
             apply_where=apply_where,
         )
diff --git a/calliope/backend/where_parser.py b/calliope/backend/where_parser.py
index 1071235de..a66b23b98 100644
--- a/calliope/backend/where_parser.py
+++ b/calliope/backend/where_parser.py
@@ -179,20 +179,14 @@ def as_latex(self, model_data: xr.Dataset, apply_where: bool = True) -> str:
 
     def _data_var_exists(self, model_data: xr.Dataset) -> xr.DataArray:
         "mask by setting all (NaN | INF/-INF) to False, otherwise True"
-        if self.data_var not in model_data:
-            return xr.DataArray(np.False_)
-        else:
-            model_data_var = model_data[self.data_var]
+        model_data_var = model_data.get(self.data_var, xr.DataArray(None))
         with pd.option_context("mode.use_inf_as_na", True):
             return model_data_var.where(pd.notnull(model_data_var)).notnull()  # type: ignore
 
     def _data_var_with_default(self, model_data: xr.Dataset) -> xr.DataArray:
         "Access data var and fill with default values. Return default value as an array if var does not exist"
         default = model_data.attrs["defaults"].get(self.data_var)
-        if self.data_var not in model_data:
-            return xr.DataArray(default)
-        else:
-            return model_data[self.data_var].fillna(default)
+        return model_data.get(self.data_var, xr.DataArray(default)).fillna(default)
 
     def eval(
         self, model_data: xr.Dataset, apply_where: bool = True, **kwargs
diff --git a/calliope/core/model.py b/calliope/core/model.py
index cff582cda..bb47a2736 100644
--- a/calliope/core/model.py
+++ b/calliope/core/model.py
@@ -38,7 +38,6 @@
 def read_netcdf(path):
     """
     Return a Model object reconstructed from model data in a NetCDF file.
-
     """
     model_data = io.read_netcdf(path)
     return Model(config=None, model_data=model_data)
@@ -47,7 +46,6 @@ def read_netcdf(path):
 class Model(object):
     """
     A Calliope Model.
-
     """
 
     _BACKENDS: dict[str, Callable] = {"pyomo": backends.PyomoBackendModel}
@@ -78,6 +76,7 @@ def __init__(
             debug (bool, optional):
                 If True, additional debug data will be included in the built model.
                 Defaults to False.
+
         Keyword Args:
             timeseries_dataframes (dict[str, pd.DataFrame]):
                 If supplying `config` as a dictionary, in-memory timeseries data can be referred to using `df=...`.
@@ -87,6 +86,7 @@ def __init__(
             override_dict (dict):
                 Additional overrides to apply to `config`.
                 These will be applied *after* applying any defined `scenario` overrides.
+
         Raises:
             ValueError: `config` must be provided (as one of `str`, `int`, `None`).
         """
diff --git a/calliope/math/base.yaml b/calliope/math/base.yaml
index e90f23dd3..8b22dd82f 100644
--- a/calliope/math/base.yaml
+++ b/calliope/math/base.yaml
@@ -63,21 +63,21 @@ constraints:
     foreach: [nodes, techs, timesteps]
     where: "inheritance(conversion_plus) AND carrier_ratios>0"
     equations:
-      - expression: squeeze_carriers(carrier_prod / carrier_ratios[carrier_tiers=out], carrier_tier=out) == -1 * squeeze_carriers(carrier_con * carrier_ratios[carrier_tiers=in], carrier_tier=in) * energy_eff
+      - expression: reduce_carrier_dim(carrier_prod / carrier_ratios[carrier_tiers=out], carrier_tier=out) == -1 * reduce_carrier_dim(carrier_con * carrier_ratios[carrier_tiers=in], carrier_tier=in) * energy_eff
 
   carrier_production_max_conversion_plus:
     description: "Set the upper bound in each timestep of a `conversion_plus` technology's total carrier production on its `out` carrier flows."
     foreach: [nodes, techs, timesteps]
     where: "inheritance(conversion_plus) AND NOT cap_method=integer"
     equations:
-      - expression: squeeze_carriers(carrier_prod, carrier_tier=out) <= timestep_resolution * energy_cap
+      - expression: reduce_carrier_dim(carrier_prod, carrier_tier=out) <= timestep_resolution * energy_cap
 
   carrier_production_min_conversion_plus:
     description: "Set the lower bound in each timestep of a `conversion_plus` technology's total carrier production on its `out` carrier flows."
     foreach: [nodes, techs, timesteps]
     where: "energy_cap_min_use AND inheritance(conversion_plus) AND NOT cap_method=integer"
     equations:
-      - expression: squeeze_carriers(carrier_prod, carrier_tier=out) >= timestep_resolution * energy_cap * energy_cap_min_use
+      - expression: reduce_carrier_dim(carrier_prod, carrier_tier=out) >= timestep_resolution * energy_cap * energy_cap_min_use
 
   balance_conversion_plus_non_primary:
     description: "Fix the relationship between a `conversion_plus` technology's total `in_2`/`in_3` (consumption) and `out_2`/`out_3` (production) carrier flows and its `in` (consumption) and `out` (production) carrier flows."
@@ -88,18 +88,18 @@ constraints:
     sub_expressions:
       c_1:
         - where: "[in_2, in_3] in carrier_tiers"
-          expression: squeeze_carriers(carrier_con / carrier_ratios[carrier_tiers=in], carrier_tier=in)
+          expression: reduce_carrier_dim(carrier_con / carrier_ratios[carrier_tiers=in], carrier_tier=in)
         - where: "[out_2, out_3] in carrier_tiers"
-          expression: squeeze_carriers(carrier_prod / carrier_ratios[carrier_tiers=out], carrier_tier=out)
+          expression: reduce_carrier_dim(carrier_prod / carrier_ratios[carrier_tiers=out], carrier_tier=out)
       c_2:
         - where: "[in_2] in carrier_tiers"
-          expression: squeeze_carriers(carrier_con / carrier_ratios[carrier_tiers=in_2], carrier_tier=in_2)
+          expression: reduce_carrier_dim(carrier_con / carrier_ratios[carrier_tiers=in_2], carrier_tier=in_2)
         - where: "[in_3] in carrier_tiers"
-          expression: squeeze_carriers(carrier_con / carrier_ratios[carrier_tiers=in_3], carrier_tier=in_3)
+          expression: reduce_carrier_dim(carrier_con / carrier_ratios[carrier_tiers=in_3], carrier_tier=in_3)
         - where: "[out_2] in carrier_tiers"
-          expression: squeeze_carriers(carrier_prod / carrier_ratios[carrier_tiers=out_2], carrier_tier=out_2)
+          expression: reduce_carrier_dim(carrier_prod / carrier_ratios[carrier_tiers=out_2], carrier_tier=out_2)
         - where: "[out_3] in carrier_tiers"
-          expression: squeeze_carriers(carrier_prod / carrier_ratios[carrier_tiers=out_3], carrier_tier=out_3)
+          expression: reduce_carrier_dim(carrier_prod / carrier_ratios[carrier_tiers=out_3], carrier_tier=out_3)
 
   conversion_plus_prod_con_to_zero:
     description: "Set a `conversion_plus` technology's carrier flow to zero if its `carrier_ratio` is zero."
@@ -119,7 +119,7 @@ constraints:
     foreach: [nodes, techs, timesteps]
     where: "inheritance(conversion)"
     equations:
-      - expression: squeeze_carriers(carrier_prod, carrier_tier=out) == -1 * squeeze_carriers(carrier_con, carrier_tier=in) * energy_eff
+      - expression: reduce_carrier_dim(carrier_prod, carrier_tier=out) == -1 * reduce_carrier_dim(carrier_con, carrier_tier=in) * energy_eff
 
   carrier_production_max:
     description: "Set the upper bound of a non-`conversion_plus` technology's carrier production."
@@ -170,9 +170,9 @@ constraints:
       - expression: "sum(carrier_prod, over=techs) + sum(carrier_con, over=techs) - $carrier_export + $unmet_demand_and_unused_supply == 0"
     sub_expressions:
       carrier_export:
-        - where: "sum(export_carrier, over=techs)"
+        - where: "any(export_carrier, over=techs)"
           expression: sum(carrier_export, over=techs)
-        - where: "NOT sum(export_carrier, over=techs)"
+        - where: "NOT any(export_carrier, over=techs)"
           expression: "0"
       unmet_demand_and_unused_supply:
         - where: "run.ensure_feasibility=True"
@@ -248,11 +248,11 @@ constraints:
     sub_expressions:
       carrier_prod: *carrier_prod_with_parasitic
       storage_previous_step: &storage_previous_step
-        - where: timesteps=get_val_at_index(dim=timesteps, idx=0) AND NOT run.cyclic_storage=True
+        - where: timesteps=get_val_at_index(timesteps=0) AND NOT run.cyclic_storage=True
           expression: storage_initial * storage_cap
-        - where: ((timesteps=get_val_at_index(dim=timesteps, idx=0) AND run.cyclic_storage=True) OR NOT timesteps=get_val_at_index(dim=timesteps, idx=0)) AND NOT lookup_cluster_first_timestep=True
+        - where: ((timesteps=get_val_at_index(timesteps=0) AND run.cyclic_storage=True) OR NOT timesteps=get_val_at_index(timesteps=0)) AND NOT lookup_cluster_first_timestep=True
           expression: (1 - storage_loss) ** roll(timestep_resolution, timesteps=1) * roll(storage, timesteps=1)
-        - where: lookup_cluster_first_timestep=True AND NOT (timesteps=get_val_at_index(dim=timesteps, idx=0) AND NOT run.cyclic_storage=True)
+        - where: lookup_cluster_first_timestep=True AND NOT (timesteps=get_val_at_index(timesteps=0) AND NOT run.cyclic_storage=True)
           expression: (1 - storage_loss) ** select_from_lookup_arrays(timestep_resolution, timesteps=lookup_cluster_last_timestep) * select_from_lookup_arrays(storage, timesteps=lookup_cluster_last_timestep)
 
   resource_availability_supply_plus:
@@ -289,7 +289,7 @@ constraints:
       - expression: storage[timesteps=$final_step] * ((1 - storage_loss) ** timestep_resolution[timesteps=$final_step]) == storage_initial * storage_cap
     slices:
       final_step:
-        - expression: get_val_at_index(dim=timesteps, idx=-1)
+        - expression: get_val_at_index(timesteps=-1)
 
   balance_transmission:
     description: "Fix the relationship between between energy flowing into and out of a `transmission` link in each timestep."
@@ -341,7 +341,7 @@ constraints:
     foreach: [nodes, techs, timesteps]
     where: "inheritance(conversion_plus) AND cap_method=integer AND allowed_carrier_prod=True"
     equations:
-      - expression: squeeze_carriers(carrier_prod, carrier_tier=out) <= operating_units * timestep_resolution * energy_cap_per_unit
+      - expression: reduce_carrier_dim(carrier_prod, carrier_tier=out) <= operating_units * timestep_resolution * energy_cap_per_unit
 
   carrier_consumption_max_milp:
     description: "Set the upper bound of a non-`conversion_plus` technology's ability to consume energy, for any technology using integer units to define its capacity."
@@ -362,7 +362,7 @@ constraints:
     foreach: [nodes, techs, timesteps]
     where: "energy_cap_min_use AND inheritance(conversion_plus) AND cap_method=integer AND allowed_carrier_prod=True"
     equations:
-      - expression: squeeze_carriers(carrier_prod, carrier_tier=out) >= operating_units * timestep_resolution * energy_cap_per_unit * energy_cap_min_use
+      - expression: reduce_carrier_dim(carrier_prod, carrier_tier=out) >= operating_units * timestep_resolution * energy_cap_per_unit * energy_cap_min_use
 
   storage_capacity_units_milp:
     description: "Fix the storage capacity of any technology using integer units to define its capacity."
@@ -433,19 +433,19 @@ constraints:
     foreach: [nodes, techs, timesteps]
     where: "force_asynchronous_prod_con=True"
     equations:
-      - expression: -1 * squeeze_carriers(carrier_con, carrier_tier=in) <= (1 - prod_con_switch) * bigM
+      - expression: -1 * reduce_carrier_dim(carrier_con, carrier_tier=in) <= (1 - prod_con_switch) * bigM
 
   asynchronous_prod_milp:
     description: "Set a technology's ability to produce energy in the same timestep that it is consuming energy, for any technology using the asynchronous production/consumption binary switch."
     foreach: [nodes, techs, timesteps]
     where: "force_asynchronous_prod_con=True"
     equations:
-      - expression: squeeze_carriers(carrier_prod, carrier_tier=out) <= prod_con_switch * bigM
+      - expression: reduce_carrier_dim(carrier_prod, carrier_tier=out) <= prod_con_switch * bigM
 
   ramping_up:
     description: "Set the upper bound on a technology's ability to ramp energy production up beyond a certain percentage compared to the previous timestep."
     foreach: [nodes, techs, carriers, timesteps]
-    where: "energy_ramping AND NOT timesteps=get_val_at_index(dim=timesteps, idx=0)"
+    where: "energy_ramping AND NOT timesteps=get_val_at_index(timesteps=0)"
     equations:
       - expression: $flow - roll($flow, timesteps=1) <= energy_ramping * energy_cap
     sub_expressions:
@@ -460,7 +460,7 @@ constraints:
   ramping_down:
     description: "Set the upper bound on a technology's ability to ramp energy production down beyond a certain percentage compared to the previous timestep."
     foreach: [nodes, techs, carriers, timesteps]
-    where: "energy_ramping AND NOT timesteps=get_val_at_index(dim=timesteps, idx=0)"
+    where: "energy_ramping AND NOT timesteps=get_val_at_index(timesteps=0)"
     equations:
       - expression: -1 * energy_ramping * energy_cap <= $flow - roll($flow, timesteps=1)
     sub_expressions:
@@ -642,18 +642,18 @@ global_expressions:
         - where: "cost_om_con AND inheritance(supply_plus)"
           expression: cost_om_con * resource_con
         - where: "cost_om_con AND inheritance(supply) AND energy_eff>0 AND [out] in carrier_tiers"
-          expression: cost_om_con * squeeze_carriers(carrier_prod, carrier_tier=out) / energy_eff
+          expression: cost_om_con * reduce_carrier_dim(carrier_prod, carrier_tier=out) / energy_eff
         - where: "cost_om_con AND inheritance(conversion_plus)"
-          expression: cost_om_con * -1 * squeeze_primary_carriers(carrier_con, carrier_tier=in)
+          expression: cost_om_con * -1 * reduce_primary_carrier_dim(carrier_con, carrier_tier=in)
         - where: "cost_om_con AND NOT (inheritance(conversion_plus) OR inheritance(supply_plus) OR inheritance(supply)) AND [in] in carrier_tiers"
-          expression: cost_om_con * -1 * squeeze_carriers(carrier_con, carrier_tier=in)
+          expression: cost_om_con * -1 * reduce_carrier_dim(carrier_con, carrier_tier=in)
         - where: "NOT cost_om_con"
           expression: "0"
       cost_om_prod:
         - where: "cost_om_prod AND inheritance(conversion_plus)"
-          expression: cost_om_prod * squeeze_primary_carriers(carrier_prod, carrier_tier=out)
+          expression: cost_om_prod * reduce_primary_carrier_dim(carrier_prod, carrier_tier=out)
         - where: "cost_om_prod AND NOT inheritance(conversion_plus)"
-          expression: cost_om_prod * squeeze_carriers(carrier_prod, carrier_tier=out)
+          expression: cost_om_prod * reduce_carrier_dim(carrier_prod, carrier_tier=out)
         - where: "NOT cost_om_prod"
           expression: "0"
 
diff --git a/calliope/math/storage_inter_cluster.yaml b/calliope/math/storage_inter_cluster.yaml
index f8839faa7..227c13cd9 100644
--- a/calliope/math/storage_inter_cluster.yaml
+++ b/calliope/math/storage_inter_cluster.yaml
@@ -7,11 +7,11 @@ constraints:
   balance_supply_plus_with_storage:
     sub_expressions:
       storage_previous_step: &storage_previous_step
-        - where: timesteps=get_val_at_index(dim=timesteps, idx=0) AND NOT run.cyclic_storage=True
+        - where: timesteps=get_val_at_index(timesteps=0) AND NOT run.cyclic_storage=True
           expression: storage_initial * storage_cap
-        - where: ((timesteps=get_val_at_index(dim=timesteps, idx=0) AND run.cyclic_storage=True) OR NOT timesteps=get_val_at_index(dim=timesteps, idx=0)) AND NOT lookup_cluster_last_timestep
+        - where: ((timesteps=get_val_at_index(timesteps=0) AND run.cyclic_storage=True) OR NOT timesteps=get_val_at_index(timesteps=0)) AND NOT lookup_cluster_last_timestep
           expression: (1 - storage_loss) ** roll(timestep_resolution, timesteps=1) * roll(storage, timesteps=1)
-        - where: lookup_cluster_last_timestep AND NOT (timesteps=get_val_at_index(dim=timesteps, idx=0) AND NOT run.cyclic_storage=True)
+        - where: lookup_cluster_last_timestep AND NOT (timesteps=get_val_at_index(timesteps=0) AND NOT run.cyclic_storage=True)
           expression: "0"
 
   balance_storage:
@@ -23,7 +23,7 @@ constraints:
       - expression: storage_inter_cluster[datesteps=$final_step] * ((1 - storage_loss) ** 24) == storage_initial * storage_cap
     slices:
       final_step:
-        - expression: get_val_at_index(dim=datesteps, idx=-1)
+        - expression: get_val_at_index(datesteps=-1)
 
   storage_intra_max:
     description: "Set the upper bound of a `storage` technology's stored energy within a clustered day"
@@ -69,14 +69,14 @@ constraints:
       - expression: storage_inter_cluster == $storage_previous_step + $storage_intra
     sub_expressions:
       storage_previous_step:
-        - where: datesteps=get_val_at_index(dim=datesteps, idx=0) AND NOT run.cyclic_storage=True
+        - where: datesteps=get_val_at_index(datesteps=0) AND NOT run.cyclic_storage=True
           expression: storage_initial
-        - where: (datesteps=get_val_at_index(dim=datesteps, idx=0) AND run.cyclic_storage=True) OR NOT datesteps=get_val_at_index(dim=datesteps, idx=0)
+        - where: (datesteps=get_val_at_index(datesteps=0) AND run.cyclic_storage=True) OR NOT datesteps=get_val_at_index(datesteps=0)
           expression: ((1 - storage_loss) ** 24) * roll(storage_inter_cluster, datesteps=1)
       storage_intra:
-        - where: datesteps=get_val_at_index(dim=datesteps, idx=0) AND NOT run.cyclic_storage=True
+        - where: datesteps=get_val_at_index(datesteps=0) AND NOT run.cyclic_storage=True
           expression: "0"
-        - where: NOT (datesteps=get_val_at_index(dim=datesteps, idx=0) AND NOT run.cyclic_storage=True)
+        - where: NOT (datesteps=get_val_at_index(datesteps=0) AND NOT run.cyclic_storage=True)
           expression: storage[timesteps=$final_step]
     slices:
       final_step:
diff --git a/doc/_static/math.rst b/doc/_static/math.rst
index e0d9e119a..572c53c44 100644
--- a/doc/_static/math.rst
+++ b/doc/_static/math.rst
@@ -201,10 +201,10 @@ Fix the relationship between total carrier production and total carrier consumpt
             \text{ tech }\negthickspace \in \negthickspace\text{ techs, }
             \text{ timestep }\negthickspace \in \negthickspace\text{ timesteps }
             \\
-            \text{if } (\text{tech_group=conversion_plus} \land \textit{carrier_ratios}_\text{carrier_tier,carrier,node,tech,timestep}\mathord{>}\text{0})
+            \text{if } (\text{tech_group=conversion_plus} \land \textit{carrier_ratios}_\text{node,tech,carrier_tier,carrier,timestep}\mathord{>}\text{0})
         \end{array}
         \begin{cases}
-            \sum\limits_{\text{carrier} \in \text{carrier_tier(out)}} (\frac{ \textbf{carrier_prod}_\text{node,tech,carrier,timestep} }{ \textit{carrier_ratios}_\text{carrier_tier=out,carrier,node,tech,timestep} }) = -1 \times \sum\limits_{\text{carrier} \in \text{carrier_tier(in)}} (\textbf{carrier_con}_\text{node,tech,carrier,timestep} \times \textit{carrier_ratios}_\text{carrier_tier=in,carrier,node,tech,timestep}) \times \textit{energy_eff}_\text{node,tech,timestep}&\quad
+            \sum\limits_{\text{carrier} \in \text{carrier_tier(out)}} (\frac{ \textbf{carrier_prod}_\text{node,tech,carrier,timestep} }{ \textit{carrier_ratios}_\text{node,tech,carrier_tier=out,carrier,timestep} }) = -1 \times \sum\limits_{\text{carrier} \in \text{carrier_tier(in)}} (\textbf{carrier_con}_\text{node,tech,carrier,timestep} \times \textit{carrier_ratios}_\text{node,tech,carrier_tier=in,carrier,timestep}) \times \textit{energy_eff}_\text{node,tech,timestep}&\quad
             \\
         \end{cases}
 
@@ -265,31 +265,31 @@ Fix the relationship between a `conversion_plus` technology's total `in_2`/`in_3
             \text{ carrier_tier }\negthickspace \in \negthickspace\text{ carrier_tiers, }
             \text{ timestep }\negthickspace \in \negthickspace\text{ timesteps }
             \\
-            \text{if } (\text{tech_group=conversion_plus} \land \text{carrier_tier} \in \text{[in_2,out_2,in_3,out_3]} \land \textit{carrier_ratios}_\text{carrier_tier,carrier,node,tech,timestep}\mathord{>}\text{0})
+            \text{if } (\text{tech_group=conversion_plus} \land \text{carrier_tier} \in \text{[in_2,out_2,in_3,out_3]} \land \textit{carrier_ratios}_\text{node,tech,carrier_tier,carrier,timestep}\mathord{>}\text{0})
         \end{array}
         \begin{cases}
-            \sum\limits_{\text{carrier} \in \text{carrier_tier(in)}} (\frac{ \textbf{carrier_con}_\text{node,tech,carrier,timestep} }{ \textit{carrier_ratios}_\text{carrier_tier=in,carrier,node,tech,timestep} }) = \sum\limits_{\text{carrier} \in \text{carrier_tier(in_2)}} (\frac{ \textbf{carrier_con}_\text{node,tech,carrier,timestep} }{ \textit{carrier_ratios}_\text{carrier_tier=in_2,carrier,node,tech,timestep} })&\quad
+            \sum\limits_{\text{carrier} \in \text{carrier_tier(in)}} (\frac{ \textbf{carrier_con}_\text{node,tech,carrier,timestep} }{ \textit{carrier_ratios}_\text{node,tech,carrier_tier=in,carrier,timestep} }) = \sum\limits_{\text{carrier} \in \text{carrier_tier(in_2)}} (\frac{ \textbf{carrier_con}_\text{node,tech,carrier,timestep} }{ \textit{carrier_ratios}_\text{node,tech,carrier_tier=in_2,carrier,timestep} })&\quad
             \text{if } (\text{carrier_tier} \in \text{[in_2]})\land{}(\text{carrier_tier} \in \text{[in_2,in_3]})
             \\
-            \sum\limits_{\text{carrier} \in \text{carrier_tier(out)}} (\frac{ \textbf{carrier_prod}_\text{node,tech,carrier,timestep} }{ \textit{carrier_ratios}_\text{carrier_tier=out,carrier,node,tech,timestep} }) = \sum\limits_{\text{carrier} \in \text{carrier_tier(in_2)}} (\frac{ \textbf{carrier_con}_\text{node,tech,carrier,timestep} }{ \textit{carrier_ratios}_\text{carrier_tier=in_2,carrier,node,tech,timestep} })&\quad
+            \sum\limits_{\text{carrier} \in \text{carrier_tier(out)}} (\frac{ \textbf{carrier_prod}_\text{node,tech,carrier,timestep} }{ \textit{carrier_ratios}_\text{node,tech,carrier_tier=out,carrier,timestep} }) = \sum\limits_{\text{carrier} \in \text{carrier_tier(in_2)}} (\frac{ \textbf{carrier_con}_\text{node,tech,carrier,timestep} }{ \textit{carrier_ratios}_\text{node,tech,carrier_tier=in_2,carrier,timestep} })&\quad
             \text{if } (\text{carrier_tier} \in \text{[in_2]})\land{}(\text{carrier_tier} \in \text{[out_2,out_3]})
             \\
-            \sum\limits_{\text{carrier} \in \text{carrier_tier(in)}} (\frac{ \textbf{carrier_con}_\text{node,tech,carrier,timestep} }{ \textit{carrier_ratios}_\text{carrier_tier=in,carrier,node,tech,timestep} }) = \sum\limits_{\text{carrier} \in \text{carrier_tier(in_3)}} (\frac{ \textbf{carrier_con}_\text{node,tech,carrier,timestep} }{ \textit{carrier_ratios}_\text{carrier_tier=in_3,carrier,node,tech,timestep} })&\quad
+            \sum\limits_{\text{carrier} \in \text{carrier_tier(in)}} (\frac{ \textbf{carrier_con}_\text{node,tech,carrier,timestep} }{ \textit{carrier_ratios}_\text{node,tech,carrier_tier=in,carrier,timestep} }) = \sum\limits_{\text{carrier} \in \text{carrier_tier(in_3)}} (\frac{ \textbf{carrier_con}_\text{node,tech,carrier,timestep} }{ \textit{carrier_ratios}_\text{node,tech,carrier_tier=in_3,carrier,timestep} })&\quad
             \text{if } (\text{carrier_tier} \in \text{[in_3]})\land{}(\text{carrier_tier} \in \text{[in_2,in_3]})
             \\
-            \sum\limits_{\text{carrier} \in \text{carrier_tier(out)}} (\frac{ \textbf{carrier_prod}_\text{node,tech,carrier,timestep} }{ \textit{carrier_ratios}_\text{carrier_tier=out,carrier,node,tech,timestep} }) = \sum\limits_{\text{carrier} \in \text{carrier_tier(in_3)}} (\frac{ \textbf{carrier_con}_\text{node,tech,carrier,timestep} }{ \textit{carrier_ratios}_\text{carrier_tier=in_3,carrier,node,tech,timestep} })&\quad
+            \sum\limits_{\text{carrier} \in \text{carrier_tier(out)}} (\frac{ \textbf{carrier_prod}_\text{node,tech,carrier,timestep} }{ \textit{carrier_ratios}_\text{node,tech,carrier_tier=out,carrier,timestep} }) = \sum\limits_{\text{carrier} \in \text{carrier_tier(in_3)}} (\frac{ \textbf{carrier_con}_\text{node,tech,carrier,timestep} }{ \textit{carrier_ratios}_\text{node,tech,carrier_tier=in_3,carrier,timestep} })&\quad
             \text{if } (\text{carrier_tier} \in \text{[in_3]})\land{}(\text{carrier_tier} \in \text{[out_2,out_3]})
             \\
-            \sum\limits_{\text{carrier} \in \text{carrier_tier(in)}} (\frac{ \textbf{carrier_con}_\text{node,tech,carrier,timestep} }{ \textit{carrier_ratios}_\text{carrier_tier=in,carrier,node,tech,timestep} }) = \sum\limits_{\text{carrier} \in \text{carrier_tier(out_2)}} (\frac{ \textbf{carrier_prod}_\text{node,tech,carrier,timestep} }{ \textit{carrier_ratios}_\text{carrier_tier=out_2,carrier,node,tech,timestep} })&\quad
+            \sum\limits_{\text{carrier} \in \text{carrier_tier(in)}} (\frac{ \textbf{carrier_con}_\text{node,tech,carrier,timestep} }{ \textit{carrier_ratios}_\text{node,tech,carrier_tier=in,carrier,timestep} }) = \sum\limits_{\text{carrier} \in \text{carrier_tier(out_2)}} (\frac{ \textbf{carrier_prod}_\text{node,tech,carrier,timestep} }{ \textit{carrier_ratios}_\text{node,tech,carrier_tier=out_2,carrier,timestep} })&\quad
             \text{if } (\text{carrier_tier} \in \text{[out_2]})\land{}(\text{carrier_tier} \in \text{[in_2,in_3]})
             \\
-            \sum\limits_{\text{carrier} \in \text{carrier_tier(out)}} (\frac{ \textbf{carrier_prod}_\text{node,tech,carrier,timestep} }{ \textit{carrier_ratios}_\text{carrier_tier=out,carrier,node,tech,timestep} }) = \sum\limits_{\text{carrier} \in \text{carrier_tier(out_2)}} (\frac{ \textbf{carrier_prod}_\text{node,tech,carrier,timestep} }{ \textit{carrier_ratios}_\text{carrier_tier=out_2,carrier,node,tech,timestep} })&\quad
+            \sum\limits_{\text{carrier} \in \text{carrier_tier(out)}} (\frac{ \textbf{carrier_prod}_\text{node,tech,carrier,timestep} }{ \textit{carrier_ratios}_\text{node,tech,carrier_tier=out,carrier,timestep} }) = \sum\limits_{\text{carrier} \in \text{carrier_tier(out_2)}} (\frac{ \textbf{carrier_prod}_\text{node,tech,carrier,timestep} }{ \textit{carrier_ratios}_\text{node,tech,carrier_tier=out_2,carrier,timestep} })&\quad
             \text{if } (\text{carrier_tier} \in \text{[out_2]})\land{}(\text{carrier_tier} \in \text{[out_2,out_3]})
             \\
-            \sum\limits_{\text{carrier} \in \text{carrier_tier(in)}} (\frac{ \textbf{carrier_con}_\text{node,tech,carrier,timestep} }{ \textit{carrier_ratios}_\text{carrier_tier=in,carrier,node,tech,timestep} }) = \sum\limits_{\text{carrier} \in \text{carrier_tier(out_3)}} (\frac{ \textbf{carrier_prod}_\text{node,tech,carrier,timestep} }{ \textit{carrier_ratios}_\text{carrier_tier=out_3,carrier,node,tech,timestep} })&\quad
+            \sum\limits_{\text{carrier} \in \text{carrier_tier(in)}} (\frac{ \textbf{carrier_con}_\text{node,tech,carrier,timestep} }{ \textit{carrier_ratios}_\text{node,tech,carrier_tier=in,carrier,timestep} }) = \sum\limits_{\text{carrier} \in \text{carrier_tier(out_3)}} (\frac{ \textbf{carrier_prod}_\text{node,tech,carrier,timestep} }{ \textit{carrier_ratios}_\text{node,tech,carrier_tier=out_3,carrier,timestep} })&\quad
             \text{if } (\text{carrier_tier} \in \text{[out_3]})\land{}(\text{carrier_tier} \in \text{[in_2,in_3]})
             \\
-            \sum\limits_{\text{carrier} \in \text{carrier_tier(out)}} (\frac{ \textbf{carrier_prod}_\text{node,tech,carrier,timestep} }{ \textit{carrier_ratios}_\text{carrier_tier=out,carrier,node,tech,timestep} }) = \sum\limits_{\text{carrier} \in \text{carrier_tier(out_3)}} (\frac{ \textbf{carrier_prod}_\text{node,tech,carrier,timestep} }{ \textit{carrier_ratios}_\text{carrier_tier=out_3,carrier,node,tech,timestep} })&\quad
+            \sum\limits_{\text{carrier} \in \text{carrier_tier(out)}} (\frac{ \textbf{carrier_prod}_\text{node,tech,carrier,timestep} }{ \textit{carrier_ratios}_\text{node,tech,carrier_tier=out,carrier,timestep} }) = \sum\limits_{\text{carrier} \in \text{carrier_tier(out_3)}} (\frac{ \textbf{carrier_prod}_\text{node,tech,carrier,timestep} }{ \textit{carrier_ratios}_\text{node,tech,carrier_tier=out_3,carrier,timestep} })&\quad
             \text{if } (\text{carrier_tier} \in \text{[out_3]})\land{}(\text{carrier_tier} \in \text{[out_2,out_3]})
             \\
         \end{cases}
@@ -309,7 +309,7 @@ Set a `conversion_plus` technology's carrier flow to zero if its `carrier_ratio`
             \text{ carrier }\negthickspace \in \negthickspace\text{ carriers, }
             \text{ timestep }\negthickspace \in \negthickspace\text{ timesteps }
             \\
-            \text{if } (\textit{carrier_ratios}_\text{carrier_tier,carrier,node,tech,timestep}\mathord{=}\text{0} \land \text{tech_group=conversion_plus})
+            \text{if } (\textit{carrier_ratios}_\text{node,tech,carrier_tier,carrier,timestep}\mathord{=}\text{0} \land \text{tech_group=conversion_plus})
         \end{array}
         \begin{cases}
             \textbf{carrier_con}_\text{node,tech,carrier,timestep} = 0&\quad
@@ -356,7 +356,7 @@ Set the upper bound of a non-`conversion_plus` technology's carrier production.
             \text{ carrier }\negthickspace \in \negthickspace\text{ carriers, }
             \text{ timestep }\negthickspace \in \negthickspace\text{ timesteps }
             \\
-            \text{if } (\exists (\textit{carrier}_\text{carrier_tier,carrier,tech}) \land \neg (\text{tech_group=conversion_plus}) \land \neg (\textit{cap_method}_\text{node,tech}\mathord{=}\text{integer}) \land \textit{allowed_carrier_prod}_\text{node,tech}\mathord{=}\text{true} \land \text{carrier_tier} \in \text{[out]})
+            \text{if } (\exists (\textit{carrier}_\text{tech,carrier_tier,carrier}) \land \neg (\text{tech_group=conversion_plus}) \land \neg (\textit{cap_method}_\text{node,tech}\mathord{=}\text{integer}) \land \textit{allowed_carrier_prod}_\text{node,tech}\mathord{=}\text{true} \land \text{carrier_tier} \in \text{[out]})
         \end{array}
         \begin{cases}
             \textbf{carrier_prod}_\text{node,tech,carrier,timestep} \leq \textbf{energy_cap}_\text{node,tech} \times \textit{timestep_resolution}_\text{timestep} \times \textit{parasitic_eff}_\text{node,tech,timestep}&\quad
@@ -378,7 +378,7 @@ Set the lower bound of a non-`conversion_plus` technology's carrier production.
             \text{ carrier }\negthickspace \in \negthickspace\text{ carriers, }
             \text{ timestep }\negthickspace \in \negthickspace\text{ timesteps }
             \\
-            \text{if } (\exists (\textit{carrier}_\text{carrier_tier,carrier,tech}) \land \exists (\textit{energy_cap_min_use}_\text{node,tech}) \land \neg (\text{tech_group=conversion_plus}) \land \neg (\textit{cap_method}_\text{node,tech}\mathord{=}\text{integer}) \land \textit{allowed_carrier_prod}_\text{node,tech}\mathord{=}\text{true} \land \text{carrier_tier} \in \text{[out]})
+            \text{if } (\exists (\textit{carrier}_\text{tech,carrier_tier,carrier}) \land \exists (\textit{energy_cap_min_use}_\text{node,tech}) \land \neg (\text{tech_group=conversion_plus}) \land \neg (\textit{cap_method}_\text{node,tech}\mathord{=}\text{integer}) \land \textit{allowed_carrier_prod}_\text{node,tech}\mathord{=}\text{true} \land \text{carrier_tier} \in \text{[out]})
         \end{array}
         \begin{cases}
             \textbf{carrier_prod}_\text{node,tech,carrier,timestep} \geq \textbf{energy_cap}_\text{node,tech} \times \textit{timestep_resolution}_\text{timestep} \times \textit{energy_cap_min_use}_\text{node,tech}&\quad
@@ -400,7 +400,7 @@ Set the upper bound of a non-`conversion_plus` technology's carrier consumption.
             \text{ carrier }\negthickspace \in \negthickspace\text{ carriers, }
             \text{ timestep }\negthickspace \in \negthickspace\text{ timesteps }
             \\
-            \text{if } (\exists (\textit{carrier}_\text{carrier_tier,carrier,tech}) \land (\text{tech_group=transmission} \lor \text{tech_group=demand} \lor \text{tech_group=storage}) \land (\neg (\textit{cap_method}_\text{node,tech}\mathord{=}\text{integer}) \lor \text{tech_group=demand}) \land \textit{allowed_carrier_con}_\text{node,tech}\mathord{=}\text{true} \land \text{carrier_tier} \in \text{[in]})
+            \text{if } (\exists (\textit{carrier}_\text{tech,carrier_tier,carrier}) \land (\text{tech_group=transmission} \lor \text{tech_group=demand} \lor \text{tech_group=storage}) \land (\neg (\textit{cap_method}_\text{node,tech}\mathord{=}\text{integer}) \lor \text{tech_group=demand}) \land \textit{allowed_carrier_con}_\text{node,tech}\mathord{=}\text{true} \land \text{carrier_tier} \in \text{[in]})
         \end{array}
         \begin{cases}
             \textbf{carrier_con}_\text{node,tech,carrier,timestep} \geq -1 \times \textbf{energy_cap}_\text{node,tech} \times \textit{timestep_resolution}_\text{timestep}&\quad
@@ -487,16 +487,16 @@ Set the global energy balance of the optimisation problem by fixing the total pr
         \end{array}
         \begin{cases}
             \sum\limits_{\text{tech} \in \text{techs}} (\textbf{carrier_prod}_\text{node,tech,carrier,timestep}) + \sum\limits_{\text{tech} \in \text{techs}} (\textbf{carrier_con}_\text{node,tech,carrier,timestep}) - \sum\limits_{\text{tech} \in \text{techs}} (\textbf{carrier_export}_\text{node,tech,carrier,timestep}) + \textbf{unmet_demand}_\text{node,carrier,timestep} + \textbf{unused_supply}_\text{node,carrier,timestep} = 0&\quad
-            \text{if } (\text{run_config.ensure_feasibility}\mathord{=}\text{true})\land{}(\sum\limits_{\text{tech} \in \text{techs}} (export_carrier))
+            \text{if } (\text{run_config.ensure_feasibility}\mathord{=}\text{true})\land{}(\bigvee\limits_{\text{tech} \in \text{techs}} (export_carrier))
             \\
             \sum\limits_{\text{tech} \in \text{techs}} (\textbf{carrier_prod}_\text{node,tech,carrier,timestep}) + \sum\limits_{\text{tech} \in \text{techs}} (\textbf{carrier_con}_\text{node,tech,carrier,timestep}) + \textbf{unmet_demand}_\text{node,carrier,timestep} + \textbf{unused_supply}_\text{node,carrier,timestep} = 0&\quad
-            \text{if } (\text{run_config.ensure_feasibility}\mathord{=}\text{true})\land{}(\neg (\sum\limits_{\text{tech} \in \text{techs}} (export_carrier)))
+            \text{if } (\text{run_config.ensure_feasibility}\mathord{=}\text{true})\land{}(\neg (\bigvee\limits_{\text{tech} \in \text{techs}} (export_carrier)))
             \\
             \sum\limits_{\text{tech} \in \text{techs}} (\textbf{carrier_prod}_\text{node,tech,carrier,timestep}) + \sum\limits_{\text{tech} \in \text{techs}} (\textbf{carrier_con}_\text{node,tech,carrier,timestep}) - \sum\limits_{\text{tech} \in \text{techs}} (\textbf{carrier_export}_\text{node,tech,carrier,timestep}) = 0&\quad
-            \text{if } (\neg (\text{run_config.ensure_feasibility}\mathord{=}\text{true}))\land{}(\sum\limits_{\text{tech} \in \text{techs}} (export_carrier))
+            \text{if } (\neg (\text{run_config.ensure_feasibility}\mathord{=}\text{true}))\land{}(\bigvee\limits_{\text{tech} \in \text{techs}} (export_carrier))
             \\
             \sum\limits_{\text{tech} \in \text{techs}} (\textbf{carrier_prod}_\text{node,tech,carrier,timestep}) + \sum\limits_{\text{tech} \in \text{techs}} (\textbf{carrier_con}_\text{node,tech,carrier,timestep}) = 0&\quad
-            \text{if } (\neg (\text{run_config.ensure_feasibility}\mathord{=}\text{true}))\land{}(\neg (\sum\limits_{\text{tech} \in \text{techs}} (export_carrier)))
+            \text{if } (\neg (\text{run_config.ensure_feasibility}\mathord{=}\text{true}))\land{}(\neg (\bigvee\limits_{\text{tech} \in \text{techs}} (export_carrier)))
             \\
         \end{cases}
 
@@ -645,22 +645,22 @@ Set the upper bound on, or a fixed total of, a `supply_plus` (with storage) tech
         \end{array}
         \begin{cases}
             \textbf{storage}_\text{node,tech,timestep} = \textit{storage_initial}_\text{node,tech} \times \textbf{storage_cap}_\text{node,tech} + (\textbf{resource_con}_\text{node,tech,timestep} \times \textit{resource_eff}_\text{node,tech,timestep})&\quad
-            \text{if } (\textit{timesteps}_\text{timestep}\mathord{=}\text{timesteps[0]} \land \neg (\text{run_config.cyclic_storage}\mathord{=}\text{true}))\land{}(\textit{energy_eff}_\text{node,tech,timestep}\mathord{=}\text{0} \lor \textit{parasitic_eff}_\text{node,tech,timestep}\mathord{=}\text{0})
-            \\
-            \textbf{storage}_\text{node,tech,timestep} = \textit{storage_initial}_\text{node,tech} \times \textbf{storage_cap}_\text{node,tech} + (\textbf{resource_con}_\text{node,tech,timestep} \times \textit{resource_eff}_\text{node,tech,timestep}) - \frac{ \textbf{carrier_prod}_\text{node,tech,carrier,timestep} }{ (\textit{energy_eff}_\text{node,tech,timestep} \times \textit{parasitic_eff}_\text{node,tech,timestep}) }&\quad
-            \text{if } (\textit{timesteps}_\text{timestep}\mathord{=}\text{timesteps[0]} \land \neg (\text{run_config.cyclic_storage}\mathord{=}\text{true}))\land{}(\neg (\textit{energy_eff}_\text{node,tech,timestep}\mathord{=}\text{0} \lor \textit{parasitic_eff}_\text{node,tech,timestep}\mathord{=}\text{0}))
+            \text{if } (\textit{energy_eff}_\text{node,tech,timestep}\mathord{=}\text{0} \lor \textit{parasitic_eff}_\text{node,tech,timestep}\mathord{=}\text{0})\land{}(\textit{timesteps}_\text{timestep}\mathord{=}\text{timesteps[0]} \land \neg (\text{run_config.cyclic_storage}\mathord{=}\text{true}))
             \\
             \textbf{storage}_\text{node,tech,timestep} = ((1 - \textit{storage_loss}_\text{node,tech,timestep})^{\textit{timestep_resolution}_\text{timestep-1}}) \times \textbf{storage}_\text{node,tech,timestep-1} + (\textbf{resource_con}_\text{node,tech,timestep} \times \textit{resource_eff}_\text{node,tech,timestep})&\quad
-            \text{if } (((\textit{timesteps}_\text{timestep}\mathord{=}\text{timesteps[0]} \land \text{run_config.cyclic_storage}\mathord{=}\text{true}) \lor \neg (\textit{timesteps}_\text{timestep}\mathord{=}\text{timesteps[0]})) \land \neg (\textit{lookup_cluster_first_timestep}\mathord{=}\text{true}))\land{}(\textit{energy_eff}_\text{node,tech,timestep}\mathord{=}\text{0} \lor \textit{parasitic_eff}_\text{node,tech,timestep}\mathord{=}\text{0})
-            \\
-            \textbf{storage}_\text{node,tech,timestep} = ((1 - \textit{storage_loss}_\text{node,tech,timestep})^{\textit{timestep_resolution}_\text{timestep-1}}) \times \textbf{storage}_\text{node,tech,timestep-1} + (\textbf{resource_con}_\text{node,tech,timestep} \times \textit{resource_eff}_\text{node,tech,timestep}) - \frac{ \textbf{carrier_prod}_\text{node,tech,carrier,timestep} }{ (\textit{energy_eff}_\text{node,tech,timestep} \times \textit{parasitic_eff}_\text{node,tech,timestep}) }&\quad
-            \text{if } (((\textit{timesteps}_\text{timestep}\mathord{=}\text{timesteps[0]} \land \text{run_config.cyclic_storage}\mathord{=}\text{true}) \lor \neg (\textit{timesteps}_\text{timestep}\mathord{=}\text{timesteps[0]})) \land \neg (\textit{lookup_cluster_first_timestep}\mathord{=}\text{true}))\land{}(\neg (\textit{energy_eff}_\text{node,tech,timestep}\mathord{=}\text{0} \lor \textit{parasitic_eff}_\text{node,tech,timestep}\mathord{=}\text{0}))
+            \text{if } (\textit{energy_eff}_\text{node,tech,timestep}\mathord{=}\text{0} \lor \textit{parasitic_eff}_\text{node,tech,timestep}\mathord{=}\text{0})\land{}(((\textit{timesteps}_\text{timestep}\mathord{=}\text{timesteps[0]} \land \text{run_config.cyclic_storage}\mathord{=}\text{true}) \lor \neg (\textit{timesteps}_\text{timestep}\mathord{=}\text{timesteps[0]})) \land \neg (\textit{lookup_cluster_first_timestep}\mathord{=}\text{true}))
             \\
             \textbf{storage}_\text{node,tech,timestep} = ((1 - \textit{storage_loss}_\text{node,tech,timestep})^{\textit{timestep_resolution}_\text{timestep=lookup_cluster_last_timestep[timestep]}}) \times \textbf{storage}_\text{node,tech,timestep=lookup_cluster_last_timestep[timestep]} + (\textbf{resource_con}_\text{node,tech,timestep} \times \textit{resource_eff}_\text{node,tech,timestep})&\quad
-            \text{if } (\textit{lookup_cluster_first_timestep}\mathord{=}\text{true} \land \neg (\textit{timesteps}_\text{timestep}\mathord{=}\text{timesteps[0]} \land \neg (\text{run_config.cyclic_storage}\mathord{=}\text{true})))\land{}(\textit{energy_eff}_\text{node,tech,timestep}\mathord{=}\text{0} \lor \textit{parasitic_eff}_\text{node,tech,timestep}\mathord{=}\text{0})
+            \text{if } (\textit{energy_eff}_\text{node,tech,timestep}\mathord{=}\text{0} \lor \textit{parasitic_eff}_\text{node,tech,timestep}\mathord{=}\text{0})\land{}(\textit{lookup_cluster_first_timestep}\mathord{=}\text{true} \land \neg (\textit{timesteps}_\text{timestep}\mathord{=}\text{timesteps[0]} \land \neg (\text{run_config.cyclic_storage}\mathord{=}\text{true})))
+            \\
+            \textbf{storage}_\text{node,tech,timestep} = \textit{storage_initial}_\text{node,tech} \times \textbf{storage_cap}_\text{node,tech} + (\textbf{resource_con}_\text{node,tech,timestep} \times \textit{resource_eff}_\text{node,tech,timestep}) - \frac{ \textbf{carrier_prod}_\text{node,tech,carrier,timestep} }{ (\textit{energy_eff}_\text{node,tech,timestep} \times \textit{parasitic_eff}_\text{node,tech,timestep}) }&\quad
+            \text{if } (\neg (\textit{energy_eff}_\text{node,tech,timestep}\mathord{=}\text{0} \lor \textit{parasitic_eff}_\text{node,tech,timestep}\mathord{=}\text{0}))\land{}(\textit{timesteps}_\text{timestep}\mathord{=}\text{timesteps[0]} \land \neg (\text{run_config.cyclic_storage}\mathord{=}\text{true}))
+            \\
+            \textbf{storage}_\text{node,tech,timestep} = ((1 - \textit{storage_loss}_\text{node,tech,timestep})^{\textit{timestep_resolution}_\text{timestep-1}}) \times \textbf{storage}_\text{node,tech,timestep-1} + (\textbf{resource_con}_\text{node,tech,timestep} \times \textit{resource_eff}_\text{node,tech,timestep}) - \frac{ \textbf{carrier_prod}_\text{node,tech,carrier,timestep} }{ (\textit{energy_eff}_\text{node,tech,timestep} \times \textit{parasitic_eff}_\text{node,tech,timestep}) }&\quad
+            \text{if } (\neg (\textit{energy_eff}_\text{node,tech,timestep}\mathord{=}\text{0} \lor \textit{parasitic_eff}_\text{node,tech,timestep}\mathord{=}\text{0}))\land{}(((\textit{timesteps}_\text{timestep}\mathord{=}\text{timesteps[0]} \land \text{run_config.cyclic_storage}\mathord{=}\text{true}) \lor \neg (\textit{timesteps}_\text{timestep}\mathord{=}\text{timesteps[0]})) \land \neg (\textit{lookup_cluster_first_timestep}\mathord{=}\text{true}))
             \\
             \textbf{storage}_\text{node,tech,timestep} = ((1 - \textit{storage_loss}_\text{node,tech,timestep})^{\textit{timestep_resolution}_\text{timestep=lookup_cluster_last_timestep[timestep]}}) \times \textbf{storage}_\text{node,tech,timestep=lookup_cluster_last_timestep[timestep]} + (\textbf{resource_con}_\text{node,tech,timestep} \times \textit{resource_eff}_\text{node,tech,timestep}) - \frac{ \textbf{carrier_prod}_\text{node,tech,carrier,timestep} }{ (\textit{energy_eff}_\text{node,tech,timestep} \times \textit{parasitic_eff}_\text{node,tech,timestep}) }&\quad
-            \text{if } (\textit{lookup_cluster_first_timestep}\mathord{=}\text{true} \land \neg (\textit{timesteps}_\text{timestep}\mathord{=}\text{timesteps[0]} \land \neg (\text{run_config.cyclic_storage}\mathord{=}\text{true})))\land{}(\neg (\textit{energy_eff}_\text{node,tech,timestep}\mathord{=}\text{0} \lor \textit{parasitic_eff}_\text{node,tech,timestep}\mathord{=}\text{0}))
+            \text{if } (\neg (\textit{energy_eff}_\text{node,tech,timestep}\mathord{=}\text{0} \lor \textit{parasitic_eff}_\text{node,tech,timestep}\mathord{=}\text{0}))\land{}(\textit{lookup_cluster_first_timestep}\mathord{=}\text{true} \land \neg (\textit{timesteps}_\text{timestep}\mathord{=}\text{timesteps[0]} \land \neg (\text{run_config.cyclic_storage}\mathord{=}\text{true})))
             \\
         \end{cases}
 
@@ -720,22 +720,22 @@ Fix the quantity of energy stored in a `storage` technology at the end of each t
         \end{array}
         \begin{cases}
             \textbf{storage}_\text{node,tech,timestep} = \textit{storage_initial}_\text{node,tech} \times \textbf{storage_cap}_\text{node,tech} - \frac{ \textbf{carrier_prod}_\text{node,tech,carrier,timestep} }{ \textit{energy_eff}_\text{node,tech,timestep} } - (\textbf{carrier_con}_\text{node,tech,carrier,timestep} \times \textit{energy_eff}_\text{node,tech,timestep})&\quad
-            \text{if } (\textit{timesteps}_\text{timestep}\mathord{=}\text{timesteps[0]} \land \neg (\text{run_config.cyclic_storage}\mathord{=}\text{true}))\land{}(\textit{energy_eff}_\text{node,tech,timestep}\mathord{>}\text{0})
-            \\
-            \textbf{storage}_\text{node,tech,timestep} = \textit{storage_initial}_\text{node,tech} \times \textbf{storage_cap}_\text{node,tech} - (\textbf{carrier_con}_\text{node,tech,carrier,timestep} \times \textit{energy_eff}_\text{node,tech,timestep})&\quad
-            \text{if } (\textit{timesteps}_\text{timestep}\mathord{=}\text{timesteps[0]} \land \neg (\text{run_config.cyclic_storage}\mathord{=}\text{true}))\land{}(\textit{energy_eff}_\text{node,tech,timestep}\mathord{=}\text{0})
+            \text{if } (\textit{energy_eff}_\text{node,tech,timestep}\mathord{>}\text{0})\land{}(\textit{timesteps}_\text{timestep}\mathord{=}\text{timesteps[0]} \land \neg (\text{run_config.cyclic_storage}\mathord{=}\text{true}))
             \\
             \textbf{storage}_\text{node,tech,timestep} = ((1 - \textit{storage_loss}_\text{node,tech,timestep})^{\textit{timestep_resolution}_\text{timestep-1}}) \times \textbf{storage}_\text{node,tech,timestep-1} - \frac{ \textbf{carrier_prod}_\text{node,tech,carrier,timestep} }{ \textit{energy_eff}_\text{node,tech,timestep} } - (\textbf{carrier_con}_\text{node,tech,carrier,timestep} \times \textit{energy_eff}_\text{node,tech,timestep})&\quad
-            \text{if } (((\textit{timesteps}_\text{timestep}\mathord{=}\text{timesteps[0]} \land \text{run_config.cyclic_storage}\mathord{=}\text{true}) \lor \neg (\textit{timesteps}_\text{timestep}\mathord{=}\text{timesteps[0]})) \land \neg (\textit{lookup_cluster_first_timestep}\mathord{=}\text{true}))\land{}(\textit{energy_eff}_\text{node,tech,timestep}\mathord{>}\text{0})
-            \\
-            \textbf{storage}_\text{node,tech,timestep} = ((1 - \textit{storage_loss}_\text{node,tech,timestep})^{\textit{timestep_resolution}_\text{timestep-1}}) \times \textbf{storage}_\text{node,tech,timestep-1} - (\textbf{carrier_con}_\text{node,tech,carrier,timestep} \times \textit{energy_eff}_\text{node,tech,timestep})&\quad
-            \text{if } (((\textit{timesteps}_\text{timestep}\mathord{=}\text{timesteps[0]} \land \text{run_config.cyclic_storage}\mathord{=}\text{true}) \lor \neg (\textit{timesteps}_\text{timestep}\mathord{=}\text{timesteps[0]})) \land \neg (\textit{lookup_cluster_first_timestep}\mathord{=}\text{true}))\land{}(\textit{energy_eff}_\text{node,tech,timestep}\mathord{=}\text{0})
+            \text{if } (\textit{energy_eff}_\text{node,tech,timestep}\mathord{>}\text{0})\land{}(((\textit{timesteps}_\text{timestep}\mathord{=}\text{timesteps[0]} \land \text{run_config.cyclic_storage}\mathord{=}\text{true}) \lor \neg (\textit{timesteps}_\text{timestep}\mathord{=}\text{timesteps[0]})) \land \neg (\textit{lookup_cluster_first_timestep}\mathord{=}\text{true}))
             \\
             \textbf{storage}_\text{node,tech,timestep} = ((1 - \textit{storage_loss}_\text{node,tech,timestep})^{\textit{timestep_resolution}_\text{timestep=lookup_cluster_last_timestep[timestep]}}) \times \textbf{storage}_\text{node,tech,timestep=lookup_cluster_last_timestep[timestep]} - \frac{ \textbf{carrier_prod}_\text{node,tech,carrier,timestep} }{ \textit{energy_eff}_\text{node,tech,timestep} } - (\textbf{carrier_con}_\text{node,tech,carrier,timestep} \times \textit{energy_eff}_\text{node,tech,timestep})&\quad
-            \text{if } (\textit{lookup_cluster_first_timestep}\mathord{=}\text{true} \land \neg (\textit{timesteps}_\text{timestep}\mathord{=}\text{timesteps[0]} \land \neg (\text{run_config.cyclic_storage}\mathord{=}\text{true})))\land{}(\textit{energy_eff}_\text{node,tech,timestep}\mathord{>}\text{0})
+            \text{if } (\textit{energy_eff}_\text{node,tech,timestep}\mathord{>}\text{0})\land{}(\textit{lookup_cluster_first_timestep}\mathord{=}\text{true} \land \neg (\textit{timesteps}_\text{timestep}\mathord{=}\text{timesteps[0]} \land \neg (\text{run_config.cyclic_storage}\mathord{=}\text{true})))
+            \\
+            \textbf{storage}_\text{node,tech,timestep} = \textit{storage_initial}_\text{node,tech} \times \textbf{storage_cap}_\text{node,tech} - (\textbf{carrier_con}_\text{node,tech,carrier,timestep} \times \textit{energy_eff}_\text{node,tech,timestep})&\quad
+            \text{if } (\textit{energy_eff}_\text{node,tech,timestep}\mathord{=}\text{0})\land{}(\textit{timesteps}_\text{timestep}\mathord{=}\text{timesteps[0]} \land \neg (\text{run_config.cyclic_storage}\mathord{=}\text{true}))
+            \\
+            \textbf{storage}_\text{node,tech,timestep} = ((1 - \textit{storage_loss}_\text{node,tech,timestep})^{\textit{timestep_resolution}_\text{timestep-1}}) \times \textbf{storage}_\text{node,tech,timestep-1} - (\textbf{carrier_con}_\text{node,tech,carrier,timestep} \times \textit{energy_eff}_\text{node,tech,timestep})&\quad
+            \text{if } (\textit{energy_eff}_\text{node,tech,timestep}\mathord{=}\text{0})\land{}(((\textit{timesteps}_\text{timestep}\mathord{=}\text{timesteps[0]} \land \text{run_config.cyclic_storage}\mathord{=}\text{true}) \lor \neg (\textit{timesteps}_\text{timestep}\mathord{=}\text{timesteps[0]})) \land \neg (\textit{lookup_cluster_first_timestep}\mathord{=}\text{true}))
             \\
             \textbf{storage}_\text{node,tech,timestep} = ((1 - \textit{storage_loss}_\text{node,tech,timestep})^{\textit{timestep_resolution}_\text{timestep=lookup_cluster_last_timestep[timestep]}}) \times \textbf{storage}_\text{node,tech,timestep=lookup_cluster_last_timestep[timestep]} - (\textbf{carrier_con}_\text{node,tech,carrier,timestep} \times \textit{energy_eff}_\text{node,tech,timestep})&\quad
-            \text{if } (\textit{lookup_cluster_first_timestep}\mathord{=}\text{true} \land \neg (\textit{timesteps}_\text{timestep}\mathord{=}\text{timesteps[0]} \land \neg (\text{run_config.cyclic_storage}\mathord{=}\text{true})))\land{}(\textit{energy_eff}_\text{node,tech,timestep}\mathord{=}\text{0})
+            \text{if } (\textit{energy_eff}_\text{node,tech,timestep}\mathord{=}\text{0})\land{}(\textit{lookup_cluster_first_timestep}\mathord{=}\text{true} \land \neg (\textit{timesteps}_\text{timestep}\mathord{=}\text{timesteps[0]} \land \neg (\text{run_config.cyclic_storage}\mathord{=}\text{true})))
             \\
         \end{cases}
 
@@ -816,7 +816,7 @@ Set the lower bound of a technology's carrier production to a technology's carri
             \text{ carrier }\negthickspace \in \negthickspace\text{ carriers, }
             \text{ timestep }\negthickspace \in \negthickspace\text{ timesteps }
             \\
-            \text{if } (\exists (\textit{export_carrier}_\text{carrier,node,tech}) \land \textit{export}_\text{node,tech}\mathord{=}\text{true})
+            \text{if } (\exists (\textit{export_carrier}_\text{node,tech,carrier}) \land \textit{export}_\text{node,tech}\mathord{=}\text{true})
         \end{array}
         \begin{cases}
             \textbf{carrier_prod}_\text{node,tech,carrier,timestep} \geq \textbf{carrier_export}_\text{node,tech,carrier,timestep}&\quad
@@ -838,7 +838,7 @@ Set the upper bound of a technology's carrier export, for any technologies that
             \text{ carrier }\negthickspace \in \negthickspace\text{ carriers, }
             \text{ timestep }\negthickspace \in \negthickspace\text{ timesteps }
             \\
-            \text{if } (\exists (\textit{export_max}_\text{node,tech}) \land \exists (\textit{export_carrier}_\text{carrier,node,tech}) \land \textit{export}_\text{node,tech}\mathord{=}\text{true})
+            \text{if } (\exists (\textit{export_max}_\text{node,tech}) \land \exists (\textit{export_carrier}_\text{node,tech,carrier}) \land \textit{export}_\text{node,tech}\mathord{=}\text{true})
         \end{array}
         \begin{cases}
             \textbf{carrier_export}_\text{node,tech,carrier,timestep} \leq \textit{export_max}_\text{node,tech} \times \textbf{operating_units}_\text{node,tech,timestep}&\quad
@@ -885,7 +885,7 @@ Set the upper bound of a non-`conversion_plus` technology's ability to produce e
             \text{ carrier }\negthickspace \in \negthickspace\text{ carriers, }
             \text{ timestep }\negthickspace \in \negthickspace\text{ timesteps }
             \\
-            \text{if } (\exists (\textit{carrier}_\text{carrier_tier,carrier,tech}) \land \neg (\text{tech_group=conversion_plus}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer} \land \textit{allowed_carrier_prod}_\text{node,tech}\mathord{=}\text{true})
+            \text{if } (\exists (\textit{carrier}_\text{tech,carrier_tier,carrier}) \land \neg (\text{tech_group=conversion_plus}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer} \land \textit{allowed_carrier_prod}_\text{node,tech}\mathord{=}\text{true})
         \end{array}
         \begin{cases}
             \textbf{carrier_prod}_\text{node,tech,carrier,timestep} \leq \textbf{operating_units}_\text{node,tech,timestep} \times \textit{timestep_resolution}_\text{timestep} \times \textit{energy_cap_per_unit}_\text{node,tech} \times \textit{parasitic_eff}_\text{node,tech,timestep}&\quad
@@ -950,7 +950,7 @@ Set the lower bound of a non-`conversion_plus` technology's ability to produce e
             \text{ carrier }\negthickspace \in \negthickspace\text{ carriers, }
             \text{ timestep }\negthickspace \in \negthickspace\text{ timesteps }
             \\
-            \text{if } (\exists (\textit{carrier}_\text{carrier_tier,carrier,tech}) \land \exists (\textit{energy_cap_min_use}_\text{node,tech}) \land \neg (\text{tech_group=conversion_plus}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer} \land \textit{allowed_carrier_prod}_\text{node,tech}\mathord{=}\text{true})
+            \text{if } (\exists (\textit{carrier}_\text{tech,carrier_tier,carrier}) \land \exists (\textit{energy_cap_min_use}_\text{node,tech}) \land \neg (\text{tech_group=conversion_plus}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer} \land \textit{allowed_carrier_prod}_\text{node,tech}\mathord{=}\text{true})
         \end{array}
         \begin{cases}
             \textbf{carrier_prod}_\text{node,tech,carrier,timestep} \geq \textbf{operating_units}_\text{node,tech,timestep} \times \textit{timestep_resolution}_\text{timestep} \times \textit{energy_cap_per_unit}_\text{node,tech} \times \textit{energy_cap_min_use}_\text{node,tech}&\quad
@@ -1031,7 +1031,7 @@ Set the upper bound on, or a fixed total of, a technology's energy capacity, for
             \text{ node }\negthickspace \in \negthickspace\text{ nodes, }
             \text{ tech }\negthickspace \in \negthickspace\text{ techs }
             \\
-            \text{if } (\exists (\textit{cost_purchase}_\text{cost,node,tech}) \land (\exists (\textit{energy_cap_max}_\text{node,tech}) \lor \exists (\textit{energy_cap_equals}_\text{node,tech})) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{binary})
+            \text{if } (\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land (\exists (\textit{energy_cap_max}_\text{node,tech}) \lor \exists (\textit{energy_cap_equals}_\text{node,tech})) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{binary})
         \end{array}
         \begin{cases}
             \textbf{energy_cap}_\text{node,tech} = \textit{energy_cap_equals}_\text{node,tech} \times \textit{energy_cap_scale}_\text{node,tech} \times \textbf{purchased}_\text{node,tech}&\quad
@@ -1055,7 +1055,7 @@ Set the lower bound on a technology's energy capacity, for any technology with b
             \text{ node }\negthickspace \in \negthickspace\text{ nodes, }
             \text{ tech }\negthickspace \in \negthickspace\text{ techs }
             \\
-            \text{if } (\exists (\textit{cost_purchase}_\text{cost,node,tech}) \land \exists (\textit{energy_cap_min}_\text{node,tech}) \land \neg (\exists (\textit{energy_cap_equals}_\text{node,tech})) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{binary})
+            \text{if } (\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \exists (\textit{energy_cap_min}_\text{node,tech}) \land \neg (\exists (\textit{energy_cap_equals}_\text{node,tech})) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{binary})
         \end{array}
         \begin{cases}
             \textbf{energy_cap}_\text{node,tech} \geq \textit{energy_cap_min}_\text{node,tech} \times \textit{energy_cap_scale}_\text{node,tech} \times \textbf{purchased}_\text{node,tech}&\quad
@@ -1075,7 +1075,7 @@ Set the upper bound on, or a fixed total of, a technology's storage capacity, fo
             \text{ node }\negthickspace \in \negthickspace\text{ nodes, }
             \text{ tech }\negthickspace \in \negthickspace\text{ techs }
             \\
-            \text{if } (\exists (\textit{cost_purchase}_\text{cost,node,tech}) \land (\exists (\textit{storage_cap_max}_\text{node,tech}) \lor \exists (\textit{storage_cap_equals}_\text{node,tech})) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{binary})
+            \text{if } (\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land (\exists (\textit{storage_cap_max}_\text{node,tech}) \lor \exists (\textit{storage_cap_equals}_\text{node,tech})) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{binary})
         \end{array}
         \begin{cases}
             \textbf{storage_cap}_\text{node,tech} = \textit{storage_cap_equals}_\text{node,tech} \times \textbf{purchased}_\text{node,tech}&\quad
@@ -1099,7 +1099,7 @@ Set the lower bound on a technology's storage capacity, for any technology with
             \text{ node }\negthickspace \in \negthickspace\text{ nodes, }
             \text{ tech }\negthickspace \in \negthickspace\text{ techs }
             \\
-            \text{if } (\exists (\textit{cost_purchase}_\text{cost,node,tech}) \land \exists (\textit{storage_cap_min}_\text{node,tech}) \land \neg (\exists (\textit{storage_cap_equals}_\text{node,tech})) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{binary})
+            \text{if } (\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \exists (\textit{storage_cap_min}_\text{node,tech}) \land \neg (\exists (\textit{storage_cap_equals}_\text{node,tech})) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{binary})
         \end{array}
         \begin{cases}
             \textbf{storage_cap}_\text{node,tech} \geq \textit{storage_cap_min}_\text{node,tech} \times \textbf{purchased}_\text{node,tech}&\quad
@@ -1196,13 +1196,13 @@ Set the upper bound on a technology's ability to ramp energy production up beyon
         \end{array}
         \begin{cases}
             \frac{ \textbf{carrier_prod}_\text{node,tech,carrier,timestep} }{ \textit{timestep_resolution}_\text{timestep} } - \frac{ \textbf{carrier_prod}_\text{node,tech,carrier,timestep-1} }{ \textit{timestep_resolution}_\text{timestep-1} } \leq \textit{energy_ramping}_\text{node,tech,timestep} \times \textbf{energy_cap}_\text{node,tech}&\quad
-            \text{if } (\exists (\textit{carrier}_\text{carrier_tier,carrier,tech}) \land \textit{allowed_carrier_prod}_\text{node,tech}\mathord{=}\text{true} \land \neg (\textit{allowed_carrier_con}_\text{node,tech}\mathord{=}\text{true}))
+            \text{if } (\exists (\textit{carrier}_\text{tech,carrier_tier,carrier}) \land \textit{allowed_carrier_prod}_\text{node,tech}\mathord{=}\text{true} \land \neg (\textit{allowed_carrier_con}_\text{node,tech}\mathord{=}\text{true}))
             \\
             \frac{ \textbf{carrier_con}_\text{node,tech,carrier,timestep} }{ \textit{timestep_resolution}_\text{timestep} } - \frac{ \textbf{carrier_con}_\text{node,tech,carrier,timestep-1} }{ \textit{timestep_resolution}_\text{timestep-1} } \leq \textit{energy_ramping}_\text{node,tech,timestep} \times \textbf{energy_cap}_\text{node,tech}&\quad
-            \text{if } (\exists (\textit{carrier}_\text{carrier_tier,carrier,tech}) \land \textit{allowed_carrier_con}_\text{node,tech}\mathord{=}\text{true} \land \neg (\textit{allowed_carrier_prod}_\text{node,tech}\mathord{=}\text{true}))
+            \text{if } (\exists (\textit{carrier}_\text{tech,carrier_tier,carrier}) \land \textit{allowed_carrier_con}_\text{node,tech}\mathord{=}\text{true} \land \neg (\textit{allowed_carrier_prod}_\text{node,tech}\mathord{=}\text{true}))
             \\
             \frac{ (\textbf{carrier_con}_\text{node,tech,carrier,timestep} + \textbf{carrier_prod}_\text{node,tech,carrier,timestep}) }{ \textit{timestep_resolution}_\text{timestep} } - \frac{ (\textbf{carrier_con}_\text{node,tech,carrier,timestep-1} + \textbf{carrier_prod}_\text{node,tech,carrier,timestep-1}) }{ \textit{timestep_resolution}_\text{timestep-1} } \leq \textit{energy_ramping}_\text{node,tech,timestep} \times \textbf{energy_cap}_\text{node,tech}&\quad
-            \text{if } (\exists (\textit{carrier}_\text{carrier_tier,carrier,tech}) \land \textit{allowed_carrier_con}_\text{node,tech}\mathord{=}\text{true} \land \textit{allowed_carrier_prod}_\text{node,tech}\mathord{=}\text{true})
+            \text{if } (\exists (\textit{carrier}_\text{tech,carrier_tier,carrier}) \land \textit{allowed_carrier_con}_\text{node,tech}\mathord{=}\text{true} \land \textit{allowed_carrier_prod}_\text{node,tech}\mathord{=}\text{true})
             \\
         \end{cases}
 
@@ -1225,13 +1225,13 @@ Set the upper bound on a technology's ability to ramp energy production down bey
         \end{array}
         \begin{cases}
             -1 \times \textit{energy_ramping}_\text{node,tech,timestep} \times \textbf{energy_cap}_\text{node,tech} \leq \frac{ \textbf{carrier_prod}_\text{node,tech,carrier,timestep} }{ \textit{timestep_resolution}_\text{timestep} } - \frac{ \textbf{carrier_prod}_\text{node,tech,carrier,timestep-1} }{ \textit{timestep_resolution}_\text{timestep-1} }&\quad
-            \text{if } (\exists (\textit{carrier}_\text{carrier_tier,carrier,tech}) \land \textit{allowed_carrier_prod}_\text{node,tech}\mathord{=}\text{true} \land \neg (\textit{allowed_carrier_con}_\text{node,tech}\mathord{=}\text{true}))
+            \text{if } (\exists (\textit{carrier}_\text{tech,carrier_tier,carrier}) \land \textit{allowed_carrier_prod}_\text{node,tech}\mathord{=}\text{true} \land \neg (\textit{allowed_carrier_con}_\text{node,tech}\mathord{=}\text{true}))
             \\
             -1 \times \textit{energy_ramping}_\text{node,tech,timestep} \times \textbf{energy_cap}_\text{node,tech} \leq \frac{ \textbf{carrier_con}_\text{node,tech,carrier,timestep} }{ \textit{timestep_resolution}_\text{timestep} } - \frac{ \textbf{carrier_con}_\text{node,tech,carrier,timestep-1} }{ \textit{timestep_resolution}_\text{timestep-1} }&\quad
-            \text{if } (\exists (\textit{carrier}_\text{carrier_tier,carrier,tech}) \land \textit{allowed_carrier_con}_\text{node,tech}\mathord{=}\text{true} \land \neg (\textit{allowed_carrier_prod}_\text{node,tech}\mathord{=}\text{true}))
+            \text{if } (\exists (\textit{carrier}_\text{tech,carrier_tier,carrier}) \land \textit{allowed_carrier_con}_\text{node,tech}\mathord{=}\text{true} \land \neg (\textit{allowed_carrier_prod}_\text{node,tech}\mathord{=}\text{true}))
             \\
             -1 \times \textit{energy_ramping}_\text{node,tech,timestep} \times \textbf{energy_cap}_\text{node,tech} \leq \frac{ (\textbf{carrier_con}_\text{node,tech,carrier,timestep} + \textbf{carrier_prod}_\text{node,tech,carrier,timestep}) }{ \textit{timestep_resolution}_\text{timestep} } - \frac{ (\textbf{carrier_con}_\text{node,tech,carrier,timestep-1} + \textbf{carrier_prod}_\text{node,tech,carrier,timestep-1}) }{ \textit{timestep_resolution}_\text{timestep-1} }&\quad
-            \text{if } (\exists (\textit{carrier}_\text{carrier_tier,carrier,tech}) \land \textit{allowed_carrier_con}_\text{node,tech}\mathord{=}\text{true} \land \textit{allowed_carrier_prod}_\text{node,tech}\mathord{=}\text{true})
+            \text{if } (\exists (\textit{carrier}_\text{tech,carrier_tier,carrier}) \land \textit{allowed_carrier_con}_\text{node,tech}\mathord{=}\text{true} \land \textit{allowed_carrier_prod}_\text{node,tech}\mathord{=}\text{true})
             \\
         \end{cases}
 
@@ -1253,98 +1253,98 @@ The operating costs per timestep of a technology
             \text{ cost }\negthickspace \in \negthickspace\text{ costs, }
             \text{ timestep }\negthickspace \in \negthickspace\text{ timesteps }
             \\
-            \text{if } (\exists (\textit{cost_export}_\text{cost,node,tech,timestep}) \lor \exists (\textit{cost_om_con}_\text{cost,node,tech,timestep}) \lor \exists (\textit{cost_om_prod}_\text{cost,node,tech,timestep}))
+            \text{if } (\exists (\textit{cost_export}_\text{node,tech,cost,timestep}) \lor \exists (\textit{cost_om_con}_\text{node,tech,cost,timestep}) \lor \exists (\textit{cost_om_prod}_\text{node,tech,cost,timestep}))
         \end{array}
         \begin{cases}
-            \textit{timestep_weights}_\text{timestep} \times (\textit{cost_export}_\text{cost,node,tech,timestep} \times \sum\limits_{\text{carrier} \in \text{carriers}} (\textbf{carrier_export}_\text{node,tech,carrier,timestep}) + \textit{cost_om_prod}_\text{cost,node,tech,timestep} \times \sum\limits_{\text{carrier=primary_carrier_out}} (\textbf{carrier_prod}_\text{node,tech,carrier,timestep}) + \textit{cost_om_con}_\text{cost,node,tech,timestep} \times \textbf{resource_con}_\text{node,tech,timestep})&\quad
-            \text{if } (\exists (\textit{cost_om_prod}_\text{cost,node,tech,timestep}) \land \text{tech_group=conversion_plus})\land{}(\exists (\textit{cost_om_con}_\text{cost,node,tech,timestep}) \land \text{tech_group=supply_plus})\land{}(\exists (\textit{export_carrier}_\text{carrier,node,tech}) \land \exists (\textit{cost_export}_\text{cost,node,tech,timestep}))
+            \textit{timestep_weights}_\text{timestep} \times (\textit{cost_export}_\text{node,tech,cost,timestep} \times \sum\limits_{\text{carrier} \in \text{carriers}} (\textbf{carrier_export}_\text{node,tech,carrier,timestep}) + \textit{cost_om_prod}_\text{node,tech,cost,timestep} \times \sum\limits_{\text{carrier=primary_carrier_out}} (\textbf{carrier_prod}_\text{node,tech,carrier,timestep}) + \textit{cost_om_con}_\text{node,tech,cost,timestep} \times \textbf{resource_con}_\text{node,tech,timestep})&\quad
+            \text{if } (\exists (\textit{cost_om_prod}_\text{node,tech,cost,timestep}) \land \text{tech_group=conversion_plus})\land{}(\exists (\textit{export_carrier}_\text{node,tech,carrier}) \land \exists (\textit{cost_export}_\text{node,tech,cost,timestep}))\land{}(\exists (\textit{cost_om_con}_\text{node,tech,cost,timestep}) \land \text{tech_group=supply_plus})
             \\
-            \textit{timestep_weights}_\text{timestep} \times (\textit{cost_om_prod}_\text{cost,node,tech,timestep} \times \sum\limits_{\text{carrier=primary_carrier_out}} (\textbf{carrier_prod}_\text{node,tech,carrier,timestep}) + \textit{cost_om_con}_\text{cost,node,tech,timestep} \times \textbf{resource_con}_\text{node,tech,timestep})&\quad
-            \text{if } (\exists (\textit{cost_om_prod}_\text{cost,node,tech,timestep}) \land \text{tech_group=conversion_plus})\land{}(\exists (\textit{cost_om_con}_\text{cost,node,tech,timestep}) \land \text{tech_group=supply_plus})\land{}(\neg (\exists (\textit{cost_export}_\text{cost,node,tech,timestep})))
+            \textit{timestep_weights}_\text{timestep} \times (\textit{cost_export}_\text{node,tech,cost,timestep} \times \sum\limits_{\text{carrier} \in \text{carriers}} (\textbf{carrier_export}_\text{node,tech,carrier,timestep}) + \textit{cost_om_prod}_\text{node,tech,cost,timestep} \times \sum\limits_{\text{carrier=primary_carrier_out}} (\textbf{carrier_prod}_\text{node,tech,carrier,timestep}) + \frac{ \textit{cost_om_con}_\text{node,tech,cost,timestep} \times \sum\limits_{\text{carrier} \in \text{carrier_tier(out)}} (\textbf{carrier_prod}_\text{node,tech,carrier,timestep}) }{ \textit{energy_eff}_\text{node,tech,timestep} })&\quad
+            \text{if } (\exists (\textit{cost_om_prod}_\text{node,tech,cost,timestep}) \land \text{tech_group=conversion_plus})\land{}(\exists (\textit{export_carrier}_\text{node,tech,carrier}) \land \exists (\textit{cost_export}_\text{node,tech,cost,timestep}))\land{}(\exists (\textit{cost_om_con}_\text{node,tech,cost,timestep}) \land \text{tech_group=supply} \land \textit{energy_eff}_\text{node,tech,timestep}\mathord{>}\text{0} \land \text{carrier_tier} \in \text{[out]})
             \\
-            \textit{timestep_weights}_\text{timestep} \times (\textit{cost_export}_\text{cost,node,tech,timestep} \times \sum\limits_{\text{carrier} \in \text{carriers}} (\textbf{carrier_export}_\text{node,tech,carrier,timestep}) + \textit{cost_om_prod}_\text{cost,node,tech,timestep} \times \sum\limits_{\text{carrier=primary_carrier_out}} (\textbf{carrier_prod}_\text{node,tech,carrier,timestep}) + \frac{ \textit{cost_om_con}_\text{cost,node,tech,timestep} \times \sum\limits_{\text{carrier} \in \text{carrier_tier(out)}} (\textbf{carrier_prod}_\text{node,tech,carrier,timestep}) }{ \textit{energy_eff}_\text{node,tech,timestep} })&\quad
-            \text{if } (\exists (\textit{cost_om_prod}_\text{cost,node,tech,timestep}) \land \text{tech_group=conversion_plus})\land{}(\exists (\textit{cost_om_con}_\text{cost,node,tech,timestep}) \land \text{tech_group=supply} \land \textit{energy_eff}_\text{node,tech,timestep}\mathord{>}\text{0} \land \text{carrier_tier} \in \text{[out]})\land{}(\exists (\textit{export_carrier}_\text{carrier,node,tech}) \land \exists (\textit{cost_export}_\text{cost,node,tech,timestep}))
+            \textit{timestep_weights}_\text{timestep} \times (\textit{cost_export}_\text{node,tech,cost,timestep} \times \sum\limits_{\text{carrier} \in \text{carriers}} (\textbf{carrier_export}_\text{node,tech,carrier,timestep}) + \textit{cost_om_prod}_\text{node,tech,cost,timestep} \times \sum\limits_{\text{carrier=primary_carrier_out}} (\textbf{carrier_prod}_\text{node,tech,carrier,timestep}) + \textit{cost_om_con}_\text{node,tech,cost,timestep} \times -1 \times \sum\limits_{\text{carrier=primary_carrier_in}} (\textbf{carrier_con}_\text{node,tech,carrier,timestep}))&\quad
+            \text{if } (\exists (\textit{cost_om_prod}_\text{node,tech,cost,timestep}) \land \text{tech_group=conversion_plus})\land{}(\exists (\textit{export_carrier}_\text{node,tech,carrier}) \land \exists (\textit{cost_export}_\text{node,tech,cost,timestep}))\land{}(\exists (\textit{cost_om_con}_\text{node,tech,cost,timestep}) \land \text{tech_group=conversion_plus})
             \\
-            \textit{timestep_weights}_\text{timestep} \times (\textit{cost_om_prod}_\text{cost,node,tech,timestep} \times \sum\limits_{\text{carrier=primary_carrier_out}} (\textbf{carrier_prod}_\text{node,tech,carrier,timestep}) + \frac{ \textit{cost_om_con}_\text{cost,node,tech,timestep} \times \sum\limits_{\text{carrier} \in \text{carrier_tier(out)}} (\textbf{carrier_prod}_\text{node,tech,carrier,timestep}) }{ \textit{energy_eff}_\text{node,tech,timestep} })&\quad
-            \text{if } (\exists (\textit{cost_om_prod}_\text{cost,node,tech,timestep}) \land \text{tech_group=conversion_plus})\land{}(\exists (\textit{cost_om_con}_\text{cost,node,tech,timestep}) \land \text{tech_group=supply} \land \textit{energy_eff}_\text{node,tech,timestep}\mathord{>}\text{0} \land \text{carrier_tier} \in \text{[out]})\land{}(\neg (\exists (\textit{cost_export}_\text{cost,node,tech,timestep})))
+            \textit{timestep_weights}_\text{timestep} \times (\textit{cost_export}_\text{node,tech,cost,timestep} \times \sum\limits_{\text{carrier} \in \text{carriers}} (\textbf{carrier_export}_\text{node,tech,carrier,timestep}) + \textit{cost_om_prod}_\text{node,tech,cost,timestep} \times \sum\limits_{\text{carrier=primary_carrier_out}} (\textbf{carrier_prod}_\text{node,tech,carrier,timestep}) + \textit{cost_om_con}_\text{node,tech,cost,timestep} \times -1 \times \sum\limits_{\text{carrier} \in \text{carrier_tier(in)}} (\textbf{carrier_con}_\text{node,tech,carrier,timestep}))&\quad
+            \text{if } (\exists (\textit{cost_om_prod}_\text{node,tech,cost,timestep}) \land \text{tech_group=conversion_plus})\land{}(\exists (\textit{export_carrier}_\text{node,tech,carrier}) \land \exists (\textit{cost_export}_\text{node,tech,cost,timestep}))\land{}(\exists (\textit{cost_om_con}_\text{node,tech,cost,timestep}) \land \neg (\text{tech_group=conversion_plus} \lor \text{tech_group=supply_plus} \lor \text{tech_group=supply}) \land \text{carrier_tier} \in \text{[in]})
             \\
-            \textit{timestep_weights}_\text{timestep} \times (\textit{cost_export}_\text{cost,node,tech,timestep} \times \sum\limits_{\text{carrier} \in \text{carriers}} (\textbf{carrier_export}_\text{node,tech,carrier,timestep}) + \textit{cost_om_prod}_\text{cost,node,tech,timestep} \times \sum\limits_{\text{carrier=primary_carrier_out}} (\textbf{carrier_prod}_\text{node,tech,carrier,timestep}) + \textit{cost_om_con}_\text{cost,node,tech,timestep} \times -1 \times \sum\limits_{\text{carrier=primary_carrier_in}} (\textbf{carrier_con}_\text{node,tech,carrier,timestep}))&\quad
-            \text{if } (\exists (\textit{cost_om_prod}_\text{cost,node,tech,timestep}) \land \text{tech_group=conversion_plus})\land{}(\exists (\textit{cost_om_con}_\text{cost,node,tech,timestep}) \land \text{tech_group=conversion_plus})\land{}(\exists (\textit{export_carrier}_\text{carrier,node,tech}) \land \exists (\textit{cost_export}_\text{cost,node,tech,timestep}))
+            \textit{timestep_weights}_\text{timestep} \times (\textit{cost_export}_\text{node,tech,cost,timestep} \times \sum\limits_{\text{carrier} \in \text{carriers}} (\textbf{carrier_export}_\text{node,tech,carrier,timestep}) + \textit{cost_om_prod}_\text{node,tech,cost,timestep} \times \sum\limits_{\text{carrier=primary_carrier_out}} (\textbf{carrier_prod}_\text{node,tech,carrier,timestep}))&\quad
+            \text{if } (\exists (\textit{cost_om_prod}_\text{node,tech,cost,timestep}) \land \text{tech_group=conversion_plus})\land{}(\exists (\textit{export_carrier}_\text{node,tech,carrier}) \land \exists (\textit{cost_export}_\text{node,tech,cost,timestep}))\land{}(\neg (\exists (\textit{cost_om_con}_\text{node,tech,cost,timestep})))
             \\
-            \textit{timestep_weights}_\text{timestep} \times (\textit{cost_om_prod}_\text{cost,node,tech,timestep} \times \sum\limits_{\text{carrier=primary_carrier_out}} (\textbf{carrier_prod}_\text{node,tech,carrier,timestep}) + \textit{cost_om_con}_\text{cost,node,tech,timestep} \times -1 \times \sum\limits_{\text{carrier=primary_carrier_in}} (\textbf{carrier_con}_\text{node,tech,carrier,timestep}))&\quad
-            \text{if } (\exists (\textit{cost_om_prod}_\text{cost,node,tech,timestep}) \land \text{tech_group=conversion_plus})\land{}(\exists (\textit{cost_om_con}_\text{cost,node,tech,timestep}) \land \text{tech_group=conversion_plus})\land{}(\neg (\exists (\textit{cost_export}_\text{cost,node,tech,timestep})))
+            \textit{timestep_weights}_\text{timestep} \times (\textit{cost_om_prod}_\text{node,tech,cost,timestep} \times \sum\limits_{\text{carrier=primary_carrier_out}} (\textbf{carrier_prod}_\text{node,tech,carrier,timestep}) + \textit{cost_om_con}_\text{node,tech,cost,timestep} \times \textbf{resource_con}_\text{node,tech,timestep})&\quad
+            \text{if } (\exists (\textit{cost_om_prod}_\text{node,tech,cost,timestep}) \land \text{tech_group=conversion_plus})\land{}(\neg (\exists (\textit{cost_export}_\text{node,tech,cost,timestep})))\land{}(\exists (\textit{cost_om_con}_\text{node,tech,cost,timestep}) \land \text{tech_group=supply_plus})
             \\
-            \textit{timestep_weights}_\text{timestep} \times (\textit{cost_export}_\text{cost,node,tech,timestep} \times \sum\limits_{\text{carrier} \in \text{carriers}} (\textbf{carrier_export}_\text{node,tech,carrier,timestep}) + \textit{cost_om_prod}_\text{cost,node,tech,timestep} \times \sum\limits_{\text{carrier=primary_carrier_out}} (\textbf{carrier_prod}_\text{node,tech,carrier,timestep}) + \textit{cost_om_con}_\text{cost,node,tech,timestep} \times -1 \times \sum\limits_{\text{carrier} \in \text{carrier_tier(in)}} (\textbf{carrier_con}_\text{node,tech,carrier,timestep}))&\quad
-            \text{if } (\exists (\textit{cost_om_prod}_\text{cost,node,tech,timestep}) \land \text{tech_group=conversion_plus})\land{}(\exists (\textit{cost_om_con}_\text{cost,node,tech,timestep}) \land \neg (\text{tech_group=conversion_plus} \lor \text{tech_group=supply_plus} \lor \text{tech_group=supply}) \land \text{carrier_tier} \in \text{[in]})\land{}(\exists (\textit{export_carrier}_\text{carrier,node,tech}) \land \exists (\textit{cost_export}_\text{cost,node,tech,timestep}))
+            \textit{timestep_weights}_\text{timestep} \times (\textit{cost_om_prod}_\text{node,tech,cost,timestep} \times \sum\limits_{\text{carrier=primary_carrier_out}} (\textbf{carrier_prod}_\text{node,tech,carrier,timestep}) + \frac{ \textit{cost_om_con}_\text{node,tech,cost,timestep} \times \sum\limits_{\text{carrier} \in \text{carrier_tier(out)}} (\textbf{carrier_prod}_\text{node,tech,carrier,timestep}) }{ \textit{energy_eff}_\text{node,tech,timestep} })&\quad
+            \text{if } (\exists (\textit{cost_om_prod}_\text{node,tech,cost,timestep}) \land \text{tech_group=conversion_plus})\land{}(\neg (\exists (\textit{cost_export}_\text{node,tech,cost,timestep})))\land{}(\exists (\textit{cost_om_con}_\text{node,tech,cost,timestep}) \land \text{tech_group=supply} \land \textit{energy_eff}_\text{node,tech,timestep}\mathord{>}\text{0} \land \text{carrier_tier} \in \text{[out]})
             \\
-            \textit{timestep_weights}_\text{timestep} \times (\textit{cost_om_prod}_\text{cost,node,tech,timestep} \times \sum\limits_{\text{carrier=primary_carrier_out}} (\textbf{carrier_prod}_\text{node,tech,carrier,timestep}) + \textit{cost_om_con}_\text{cost,node,tech,timestep} \times -1 \times \sum\limits_{\text{carrier} \in \text{carrier_tier(in)}} (\textbf{carrier_con}_\text{node,tech,carrier,timestep}))&\quad
-            \text{if } (\exists (\textit{cost_om_prod}_\text{cost,node,tech,timestep}) \land \text{tech_group=conversion_plus})\land{}(\exists (\textit{cost_om_con}_\text{cost,node,tech,timestep}) \land \neg (\text{tech_group=conversion_plus} \lor \text{tech_group=supply_plus} \lor \text{tech_group=supply}) \land \text{carrier_tier} \in \text{[in]})\land{}(\neg (\exists (\textit{cost_export}_\text{cost,node,tech,timestep})))
+            \textit{timestep_weights}_\text{timestep} \times (\textit{cost_om_prod}_\text{node,tech,cost,timestep} \times \sum\limits_{\text{carrier=primary_carrier_out}} (\textbf{carrier_prod}_\text{node,tech,carrier,timestep}) + \textit{cost_om_con}_\text{node,tech,cost,timestep} \times -1 \times \sum\limits_{\text{carrier=primary_carrier_in}} (\textbf{carrier_con}_\text{node,tech,carrier,timestep}))&\quad
+            \text{if } (\exists (\textit{cost_om_prod}_\text{node,tech,cost,timestep}) \land \text{tech_group=conversion_plus})\land{}(\neg (\exists (\textit{cost_export}_\text{node,tech,cost,timestep})))\land{}(\exists (\textit{cost_om_con}_\text{node,tech,cost,timestep}) \land \text{tech_group=conversion_plus})
             \\
-            \textit{timestep_weights}_\text{timestep} \times (\textit{cost_export}_\text{cost,node,tech,timestep} \times \sum\limits_{\text{carrier} \in \text{carriers}} (\textbf{carrier_export}_\text{node,tech,carrier,timestep}) + \textit{cost_om_prod}_\text{cost,node,tech,timestep} \times \sum\limits_{\text{carrier=primary_carrier_out}} (\textbf{carrier_prod}_\text{node,tech,carrier,timestep}))&\quad
-            \text{if } (\exists (\textit{cost_om_prod}_\text{cost,node,tech,timestep}) \land \text{tech_group=conversion_plus})\land{}(\neg (\exists (\textit{cost_om_con}_\text{cost,node,tech,timestep})))\land{}(\exists (\textit{export_carrier}_\text{carrier,node,tech}) \land \exists (\textit{cost_export}_\text{cost,node,tech,timestep}))
+            \textit{timestep_weights}_\text{timestep} \times (\textit{cost_om_prod}_\text{node,tech,cost,timestep} \times \sum\limits_{\text{carrier=primary_carrier_out}} (\textbf{carrier_prod}_\text{node,tech,carrier,timestep}) + \textit{cost_om_con}_\text{node,tech,cost,timestep} \times -1 \times \sum\limits_{\text{carrier} \in \text{carrier_tier(in)}} (\textbf{carrier_con}_\text{node,tech,carrier,timestep}))&\quad
+            \text{if } (\exists (\textit{cost_om_prod}_\text{node,tech,cost,timestep}) \land \text{tech_group=conversion_plus})\land{}(\neg (\exists (\textit{cost_export}_\text{node,tech,cost,timestep})))\land{}(\exists (\textit{cost_om_con}_\text{node,tech,cost,timestep}) \land \neg (\text{tech_group=conversion_plus} \lor \text{tech_group=supply_plus} \lor \text{tech_group=supply}) \land \text{carrier_tier} \in \text{[in]})
             \\
-            \textit{timestep_weights}_\text{timestep} \times (\textit{cost_om_prod}_\text{cost,node,tech,timestep} \times \sum\limits_{\text{carrier=primary_carrier_out}} (\textbf{carrier_prod}_\text{node,tech,carrier,timestep}))&\quad
-            \text{if } (\exists (\textit{cost_om_prod}_\text{cost,node,tech,timestep}) \land \text{tech_group=conversion_plus})\land{}(\neg (\exists (\textit{cost_om_con}_\text{cost,node,tech,timestep})))\land{}(\neg (\exists (\textit{cost_export}_\text{cost,node,tech,timestep})))
+            \textit{timestep_weights}_\text{timestep} \times (\textit{cost_om_prod}_\text{node,tech,cost,timestep} \times \sum\limits_{\text{carrier=primary_carrier_out}} (\textbf{carrier_prod}_\text{node,tech,carrier,timestep}))&\quad
+            \text{if } (\exists (\textit{cost_om_prod}_\text{node,tech,cost,timestep}) \land \text{tech_group=conversion_plus})\land{}(\neg (\exists (\textit{cost_export}_\text{node,tech,cost,timestep})))\land{}(\neg (\exists (\textit{cost_om_con}_\text{node,tech,cost,timestep})))
             \\
-            \textit{timestep_weights}_\text{timestep} \times (\textit{cost_export}_\text{cost,node,tech,timestep} \times \sum\limits_{\text{carrier} \in \text{carriers}} (\textbf{carrier_export}_\text{node,tech,carrier,timestep}) + \textit{cost_om_prod}_\text{cost,node,tech,timestep} \times \sum\limits_{\text{carrier} \in \text{carrier_tier(out)}} (\textbf{carrier_prod}_\text{node,tech,carrier,timestep}) + \textit{cost_om_con}_\text{cost,node,tech,timestep} \times \textbf{resource_con}_\text{node,tech,timestep})&\quad
-            \text{if } (\exists (\textit{cost_om_prod}_\text{cost,node,tech,timestep}) \land \neg (\text{tech_group=conversion_plus}))\land{}(\exists (\textit{cost_om_con}_\text{cost,node,tech,timestep}) \land \text{tech_group=supply_plus})\land{}(\exists (\textit{export_carrier}_\text{carrier,node,tech}) \land \exists (\textit{cost_export}_\text{cost,node,tech,timestep}))
+            \textit{timestep_weights}_\text{timestep} \times (\textit{cost_export}_\text{node,tech,cost,timestep} \times \sum\limits_{\text{carrier} \in \text{carriers}} (\textbf{carrier_export}_\text{node,tech,carrier,timestep}) + \textit{cost_om_prod}_\text{node,tech,cost,timestep} \times \sum\limits_{\text{carrier} \in \text{carrier_tier(out)}} (\textbf{carrier_prod}_\text{node,tech,carrier,timestep}) + \textit{cost_om_con}_\text{node,tech,cost,timestep} \times \textbf{resource_con}_\text{node,tech,timestep})&\quad
+            \text{if } (\exists (\textit{cost_om_prod}_\text{node,tech,cost,timestep}) \land \neg (\text{tech_group=conversion_plus}))\land{}(\exists (\textit{export_carrier}_\text{node,tech,carrier}) \land \exists (\textit{cost_export}_\text{node,tech,cost,timestep}))\land{}(\exists (\textit{cost_om_con}_\text{node,tech,cost,timestep}) \land \text{tech_group=supply_plus})
             \\
-            \textit{timestep_weights}_\text{timestep} \times (\textit{cost_om_prod}_\text{cost,node,tech,timestep} \times \sum\limits_{\text{carrier} \in \text{carrier_tier(out)}} (\textbf{carrier_prod}_\text{node,tech,carrier,timestep}) + \textit{cost_om_con}_\text{cost,node,tech,timestep} \times \textbf{resource_con}_\text{node,tech,timestep})&\quad
-            \text{if } (\exists (\textit{cost_om_prod}_\text{cost,node,tech,timestep}) \land \neg (\text{tech_group=conversion_plus}))\land{}(\exists (\textit{cost_om_con}_\text{cost,node,tech,timestep}) \land \text{tech_group=supply_plus})\land{}(\neg (\exists (\textit{cost_export}_\text{cost,node,tech,timestep})))
+            \textit{timestep_weights}_\text{timestep} \times (\textit{cost_export}_\text{node,tech,cost,timestep} \times \sum\limits_{\text{carrier} \in \text{carriers}} (\textbf{carrier_export}_\text{node,tech,carrier,timestep}) + \textit{cost_om_prod}_\text{node,tech,cost,timestep} \times \sum\limits_{\text{carrier} \in \text{carrier_tier(out)}} (\textbf{carrier_prod}_\text{node,tech,carrier,timestep}) + \frac{ \textit{cost_om_con}_\text{node,tech,cost,timestep} \times \sum\limits_{\text{carrier} \in \text{carrier_tier(out)}} (\textbf{carrier_prod}_\text{node,tech,carrier,timestep}) }{ \textit{energy_eff}_\text{node,tech,timestep} })&\quad
+            \text{if } (\exists (\textit{cost_om_prod}_\text{node,tech,cost,timestep}) \land \neg (\text{tech_group=conversion_plus}))\land{}(\exists (\textit{export_carrier}_\text{node,tech,carrier}) \land \exists (\textit{cost_export}_\text{node,tech,cost,timestep}))\land{}(\exists (\textit{cost_om_con}_\text{node,tech,cost,timestep}) \land \text{tech_group=supply} \land \textit{energy_eff}_\text{node,tech,timestep}\mathord{>}\text{0} \land \text{carrier_tier} \in \text{[out]})
             \\
-            \textit{timestep_weights}_\text{timestep} \times (\textit{cost_export}_\text{cost,node,tech,timestep} \times \sum\limits_{\text{carrier} \in \text{carriers}} (\textbf{carrier_export}_\text{node,tech,carrier,timestep}) + \textit{cost_om_prod}_\text{cost,node,tech,timestep} \times \sum\limits_{\text{carrier} \in \text{carrier_tier(out)}} (\textbf{carrier_prod}_\text{node,tech,carrier,timestep}) + \frac{ \textit{cost_om_con}_\text{cost,node,tech,timestep} \times \sum\limits_{\text{carrier} \in \text{carrier_tier(out)}} (\textbf{carrier_prod}_\text{node,tech,carrier,timestep}) }{ \textit{energy_eff}_\text{node,tech,timestep} })&\quad
-            \text{if } (\exists (\textit{cost_om_prod}_\text{cost,node,tech,timestep}) \land \neg (\text{tech_group=conversion_plus}))\land{}(\exists (\textit{cost_om_con}_\text{cost,node,tech,timestep}) \land \text{tech_group=supply} \land \textit{energy_eff}_\text{node,tech,timestep}\mathord{>}\text{0} \land \text{carrier_tier} \in \text{[out]})\land{}(\exists (\textit{export_carrier}_\text{carrier,node,tech}) \land \exists (\textit{cost_export}_\text{cost,node,tech,timestep}))
+            \textit{timestep_weights}_\text{timestep} \times (\textit{cost_export}_\text{node,tech,cost,timestep} \times \sum\limits_{\text{carrier} \in \text{carriers}} (\textbf{carrier_export}_\text{node,tech,carrier,timestep}) + \textit{cost_om_prod}_\text{node,tech,cost,timestep} \times \sum\limits_{\text{carrier} \in \text{carrier_tier(out)}} (\textbf{carrier_prod}_\text{node,tech,carrier,timestep}) + \textit{cost_om_con}_\text{node,tech,cost,timestep} \times -1 \times \sum\limits_{\text{carrier=primary_carrier_in}} (\textbf{carrier_con}_\text{node,tech,carrier,timestep}))&\quad
+            \text{if } (\exists (\textit{cost_om_prod}_\text{node,tech,cost,timestep}) \land \neg (\text{tech_group=conversion_plus}))\land{}(\exists (\textit{export_carrier}_\text{node,tech,carrier}) \land \exists (\textit{cost_export}_\text{node,tech,cost,timestep}))\land{}(\exists (\textit{cost_om_con}_\text{node,tech,cost,timestep}) \land \text{tech_group=conversion_plus})
             \\
-            \textit{timestep_weights}_\text{timestep} \times (\textit{cost_om_prod}_\text{cost,node,tech,timestep} \times \sum\limits_{\text{carrier} \in \text{carrier_tier(out)}} (\textbf{carrier_prod}_\text{node,tech,carrier,timestep}) + \frac{ \textit{cost_om_con}_\text{cost,node,tech,timestep} \times \sum\limits_{\text{carrier} \in \text{carrier_tier(out)}} (\textbf{carrier_prod}_\text{node,tech,carrier,timestep}) }{ \textit{energy_eff}_\text{node,tech,timestep} })&\quad
-            \text{if } (\exists (\textit{cost_om_prod}_\text{cost,node,tech,timestep}) \land \neg (\text{tech_group=conversion_plus}))\land{}(\exists (\textit{cost_om_con}_\text{cost,node,tech,timestep}) \land \text{tech_group=supply} \land \textit{energy_eff}_\text{node,tech,timestep}\mathord{>}\text{0} \land \text{carrier_tier} \in \text{[out]})\land{}(\neg (\exists (\textit{cost_export}_\text{cost,node,tech,timestep})))
+            \textit{timestep_weights}_\text{timestep} \times (\textit{cost_export}_\text{node,tech,cost,timestep} \times \sum\limits_{\text{carrier} \in \text{carriers}} (\textbf{carrier_export}_\text{node,tech,carrier,timestep}) + \textit{cost_om_prod}_\text{node,tech,cost,timestep} \times \sum\limits_{\text{carrier} \in \text{carrier_tier(out)}} (\textbf{carrier_prod}_\text{node,tech,carrier,timestep}) + \textit{cost_om_con}_\text{node,tech,cost,timestep} \times -1 \times \sum\limits_{\text{carrier} \in \text{carrier_tier(in)}} (\textbf{carrier_con}_\text{node,tech,carrier,timestep}))&\quad
+            \text{if } (\exists (\textit{cost_om_prod}_\text{node,tech,cost,timestep}) \land \neg (\text{tech_group=conversion_plus}))\land{}(\exists (\textit{export_carrier}_\text{node,tech,carrier}) \land \exists (\textit{cost_export}_\text{node,tech,cost,timestep}))\land{}(\exists (\textit{cost_om_con}_\text{node,tech,cost,timestep}) \land \neg (\text{tech_group=conversion_plus} \lor \text{tech_group=supply_plus} \lor \text{tech_group=supply}) \land \text{carrier_tier} \in \text{[in]})
             \\
-            \textit{timestep_weights}_\text{timestep} \times (\textit{cost_export}_\text{cost,node,tech,timestep} \times \sum\limits_{\text{carrier} \in \text{carriers}} (\textbf{carrier_export}_\text{node,tech,carrier,timestep}) + \textit{cost_om_prod}_\text{cost,node,tech,timestep} \times \sum\limits_{\text{carrier} \in \text{carrier_tier(out)}} (\textbf{carrier_prod}_\text{node,tech,carrier,timestep}) + \textit{cost_om_con}_\text{cost,node,tech,timestep} \times -1 \times \sum\limits_{\text{carrier=primary_carrier_in}} (\textbf{carrier_con}_\text{node,tech,carrier,timestep}))&\quad
-            \text{if } (\exists (\textit{cost_om_prod}_\text{cost,node,tech,timestep}) \land \neg (\text{tech_group=conversion_plus}))\land{}(\exists (\textit{cost_om_con}_\text{cost,node,tech,timestep}) \land \text{tech_group=conversion_plus})\land{}(\exists (\textit{export_carrier}_\text{carrier,node,tech}) \land \exists (\textit{cost_export}_\text{cost,node,tech,timestep}))
+            \textit{timestep_weights}_\text{timestep} \times (\textit{cost_export}_\text{node,tech,cost,timestep} \times \sum\limits_{\text{carrier} \in \text{carriers}} (\textbf{carrier_export}_\text{node,tech,carrier,timestep}) + \textit{cost_om_prod}_\text{node,tech,cost,timestep} \times \sum\limits_{\text{carrier} \in \text{carrier_tier(out)}} (\textbf{carrier_prod}_\text{node,tech,carrier,timestep}))&\quad
+            \text{if } (\exists (\textit{cost_om_prod}_\text{node,tech,cost,timestep}) \land \neg (\text{tech_group=conversion_plus}))\land{}(\exists (\textit{export_carrier}_\text{node,tech,carrier}) \land \exists (\textit{cost_export}_\text{node,tech,cost,timestep}))\land{}(\neg (\exists (\textit{cost_om_con}_\text{node,tech,cost,timestep})))
             \\
-            \textit{timestep_weights}_\text{timestep} \times (\textit{cost_om_prod}_\text{cost,node,tech,timestep} \times \sum\limits_{\text{carrier} \in \text{carrier_tier(out)}} (\textbf{carrier_prod}_\text{node,tech,carrier,timestep}) + \textit{cost_om_con}_\text{cost,node,tech,timestep} \times -1 \times \sum\limits_{\text{carrier=primary_carrier_in}} (\textbf{carrier_con}_\text{node,tech,carrier,timestep}))&\quad
-            \text{if } (\exists (\textit{cost_om_prod}_\text{cost,node,tech,timestep}) \land \neg (\text{tech_group=conversion_plus}))\land{}(\exists (\textit{cost_om_con}_\text{cost,node,tech,timestep}) \land \text{tech_group=conversion_plus})\land{}(\neg (\exists (\textit{cost_export}_\text{cost,node,tech,timestep})))
+            \textit{timestep_weights}_\text{timestep} \times (\textit{cost_om_prod}_\text{node,tech,cost,timestep} \times \sum\limits_{\text{carrier} \in \text{carrier_tier(out)}} (\textbf{carrier_prod}_\text{node,tech,carrier,timestep}) + \textit{cost_om_con}_\text{node,tech,cost,timestep} \times \textbf{resource_con}_\text{node,tech,timestep})&\quad
+            \text{if } (\exists (\textit{cost_om_prod}_\text{node,tech,cost,timestep}) \land \neg (\text{tech_group=conversion_plus}))\land{}(\neg (\exists (\textit{cost_export}_\text{node,tech,cost,timestep})))\land{}(\exists (\textit{cost_om_con}_\text{node,tech,cost,timestep}) \land \text{tech_group=supply_plus})
             \\
-            \textit{timestep_weights}_\text{timestep} \times (\textit{cost_export}_\text{cost,node,tech,timestep} \times \sum\limits_{\text{carrier} \in \text{carriers}} (\textbf{carrier_export}_\text{node,tech,carrier,timestep}) + \textit{cost_om_prod}_\text{cost,node,tech,timestep} \times \sum\limits_{\text{carrier} \in \text{carrier_tier(out)}} (\textbf{carrier_prod}_\text{node,tech,carrier,timestep}) + \textit{cost_om_con}_\text{cost,node,tech,timestep} \times -1 \times \sum\limits_{\text{carrier} \in \text{carrier_tier(in)}} (\textbf{carrier_con}_\text{node,tech,carrier,timestep}))&\quad
-            \text{if } (\exists (\textit{cost_om_prod}_\text{cost,node,tech,timestep}) \land \neg (\text{tech_group=conversion_plus}))\land{}(\exists (\textit{cost_om_con}_\text{cost,node,tech,timestep}) \land \neg (\text{tech_group=conversion_plus} \lor \text{tech_group=supply_plus} \lor \text{tech_group=supply}) \land \text{carrier_tier} \in \text{[in]})\land{}(\exists (\textit{export_carrier}_\text{carrier,node,tech}) \land \exists (\textit{cost_export}_\text{cost,node,tech,timestep}))
+            \textit{timestep_weights}_\text{timestep} \times (\textit{cost_om_prod}_\text{node,tech,cost,timestep} \times \sum\limits_{\text{carrier} \in \text{carrier_tier(out)}} (\textbf{carrier_prod}_\text{node,tech,carrier,timestep}) + \frac{ \textit{cost_om_con}_\text{node,tech,cost,timestep} \times \sum\limits_{\text{carrier} \in \text{carrier_tier(out)}} (\textbf{carrier_prod}_\text{node,tech,carrier,timestep}) }{ \textit{energy_eff}_\text{node,tech,timestep} })&\quad
+            \text{if } (\exists (\textit{cost_om_prod}_\text{node,tech,cost,timestep}) \land \neg (\text{tech_group=conversion_plus}))\land{}(\neg (\exists (\textit{cost_export}_\text{node,tech,cost,timestep})))\land{}(\exists (\textit{cost_om_con}_\text{node,tech,cost,timestep}) \land \text{tech_group=supply} \land \textit{energy_eff}_\text{node,tech,timestep}\mathord{>}\text{0} \land \text{carrier_tier} \in \text{[out]})
             \\
-            \textit{timestep_weights}_\text{timestep} \times (\textit{cost_om_prod}_\text{cost,node,tech,timestep} \times \sum\limits_{\text{carrier} \in \text{carrier_tier(out)}} (\textbf{carrier_prod}_\text{node,tech,carrier,timestep}) + \textit{cost_om_con}_\text{cost,node,tech,timestep} \times -1 \times \sum\limits_{\text{carrier} \in \text{carrier_tier(in)}} (\textbf{carrier_con}_\text{node,tech,carrier,timestep}))&\quad
-            \text{if } (\exists (\textit{cost_om_prod}_\text{cost,node,tech,timestep}) \land \neg (\text{tech_group=conversion_plus}))\land{}(\exists (\textit{cost_om_con}_\text{cost,node,tech,timestep}) \land \neg (\text{tech_group=conversion_plus} \lor \text{tech_group=supply_plus} \lor \text{tech_group=supply}) \land \text{carrier_tier} \in \text{[in]})\land{}(\neg (\exists (\textit{cost_export}_\text{cost,node,tech,timestep})))
+            \textit{timestep_weights}_\text{timestep} \times (\textit{cost_om_prod}_\text{node,tech,cost,timestep} \times \sum\limits_{\text{carrier} \in \text{carrier_tier(out)}} (\textbf{carrier_prod}_\text{node,tech,carrier,timestep}) + \textit{cost_om_con}_\text{node,tech,cost,timestep} \times -1 \times \sum\limits_{\text{carrier=primary_carrier_in}} (\textbf{carrier_con}_\text{node,tech,carrier,timestep}))&\quad
+            \text{if } (\exists (\textit{cost_om_prod}_\text{node,tech,cost,timestep}) \land \neg (\text{tech_group=conversion_plus}))\land{}(\neg (\exists (\textit{cost_export}_\text{node,tech,cost,timestep})))\land{}(\exists (\textit{cost_om_con}_\text{node,tech,cost,timestep}) \land \text{tech_group=conversion_plus})
             \\
-            \textit{timestep_weights}_\text{timestep} \times (\textit{cost_export}_\text{cost,node,tech,timestep} \times \sum\limits_{\text{carrier} \in \text{carriers}} (\textbf{carrier_export}_\text{node,tech,carrier,timestep}) + \textit{cost_om_prod}_\text{cost,node,tech,timestep} \times \sum\limits_{\text{carrier} \in \text{carrier_tier(out)}} (\textbf{carrier_prod}_\text{node,tech,carrier,timestep}))&\quad
-            \text{if } (\exists (\textit{cost_om_prod}_\text{cost,node,tech,timestep}) \land \neg (\text{tech_group=conversion_plus}))\land{}(\neg (\exists (\textit{cost_om_con}_\text{cost,node,tech,timestep})))\land{}(\exists (\textit{export_carrier}_\text{carrier,node,tech}) \land \exists (\textit{cost_export}_\text{cost,node,tech,timestep}))
+            \textit{timestep_weights}_\text{timestep} \times (\textit{cost_om_prod}_\text{node,tech,cost,timestep} \times \sum\limits_{\text{carrier} \in \text{carrier_tier(out)}} (\textbf{carrier_prod}_\text{node,tech,carrier,timestep}) + \textit{cost_om_con}_\text{node,tech,cost,timestep} \times -1 \times \sum\limits_{\text{carrier} \in \text{carrier_tier(in)}} (\textbf{carrier_con}_\text{node,tech,carrier,timestep}))&\quad
+            \text{if } (\exists (\textit{cost_om_prod}_\text{node,tech,cost,timestep}) \land \neg (\text{tech_group=conversion_plus}))\land{}(\neg (\exists (\textit{cost_export}_\text{node,tech,cost,timestep})))\land{}(\exists (\textit{cost_om_con}_\text{node,tech,cost,timestep}) \land \neg (\text{tech_group=conversion_plus} \lor \text{tech_group=supply_plus} \lor \text{tech_group=supply}) \land \text{carrier_tier} \in \text{[in]})
             \\
-            \textit{timestep_weights}_\text{timestep} \times (\textit{cost_om_prod}_\text{cost,node,tech,timestep} \times \sum\limits_{\text{carrier} \in \text{carrier_tier(out)}} (\textbf{carrier_prod}_\text{node,tech,carrier,timestep}))&\quad
-            \text{if } (\exists (\textit{cost_om_prod}_\text{cost,node,tech,timestep}) \land \neg (\text{tech_group=conversion_plus}))\land{}(\neg (\exists (\textit{cost_om_con}_\text{cost,node,tech,timestep})))\land{}(\neg (\exists (\textit{cost_export}_\text{cost,node,tech,timestep})))
+            \textit{timestep_weights}_\text{timestep} \times (\textit{cost_om_prod}_\text{node,tech,cost,timestep} \times \sum\limits_{\text{carrier} \in \text{carrier_tier(out)}} (\textbf{carrier_prod}_\text{node,tech,carrier,timestep}))&\quad
+            \text{if } (\exists (\textit{cost_om_prod}_\text{node,tech,cost,timestep}) \land \neg (\text{tech_group=conversion_plus}))\land{}(\neg (\exists (\textit{cost_export}_\text{node,tech,cost,timestep})))\land{}(\neg (\exists (\textit{cost_om_con}_\text{node,tech,cost,timestep})))
             \\
-            \textit{timestep_weights}_\text{timestep} \times (\textit{cost_export}_\text{cost,node,tech,timestep} \times \sum\limits_{\text{carrier} \in \text{carriers}} (\textbf{carrier_export}_\text{node,tech,carrier,timestep}) + \textit{cost_om_con}_\text{cost,node,tech,timestep} \times \textbf{resource_con}_\text{node,tech,timestep})&\quad
-            \text{if } (\neg (\exists (\textit{cost_om_prod}_\text{cost,node,tech,timestep})))\land{}(\exists (\textit{cost_om_con}_\text{cost,node,tech,timestep}) \land \text{tech_group=supply_plus})\land{}(\exists (\textit{export_carrier}_\text{carrier,node,tech}) \land \exists (\textit{cost_export}_\text{cost,node,tech,timestep}))
+            \textit{timestep_weights}_\text{timestep} \times (\textit{cost_export}_\text{node,tech,cost,timestep} \times \sum\limits_{\text{carrier} \in \text{carriers}} (\textbf{carrier_export}_\text{node,tech,carrier,timestep}) + \textit{cost_om_con}_\text{node,tech,cost,timestep} \times \textbf{resource_con}_\text{node,tech,timestep})&\quad
+            \text{if } (\neg (\exists (\textit{cost_om_prod}_\text{node,tech,cost,timestep})))\land{}(\exists (\textit{export_carrier}_\text{node,tech,carrier}) \land \exists (\textit{cost_export}_\text{node,tech,cost,timestep}))\land{}(\exists (\textit{cost_om_con}_\text{node,tech,cost,timestep}) \land \text{tech_group=supply_plus})
             \\
-            \textit{timestep_weights}_\text{timestep} \times (\textit{cost_om_con}_\text{cost,node,tech,timestep} \times \textbf{resource_con}_\text{node,tech,timestep})&\quad
-            \text{if } (\neg (\exists (\textit{cost_om_prod}_\text{cost,node,tech,timestep})))\land{}(\exists (\textit{cost_om_con}_\text{cost,node,tech,timestep}) \land \text{tech_group=supply_plus})\land{}(\neg (\exists (\textit{cost_export}_\text{cost,node,tech,timestep})))
+            \textit{timestep_weights}_\text{timestep} \times (\textit{cost_export}_\text{node,tech,cost,timestep} \times \sum\limits_{\text{carrier} \in \text{carriers}} (\textbf{carrier_export}_\text{node,tech,carrier,timestep}) + \frac{ \textit{cost_om_con}_\text{node,tech,cost,timestep} \times \sum\limits_{\text{carrier} \in \text{carrier_tier(out)}} (\textbf{carrier_prod}_\text{node,tech,carrier,timestep}) }{ \textit{energy_eff}_\text{node,tech,timestep} })&\quad
+            \text{if } (\neg (\exists (\textit{cost_om_prod}_\text{node,tech,cost,timestep})))\land{}(\exists (\textit{export_carrier}_\text{node,tech,carrier}) \land \exists (\textit{cost_export}_\text{node,tech,cost,timestep}))\land{}(\exists (\textit{cost_om_con}_\text{node,tech,cost,timestep}) \land \text{tech_group=supply} \land \textit{energy_eff}_\text{node,tech,timestep}\mathord{>}\text{0} \land \text{carrier_tier} \in \text{[out]})
             \\
-            \textit{timestep_weights}_\text{timestep} \times (\textit{cost_export}_\text{cost,node,tech,timestep} \times \sum\limits_{\text{carrier} \in \text{carriers}} (\textbf{carrier_export}_\text{node,tech,carrier,timestep}) + \frac{ \textit{cost_om_con}_\text{cost,node,tech,timestep} \times \sum\limits_{\text{carrier} \in \text{carrier_tier(out)}} (\textbf{carrier_prod}_\text{node,tech,carrier,timestep}) }{ \textit{energy_eff}_\text{node,tech,timestep} })&\quad
-            \text{if } (\neg (\exists (\textit{cost_om_prod}_\text{cost,node,tech,timestep})))\land{}(\exists (\textit{cost_om_con}_\text{cost,node,tech,timestep}) \land \text{tech_group=supply} \land \textit{energy_eff}_\text{node,tech,timestep}\mathord{>}\text{0} \land \text{carrier_tier} \in \text{[out]})\land{}(\exists (\textit{export_carrier}_\text{carrier,node,tech}) \land \exists (\textit{cost_export}_\text{cost,node,tech,timestep}))
+            \textit{timestep_weights}_\text{timestep} \times (\textit{cost_export}_\text{node,tech,cost,timestep} \times \sum\limits_{\text{carrier} \in \text{carriers}} (\textbf{carrier_export}_\text{node,tech,carrier,timestep}) + \textit{cost_om_con}_\text{node,tech,cost,timestep} \times -1 \times \sum\limits_{\text{carrier=primary_carrier_in}} (\textbf{carrier_con}_\text{node,tech,carrier,timestep}))&\quad
+            \text{if } (\neg (\exists (\textit{cost_om_prod}_\text{node,tech,cost,timestep})))\land{}(\exists (\textit{export_carrier}_\text{node,tech,carrier}) \land \exists (\textit{cost_export}_\text{node,tech,cost,timestep}))\land{}(\exists (\textit{cost_om_con}_\text{node,tech,cost,timestep}) \land \text{tech_group=conversion_plus})
             \\
-            \textit{timestep_weights}_\text{timestep} \times (\frac{ \textit{cost_om_con}_\text{cost,node,tech,timestep} \times \sum\limits_{\text{carrier} \in \text{carrier_tier(out)}} (\textbf{carrier_prod}_\text{node,tech,carrier,timestep}) }{ \textit{energy_eff}_\text{node,tech,timestep} })&\quad
-            \text{if } (\neg (\exists (\textit{cost_om_prod}_\text{cost,node,tech,timestep})))\land{}(\exists (\textit{cost_om_con}_\text{cost,node,tech,timestep}) \land \text{tech_group=supply} \land \textit{energy_eff}_\text{node,tech,timestep}\mathord{>}\text{0} \land \text{carrier_tier} \in \text{[out]})\land{}(\neg (\exists (\textit{cost_export}_\text{cost,node,tech,timestep})))
+            \textit{timestep_weights}_\text{timestep} \times (\textit{cost_export}_\text{node,tech,cost,timestep} \times \sum\limits_{\text{carrier} \in \text{carriers}} (\textbf{carrier_export}_\text{node,tech,carrier,timestep}) + \textit{cost_om_con}_\text{node,tech,cost,timestep} \times -1 \times \sum\limits_{\text{carrier} \in \text{carrier_tier(in)}} (\textbf{carrier_con}_\text{node,tech,carrier,timestep}))&\quad
+            \text{if } (\neg (\exists (\textit{cost_om_prod}_\text{node,tech,cost,timestep})))\land{}(\exists (\textit{export_carrier}_\text{node,tech,carrier}) \land \exists (\textit{cost_export}_\text{node,tech,cost,timestep}))\land{}(\exists (\textit{cost_om_con}_\text{node,tech,cost,timestep}) \land \neg (\text{tech_group=conversion_plus} \lor \text{tech_group=supply_plus} \lor \text{tech_group=supply}) \land \text{carrier_tier} \in \text{[in]})
             \\
-            \textit{timestep_weights}_\text{timestep} \times (\textit{cost_export}_\text{cost,node,tech,timestep} \times \sum\limits_{\text{carrier} \in \text{carriers}} (\textbf{carrier_export}_\text{node,tech,carrier,timestep}) + \textit{cost_om_con}_\text{cost,node,tech,timestep} \times -1 \times \sum\limits_{\text{carrier=primary_carrier_in}} (\textbf{carrier_con}_\text{node,tech,carrier,timestep}))&\quad
-            \text{if } (\neg (\exists (\textit{cost_om_prod}_\text{cost,node,tech,timestep})))\land{}(\exists (\textit{cost_om_con}_\text{cost,node,tech,timestep}) \land \text{tech_group=conversion_plus})\land{}(\exists (\textit{export_carrier}_\text{carrier,node,tech}) \land \exists (\textit{cost_export}_\text{cost,node,tech,timestep}))
+            \textit{timestep_weights}_\text{timestep} \times (\textit{cost_export}_\text{node,tech,cost,timestep} \times \sum\limits_{\text{carrier} \in \text{carriers}} (\textbf{carrier_export}_\text{node,tech,carrier,timestep}))&\quad
+            \text{if } (\neg (\exists (\textit{cost_om_prod}_\text{node,tech,cost,timestep})))\land{}(\exists (\textit{export_carrier}_\text{node,tech,carrier}) \land \exists (\textit{cost_export}_\text{node,tech,cost,timestep}))\land{}(\neg (\exists (\textit{cost_om_con}_\text{node,tech,cost,timestep})))
             \\
-            \textit{timestep_weights}_\text{timestep} \times (\textit{cost_om_con}_\text{cost,node,tech,timestep} \times -1 \times \sum\limits_{\text{carrier=primary_carrier_in}} (\textbf{carrier_con}_\text{node,tech,carrier,timestep}))&\quad
-            \text{if } (\neg (\exists (\textit{cost_om_prod}_\text{cost,node,tech,timestep})))\land{}(\exists (\textit{cost_om_con}_\text{cost,node,tech,timestep}) \land \text{tech_group=conversion_plus})\land{}(\neg (\exists (\textit{cost_export}_\text{cost,node,tech,timestep})))
+            \textit{timestep_weights}_\text{timestep} \times (\textit{cost_om_con}_\text{node,tech,cost,timestep} \times \textbf{resource_con}_\text{node,tech,timestep})&\quad
+            \text{if } (\neg (\exists (\textit{cost_om_prod}_\text{node,tech,cost,timestep})))\land{}(\neg (\exists (\textit{cost_export}_\text{node,tech,cost,timestep})))\land{}(\exists (\textit{cost_om_con}_\text{node,tech,cost,timestep}) \land \text{tech_group=supply_plus})
             \\
-            \textit{timestep_weights}_\text{timestep} \times (\textit{cost_export}_\text{cost,node,tech,timestep} \times \sum\limits_{\text{carrier} \in \text{carriers}} (\textbf{carrier_export}_\text{node,tech,carrier,timestep}) + \textit{cost_om_con}_\text{cost,node,tech,timestep} \times -1 \times \sum\limits_{\text{carrier} \in \text{carrier_tier(in)}} (\textbf{carrier_con}_\text{node,tech,carrier,timestep}))&\quad
-            \text{if } (\neg (\exists (\textit{cost_om_prod}_\text{cost,node,tech,timestep})))\land{}(\exists (\textit{cost_om_con}_\text{cost,node,tech,timestep}) \land \neg (\text{tech_group=conversion_plus} \lor \text{tech_group=supply_plus} \lor \text{tech_group=supply}) \land \text{carrier_tier} \in \text{[in]})\land{}(\exists (\textit{export_carrier}_\text{carrier,node,tech}) \land \exists (\textit{cost_export}_\text{cost,node,tech,timestep}))
+            \textit{timestep_weights}_\text{timestep} \times (\frac{ \textit{cost_om_con}_\text{node,tech,cost,timestep} \times \sum\limits_{\text{carrier} \in \text{carrier_tier(out)}} (\textbf{carrier_prod}_\text{node,tech,carrier,timestep}) }{ \textit{energy_eff}_\text{node,tech,timestep} })&\quad
+            \text{if } (\neg (\exists (\textit{cost_om_prod}_\text{node,tech,cost,timestep})))\land{}(\neg (\exists (\textit{cost_export}_\text{node,tech,cost,timestep})))\land{}(\exists (\textit{cost_om_con}_\text{node,tech,cost,timestep}) \land \text{tech_group=supply} \land \textit{energy_eff}_\text{node,tech,timestep}\mathord{>}\text{0} \land \text{carrier_tier} \in \text{[out]})
             \\
-            \textit{timestep_weights}_\text{timestep} \times (\textit{cost_om_con}_\text{cost,node,tech,timestep} \times -1 \times \sum\limits_{\text{carrier} \in \text{carrier_tier(in)}} (\textbf{carrier_con}_\text{node,tech,carrier,timestep}))&\quad
-            \text{if } (\neg (\exists (\textit{cost_om_prod}_\text{cost,node,tech,timestep})))\land{}(\exists (\textit{cost_om_con}_\text{cost,node,tech,timestep}) \land \neg (\text{tech_group=conversion_plus} \lor \text{tech_group=supply_plus} \lor \text{tech_group=supply}) \land \text{carrier_tier} \in \text{[in]})\land{}(\neg (\exists (\textit{cost_export}_\text{cost,node,tech,timestep})))
+            \textit{timestep_weights}_\text{timestep} \times (\textit{cost_om_con}_\text{node,tech,cost,timestep} \times -1 \times \sum\limits_{\text{carrier=primary_carrier_in}} (\textbf{carrier_con}_\text{node,tech,carrier,timestep}))&\quad
+            \text{if } (\neg (\exists (\textit{cost_om_prod}_\text{node,tech,cost,timestep})))\land{}(\neg (\exists (\textit{cost_export}_\text{node,tech,cost,timestep})))\land{}(\exists (\textit{cost_om_con}_\text{node,tech,cost,timestep}) \land \text{tech_group=conversion_plus})
             \\
-            \textit{timestep_weights}_\text{timestep} \times (\textit{cost_export}_\text{cost,node,tech,timestep} \times \sum\limits_{\text{carrier} \in \text{carriers}} (\textbf{carrier_export}_\text{node,tech,carrier,timestep}))&\quad
-            \text{if } (\neg (\exists (\textit{cost_om_prod}_\text{cost,node,tech,timestep})))\land{}(\neg (\exists (\textit{cost_om_con}_\text{cost,node,tech,timestep})))\land{}(\exists (\textit{export_carrier}_\text{carrier,node,tech}) \land \exists (\textit{cost_export}_\text{cost,node,tech,timestep}))
+            \textit{timestep_weights}_\text{timestep} \times (\textit{cost_om_con}_\text{node,tech,cost,timestep} \times -1 \times \sum\limits_{\text{carrier} \in \text{carrier_tier(in)}} (\textbf{carrier_con}_\text{node,tech,carrier,timestep}))&\quad
+            \text{if } (\neg (\exists (\textit{cost_om_prod}_\text{node,tech,cost,timestep})))\land{}(\neg (\exists (\textit{cost_export}_\text{node,tech,cost,timestep})))\land{}(\exists (\textit{cost_om_con}_\text{node,tech,cost,timestep}) \land \neg (\text{tech_group=conversion_plus} \lor \text{tech_group=supply_plus} \lor \text{tech_group=supply}) \land \text{carrier_tier} \in \text{[in]})
             \\
             \textit{timestep_weights}_\text{timestep} \times (0)&\quad
-            \text{if } (\neg (\exists (\textit{cost_om_prod}_\text{cost,node,tech,timestep})))\land{}(\neg (\exists (\textit{cost_om_con}_\text{cost,node,tech,timestep})))\land{}(\neg (\exists (\textit{cost_export}_\text{cost,node,tech,timestep})))
+            \text{if } (\neg (\exists (\textit{cost_om_prod}_\text{node,tech,cost,timestep})))\land{}(\neg (\exists (\textit{cost_export}_\text{node,tech,cost,timestep})))\land{}(\neg (\exists (\textit{cost_om_con}_\text{node,tech,cost,timestep})))
             \\
         \end{cases}
 
@@ -1362,296 +1362,296 @@ The installation costs of a technology, including annualised investment costs an
             \text{ tech }\negthickspace \in \negthickspace\text{ techs, }
             \text{ cost }\negthickspace \in \negthickspace\text{ costs }
             \\
-            \text{if } (\exists (\textit{cost_energy_cap}_\text{cost,node,tech}) \lor \exists (\textit{cost_om_annual}_\text{cost,node,tech}) \lor \exists (\textit{cost_om_annual_investment_fraction}_\text{cost,node,tech}) \lor \exists (\textit{cost_purchase}_\text{cost,node,tech}) \lor \exists (\textit{cost_resource_area}_\text{cost,node,tech}) \lor \exists (\textit{cost_resource_cap}_\text{cost,node,tech}) \lor \exists (\textit{cost_storage_cap}_\text{cost,node,tech}))
+            \text{if } (\exists (\textit{cost_energy_cap}_\text{node,tech,cost}) \lor \exists (\textit{cost_om_annual}_\text{node,tech,cost}) \lor \exists (\textit{cost_om_annual_investment_fraction}_\text{node,tech,cost}) \lor \exists (\textit{cost_purchase}_\text{node,tech,cost}) \lor \exists (\textit{cost_resource_area}_\text{node,tech,cost}) \lor \exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \lor \exists (\textit{cost_storage_cap}_\text{node,tech,cost}))
         \end{array}
         \begin{cases}
-            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{cost,node,tech} \times (\textit{cost_energy_cap}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech} + \textit{cost_storage_cap}_\text{cost,node,tech} \times \textbf{storage_cap}_\text{node,tech} + \textit{cost_resource_cap}_\text{cost,node,tech} \times \textbf{resource_cap}_\text{node,tech} + \textit{cost_resource_area}_\text{cost,node,tech} \times \textbf{resource_area}_\text{node,tech} + \textit{cost_purchase}_\text{cost,node,tech} \times \textbf{purchased}_\text{node,tech}) \times (0.5 + \textit{cost_om_annual_investment_fraction}_\text{cost,node,tech})) + (\textit{cost_om_annual}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech}))&\quad
-            \text{if } (\exists (\textit{cost_energy_cap}_\text{cost,node,tech}))\land{}(\exists (\textit{cost_storage_cap}_\text{cost,node,tech}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage}))\land{}(\exists (\textit{cost_resource_area}_\text{cost,node,tech}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area}))\land{}(\exists (\textit{cost_purchase}_\text{cost,node,tech}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{binary})\land{}(\exists (\textit{cost_resource_cap}_\text{cost,node,tech}) \land \text{tech_group=supply_plus})\land{}(\text{tech_group=transmission})
+            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{node,tech,cost} \times (\textit{cost_energy_cap}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech} + \textit{cost_storage_cap}_\text{node,tech,cost} \times \textbf{storage_cap}_\text{node,tech} + \textit{cost_resource_cap}_\text{node,tech,cost} \times \textbf{resource_cap}_\text{node,tech} + \textit{cost_resource_area}_\text{node,tech,cost} \times \textbf{resource_area}_\text{node,tech} + \textit{cost_purchase}_\text{node,tech,cost} \times \textbf{purchased}_\text{node,tech}) \times (0.5 + \textit{cost_om_annual_investment_fraction}_\text{node,tech,cost})) + (\textit{cost_om_annual}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech}))&\quad
+            \text{if } (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area}))\land{}(\text{tech_group=transmission})\land{}(\exists (\textit{cost_energy_cap}_\text{node,tech,cost}))\land{}(\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \text{tech_group=supply_plus})\land{}(\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage}))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{binary})
             \\
-            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{cost,node,tech} \times (\textit{cost_energy_cap}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech} + \textit{cost_storage_cap}_\text{cost,node,tech} \times \textbf{storage_cap}_\text{node,tech} + \textit{cost_resource_cap}_\text{cost,node,tech} \times \textbf{resource_cap}_\text{node,tech} + \textit{cost_resource_area}_\text{cost,node,tech} \times \textbf{resource_area}_\text{node,tech} + \textit{cost_purchase}_\text{cost,node,tech} \times \textbf{purchased}_\text{node,tech}) \times (1 + \textit{cost_om_annual_investment_fraction}_\text{cost,node,tech})) + (\textit{cost_om_annual}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech}))&\quad
-            \text{if } (\exists (\textit{cost_energy_cap}_\text{cost,node,tech}))\land{}(\exists (\textit{cost_storage_cap}_\text{cost,node,tech}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage}))\land{}(\exists (\textit{cost_resource_area}_\text{cost,node,tech}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area}))\land{}(\exists (\textit{cost_purchase}_\text{cost,node,tech}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{binary})\land{}(\exists (\textit{cost_resource_cap}_\text{cost,node,tech}) \land \text{tech_group=supply_plus})\land{}(\neg (\text{tech_group=transmission}))
+            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{node,tech,cost} \times (\textit{cost_energy_cap}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech} + \textit{cost_storage_cap}_\text{node,tech,cost} \times \textbf{storage_cap}_\text{node,tech} + \textit{cost_resource_cap}_\text{node,tech,cost} \times \textbf{resource_cap}_\text{node,tech} + \textit{cost_resource_area}_\text{node,tech,cost} \times \textbf{resource_area}_\text{node,tech} + \textit{cost_purchase}_\text{node,tech,cost} \times \textbf{units}_\text{node,tech}) \times (0.5 + \textit{cost_om_annual_investment_fraction}_\text{node,tech,cost})) + (\textit{cost_om_annual}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech}))&\quad
+            \text{if } (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area}))\land{}(\text{tech_group=transmission})\land{}(\exists (\textit{cost_energy_cap}_\text{node,tech,cost}))\land{}(\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \text{tech_group=supply_plus})\land{}(\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage}))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})
             \\
-            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{cost,node,tech} \times (\textit{cost_energy_cap}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech} + \textit{cost_storage_cap}_\text{cost,node,tech} \times \textbf{storage_cap}_\text{node,tech} + \textit{cost_resource_area}_\text{cost,node,tech} \times \textbf{resource_area}_\text{node,tech} + \textit{cost_purchase}_\text{cost,node,tech} \times \textbf{purchased}_\text{node,tech}) \times (0.5 + \textit{cost_om_annual_investment_fraction}_\text{cost,node,tech})) + (\textit{cost_om_annual}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech}))&\quad
-            \text{if } (\exists (\textit{cost_energy_cap}_\text{cost,node,tech}))\land{}(\exists (\textit{cost_storage_cap}_\text{cost,node,tech}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage}))\land{}(\exists (\textit{cost_resource_area}_\text{cost,node,tech}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area}))\land{}(\exists (\textit{cost_purchase}_\text{cost,node,tech}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{binary})\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{cost,node,tech}) \land \text{tech_group=supply_plus}))\land{}(\text{tech_group=transmission})
+            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{node,tech,cost} \times (\textit{cost_energy_cap}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech} + \textit{cost_storage_cap}_\text{node,tech,cost} \times \textbf{storage_cap}_\text{node,tech} + \textit{cost_resource_cap}_\text{node,tech,cost} \times \textbf{resource_cap}_\text{node,tech} + \textit{cost_resource_area}_\text{node,tech,cost} \times \textbf{resource_area}_\text{node,tech}) \times (0.5 + \textit{cost_om_annual_investment_fraction}_\text{node,tech,cost})) + (\textit{cost_om_annual}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech}))&\quad
+            \text{if } (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area}))\land{}(\text{tech_group=transmission})\land{}(\exists (\textit{cost_energy_cap}_\text{node,tech,cost}))\land{}(\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \text{tech_group=supply_plus})\land{}(\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage}))\land{}(\neg (\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land (\textit{cap_method}_\text{node,tech}\mathord{=}\text{binary} \lor \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})))
             \\
-            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{cost,node,tech} \times (\textit{cost_energy_cap}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech} + \textit{cost_storage_cap}_\text{cost,node,tech} \times \textbf{storage_cap}_\text{node,tech} + \textit{cost_resource_area}_\text{cost,node,tech} \times \textbf{resource_area}_\text{node,tech} + \textit{cost_purchase}_\text{cost,node,tech} \times \textbf{purchased}_\text{node,tech}) \times (1 + \textit{cost_om_annual_investment_fraction}_\text{cost,node,tech})) + (\textit{cost_om_annual}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech}))&\quad
-            \text{if } (\exists (\textit{cost_energy_cap}_\text{cost,node,tech}))\land{}(\exists (\textit{cost_storage_cap}_\text{cost,node,tech}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage}))\land{}(\exists (\textit{cost_resource_area}_\text{cost,node,tech}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area}))\land{}(\exists (\textit{cost_purchase}_\text{cost,node,tech}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{binary})\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{cost,node,tech}) \land \text{tech_group=supply_plus}))\land{}(\neg (\text{tech_group=transmission}))
+            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{node,tech,cost} \times (\textit{cost_energy_cap}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech} + \textit{cost_resource_cap}_\text{node,tech,cost} \times \textbf{resource_cap}_\text{node,tech} + \textit{cost_resource_area}_\text{node,tech,cost} \times \textbf{resource_area}_\text{node,tech} + \textit{cost_purchase}_\text{node,tech,cost} \times \textbf{purchased}_\text{node,tech}) \times (0.5 + \textit{cost_om_annual_investment_fraction}_\text{node,tech,cost})) + (\textit{cost_om_annual}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech}))&\quad
+            \text{if } (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area}))\land{}(\text{tech_group=transmission})\land{}(\exists (\textit{cost_energy_cap}_\text{node,tech,cost}))\land{}(\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \text{tech_group=supply_plus})\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage})))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{binary})
             \\
-            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{cost,node,tech} \times (\textit{cost_energy_cap}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech} + \textit{cost_storage_cap}_\text{cost,node,tech} \times \textbf{storage_cap}_\text{node,tech} + \textit{cost_resource_cap}_\text{cost,node,tech} \times \textbf{resource_cap}_\text{node,tech} + \textit{cost_resource_area}_\text{cost,node,tech} \times \textbf{resource_area}_\text{node,tech} + \textit{cost_purchase}_\text{cost,node,tech} \times \textbf{units}_\text{node,tech}) \times (0.5 + \textit{cost_om_annual_investment_fraction}_\text{cost,node,tech})) + (\textit{cost_om_annual}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech}))&\quad
-            \text{if } (\exists (\textit{cost_energy_cap}_\text{cost,node,tech}))\land{}(\exists (\textit{cost_storage_cap}_\text{cost,node,tech}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage}))\land{}(\exists (\textit{cost_resource_area}_\text{cost,node,tech}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area}))\land{}(\exists (\textit{cost_purchase}_\text{cost,node,tech}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})\land{}(\exists (\textit{cost_resource_cap}_\text{cost,node,tech}) \land \text{tech_group=supply_plus})\land{}(\text{tech_group=transmission})
+            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{node,tech,cost} \times (\textit{cost_energy_cap}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech} + \textit{cost_resource_cap}_\text{node,tech,cost} \times \textbf{resource_cap}_\text{node,tech} + \textit{cost_resource_area}_\text{node,tech,cost} \times \textbf{resource_area}_\text{node,tech} + \textit{cost_purchase}_\text{node,tech,cost} \times \textbf{units}_\text{node,tech}) \times (0.5 + \textit{cost_om_annual_investment_fraction}_\text{node,tech,cost})) + (\textit{cost_om_annual}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech}))&\quad
+            \text{if } (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area}))\land{}(\text{tech_group=transmission})\land{}(\exists (\textit{cost_energy_cap}_\text{node,tech,cost}))\land{}(\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \text{tech_group=supply_plus})\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage})))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})
             \\
-            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{cost,node,tech} \times (\textit{cost_energy_cap}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech} + \textit{cost_storage_cap}_\text{cost,node,tech} \times \textbf{storage_cap}_\text{node,tech} + \textit{cost_resource_cap}_\text{cost,node,tech} \times \textbf{resource_cap}_\text{node,tech} + \textit{cost_resource_area}_\text{cost,node,tech} \times \textbf{resource_area}_\text{node,tech} + \textit{cost_purchase}_\text{cost,node,tech} \times \textbf{units}_\text{node,tech}) \times (1 + \textit{cost_om_annual_investment_fraction}_\text{cost,node,tech})) + (\textit{cost_om_annual}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech}))&\quad
-            \text{if } (\exists (\textit{cost_energy_cap}_\text{cost,node,tech}))\land{}(\exists (\textit{cost_storage_cap}_\text{cost,node,tech}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage}))\land{}(\exists (\textit{cost_resource_area}_\text{cost,node,tech}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area}))\land{}(\exists (\textit{cost_purchase}_\text{cost,node,tech}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})\land{}(\exists (\textit{cost_resource_cap}_\text{cost,node,tech}) \land \text{tech_group=supply_plus})\land{}(\neg (\text{tech_group=transmission}))
+            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{node,tech,cost} \times (\textit{cost_energy_cap}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech} + \textit{cost_resource_cap}_\text{node,tech,cost} \times \textbf{resource_cap}_\text{node,tech} + \textit{cost_resource_area}_\text{node,tech,cost} \times \textbf{resource_area}_\text{node,tech}) \times (0.5 + \textit{cost_om_annual_investment_fraction}_\text{node,tech,cost})) + (\textit{cost_om_annual}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech}))&\quad
+            \text{if } (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area}))\land{}(\text{tech_group=transmission})\land{}(\exists (\textit{cost_energy_cap}_\text{node,tech,cost}))\land{}(\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \text{tech_group=supply_plus})\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage})))\land{}(\neg (\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land (\textit{cap_method}_\text{node,tech}\mathord{=}\text{binary} \lor \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})))
             \\
-            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{cost,node,tech} \times (\textit{cost_energy_cap}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech} + \textit{cost_storage_cap}_\text{cost,node,tech} \times \textbf{storage_cap}_\text{node,tech} + \textit{cost_resource_area}_\text{cost,node,tech} \times \textbf{resource_area}_\text{node,tech} + \textit{cost_purchase}_\text{cost,node,tech} \times \textbf{units}_\text{node,tech}) \times (0.5 + \textit{cost_om_annual_investment_fraction}_\text{cost,node,tech})) + (\textit{cost_om_annual}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech}))&\quad
-            \text{if } (\exists (\textit{cost_energy_cap}_\text{cost,node,tech}))\land{}(\exists (\textit{cost_storage_cap}_\text{cost,node,tech}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage}))\land{}(\exists (\textit{cost_resource_area}_\text{cost,node,tech}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area}))\land{}(\exists (\textit{cost_purchase}_\text{cost,node,tech}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{cost,node,tech}) \land \text{tech_group=supply_plus}))\land{}(\text{tech_group=transmission})
+            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{node,tech,cost} \times (\textit{cost_energy_cap}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech} + \textit{cost_storage_cap}_\text{node,tech,cost} \times \textbf{storage_cap}_\text{node,tech} + \textit{cost_resource_area}_\text{node,tech,cost} \times \textbf{resource_area}_\text{node,tech} + \textit{cost_purchase}_\text{node,tech,cost} \times \textbf{purchased}_\text{node,tech}) \times (0.5 + \textit{cost_om_annual_investment_fraction}_\text{node,tech,cost})) + (\textit{cost_om_annual}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech}))&\quad
+            \text{if } (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area}))\land{}(\text{tech_group=transmission})\land{}(\exists (\textit{cost_energy_cap}_\text{node,tech,cost}))\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \text{tech_group=supply_plus}))\land{}(\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage}))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{binary})
             \\
-            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{cost,node,tech} \times (\textit{cost_energy_cap}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech} + \textit{cost_storage_cap}_\text{cost,node,tech} \times \textbf{storage_cap}_\text{node,tech} + \textit{cost_resource_area}_\text{cost,node,tech} \times \textbf{resource_area}_\text{node,tech} + \textit{cost_purchase}_\text{cost,node,tech} \times \textbf{units}_\text{node,tech}) \times (1 + \textit{cost_om_annual_investment_fraction}_\text{cost,node,tech})) + (\textit{cost_om_annual}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech}))&\quad
-            \text{if } (\exists (\textit{cost_energy_cap}_\text{cost,node,tech}))\land{}(\exists (\textit{cost_storage_cap}_\text{cost,node,tech}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage}))\land{}(\exists (\textit{cost_resource_area}_\text{cost,node,tech}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area}))\land{}(\exists (\textit{cost_purchase}_\text{cost,node,tech}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{cost,node,tech}) \land \text{tech_group=supply_plus}))\land{}(\neg (\text{tech_group=transmission}))
+            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{node,tech,cost} \times (\textit{cost_energy_cap}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech} + \textit{cost_storage_cap}_\text{node,tech,cost} \times \textbf{storage_cap}_\text{node,tech} + \textit{cost_resource_area}_\text{node,tech,cost} \times \textbf{resource_area}_\text{node,tech} + \textit{cost_purchase}_\text{node,tech,cost} \times \textbf{units}_\text{node,tech}) \times (0.5 + \textit{cost_om_annual_investment_fraction}_\text{node,tech,cost})) + (\textit{cost_om_annual}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech}))&\quad
+            \text{if } (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area}))\land{}(\text{tech_group=transmission})\land{}(\exists (\textit{cost_energy_cap}_\text{node,tech,cost}))\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \text{tech_group=supply_plus}))\land{}(\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage}))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})
             \\
-            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{cost,node,tech} \times (\textit{cost_energy_cap}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech} + \textit{cost_storage_cap}_\text{cost,node,tech} \times \textbf{storage_cap}_\text{node,tech} + \textit{cost_resource_cap}_\text{cost,node,tech} \times \textbf{resource_cap}_\text{node,tech} + \textit{cost_resource_area}_\text{cost,node,tech} \times \textbf{resource_area}_\text{node,tech}) \times (0.5 + \textit{cost_om_annual_investment_fraction}_\text{cost,node,tech})) + (\textit{cost_om_annual}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech}))&\quad
-            \text{if } (\exists (\textit{cost_energy_cap}_\text{cost,node,tech}))\land{}(\exists (\textit{cost_storage_cap}_\text{cost,node,tech}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage}))\land{}(\exists (\textit{cost_resource_area}_\text{cost,node,tech}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area}))\land{}(\neg (\exists (\textit{cost_purchase}_\text{cost,node,tech}) \land (\textit{cap_method}_\text{node,tech}\mathord{=}\text{binary} \lor \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})))\land{}(\exists (\textit{cost_resource_cap}_\text{cost,node,tech}) \land \text{tech_group=supply_plus})\land{}(\text{tech_group=transmission})
+            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{node,tech,cost} \times (\textit{cost_energy_cap}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech} + \textit{cost_storage_cap}_\text{node,tech,cost} \times \textbf{storage_cap}_\text{node,tech} + \textit{cost_resource_area}_\text{node,tech,cost} \times \textbf{resource_area}_\text{node,tech}) \times (0.5 + \textit{cost_om_annual_investment_fraction}_\text{node,tech,cost})) + (\textit{cost_om_annual}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech}))&\quad
+            \text{if } (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area}))\land{}(\text{tech_group=transmission})\land{}(\exists (\textit{cost_energy_cap}_\text{node,tech,cost}))\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \text{tech_group=supply_plus}))\land{}(\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage}))\land{}(\neg (\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land (\textit{cap_method}_\text{node,tech}\mathord{=}\text{binary} \lor \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})))
             \\
-            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{cost,node,tech} \times (\textit{cost_energy_cap}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech} + \textit{cost_storage_cap}_\text{cost,node,tech} \times \textbf{storage_cap}_\text{node,tech} + \textit{cost_resource_cap}_\text{cost,node,tech} \times \textbf{resource_cap}_\text{node,tech} + \textit{cost_resource_area}_\text{cost,node,tech} \times \textbf{resource_area}_\text{node,tech}) \times (1 + \textit{cost_om_annual_investment_fraction}_\text{cost,node,tech})) + (\textit{cost_om_annual}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech}))&\quad
-            \text{if } (\exists (\textit{cost_energy_cap}_\text{cost,node,tech}))\land{}(\exists (\textit{cost_storage_cap}_\text{cost,node,tech}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage}))\land{}(\exists (\textit{cost_resource_area}_\text{cost,node,tech}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area}))\land{}(\neg (\exists (\textit{cost_purchase}_\text{cost,node,tech}) \land (\textit{cap_method}_\text{node,tech}\mathord{=}\text{binary} \lor \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})))\land{}(\exists (\textit{cost_resource_cap}_\text{cost,node,tech}) \land \text{tech_group=supply_plus})\land{}(\neg (\text{tech_group=transmission}))
+            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{node,tech,cost} \times (\textit{cost_energy_cap}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech} + \textit{cost_resource_area}_\text{node,tech,cost} \times \textbf{resource_area}_\text{node,tech} + \textit{cost_purchase}_\text{node,tech,cost} \times \textbf{purchased}_\text{node,tech}) \times (0.5 + \textit{cost_om_annual_investment_fraction}_\text{node,tech,cost})) + (\textit{cost_om_annual}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech}))&\quad
+            \text{if } (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area}))\land{}(\text{tech_group=transmission})\land{}(\exists (\textit{cost_energy_cap}_\text{node,tech,cost}))\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \text{tech_group=supply_plus}))\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage})))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{binary})
             \\
-            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{cost,node,tech} \times (\textit{cost_energy_cap}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech} + \textit{cost_storage_cap}_\text{cost,node,tech} \times \textbf{storage_cap}_\text{node,tech} + \textit{cost_resource_area}_\text{cost,node,tech} \times \textbf{resource_area}_\text{node,tech}) \times (0.5 + \textit{cost_om_annual_investment_fraction}_\text{cost,node,tech})) + (\textit{cost_om_annual}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech}))&\quad
-            \text{if } (\exists (\textit{cost_energy_cap}_\text{cost,node,tech}))\land{}(\exists (\textit{cost_storage_cap}_\text{cost,node,tech}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage}))\land{}(\exists (\textit{cost_resource_area}_\text{cost,node,tech}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area}))\land{}(\neg (\exists (\textit{cost_purchase}_\text{cost,node,tech}) \land (\textit{cap_method}_\text{node,tech}\mathord{=}\text{binary} \lor \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})))\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{cost,node,tech}) \land \text{tech_group=supply_plus}))\land{}(\text{tech_group=transmission})
+            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{node,tech,cost} \times (\textit{cost_energy_cap}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech} + \textit{cost_resource_area}_\text{node,tech,cost} \times \textbf{resource_area}_\text{node,tech} + \textit{cost_purchase}_\text{node,tech,cost} \times \textbf{units}_\text{node,tech}) \times (0.5 + \textit{cost_om_annual_investment_fraction}_\text{node,tech,cost})) + (\textit{cost_om_annual}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech}))&\quad
+            \text{if } (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area}))\land{}(\text{tech_group=transmission})\land{}(\exists (\textit{cost_energy_cap}_\text{node,tech,cost}))\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \text{tech_group=supply_plus}))\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage})))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})
             \\
-            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{cost,node,tech} \times (\textit{cost_energy_cap}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech} + \textit{cost_storage_cap}_\text{cost,node,tech} \times \textbf{storage_cap}_\text{node,tech} + \textit{cost_resource_area}_\text{cost,node,tech} \times \textbf{resource_area}_\text{node,tech}) \times (1 + \textit{cost_om_annual_investment_fraction}_\text{cost,node,tech})) + (\textit{cost_om_annual}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech}))&\quad
-            \text{if } (\exists (\textit{cost_energy_cap}_\text{cost,node,tech}))\land{}(\exists (\textit{cost_storage_cap}_\text{cost,node,tech}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage}))\land{}(\exists (\textit{cost_resource_area}_\text{cost,node,tech}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area}))\land{}(\neg (\exists (\textit{cost_purchase}_\text{cost,node,tech}) \land (\textit{cap_method}_\text{node,tech}\mathord{=}\text{binary} \lor \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})))\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{cost,node,tech}) \land \text{tech_group=supply_plus}))\land{}(\neg (\text{tech_group=transmission}))
+            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{node,tech,cost} \times (\textit{cost_energy_cap}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech} + \textit{cost_resource_area}_\text{node,tech,cost} \times \textbf{resource_area}_\text{node,tech}) \times (0.5 + \textit{cost_om_annual_investment_fraction}_\text{node,tech,cost})) + (\textit{cost_om_annual}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech}))&\quad
+            \text{if } (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area}))\land{}(\text{tech_group=transmission})\land{}(\exists (\textit{cost_energy_cap}_\text{node,tech,cost}))\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \text{tech_group=supply_plus}))\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage})))\land{}(\neg (\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land (\textit{cap_method}_\text{node,tech}\mathord{=}\text{binary} \lor \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})))
             \\
-            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{cost,node,tech} \times (\textit{cost_energy_cap}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech} + \textit{cost_storage_cap}_\text{cost,node,tech} \times \textbf{storage_cap}_\text{node,tech} + \textit{cost_resource_cap}_\text{cost,node,tech} \times \textbf{resource_cap}_\text{node,tech} + \textit{cost_purchase}_\text{cost,node,tech} \times \textbf{purchased}_\text{node,tech}) \times (0.5 + \textit{cost_om_annual_investment_fraction}_\text{cost,node,tech})) + (\textit{cost_om_annual}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech}))&\quad
-            \text{if } (\exists (\textit{cost_energy_cap}_\text{cost,node,tech}))\land{}(\exists (\textit{cost_storage_cap}_\text{cost,node,tech}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage}))\land{}(\neg (\exists (\textit{cost_resource_area}_\text{cost,node,tech}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area})))\land{}(\exists (\textit{cost_purchase}_\text{cost,node,tech}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{binary})\land{}(\exists (\textit{cost_resource_cap}_\text{cost,node,tech}) \land \text{tech_group=supply_plus})\land{}(\text{tech_group=transmission})
+            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{node,tech,cost} \times (\textit{cost_storage_cap}_\text{node,tech,cost} \times \textbf{storage_cap}_\text{node,tech} + \textit{cost_resource_cap}_\text{node,tech,cost} \times \textbf{resource_cap}_\text{node,tech} + \textit{cost_resource_area}_\text{node,tech,cost} \times \textbf{resource_area}_\text{node,tech} + \textit{cost_purchase}_\text{node,tech,cost} \times \textbf{purchased}_\text{node,tech}) \times (0.5 + \textit{cost_om_annual_investment_fraction}_\text{node,tech,cost})) + (\textit{cost_om_annual}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech}))&\quad
+            \text{if } (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area}))\land{}(\text{tech_group=transmission})\land{}(\neg (\exists (\textit{cost_energy_cap}_\text{node,tech,cost})))\land{}(\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \text{tech_group=supply_plus})\land{}(\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage}))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{binary})
             \\
-            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{cost,node,tech} \times (\textit{cost_energy_cap}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech} + \textit{cost_storage_cap}_\text{cost,node,tech} \times \textbf{storage_cap}_\text{node,tech} + \textit{cost_resource_cap}_\text{cost,node,tech} \times \textbf{resource_cap}_\text{node,tech} + \textit{cost_purchase}_\text{cost,node,tech} \times \textbf{purchased}_\text{node,tech}) \times (1 + \textit{cost_om_annual_investment_fraction}_\text{cost,node,tech})) + (\textit{cost_om_annual}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech}))&\quad
-            \text{if } (\exists (\textit{cost_energy_cap}_\text{cost,node,tech}))\land{}(\exists (\textit{cost_storage_cap}_\text{cost,node,tech}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage}))\land{}(\neg (\exists (\textit{cost_resource_area}_\text{cost,node,tech}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area})))\land{}(\exists (\textit{cost_purchase}_\text{cost,node,tech}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{binary})\land{}(\exists (\textit{cost_resource_cap}_\text{cost,node,tech}) \land \text{tech_group=supply_plus})\land{}(\neg (\text{tech_group=transmission}))
+            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{node,tech,cost} \times (\textit{cost_storage_cap}_\text{node,tech,cost} \times \textbf{storage_cap}_\text{node,tech} + \textit{cost_resource_cap}_\text{node,tech,cost} \times \textbf{resource_cap}_\text{node,tech} + \textit{cost_resource_area}_\text{node,tech,cost} \times \textbf{resource_area}_\text{node,tech} + \textit{cost_purchase}_\text{node,tech,cost} \times \textbf{units}_\text{node,tech}) \times (0.5 + \textit{cost_om_annual_investment_fraction}_\text{node,tech,cost})) + (\textit{cost_om_annual}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech}))&\quad
+            \text{if } (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area}))\land{}(\text{tech_group=transmission})\land{}(\neg (\exists (\textit{cost_energy_cap}_\text{node,tech,cost})))\land{}(\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \text{tech_group=supply_plus})\land{}(\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage}))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})
             \\
-            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{cost,node,tech} \times (\textit{cost_energy_cap}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech} + \textit{cost_storage_cap}_\text{cost,node,tech} \times \textbf{storage_cap}_\text{node,tech} + \textit{cost_purchase}_\text{cost,node,tech} \times \textbf{purchased}_\text{node,tech}) \times (0.5 + \textit{cost_om_annual_investment_fraction}_\text{cost,node,tech})) + (\textit{cost_om_annual}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech}))&\quad
-            \text{if } (\exists (\textit{cost_energy_cap}_\text{cost,node,tech}))\land{}(\exists (\textit{cost_storage_cap}_\text{cost,node,tech}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage}))\land{}(\neg (\exists (\textit{cost_resource_area}_\text{cost,node,tech}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area})))\land{}(\exists (\textit{cost_purchase}_\text{cost,node,tech}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{binary})\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{cost,node,tech}) \land \text{tech_group=supply_plus}))\land{}(\text{tech_group=transmission})
+            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{node,tech,cost} \times (\textit{cost_storage_cap}_\text{node,tech,cost} \times \textbf{storage_cap}_\text{node,tech} + \textit{cost_resource_cap}_\text{node,tech,cost} \times \textbf{resource_cap}_\text{node,tech} + \textit{cost_resource_area}_\text{node,tech,cost} \times \textbf{resource_area}_\text{node,tech}) \times (0.5 + \textit{cost_om_annual_investment_fraction}_\text{node,tech,cost})) + (\textit{cost_om_annual}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech}))&\quad
+            \text{if } (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area}))\land{}(\text{tech_group=transmission})\land{}(\neg (\exists (\textit{cost_energy_cap}_\text{node,tech,cost})))\land{}(\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \text{tech_group=supply_plus})\land{}(\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage}))\land{}(\neg (\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land (\textit{cap_method}_\text{node,tech}\mathord{=}\text{binary} \lor \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})))
             \\
-            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{cost,node,tech} \times (\textit{cost_energy_cap}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech} + \textit{cost_storage_cap}_\text{cost,node,tech} \times \textbf{storage_cap}_\text{node,tech} + \textit{cost_purchase}_\text{cost,node,tech} \times \textbf{purchased}_\text{node,tech}) \times (1 + \textit{cost_om_annual_investment_fraction}_\text{cost,node,tech})) + (\textit{cost_om_annual}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech}))&\quad
-            \text{if } (\exists (\textit{cost_energy_cap}_\text{cost,node,tech}))\land{}(\exists (\textit{cost_storage_cap}_\text{cost,node,tech}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage}))\land{}(\neg (\exists (\textit{cost_resource_area}_\text{cost,node,tech}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area})))\land{}(\exists (\textit{cost_purchase}_\text{cost,node,tech}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{binary})\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{cost,node,tech}) \land \text{tech_group=supply_plus}))\land{}(\neg (\text{tech_group=transmission}))
+            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{node,tech,cost} \times (\textit{cost_resource_cap}_\text{node,tech,cost} \times \textbf{resource_cap}_\text{node,tech} + \textit{cost_resource_area}_\text{node,tech,cost} \times \textbf{resource_area}_\text{node,tech} + \textit{cost_purchase}_\text{node,tech,cost} \times \textbf{purchased}_\text{node,tech}) \times (0.5 + \textit{cost_om_annual_investment_fraction}_\text{node,tech,cost})) + (\textit{cost_om_annual}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech}))&\quad
+            \text{if } (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area}))\land{}(\text{tech_group=transmission})\land{}(\neg (\exists (\textit{cost_energy_cap}_\text{node,tech,cost})))\land{}(\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \text{tech_group=supply_plus})\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage})))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{binary})
             \\
-            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{cost,node,tech} \times (\textit{cost_energy_cap}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech} + \textit{cost_storage_cap}_\text{cost,node,tech} \times \textbf{storage_cap}_\text{node,tech} + \textit{cost_resource_cap}_\text{cost,node,tech} \times \textbf{resource_cap}_\text{node,tech} + \textit{cost_purchase}_\text{cost,node,tech} \times \textbf{units}_\text{node,tech}) \times (0.5 + \textit{cost_om_annual_investment_fraction}_\text{cost,node,tech})) + (\textit{cost_om_annual}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech}))&\quad
-            \text{if } (\exists (\textit{cost_energy_cap}_\text{cost,node,tech}))\land{}(\exists (\textit{cost_storage_cap}_\text{cost,node,tech}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage}))\land{}(\neg (\exists (\textit{cost_resource_area}_\text{cost,node,tech}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area})))\land{}(\exists (\textit{cost_purchase}_\text{cost,node,tech}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})\land{}(\exists (\textit{cost_resource_cap}_\text{cost,node,tech}) \land \text{tech_group=supply_plus})\land{}(\text{tech_group=transmission})
+            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{node,tech,cost} \times (\textit{cost_resource_cap}_\text{node,tech,cost} \times \textbf{resource_cap}_\text{node,tech} + \textit{cost_resource_area}_\text{node,tech,cost} \times \textbf{resource_area}_\text{node,tech} + \textit{cost_purchase}_\text{node,tech,cost} \times \textbf{units}_\text{node,tech}) \times (0.5 + \textit{cost_om_annual_investment_fraction}_\text{node,tech,cost})) + (\textit{cost_om_annual}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech}))&\quad
+            \text{if } (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area}))\land{}(\text{tech_group=transmission})\land{}(\neg (\exists (\textit{cost_energy_cap}_\text{node,tech,cost})))\land{}(\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \text{tech_group=supply_plus})\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage})))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})
             \\
-            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{cost,node,tech} \times (\textit{cost_energy_cap}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech} + \textit{cost_storage_cap}_\text{cost,node,tech} \times \textbf{storage_cap}_\text{node,tech} + \textit{cost_resource_cap}_\text{cost,node,tech} \times \textbf{resource_cap}_\text{node,tech} + \textit{cost_purchase}_\text{cost,node,tech} \times \textbf{units}_\text{node,tech}) \times (1 + \textit{cost_om_annual_investment_fraction}_\text{cost,node,tech})) + (\textit{cost_om_annual}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech}))&\quad
-            \text{if } (\exists (\textit{cost_energy_cap}_\text{cost,node,tech}))\land{}(\exists (\textit{cost_storage_cap}_\text{cost,node,tech}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage}))\land{}(\neg (\exists (\textit{cost_resource_area}_\text{cost,node,tech}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area})))\land{}(\exists (\textit{cost_purchase}_\text{cost,node,tech}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})\land{}(\exists (\textit{cost_resource_cap}_\text{cost,node,tech}) \land \text{tech_group=supply_plus})\land{}(\neg (\text{tech_group=transmission}))
+            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{node,tech,cost} \times (\textit{cost_resource_cap}_\text{node,tech,cost} \times \textbf{resource_cap}_\text{node,tech} + \textit{cost_resource_area}_\text{node,tech,cost} \times \textbf{resource_area}_\text{node,tech}) \times (0.5 + \textit{cost_om_annual_investment_fraction}_\text{node,tech,cost})) + (\textit{cost_om_annual}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech}))&\quad
+            \text{if } (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area}))\land{}(\text{tech_group=transmission})\land{}(\neg (\exists (\textit{cost_energy_cap}_\text{node,tech,cost})))\land{}(\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \text{tech_group=supply_plus})\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage})))\land{}(\neg (\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land (\textit{cap_method}_\text{node,tech}\mathord{=}\text{binary} \lor \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})))
             \\
-            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{cost,node,tech} \times (\textit{cost_energy_cap}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech} + \textit{cost_storage_cap}_\text{cost,node,tech} \times \textbf{storage_cap}_\text{node,tech} + \textit{cost_purchase}_\text{cost,node,tech} \times \textbf{units}_\text{node,tech}) \times (0.5 + \textit{cost_om_annual_investment_fraction}_\text{cost,node,tech})) + (\textit{cost_om_annual}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech}))&\quad
-            \text{if } (\exists (\textit{cost_energy_cap}_\text{cost,node,tech}))\land{}(\exists (\textit{cost_storage_cap}_\text{cost,node,tech}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage}))\land{}(\neg (\exists (\textit{cost_resource_area}_\text{cost,node,tech}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area})))\land{}(\exists (\textit{cost_purchase}_\text{cost,node,tech}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{cost,node,tech}) \land \text{tech_group=supply_plus}))\land{}(\text{tech_group=transmission})
+            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{node,tech,cost} \times (\textit{cost_storage_cap}_\text{node,tech,cost} \times \textbf{storage_cap}_\text{node,tech} + \textit{cost_resource_area}_\text{node,tech,cost} \times \textbf{resource_area}_\text{node,tech} + \textit{cost_purchase}_\text{node,tech,cost} \times \textbf{purchased}_\text{node,tech}) \times (0.5 + \textit{cost_om_annual_investment_fraction}_\text{node,tech,cost})) + (\textit{cost_om_annual}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech}))&\quad
+            \text{if } (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area}))\land{}(\text{tech_group=transmission})\land{}(\neg (\exists (\textit{cost_energy_cap}_\text{node,tech,cost})))\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \text{tech_group=supply_plus}))\land{}(\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage}))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{binary})
             \\
-            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{cost,node,tech} \times (\textit{cost_energy_cap}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech} + \textit{cost_storage_cap}_\text{cost,node,tech} \times \textbf{storage_cap}_\text{node,tech} + \textit{cost_purchase}_\text{cost,node,tech} \times \textbf{units}_\text{node,tech}) \times (1 + \textit{cost_om_annual_investment_fraction}_\text{cost,node,tech})) + (\textit{cost_om_annual}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech}))&\quad
-            \text{if } (\exists (\textit{cost_energy_cap}_\text{cost,node,tech}))\land{}(\exists (\textit{cost_storage_cap}_\text{cost,node,tech}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage}))\land{}(\neg (\exists (\textit{cost_resource_area}_\text{cost,node,tech}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area})))\land{}(\exists (\textit{cost_purchase}_\text{cost,node,tech}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{cost,node,tech}) \land \text{tech_group=supply_plus}))\land{}(\neg (\text{tech_group=transmission}))
+            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{node,tech,cost} \times (\textit{cost_storage_cap}_\text{node,tech,cost} \times \textbf{storage_cap}_\text{node,tech} + \textit{cost_resource_area}_\text{node,tech,cost} \times \textbf{resource_area}_\text{node,tech} + \textit{cost_purchase}_\text{node,tech,cost} \times \textbf{units}_\text{node,tech}) \times (0.5 + \textit{cost_om_annual_investment_fraction}_\text{node,tech,cost})) + (\textit{cost_om_annual}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech}))&\quad
+            \text{if } (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area}))\land{}(\text{tech_group=transmission})\land{}(\neg (\exists (\textit{cost_energy_cap}_\text{node,tech,cost})))\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \text{tech_group=supply_plus}))\land{}(\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage}))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})
             \\
-            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{cost,node,tech} \times (\textit{cost_energy_cap}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech} + \textit{cost_storage_cap}_\text{cost,node,tech} \times \textbf{storage_cap}_\text{node,tech} + \textit{cost_resource_cap}_\text{cost,node,tech} \times \textbf{resource_cap}_\text{node,tech}) \times (0.5 + \textit{cost_om_annual_investment_fraction}_\text{cost,node,tech})) + (\textit{cost_om_annual}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech}))&\quad
-            \text{if } (\exists (\textit{cost_energy_cap}_\text{cost,node,tech}))\land{}(\exists (\textit{cost_storage_cap}_\text{cost,node,tech}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage}))\land{}(\neg (\exists (\textit{cost_resource_area}_\text{cost,node,tech}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area})))\land{}(\neg (\exists (\textit{cost_purchase}_\text{cost,node,tech}) \land (\textit{cap_method}_\text{node,tech}\mathord{=}\text{binary} \lor \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})))\land{}(\exists (\textit{cost_resource_cap}_\text{cost,node,tech}) \land \text{tech_group=supply_plus})\land{}(\text{tech_group=transmission})
+            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{node,tech,cost} \times (\textit{cost_storage_cap}_\text{node,tech,cost} \times \textbf{storage_cap}_\text{node,tech} + \textit{cost_resource_area}_\text{node,tech,cost} \times \textbf{resource_area}_\text{node,tech}) \times (0.5 + \textit{cost_om_annual_investment_fraction}_\text{node,tech,cost})) + (\textit{cost_om_annual}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech}))&\quad
+            \text{if } (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area}))\land{}(\text{tech_group=transmission})\land{}(\neg (\exists (\textit{cost_energy_cap}_\text{node,tech,cost})))\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \text{tech_group=supply_plus}))\land{}(\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage}))\land{}(\neg (\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land (\textit{cap_method}_\text{node,tech}\mathord{=}\text{binary} \lor \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})))
             \\
-            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{cost,node,tech} \times (\textit{cost_energy_cap}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech} + \textit{cost_storage_cap}_\text{cost,node,tech} \times \textbf{storage_cap}_\text{node,tech} + \textit{cost_resource_cap}_\text{cost,node,tech} \times \textbf{resource_cap}_\text{node,tech}) \times (1 + \textit{cost_om_annual_investment_fraction}_\text{cost,node,tech})) + (\textit{cost_om_annual}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech}))&\quad
-            \text{if } (\exists (\textit{cost_energy_cap}_\text{cost,node,tech}))\land{}(\exists (\textit{cost_storage_cap}_\text{cost,node,tech}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage}))\land{}(\neg (\exists (\textit{cost_resource_area}_\text{cost,node,tech}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area})))\land{}(\neg (\exists (\textit{cost_purchase}_\text{cost,node,tech}) \land (\textit{cap_method}_\text{node,tech}\mathord{=}\text{binary} \lor \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})))\land{}(\exists (\textit{cost_resource_cap}_\text{cost,node,tech}) \land \text{tech_group=supply_plus})\land{}(\neg (\text{tech_group=transmission}))
+            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{node,tech,cost} \times (\textit{cost_resource_area}_\text{node,tech,cost} \times \textbf{resource_area}_\text{node,tech} + \textit{cost_purchase}_\text{node,tech,cost} \times \textbf{purchased}_\text{node,tech}) \times (0.5 + \textit{cost_om_annual_investment_fraction}_\text{node,tech,cost})) + (\textit{cost_om_annual}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech}))&\quad
+            \text{if } (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area}))\land{}(\text{tech_group=transmission})\land{}(\neg (\exists (\textit{cost_energy_cap}_\text{node,tech,cost})))\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \text{tech_group=supply_plus}))\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage})))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{binary})
             \\
-            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{cost,node,tech} \times (\textit{cost_energy_cap}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech} + \textit{cost_storage_cap}_\text{cost,node,tech} \times \textbf{storage_cap}_\text{node,tech}) \times (0.5 + \textit{cost_om_annual_investment_fraction}_\text{cost,node,tech})) + (\textit{cost_om_annual}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech}))&\quad
-            \text{if } (\exists (\textit{cost_energy_cap}_\text{cost,node,tech}))\land{}(\exists (\textit{cost_storage_cap}_\text{cost,node,tech}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage}))\land{}(\neg (\exists (\textit{cost_resource_area}_\text{cost,node,tech}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area})))\land{}(\neg (\exists (\textit{cost_purchase}_\text{cost,node,tech}) \land (\textit{cap_method}_\text{node,tech}\mathord{=}\text{binary} \lor \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})))\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{cost,node,tech}) \land \text{tech_group=supply_plus}))\land{}(\text{tech_group=transmission})
+            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{node,tech,cost} \times (\textit{cost_resource_area}_\text{node,tech,cost} \times \textbf{resource_area}_\text{node,tech} + \textit{cost_purchase}_\text{node,tech,cost} \times \textbf{units}_\text{node,tech}) \times (0.5 + \textit{cost_om_annual_investment_fraction}_\text{node,tech,cost})) + (\textit{cost_om_annual}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech}))&\quad
+            \text{if } (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area}))\land{}(\text{tech_group=transmission})\land{}(\neg (\exists (\textit{cost_energy_cap}_\text{node,tech,cost})))\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \text{tech_group=supply_plus}))\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage})))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})
             \\
-            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{cost,node,tech} \times (\textit{cost_energy_cap}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech} + \textit{cost_storage_cap}_\text{cost,node,tech} \times \textbf{storage_cap}_\text{node,tech}) \times (1 + \textit{cost_om_annual_investment_fraction}_\text{cost,node,tech})) + (\textit{cost_om_annual}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech}))&\quad
-            \text{if } (\exists (\textit{cost_energy_cap}_\text{cost,node,tech}))\land{}(\exists (\textit{cost_storage_cap}_\text{cost,node,tech}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage}))\land{}(\neg (\exists (\textit{cost_resource_area}_\text{cost,node,tech}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area})))\land{}(\neg (\exists (\textit{cost_purchase}_\text{cost,node,tech}) \land (\textit{cap_method}_\text{node,tech}\mathord{=}\text{binary} \lor \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})))\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{cost,node,tech}) \land \text{tech_group=supply_plus}))\land{}(\neg (\text{tech_group=transmission}))
+            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{node,tech,cost} \times (\textit{cost_resource_area}_\text{node,tech,cost} \times \textbf{resource_area}_\text{node,tech}) \times (0.5 + \textit{cost_om_annual_investment_fraction}_\text{node,tech,cost})) + (\textit{cost_om_annual}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech}))&\quad
+            \text{if } (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area}))\land{}(\text{tech_group=transmission})\land{}(\neg (\exists (\textit{cost_energy_cap}_\text{node,tech,cost})))\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \text{tech_group=supply_plus}))\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage})))\land{}(\neg (\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land (\textit{cap_method}_\text{node,tech}\mathord{=}\text{binary} \lor \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})))
             \\
-            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{cost,node,tech} \times (\textit{cost_energy_cap}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech} + \textit{cost_resource_cap}_\text{cost,node,tech} \times \textbf{resource_cap}_\text{node,tech} + \textit{cost_resource_area}_\text{cost,node,tech} \times \textbf{resource_area}_\text{node,tech} + \textit{cost_purchase}_\text{cost,node,tech} \times \textbf{purchased}_\text{node,tech}) \times (0.5 + \textit{cost_om_annual_investment_fraction}_\text{cost,node,tech})) + (\textit{cost_om_annual}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech}))&\quad
-            \text{if } (\exists (\textit{cost_energy_cap}_\text{cost,node,tech}))\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{cost,node,tech}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage})))\land{}(\exists (\textit{cost_resource_area}_\text{cost,node,tech}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area}))\land{}(\exists (\textit{cost_purchase}_\text{cost,node,tech}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{binary})\land{}(\exists (\textit{cost_resource_cap}_\text{cost,node,tech}) \land \text{tech_group=supply_plus})\land{}(\text{tech_group=transmission})
+            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{node,tech,cost} \times (\textit{cost_energy_cap}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech} + \textit{cost_storage_cap}_\text{node,tech,cost} \times \textbf{storage_cap}_\text{node,tech} + \textit{cost_resource_cap}_\text{node,tech,cost} \times \textbf{resource_cap}_\text{node,tech} + \textit{cost_resource_area}_\text{node,tech,cost} \times \textbf{resource_area}_\text{node,tech} + \textit{cost_purchase}_\text{node,tech,cost} \times \textbf{purchased}_\text{node,tech}) \times (1 + \textit{cost_om_annual_investment_fraction}_\text{node,tech,cost})) + (\textit{cost_om_annual}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech}))&\quad
+            \text{if } (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area}))\land{}(\neg (\text{tech_group=transmission}))\land{}(\exists (\textit{cost_energy_cap}_\text{node,tech,cost}))\land{}(\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \text{tech_group=supply_plus})\land{}(\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage}))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{binary})
             \\
-            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{cost,node,tech} \times (\textit{cost_energy_cap}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech} + \textit{cost_resource_cap}_\text{cost,node,tech} \times \textbf{resource_cap}_\text{node,tech} + \textit{cost_resource_area}_\text{cost,node,tech} \times \textbf{resource_area}_\text{node,tech} + \textit{cost_purchase}_\text{cost,node,tech} \times \textbf{purchased}_\text{node,tech}) \times (1 + \textit{cost_om_annual_investment_fraction}_\text{cost,node,tech})) + (\textit{cost_om_annual}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech}))&\quad
-            \text{if } (\exists (\textit{cost_energy_cap}_\text{cost,node,tech}))\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{cost,node,tech}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage})))\land{}(\exists (\textit{cost_resource_area}_\text{cost,node,tech}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area}))\land{}(\exists (\textit{cost_purchase}_\text{cost,node,tech}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{binary})\land{}(\exists (\textit{cost_resource_cap}_\text{cost,node,tech}) \land \text{tech_group=supply_plus})\land{}(\neg (\text{tech_group=transmission}))
+            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{node,tech,cost} \times (\textit{cost_energy_cap}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech} + \textit{cost_storage_cap}_\text{node,tech,cost} \times \textbf{storage_cap}_\text{node,tech} + \textit{cost_resource_cap}_\text{node,tech,cost} \times \textbf{resource_cap}_\text{node,tech} + \textit{cost_resource_area}_\text{node,tech,cost} \times \textbf{resource_area}_\text{node,tech} + \textit{cost_purchase}_\text{node,tech,cost} \times \textbf{units}_\text{node,tech}) \times (1 + \textit{cost_om_annual_investment_fraction}_\text{node,tech,cost})) + (\textit{cost_om_annual}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech}))&\quad
+            \text{if } (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area}))\land{}(\neg (\text{tech_group=transmission}))\land{}(\exists (\textit{cost_energy_cap}_\text{node,tech,cost}))\land{}(\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \text{tech_group=supply_plus})\land{}(\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage}))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})
             \\
-            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{cost,node,tech} \times (\textit{cost_energy_cap}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech} + \textit{cost_resource_area}_\text{cost,node,tech} \times \textbf{resource_area}_\text{node,tech} + \textit{cost_purchase}_\text{cost,node,tech} \times \textbf{purchased}_\text{node,tech}) \times (0.5 + \textit{cost_om_annual_investment_fraction}_\text{cost,node,tech})) + (\textit{cost_om_annual}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech}))&\quad
-            \text{if } (\exists (\textit{cost_energy_cap}_\text{cost,node,tech}))\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{cost,node,tech}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage})))\land{}(\exists (\textit{cost_resource_area}_\text{cost,node,tech}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area}))\land{}(\exists (\textit{cost_purchase}_\text{cost,node,tech}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{binary})\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{cost,node,tech}) \land \text{tech_group=supply_plus}))\land{}(\text{tech_group=transmission})
+            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{node,tech,cost} \times (\textit{cost_energy_cap}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech} + \textit{cost_storage_cap}_\text{node,tech,cost} \times \textbf{storage_cap}_\text{node,tech} + \textit{cost_resource_cap}_\text{node,tech,cost} \times \textbf{resource_cap}_\text{node,tech} + \textit{cost_resource_area}_\text{node,tech,cost} \times \textbf{resource_area}_\text{node,tech}) \times (1 + \textit{cost_om_annual_investment_fraction}_\text{node,tech,cost})) + (\textit{cost_om_annual}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech}))&\quad
+            \text{if } (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area}))\land{}(\neg (\text{tech_group=transmission}))\land{}(\exists (\textit{cost_energy_cap}_\text{node,tech,cost}))\land{}(\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \text{tech_group=supply_plus})\land{}(\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage}))\land{}(\neg (\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land (\textit{cap_method}_\text{node,tech}\mathord{=}\text{binary} \lor \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})))
             \\
-            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{cost,node,tech} \times (\textit{cost_energy_cap}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech} + \textit{cost_resource_area}_\text{cost,node,tech} \times \textbf{resource_area}_\text{node,tech} + \textit{cost_purchase}_\text{cost,node,tech} \times \textbf{purchased}_\text{node,tech}) \times (1 + \textit{cost_om_annual_investment_fraction}_\text{cost,node,tech})) + (\textit{cost_om_annual}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech}))&\quad
-            \text{if } (\exists (\textit{cost_energy_cap}_\text{cost,node,tech}))\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{cost,node,tech}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage})))\land{}(\exists (\textit{cost_resource_area}_\text{cost,node,tech}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area}))\land{}(\exists (\textit{cost_purchase}_\text{cost,node,tech}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{binary})\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{cost,node,tech}) \land \text{tech_group=supply_plus}))\land{}(\neg (\text{tech_group=transmission}))
+            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{node,tech,cost} \times (\textit{cost_energy_cap}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech} + \textit{cost_resource_cap}_\text{node,tech,cost} \times \textbf{resource_cap}_\text{node,tech} + \textit{cost_resource_area}_\text{node,tech,cost} \times \textbf{resource_area}_\text{node,tech} + \textit{cost_purchase}_\text{node,tech,cost} \times \textbf{purchased}_\text{node,tech}) \times (1 + \textit{cost_om_annual_investment_fraction}_\text{node,tech,cost})) + (\textit{cost_om_annual}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech}))&\quad
+            \text{if } (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area}))\land{}(\neg (\text{tech_group=transmission}))\land{}(\exists (\textit{cost_energy_cap}_\text{node,tech,cost}))\land{}(\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \text{tech_group=supply_plus})\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage})))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{binary})
             \\
-            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{cost,node,tech} \times (\textit{cost_energy_cap}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech} + \textit{cost_resource_cap}_\text{cost,node,tech} \times \textbf{resource_cap}_\text{node,tech} + \textit{cost_resource_area}_\text{cost,node,tech} \times \textbf{resource_area}_\text{node,tech} + \textit{cost_purchase}_\text{cost,node,tech} \times \textbf{units}_\text{node,tech}) \times (0.5 + \textit{cost_om_annual_investment_fraction}_\text{cost,node,tech})) + (\textit{cost_om_annual}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech}))&\quad
-            \text{if } (\exists (\textit{cost_energy_cap}_\text{cost,node,tech}))\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{cost,node,tech}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage})))\land{}(\exists (\textit{cost_resource_area}_\text{cost,node,tech}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area}))\land{}(\exists (\textit{cost_purchase}_\text{cost,node,tech}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})\land{}(\exists (\textit{cost_resource_cap}_\text{cost,node,tech}) \land \text{tech_group=supply_plus})\land{}(\text{tech_group=transmission})
+            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{node,tech,cost} \times (\textit{cost_energy_cap}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech} + \textit{cost_resource_cap}_\text{node,tech,cost} \times \textbf{resource_cap}_\text{node,tech} + \textit{cost_resource_area}_\text{node,tech,cost} \times \textbf{resource_area}_\text{node,tech} + \textit{cost_purchase}_\text{node,tech,cost} \times \textbf{units}_\text{node,tech}) \times (1 + \textit{cost_om_annual_investment_fraction}_\text{node,tech,cost})) + (\textit{cost_om_annual}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech}))&\quad
+            \text{if } (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area}))\land{}(\neg (\text{tech_group=transmission}))\land{}(\exists (\textit{cost_energy_cap}_\text{node,tech,cost}))\land{}(\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \text{tech_group=supply_plus})\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage})))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})
             \\
-            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{cost,node,tech} \times (\textit{cost_energy_cap}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech} + \textit{cost_resource_cap}_\text{cost,node,tech} \times \textbf{resource_cap}_\text{node,tech} + \textit{cost_resource_area}_\text{cost,node,tech} \times \textbf{resource_area}_\text{node,tech} + \textit{cost_purchase}_\text{cost,node,tech} \times \textbf{units}_\text{node,tech}) \times (1 + \textit{cost_om_annual_investment_fraction}_\text{cost,node,tech})) + (\textit{cost_om_annual}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech}))&\quad
-            \text{if } (\exists (\textit{cost_energy_cap}_\text{cost,node,tech}))\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{cost,node,tech}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage})))\land{}(\exists (\textit{cost_resource_area}_\text{cost,node,tech}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area}))\land{}(\exists (\textit{cost_purchase}_\text{cost,node,tech}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})\land{}(\exists (\textit{cost_resource_cap}_\text{cost,node,tech}) \land \text{tech_group=supply_plus})\land{}(\neg (\text{tech_group=transmission}))
+            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{node,tech,cost} \times (\textit{cost_energy_cap}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech} + \textit{cost_resource_cap}_\text{node,tech,cost} \times \textbf{resource_cap}_\text{node,tech} + \textit{cost_resource_area}_\text{node,tech,cost} \times \textbf{resource_area}_\text{node,tech}) \times (1 + \textit{cost_om_annual_investment_fraction}_\text{node,tech,cost})) + (\textit{cost_om_annual}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech}))&\quad
+            \text{if } (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area}))\land{}(\neg (\text{tech_group=transmission}))\land{}(\exists (\textit{cost_energy_cap}_\text{node,tech,cost}))\land{}(\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \text{tech_group=supply_plus})\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage})))\land{}(\neg (\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land (\textit{cap_method}_\text{node,tech}\mathord{=}\text{binary} \lor \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})))
             \\
-            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{cost,node,tech} \times (\textit{cost_energy_cap}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech} + \textit{cost_resource_area}_\text{cost,node,tech} \times \textbf{resource_area}_\text{node,tech} + \textit{cost_purchase}_\text{cost,node,tech} \times \textbf{units}_\text{node,tech}) \times (0.5 + \textit{cost_om_annual_investment_fraction}_\text{cost,node,tech})) + (\textit{cost_om_annual}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech}))&\quad
-            \text{if } (\exists (\textit{cost_energy_cap}_\text{cost,node,tech}))\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{cost,node,tech}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage})))\land{}(\exists (\textit{cost_resource_area}_\text{cost,node,tech}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area}))\land{}(\exists (\textit{cost_purchase}_\text{cost,node,tech}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{cost,node,tech}) \land \text{tech_group=supply_plus}))\land{}(\text{tech_group=transmission})
+            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{node,tech,cost} \times (\textit{cost_energy_cap}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech} + \textit{cost_storage_cap}_\text{node,tech,cost} \times \textbf{storage_cap}_\text{node,tech} + \textit{cost_resource_area}_\text{node,tech,cost} \times \textbf{resource_area}_\text{node,tech} + \textit{cost_purchase}_\text{node,tech,cost} \times \textbf{purchased}_\text{node,tech}) \times (1 + \textit{cost_om_annual_investment_fraction}_\text{node,tech,cost})) + (\textit{cost_om_annual}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech}))&\quad
+            \text{if } (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area}))\land{}(\neg (\text{tech_group=transmission}))\land{}(\exists (\textit{cost_energy_cap}_\text{node,tech,cost}))\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \text{tech_group=supply_plus}))\land{}(\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage}))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{binary})
             \\
-            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{cost,node,tech} \times (\textit{cost_energy_cap}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech} + \textit{cost_resource_area}_\text{cost,node,tech} \times \textbf{resource_area}_\text{node,tech} + \textit{cost_purchase}_\text{cost,node,tech} \times \textbf{units}_\text{node,tech}) \times (1 + \textit{cost_om_annual_investment_fraction}_\text{cost,node,tech})) + (\textit{cost_om_annual}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech}))&\quad
-            \text{if } (\exists (\textit{cost_energy_cap}_\text{cost,node,tech}))\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{cost,node,tech}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage})))\land{}(\exists (\textit{cost_resource_area}_\text{cost,node,tech}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area}))\land{}(\exists (\textit{cost_purchase}_\text{cost,node,tech}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{cost,node,tech}) \land \text{tech_group=supply_plus}))\land{}(\neg (\text{tech_group=transmission}))
+            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{node,tech,cost} \times (\textit{cost_energy_cap}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech} + \textit{cost_storage_cap}_\text{node,tech,cost} \times \textbf{storage_cap}_\text{node,tech} + \textit{cost_resource_area}_\text{node,tech,cost} \times \textbf{resource_area}_\text{node,tech} + \textit{cost_purchase}_\text{node,tech,cost} \times \textbf{units}_\text{node,tech}) \times (1 + \textit{cost_om_annual_investment_fraction}_\text{node,tech,cost})) + (\textit{cost_om_annual}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech}))&\quad
+            \text{if } (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area}))\land{}(\neg (\text{tech_group=transmission}))\land{}(\exists (\textit{cost_energy_cap}_\text{node,tech,cost}))\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \text{tech_group=supply_plus}))\land{}(\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage}))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})
             \\
-            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{cost,node,tech} \times (\textit{cost_energy_cap}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech} + \textit{cost_resource_cap}_\text{cost,node,tech} \times \textbf{resource_cap}_\text{node,tech} + \textit{cost_resource_area}_\text{cost,node,tech} \times \textbf{resource_area}_\text{node,tech}) \times (0.5 + \textit{cost_om_annual_investment_fraction}_\text{cost,node,tech})) + (\textit{cost_om_annual}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech}))&\quad
-            \text{if } (\exists (\textit{cost_energy_cap}_\text{cost,node,tech}))\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{cost,node,tech}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage})))\land{}(\exists (\textit{cost_resource_area}_\text{cost,node,tech}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area}))\land{}(\neg (\exists (\textit{cost_purchase}_\text{cost,node,tech}) \land (\textit{cap_method}_\text{node,tech}\mathord{=}\text{binary} \lor \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})))\land{}(\exists (\textit{cost_resource_cap}_\text{cost,node,tech}) \land \text{tech_group=supply_plus})\land{}(\text{tech_group=transmission})
+            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{node,tech,cost} \times (\textit{cost_energy_cap}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech} + \textit{cost_storage_cap}_\text{node,tech,cost} \times \textbf{storage_cap}_\text{node,tech} + \textit{cost_resource_area}_\text{node,tech,cost} \times \textbf{resource_area}_\text{node,tech}) \times (1 + \textit{cost_om_annual_investment_fraction}_\text{node,tech,cost})) + (\textit{cost_om_annual}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech}))&\quad
+            \text{if } (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area}))\land{}(\neg (\text{tech_group=transmission}))\land{}(\exists (\textit{cost_energy_cap}_\text{node,tech,cost}))\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \text{tech_group=supply_plus}))\land{}(\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage}))\land{}(\neg (\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land (\textit{cap_method}_\text{node,tech}\mathord{=}\text{binary} \lor \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})))
             \\
-            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{cost,node,tech} \times (\textit{cost_energy_cap}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech} + \textit{cost_resource_cap}_\text{cost,node,tech} \times \textbf{resource_cap}_\text{node,tech} + \textit{cost_resource_area}_\text{cost,node,tech} \times \textbf{resource_area}_\text{node,tech}) \times (1 + \textit{cost_om_annual_investment_fraction}_\text{cost,node,tech})) + (\textit{cost_om_annual}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech}))&\quad
-            \text{if } (\exists (\textit{cost_energy_cap}_\text{cost,node,tech}))\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{cost,node,tech}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage})))\land{}(\exists (\textit{cost_resource_area}_\text{cost,node,tech}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area}))\land{}(\neg (\exists (\textit{cost_purchase}_\text{cost,node,tech}) \land (\textit{cap_method}_\text{node,tech}\mathord{=}\text{binary} \lor \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})))\land{}(\exists (\textit{cost_resource_cap}_\text{cost,node,tech}) \land \text{tech_group=supply_plus})\land{}(\neg (\text{tech_group=transmission}))
+            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{node,tech,cost} \times (\textit{cost_energy_cap}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech} + \textit{cost_resource_area}_\text{node,tech,cost} \times \textbf{resource_area}_\text{node,tech} + \textit{cost_purchase}_\text{node,tech,cost} \times \textbf{purchased}_\text{node,tech}) \times (1 + \textit{cost_om_annual_investment_fraction}_\text{node,tech,cost})) + (\textit{cost_om_annual}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech}))&\quad
+            \text{if } (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area}))\land{}(\neg (\text{tech_group=transmission}))\land{}(\exists (\textit{cost_energy_cap}_\text{node,tech,cost}))\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \text{tech_group=supply_plus}))\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage})))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{binary})
             \\
-            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{cost,node,tech} \times (\textit{cost_energy_cap}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech} + \textit{cost_resource_area}_\text{cost,node,tech} \times \textbf{resource_area}_\text{node,tech}) \times (0.5 + \textit{cost_om_annual_investment_fraction}_\text{cost,node,tech})) + (\textit{cost_om_annual}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech}))&\quad
-            \text{if } (\exists (\textit{cost_energy_cap}_\text{cost,node,tech}))\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{cost,node,tech}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage})))\land{}(\exists (\textit{cost_resource_area}_\text{cost,node,tech}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area}))\land{}(\neg (\exists (\textit{cost_purchase}_\text{cost,node,tech}) \land (\textit{cap_method}_\text{node,tech}\mathord{=}\text{binary} \lor \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})))\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{cost,node,tech}) \land \text{tech_group=supply_plus}))\land{}(\text{tech_group=transmission})
+            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{node,tech,cost} \times (\textit{cost_energy_cap}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech} + \textit{cost_resource_area}_\text{node,tech,cost} \times \textbf{resource_area}_\text{node,tech} + \textit{cost_purchase}_\text{node,tech,cost} \times \textbf{units}_\text{node,tech}) \times (1 + \textit{cost_om_annual_investment_fraction}_\text{node,tech,cost})) + (\textit{cost_om_annual}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech}))&\quad
+            \text{if } (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area}))\land{}(\neg (\text{tech_group=transmission}))\land{}(\exists (\textit{cost_energy_cap}_\text{node,tech,cost}))\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \text{tech_group=supply_plus}))\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage})))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})
             \\
-            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{cost,node,tech} \times (\textit{cost_energy_cap}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech} + \textit{cost_resource_area}_\text{cost,node,tech} \times \textbf{resource_area}_\text{node,tech}) \times (1 + \textit{cost_om_annual_investment_fraction}_\text{cost,node,tech})) + (\textit{cost_om_annual}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech}))&\quad
-            \text{if } (\exists (\textit{cost_energy_cap}_\text{cost,node,tech}))\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{cost,node,tech}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage})))\land{}(\exists (\textit{cost_resource_area}_\text{cost,node,tech}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area}))\land{}(\neg (\exists (\textit{cost_purchase}_\text{cost,node,tech}) \land (\textit{cap_method}_\text{node,tech}\mathord{=}\text{binary} \lor \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})))\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{cost,node,tech}) \land \text{tech_group=supply_plus}))\land{}(\neg (\text{tech_group=transmission}))
+            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{node,tech,cost} \times (\textit{cost_energy_cap}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech} + \textit{cost_resource_area}_\text{node,tech,cost} \times \textbf{resource_area}_\text{node,tech}) \times (1 + \textit{cost_om_annual_investment_fraction}_\text{node,tech,cost})) + (\textit{cost_om_annual}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech}))&\quad
+            \text{if } (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area}))\land{}(\neg (\text{tech_group=transmission}))\land{}(\exists (\textit{cost_energy_cap}_\text{node,tech,cost}))\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \text{tech_group=supply_plus}))\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage})))\land{}(\neg (\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land (\textit{cap_method}_\text{node,tech}\mathord{=}\text{binary} \lor \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})))
             \\
-            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{cost,node,tech} \times (\textit{cost_energy_cap}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech} + \textit{cost_resource_cap}_\text{cost,node,tech} \times \textbf{resource_cap}_\text{node,tech} + \textit{cost_purchase}_\text{cost,node,tech} \times \textbf{purchased}_\text{node,tech}) \times (0.5 + \textit{cost_om_annual_investment_fraction}_\text{cost,node,tech})) + (\textit{cost_om_annual}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech}))&\quad
-            \text{if } (\exists (\textit{cost_energy_cap}_\text{cost,node,tech}))\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{cost,node,tech}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage})))\land{}(\neg (\exists (\textit{cost_resource_area}_\text{cost,node,tech}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area})))\land{}(\exists (\textit{cost_purchase}_\text{cost,node,tech}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{binary})\land{}(\exists (\textit{cost_resource_cap}_\text{cost,node,tech}) \land \text{tech_group=supply_plus})\land{}(\text{tech_group=transmission})
+            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{node,tech,cost} \times (\textit{cost_storage_cap}_\text{node,tech,cost} \times \textbf{storage_cap}_\text{node,tech} + \textit{cost_resource_cap}_\text{node,tech,cost} \times \textbf{resource_cap}_\text{node,tech} + \textit{cost_resource_area}_\text{node,tech,cost} \times \textbf{resource_area}_\text{node,tech} + \textit{cost_purchase}_\text{node,tech,cost} \times \textbf{purchased}_\text{node,tech}) \times (1 + \textit{cost_om_annual_investment_fraction}_\text{node,tech,cost})) + (\textit{cost_om_annual}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech}))&\quad
+            \text{if } (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area}))\land{}(\neg (\text{tech_group=transmission}))\land{}(\neg (\exists (\textit{cost_energy_cap}_\text{node,tech,cost})))\land{}(\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \text{tech_group=supply_plus})\land{}(\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage}))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{binary})
             \\
-            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{cost,node,tech} \times (\textit{cost_energy_cap}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech} + \textit{cost_resource_cap}_\text{cost,node,tech} \times \textbf{resource_cap}_\text{node,tech} + \textit{cost_purchase}_\text{cost,node,tech} \times \textbf{purchased}_\text{node,tech}) \times (1 + \textit{cost_om_annual_investment_fraction}_\text{cost,node,tech})) + (\textit{cost_om_annual}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech}))&\quad
-            \text{if } (\exists (\textit{cost_energy_cap}_\text{cost,node,tech}))\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{cost,node,tech}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage})))\land{}(\neg (\exists (\textit{cost_resource_area}_\text{cost,node,tech}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area})))\land{}(\exists (\textit{cost_purchase}_\text{cost,node,tech}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{binary})\land{}(\exists (\textit{cost_resource_cap}_\text{cost,node,tech}) \land \text{tech_group=supply_plus})\land{}(\neg (\text{tech_group=transmission}))
+            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{node,tech,cost} \times (\textit{cost_storage_cap}_\text{node,tech,cost} \times \textbf{storage_cap}_\text{node,tech} + \textit{cost_resource_cap}_\text{node,tech,cost} \times \textbf{resource_cap}_\text{node,tech} + \textit{cost_resource_area}_\text{node,tech,cost} \times \textbf{resource_area}_\text{node,tech} + \textit{cost_purchase}_\text{node,tech,cost} \times \textbf{units}_\text{node,tech}) \times (1 + \textit{cost_om_annual_investment_fraction}_\text{node,tech,cost})) + (\textit{cost_om_annual}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech}))&\quad
+            \text{if } (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area}))\land{}(\neg (\text{tech_group=transmission}))\land{}(\neg (\exists (\textit{cost_energy_cap}_\text{node,tech,cost})))\land{}(\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \text{tech_group=supply_plus})\land{}(\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage}))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})
             \\
-            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{cost,node,tech} \times (\textit{cost_energy_cap}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech} + \textit{cost_purchase}_\text{cost,node,tech} \times \textbf{purchased}_\text{node,tech}) \times (0.5 + \textit{cost_om_annual_investment_fraction}_\text{cost,node,tech})) + (\textit{cost_om_annual}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech}))&\quad
-            \text{if } (\exists (\textit{cost_energy_cap}_\text{cost,node,tech}))\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{cost,node,tech}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage})))\land{}(\neg (\exists (\textit{cost_resource_area}_\text{cost,node,tech}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area})))\land{}(\exists (\textit{cost_purchase}_\text{cost,node,tech}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{binary})\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{cost,node,tech}) \land \text{tech_group=supply_plus}))\land{}(\text{tech_group=transmission})
+            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{node,tech,cost} \times (\textit{cost_storage_cap}_\text{node,tech,cost} \times \textbf{storage_cap}_\text{node,tech} + \textit{cost_resource_cap}_\text{node,tech,cost} \times \textbf{resource_cap}_\text{node,tech} + \textit{cost_resource_area}_\text{node,tech,cost} \times \textbf{resource_area}_\text{node,tech}) \times (1 + \textit{cost_om_annual_investment_fraction}_\text{node,tech,cost})) + (\textit{cost_om_annual}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech}))&\quad
+            \text{if } (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area}))\land{}(\neg (\text{tech_group=transmission}))\land{}(\neg (\exists (\textit{cost_energy_cap}_\text{node,tech,cost})))\land{}(\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \text{tech_group=supply_plus})\land{}(\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage}))\land{}(\neg (\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land (\textit{cap_method}_\text{node,tech}\mathord{=}\text{binary} \lor \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})))
             \\
-            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{cost,node,tech} \times (\textit{cost_energy_cap}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech} + \textit{cost_purchase}_\text{cost,node,tech} \times \textbf{purchased}_\text{node,tech}) \times (1 + \textit{cost_om_annual_investment_fraction}_\text{cost,node,tech})) + (\textit{cost_om_annual}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech}))&\quad
-            \text{if } (\exists (\textit{cost_energy_cap}_\text{cost,node,tech}))\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{cost,node,tech}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage})))\land{}(\neg (\exists (\textit{cost_resource_area}_\text{cost,node,tech}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area})))\land{}(\exists (\textit{cost_purchase}_\text{cost,node,tech}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{binary})\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{cost,node,tech}) \land \text{tech_group=supply_plus}))\land{}(\neg (\text{tech_group=transmission}))
+            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{node,tech,cost} \times (\textit{cost_resource_cap}_\text{node,tech,cost} \times \textbf{resource_cap}_\text{node,tech} + \textit{cost_resource_area}_\text{node,tech,cost} \times \textbf{resource_area}_\text{node,tech} + \textit{cost_purchase}_\text{node,tech,cost} \times \textbf{purchased}_\text{node,tech}) \times (1 + \textit{cost_om_annual_investment_fraction}_\text{node,tech,cost})) + (\textit{cost_om_annual}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech}))&\quad
+            \text{if } (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area}))\land{}(\neg (\text{tech_group=transmission}))\land{}(\neg (\exists (\textit{cost_energy_cap}_\text{node,tech,cost})))\land{}(\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \text{tech_group=supply_plus})\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage})))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{binary})
             \\
-            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{cost,node,tech} \times (\textit{cost_energy_cap}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech} + \textit{cost_resource_cap}_\text{cost,node,tech} \times \textbf{resource_cap}_\text{node,tech} + \textit{cost_purchase}_\text{cost,node,tech} \times \textbf{units}_\text{node,tech}) \times (0.5 + \textit{cost_om_annual_investment_fraction}_\text{cost,node,tech})) + (\textit{cost_om_annual}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech}))&\quad
-            \text{if } (\exists (\textit{cost_energy_cap}_\text{cost,node,tech}))\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{cost,node,tech}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage})))\land{}(\neg (\exists (\textit{cost_resource_area}_\text{cost,node,tech}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area})))\land{}(\exists (\textit{cost_purchase}_\text{cost,node,tech}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})\land{}(\exists (\textit{cost_resource_cap}_\text{cost,node,tech}) \land \text{tech_group=supply_plus})\land{}(\text{tech_group=transmission})
+            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{node,tech,cost} \times (\textit{cost_resource_cap}_\text{node,tech,cost} \times \textbf{resource_cap}_\text{node,tech} + \textit{cost_resource_area}_\text{node,tech,cost} \times \textbf{resource_area}_\text{node,tech} + \textit{cost_purchase}_\text{node,tech,cost} \times \textbf{units}_\text{node,tech}) \times (1 + \textit{cost_om_annual_investment_fraction}_\text{node,tech,cost})) + (\textit{cost_om_annual}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech}))&\quad
+            \text{if } (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area}))\land{}(\neg (\text{tech_group=transmission}))\land{}(\neg (\exists (\textit{cost_energy_cap}_\text{node,tech,cost})))\land{}(\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \text{tech_group=supply_plus})\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage})))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})
             \\
-            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{cost,node,tech} \times (\textit{cost_energy_cap}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech} + \textit{cost_resource_cap}_\text{cost,node,tech} \times \textbf{resource_cap}_\text{node,tech} + \textit{cost_purchase}_\text{cost,node,tech} \times \textbf{units}_\text{node,tech}) \times (1 + \textit{cost_om_annual_investment_fraction}_\text{cost,node,tech})) + (\textit{cost_om_annual}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech}))&\quad
-            \text{if } (\exists (\textit{cost_energy_cap}_\text{cost,node,tech}))\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{cost,node,tech}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage})))\land{}(\neg (\exists (\textit{cost_resource_area}_\text{cost,node,tech}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area})))\land{}(\exists (\textit{cost_purchase}_\text{cost,node,tech}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})\land{}(\exists (\textit{cost_resource_cap}_\text{cost,node,tech}) \land \text{tech_group=supply_plus})\land{}(\neg (\text{tech_group=transmission}))
+            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{node,tech,cost} \times (\textit{cost_resource_cap}_\text{node,tech,cost} \times \textbf{resource_cap}_\text{node,tech} + \textit{cost_resource_area}_\text{node,tech,cost} \times \textbf{resource_area}_\text{node,tech}) \times (1 + \textit{cost_om_annual_investment_fraction}_\text{node,tech,cost})) + (\textit{cost_om_annual}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech}))&\quad
+            \text{if } (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area}))\land{}(\neg (\text{tech_group=transmission}))\land{}(\neg (\exists (\textit{cost_energy_cap}_\text{node,tech,cost})))\land{}(\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \text{tech_group=supply_plus})\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage})))\land{}(\neg (\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land (\textit{cap_method}_\text{node,tech}\mathord{=}\text{binary} \lor \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})))
             \\
-            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{cost,node,tech} \times (\textit{cost_energy_cap}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech} + \textit{cost_purchase}_\text{cost,node,tech} \times \textbf{units}_\text{node,tech}) \times (0.5 + \textit{cost_om_annual_investment_fraction}_\text{cost,node,tech})) + (\textit{cost_om_annual}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech}))&\quad
-            \text{if } (\exists (\textit{cost_energy_cap}_\text{cost,node,tech}))\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{cost,node,tech}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage})))\land{}(\neg (\exists (\textit{cost_resource_area}_\text{cost,node,tech}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area})))\land{}(\exists (\textit{cost_purchase}_\text{cost,node,tech}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{cost,node,tech}) \land \text{tech_group=supply_plus}))\land{}(\text{tech_group=transmission})
+            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{node,tech,cost} \times (\textit{cost_storage_cap}_\text{node,tech,cost} \times \textbf{storage_cap}_\text{node,tech} + \textit{cost_resource_area}_\text{node,tech,cost} \times \textbf{resource_area}_\text{node,tech} + \textit{cost_purchase}_\text{node,tech,cost} \times \textbf{purchased}_\text{node,tech}) \times (1 + \textit{cost_om_annual_investment_fraction}_\text{node,tech,cost})) + (\textit{cost_om_annual}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech}))&\quad
+            \text{if } (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area}))\land{}(\neg (\text{tech_group=transmission}))\land{}(\neg (\exists (\textit{cost_energy_cap}_\text{node,tech,cost})))\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \text{tech_group=supply_plus}))\land{}(\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage}))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{binary})
             \\
-            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{cost,node,tech} \times (\textit{cost_energy_cap}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech} + \textit{cost_purchase}_\text{cost,node,tech} \times \textbf{units}_\text{node,tech}) \times (1 + \textit{cost_om_annual_investment_fraction}_\text{cost,node,tech})) + (\textit{cost_om_annual}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech}))&\quad
-            \text{if } (\exists (\textit{cost_energy_cap}_\text{cost,node,tech}))\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{cost,node,tech}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage})))\land{}(\neg (\exists (\textit{cost_resource_area}_\text{cost,node,tech}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area})))\land{}(\exists (\textit{cost_purchase}_\text{cost,node,tech}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{cost,node,tech}) \land \text{tech_group=supply_plus}))\land{}(\neg (\text{tech_group=transmission}))
+            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{node,tech,cost} \times (\textit{cost_storage_cap}_\text{node,tech,cost} \times \textbf{storage_cap}_\text{node,tech} + \textit{cost_resource_area}_\text{node,tech,cost} \times \textbf{resource_area}_\text{node,tech} + \textit{cost_purchase}_\text{node,tech,cost} \times \textbf{units}_\text{node,tech}) \times (1 + \textit{cost_om_annual_investment_fraction}_\text{node,tech,cost})) + (\textit{cost_om_annual}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech}))&\quad
+            \text{if } (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area}))\land{}(\neg (\text{tech_group=transmission}))\land{}(\neg (\exists (\textit{cost_energy_cap}_\text{node,tech,cost})))\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \text{tech_group=supply_plus}))\land{}(\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage}))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})
             \\
-            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{cost,node,tech} \times (\textit{cost_energy_cap}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech} + \textit{cost_resource_cap}_\text{cost,node,tech} \times \textbf{resource_cap}_\text{node,tech}) \times (0.5 + \textit{cost_om_annual_investment_fraction}_\text{cost,node,tech})) + (\textit{cost_om_annual}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech}))&\quad
-            \text{if } (\exists (\textit{cost_energy_cap}_\text{cost,node,tech}))\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{cost,node,tech}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage})))\land{}(\neg (\exists (\textit{cost_resource_area}_\text{cost,node,tech}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area})))\land{}(\neg (\exists (\textit{cost_purchase}_\text{cost,node,tech}) \land (\textit{cap_method}_\text{node,tech}\mathord{=}\text{binary} \lor \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})))\land{}(\exists (\textit{cost_resource_cap}_\text{cost,node,tech}) \land \text{tech_group=supply_plus})\land{}(\text{tech_group=transmission})
+            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{node,tech,cost} \times (\textit{cost_storage_cap}_\text{node,tech,cost} \times \textbf{storage_cap}_\text{node,tech} + \textit{cost_resource_area}_\text{node,tech,cost} \times \textbf{resource_area}_\text{node,tech}) \times (1 + \textit{cost_om_annual_investment_fraction}_\text{node,tech,cost})) + (\textit{cost_om_annual}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech}))&\quad
+            \text{if } (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area}))\land{}(\neg (\text{tech_group=transmission}))\land{}(\neg (\exists (\textit{cost_energy_cap}_\text{node,tech,cost})))\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \text{tech_group=supply_plus}))\land{}(\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage}))\land{}(\neg (\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land (\textit{cap_method}_\text{node,tech}\mathord{=}\text{binary} \lor \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})))
             \\
-            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{cost,node,tech} \times (\textit{cost_energy_cap}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech} + \textit{cost_resource_cap}_\text{cost,node,tech} \times \textbf{resource_cap}_\text{node,tech}) \times (1 + \textit{cost_om_annual_investment_fraction}_\text{cost,node,tech})) + (\textit{cost_om_annual}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech}))&\quad
-            \text{if } (\exists (\textit{cost_energy_cap}_\text{cost,node,tech}))\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{cost,node,tech}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage})))\land{}(\neg (\exists (\textit{cost_resource_area}_\text{cost,node,tech}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area})))\land{}(\neg (\exists (\textit{cost_purchase}_\text{cost,node,tech}) \land (\textit{cap_method}_\text{node,tech}\mathord{=}\text{binary} \lor \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})))\land{}(\exists (\textit{cost_resource_cap}_\text{cost,node,tech}) \land \text{tech_group=supply_plus})\land{}(\neg (\text{tech_group=transmission}))
+            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{node,tech,cost} \times (\textit{cost_resource_area}_\text{node,tech,cost} \times \textbf{resource_area}_\text{node,tech} + \textit{cost_purchase}_\text{node,tech,cost} \times \textbf{purchased}_\text{node,tech}) \times (1 + \textit{cost_om_annual_investment_fraction}_\text{node,tech,cost})) + (\textit{cost_om_annual}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech}))&\quad
+            \text{if } (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area}))\land{}(\neg (\text{tech_group=transmission}))\land{}(\neg (\exists (\textit{cost_energy_cap}_\text{node,tech,cost})))\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \text{tech_group=supply_plus}))\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage})))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{binary})
             \\
-            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{cost,node,tech} \times (\textit{cost_energy_cap}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech}) \times (0.5 + \textit{cost_om_annual_investment_fraction}_\text{cost,node,tech})) + (\textit{cost_om_annual}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech}))&\quad
-            \text{if } (\exists (\textit{cost_energy_cap}_\text{cost,node,tech}))\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{cost,node,tech}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage})))\land{}(\neg (\exists (\textit{cost_resource_area}_\text{cost,node,tech}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area})))\land{}(\neg (\exists (\textit{cost_purchase}_\text{cost,node,tech}) \land (\textit{cap_method}_\text{node,tech}\mathord{=}\text{binary} \lor \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})))\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{cost,node,tech}) \land \text{tech_group=supply_plus}))\land{}(\text{tech_group=transmission})
+            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{node,tech,cost} \times (\textit{cost_resource_area}_\text{node,tech,cost} \times \textbf{resource_area}_\text{node,tech} + \textit{cost_purchase}_\text{node,tech,cost} \times \textbf{units}_\text{node,tech}) \times (1 + \textit{cost_om_annual_investment_fraction}_\text{node,tech,cost})) + (\textit{cost_om_annual}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech}))&\quad
+            \text{if } (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area}))\land{}(\neg (\text{tech_group=transmission}))\land{}(\neg (\exists (\textit{cost_energy_cap}_\text{node,tech,cost})))\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \text{tech_group=supply_plus}))\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage})))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})
             \\
-            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{cost,node,tech} \times (\textit{cost_energy_cap}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech}) \times (1 + \textit{cost_om_annual_investment_fraction}_\text{cost,node,tech})) + (\textit{cost_om_annual}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech}))&\quad
-            \text{if } (\exists (\textit{cost_energy_cap}_\text{cost,node,tech}))\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{cost,node,tech}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage})))\land{}(\neg (\exists (\textit{cost_resource_area}_\text{cost,node,tech}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area})))\land{}(\neg (\exists (\textit{cost_purchase}_\text{cost,node,tech}) \land (\textit{cap_method}_\text{node,tech}\mathord{=}\text{binary} \lor \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})))\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{cost,node,tech}) \land \text{tech_group=supply_plus}))\land{}(\neg (\text{tech_group=transmission}))
+            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{node,tech,cost} \times (\textit{cost_resource_area}_\text{node,tech,cost} \times \textbf{resource_area}_\text{node,tech}) \times (1 + \textit{cost_om_annual_investment_fraction}_\text{node,tech,cost})) + (\textit{cost_om_annual}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech}))&\quad
+            \text{if } (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area}))\land{}(\neg (\text{tech_group=transmission}))\land{}(\neg (\exists (\textit{cost_energy_cap}_\text{node,tech,cost})))\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \text{tech_group=supply_plus}))\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage})))\land{}(\neg (\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land (\textit{cap_method}_\text{node,tech}\mathord{=}\text{binary} \lor \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})))
             \\
-            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{cost,node,tech} \times (\textit{cost_storage_cap}_\text{cost,node,tech} \times \textbf{storage_cap}_\text{node,tech} + \textit{cost_resource_cap}_\text{cost,node,tech} \times \textbf{resource_cap}_\text{node,tech} + \textit{cost_resource_area}_\text{cost,node,tech} \times \textbf{resource_area}_\text{node,tech} + \textit{cost_purchase}_\text{cost,node,tech} \times \textbf{purchased}_\text{node,tech}) \times (0.5 + \textit{cost_om_annual_investment_fraction}_\text{cost,node,tech})) + (\textit{cost_om_annual}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech}))&\quad
-            \text{if } (\neg (\exists (\textit{cost_energy_cap}_\text{cost,node,tech})))\land{}(\exists (\textit{cost_storage_cap}_\text{cost,node,tech}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage}))\land{}(\exists (\textit{cost_resource_area}_\text{cost,node,tech}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area}))\land{}(\exists (\textit{cost_purchase}_\text{cost,node,tech}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{binary})\land{}(\exists (\textit{cost_resource_cap}_\text{cost,node,tech}) \land \text{tech_group=supply_plus})\land{}(\text{tech_group=transmission})
+            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{node,tech,cost} \times (\textit{cost_energy_cap}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech} + \textit{cost_storage_cap}_\text{node,tech,cost} \times \textbf{storage_cap}_\text{node,tech} + \textit{cost_resource_cap}_\text{node,tech,cost} \times \textbf{resource_cap}_\text{node,tech} + \textit{cost_purchase}_\text{node,tech,cost} \times \textbf{purchased}_\text{node,tech}) \times (0.5 + \textit{cost_om_annual_investment_fraction}_\text{node,tech,cost})) + (\textit{cost_om_annual}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech}))&\quad
+            \text{if } (\neg (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area})))\land{}(\text{tech_group=transmission})\land{}(\exists (\textit{cost_energy_cap}_\text{node,tech,cost}))\land{}(\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \text{tech_group=supply_plus})\land{}(\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage}))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{binary})
             \\
-            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{cost,node,tech} \times (\textit{cost_storage_cap}_\text{cost,node,tech} \times \textbf{storage_cap}_\text{node,tech} + \textit{cost_resource_cap}_\text{cost,node,tech} \times \textbf{resource_cap}_\text{node,tech} + \textit{cost_resource_area}_\text{cost,node,tech} \times \textbf{resource_area}_\text{node,tech} + \textit{cost_purchase}_\text{cost,node,tech} \times \textbf{purchased}_\text{node,tech}) \times (1 + \textit{cost_om_annual_investment_fraction}_\text{cost,node,tech})) + (\textit{cost_om_annual}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech}))&\quad
-            \text{if } (\neg (\exists (\textit{cost_energy_cap}_\text{cost,node,tech})))\land{}(\exists (\textit{cost_storage_cap}_\text{cost,node,tech}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage}))\land{}(\exists (\textit{cost_resource_area}_\text{cost,node,tech}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area}))\land{}(\exists (\textit{cost_purchase}_\text{cost,node,tech}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{binary})\land{}(\exists (\textit{cost_resource_cap}_\text{cost,node,tech}) \land \text{tech_group=supply_plus})\land{}(\neg (\text{tech_group=transmission}))
+            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{node,tech,cost} \times (\textit{cost_energy_cap}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech} + \textit{cost_storage_cap}_\text{node,tech,cost} \times \textbf{storage_cap}_\text{node,tech} + \textit{cost_resource_cap}_\text{node,tech,cost} \times \textbf{resource_cap}_\text{node,tech} + \textit{cost_purchase}_\text{node,tech,cost} \times \textbf{units}_\text{node,tech}) \times (0.5 + \textit{cost_om_annual_investment_fraction}_\text{node,tech,cost})) + (\textit{cost_om_annual}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech}))&\quad
+            \text{if } (\neg (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area})))\land{}(\text{tech_group=transmission})\land{}(\exists (\textit{cost_energy_cap}_\text{node,tech,cost}))\land{}(\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \text{tech_group=supply_plus})\land{}(\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage}))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})
             \\
-            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{cost,node,tech} \times (\textit{cost_storage_cap}_\text{cost,node,tech} \times \textbf{storage_cap}_\text{node,tech} + \textit{cost_resource_area}_\text{cost,node,tech} \times \textbf{resource_area}_\text{node,tech} + \textit{cost_purchase}_\text{cost,node,tech} \times \textbf{purchased}_\text{node,tech}) \times (0.5 + \textit{cost_om_annual_investment_fraction}_\text{cost,node,tech})) + (\textit{cost_om_annual}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech}))&\quad
-            \text{if } (\neg (\exists (\textit{cost_energy_cap}_\text{cost,node,tech})))\land{}(\exists (\textit{cost_storage_cap}_\text{cost,node,tech}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage}))\land{}(\exists (\textit{cost_resource_area}_\text{cost,node,tech}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area}))\land{}(\exists (\textit{cost_purchase}_\text{cost,node,tech}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{binary})\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{cost,node,tech}) \land \text{tech_group=supply_plus}))\land{}(\text{tech_group=transmission})
+            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{node,tech,cost} \times (\textit{cost_energy_cap}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech} + \textit{cost_storage_cap}_\text{node,tech,cost} \times \textbf{storage_cap}_\text{node,tech} + \textit{cost_resource_cap}_\text{node,tech,cost} \times \textbf{resource_cap}_\text{node,tech}) \times (0.5 + \textit{cost_om_annual_investment_fraction}_\text{node,tech,cost})) + (\textit{cost_om_annual}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech}))&\quad
+            \text{if } (\neg (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area})))\land{}(\text{tech_group=transmission})\land{}(\exists (\textit{cost_energy_cap}_\text{node,tech,cost}))\land{}(\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \text{tech_group=supply_plus})\land{}(\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage}))\land{}(\neg (\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land (\textit{cap_method}_\text{node,tech}\mathord{=}\text{binary} \lor \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})))
             \\
-            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{cost,node,tech} \times (\textit{cost_storage_cap}_\text{cost,node,tech} \times \textbf{storage_cap}_\text{node,tech} + \textit{cost_resource_area}_\text{cost,node,tech} \times \textbf{resource_area}_\text{node,tech} + \textit{cost_purchase}_\text{cost,node,tech} \times \textbf{purchased}_\text{node,tech}) \times (1 + \textit{cost_om_annual_investment_fraction}_\text{cost,node,tech})) + (\textit{cost_om_annual}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech}))&\quad
-            \text{if } (\neg (\exists (\textit{cost_energy_cap}_\text{cost,node,tech})))\land{}(\exists (\textit{cost_storage_cap}_\text{cost,node,tech}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage}))\land{}(\exists (\textit{cost_resource_area}_\text{cost,node,tech}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area}))\land{}(\exists (\textit{cost_purchase}_\text{cost,node,tech}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{binary})\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{cost,node,tech}) \land \text{tech_group=supply_plus}))\land{}(\neg (\text{tech_group=transmission}))
+            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{node,tech,cost} \times (\textit{cost_energy_cap}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech} + \textit{cost_resource_cap}_\text{node,tech,cost} \times \textbf{resource_cap}_\text{node,tech} + \textit{cost_purchase}_\text{node,tech,cost} \times \textbf{purchased}_\text{node,tech}) \times (0.5 + \textit{cost_om_annual_investment_fraction}_\text{node,tech,cost})) + (\textit{cost_om_annual}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech}))&\quad
+            \text{if } (\neg (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area})))\land{}(\text{tech_group=transmission})\land{}(\exists (\textit{cost_energy_cap}_\text{node,tech,cost}))\land{}(\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \text{tech_group=supply_plus})\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage})))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{binary})
             \\
-            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{cost,node,tech} \times (\textit{cost_storage_cap}_\text{cost,node,tech} \times \textbf{storage_cap}_\text{node,tech} + \textit{cost_resource_cap}_\text{cost,node,tech} \times \textbf{resource_cap}_\text{node,tech} + \textit{cost_resource_area}_\text{cost,node,tech} \times \textbf{resource_area}_\text{node,tech} + \textit{cost_purchase}_\text{cost,node,tech} \times \textbf{units}_\text{node,tech}) \times (0.5 + \textit{cost_om_annual_investment_fraction}_\text{cost,node,tech})) + (\textit{cost_om_annual}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech}))&\quad
-            \text{if } (\neg (\exists (\textit{cost_energy_cap}_\text{cost,node,tech})))\land{}(\exists (\textit{cost_storage_cap}_\text{cost,node,tech}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage}))\land{}(\exists (\textit{cost_resource_area}_\text{cost,node,tech}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area}))\land{}(\exists (\textit{cost_purchase}_\text{cost,node,tech}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})\land{}(\exists (\textit{cost_resource_cap}_\text{cost,node,tech}) \land \text{tech_group=supply_plus})\land{}(\text{tech_group=transmission})
+            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{node,tech,cost} \times (\textit{cost_energy_cap}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech} + \textit{cost_resource_cap}_\text{node,tech,cost} \times \textbf{resource_cap}_\text{node,tech} + \textit{cost_purchase}_\text{node,tech,cost} \times \textbf{units}_\text{node,tech}) \times (0.5 + \textit{cost_om_annual_investment_fraction}_\text{node,tech,cost})) + (\textit{cost_om_annual}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech}))&\quad
+            \text{if } (\neg (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area})))\land{}(\text{tech_group=transmission})\land{}(\exists (\textit{cost_energy_cap}_\text{node,tech,cost}))\land{}(\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \text{tech_group=supply_plus})\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage})))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})
             \\
-            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{cost,node,tech} \times (\textit{cost_storage_cap}_\text{cost,node,tech} \times \textbf{storage_cap}_\text{node,tech} + \textit{cost_resource_cap}_\text{cost,node,tech} \times \textbf{resource_cap}_\text{node,tech} + \textit{cost_resource_area}_\text{cost,node,tech} \times \textbf{resource_area}_\text{node,tech} + \textit{cost_purchase}_\text{cost,node,tech} \times \textbf{units}_\text{node,tech}) \times (1 + \textit{cost_om_annual_investment_fraction}_\text{cost,node,tech})) + (\textit{cost_om_annual}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech}))&\quad
-            \text{if } (\neg (\exists (\textit{cost_energy_cap}_\text{cost,node,tech})))\land{}(\exists (\textit{cost_storage_cap}_\text{cost,node,tech}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage}))\land{}(\exists (\textit{cost_resource_area}_\text{cost,node,tech}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area}))\land{}(\exists (\textit{cost_purchase}_\text{cost,node,tech}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})\land{}(\exists (\textit{cost_resource_cap}_\text{cost,node,tech}) \land \text{tech_group=supply_plus})\land{}(\neg (\text{tech_group=transmission}))
+            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{node,tech,cost} \times (\textit{cost_energy_cap}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech} + \textit{cost_resource_cap}_\text{node,tech,cost} \times \textbf{resource_cap}_\text{node,tech}) \times (0.5 + \textit{cost_om_annual_investment_fraction}_\text{node,tech,cost})) + (\textit{cost_om_annual}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech}))&\quad
+            \text{if } (\neg (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area})))\land{}(\text{tech_group=transmission})\land{}(\exists (\textit{cost_energy_cap}_\text{node,tech,cost}))\land{}(\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \text{tech_group=supply_plus})\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage})))\land{}(\neg (\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land (\textit{cap_method}_\text{node,tech}\mathord{=}\text{binary} \lor \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})))
             \\
-            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{cost,node,tech} \times (\textit{cost_storage_cap}_\text{cost,node,tech} \times \textbf{storage_cap}_\text{node,tech} + \textit{cost_resource_area}_\text{cost,node,tech} \times \textbf{resource_area}_\text{node,tech} + \textit{cost_purchase}_\text{cost,node,tech} \times \textbf{units}_\text{node,tech}) \times (0.5 + \textit{cost_om_annual_investment_fraction}_\text{cost,node,tech})) + (\textit{cost_om_annual}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech}))&\quad
-            \text{if } (\neg (\exists (\textit{cost_energy_cap}_\text{cost,node,tech})))\land{}(\exists (\textit{cost_storage_cap}_\text{cost,node,tech}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage}))\land{}(\exists (\textit{cost_resource_area}_\text{cost,node,tech}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area}))\land{}(\exists (\textit{cost_purchase}_\text{cost,node,tech}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{cost,node,tech}) \land \text{tech_group=supply_plus}))\land{}(\text{tech_group=transmission})
+            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{node,tech,cost} \times (\textit{cost_energy_cap}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech} + \textit{cost_storage_cap}_\text{node,tech,cost} \times \textbf{storage_cap}_\text{node,tech} + \textit{cost_purchase}_\text{node,tech,cost} \times \textbf{purchased}_\text{node,tech}) \times (0.5 + \textit{cost_om_annual_investment_fraction}_\text{node,tech,cost})) + (\textit{cost_om_annual}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech}))&\quad
+            \text{if } (\neg (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area})))\land{}(\text{tech_group=transmission})\land{}(\exists (\textit{cost_energy_cap}_\text{node,tech,cost}))\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \text{tech_group=supply_plus}))\land{}(\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage}))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{binary})
             \\
-            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{cost,node,tech} \times (\textit{cost_storage_cap}_\text{cost,node,tech} \times \textbf{storage_cap}_\text{node,tech} + \textit{cost_resource_area}_\text{cost,node,tech} \times \textbf{resource_area}_\text{node,tech} + \textit{cost_purchase}_\text{cost,node,tech} \times \textbf{units}_\text{node,tech}) \times (1 + \textit{cost_om_annual_investment_fraction}_\text{cost,node,tech})) + (\textit{cost_om_annual}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech}))&\quad
-            \text{if } (\neg (\exists (\textit{cost_energy_cap}_\text{cost,node,tech})))\land{}(\exists (\textit{cost_storage_cap}_\text{cost,node,tech}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage}))\land{}(\exists (\textit{cost_resource_area}_\text{cost,node,tech}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area}))\land{}(\exists (\textit{cost_purchase}_\text{cost,node,tech}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{cost,node,tech}) \land \text{tech_group=supply_plus}))\land{}(\neg (\text{tech_group=transmission}))
+            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{node,tech,cost} \times (\textit{cost_energy_cap}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech} + \textit{cost_storage_cap}_\text{node,tech,cost} \times \textbf{storage_cap}_\text{node,tech} + \textit{cost_purchase}_\text{node,tech,cost} \times \textbf{units}_\text{node,tech}) \times (0.5 + \textit{cost_om_annual_investment_fraction}_\text{node,tech,cost})) + (\textit{cost_om_annual}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech}))&\quad
+            \text{if } (\neg (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area})))\land{}(\text{tech_group=transmission})\land{}(\exists (\textit{cost_energy_cap}_\text{node,tech,cost}))\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \text{tech_group=supply_plus}))\land{}(\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage}))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})
             \\
-            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{cost,node,tech} \times (\textit{cost_storage_cap}_\text{cost,node,tech} \times \textbf{storage_cap}_\text{node,tech} + \textit{cost_resource_cap}_\text{cost,node,tech} \times \textbf{resource_cap}_\text{node,tech} + \textit{cost_resource_area}_\text{cost,node,tech} \times \textbf{resource_area}_\text{node,tech}) \times (0.5 + \textit{cost_om_annual_investment_fraction}_\text{cost,node,tech})) + (\textit{cost_om_annual}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech}))&\quad
-            \text{if } (\neg (\exists (\textit{cost_energy_cap}_\text{cost,node,tech})))\land{}(\exists (\textit{cost_storage_cap}_\text{cost,node,tech}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage}))\land{}(\exists (\textit{cost_resource_area}_\text{cost,node,tech}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area}))\land{}(\neg (\exists (\textit{cost_purchase}_\text{cost,node,tech}) \land (\textit{cap_method}_\text{node,tech}\mathord{=}\text{binary} \lor \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})))\land{}(\exists (\textit{cost_resource_cap}_\text{cost,node,tech}) \land \text{tech_group=supply_plus})\land{}(\text{tech_group=transmission})
+            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{node,tech,cost} \times (\textit{cost_energy_cap}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech} + \textit{cost_storage_cap}_\text{node,tech,cost} \times \textbf{storage_cap}_\text{node,tech}) \times (0.5 + \textit{cost_om_annual_investment_fraction}_\text{node,tech,cost})) + (\textit{cost_om_annual}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech}))&\quad
+            \text{if } (\neg (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area})))\land{}(\text{tech_group=transmission})\land{}(\exists (\textit{cost_energy_cap}_\text{node,tech,cost}))\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \text{tech_group=supply_plus}))\land{}(\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage}))\land{}(\neg (\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land (\textit{cap_method}_\text{node,tech}\mathord{=}\text{binary} \lor \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})))
             \\
-            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{cost,node,tech} \times (\textit{cost_storage_cap}_\text{cost,node,tech} \times \textbf{storage_cap}_\text{node,tech} + \textit{cost_resource_cap}_\text{cost,node,tech} \times \textbf{resource_cap}_\text{node,tech} + \textit{cost_resource_area}_\text{cost,node,tech} \times \textbf{resource_area}_\text{node,tech}) \times (1 + \textit{cost_om_annual_investment_fraction}_\text{cost,node,tech})) + (\textit{cost_om_annual}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech}))&\quad
-            \text{if } (\neg (\exists (\textit{cost_energy_cap}_\text{cost,node,tech})))\land{}(\exists (\textit{cost_storage_cap}_\text{cost,node,tech}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage}))\land{}(\exists (\textit{cost_resource_area}_\text{cost,node,tech}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area}))\land{}(\neg (\exists (\textit{cost_purchase}_\text{cost,node,tech}) \land (\textit{cap_method}_\text{node,tech}\mathord{=}\text{binary} \lor \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})))\land{}(\exists (\textit{cost_resource_cap}_\text{cost,node,tech}) \land \text{tech_group=supply_plus})\land{}(\neg (\text{tech_group=transmission}))
+            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{node,tech,cost} \times (\textit{cost_energy_cap}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech} + \textit{cost_purchase}_\text{node,tech,cost} \times \textbf{purchased}_\text{node,tech}) \times (0.5 + \textit{cost_om_annual_investment_fraction}_\text{node,tech,cost})) + (\textit{cost_om_annual}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech}))&\quad
+            \text{if } (\neg (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area})))\land{}(\text{tech_group=transmission})\land{}(\exists (\textit{cost_energy_cap}_\text{node,tech,cost}))\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \text{tech_group=supply_plus}))\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage})))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{binary})
             \\
-            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{cost,node,tech} \times (\textit{cost_storage_cap}_\text{cost,node,tech} \times \textbf{storage_cap}_\text{node,tech} + \textit{cost_resource_area}_\text{cost,node,tech} \times \textbf{resource_area}_\text{node,tech}) \times (0.5 + \textit{cost_om_annual_investment_fraction}_\text{cost,node,tech})) + (\textit{cost_om_annual}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech}))&\quad
-            \text{if } (\neg (\exists (\textit{cost_energy_cap}_\text{cost,node,tech})))\land{}(\exists (\textit{cost_storage_cap}_\text{cost,node,tech}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage}))\land{}(\exists (\textit{cost_resource_area}_\text{cost,node,tech}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area}))\land{}(\neg (\exists (\textit{cost_purchase}_\text{cost,node,tech}) \land (\textit{cap_method}_\text{node,tech}\mathord{=}\text{binary} \lor \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})))\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{cost,node,tech}) \land \text{tech_group=supply_plus}))\land{}(\text{tech_group=transmission})
+            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{node,tech,cost} \times (\textit{cost_energy_cap}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech} + \textit{cost_purchase}_\text{node,tech,cost} \times \textbf{units}_\text{node,tech}) \times (0.5 + \textit{cost_om_annual_investment_fraction}_\text{node,tech,cost})) + (\textit{cost_om_annual}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech}))&\quad
+            \text{if } (\neg (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area})))\land{}(\text{tech_group=transmission})\land{}(\exists (\textit{cost_energy_cap}_\text{node,tech,cost}))\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \text{tech_group=supply_plus}))\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage})))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})
             \\
-            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{cost,node,tech} \times (\textit{cost_storage_cap}_\text{cost,node,tech} \times \textbf{storage_cap}_\text{node,tech} + \textit{cost_resource_area}_\text{cost,node,tech} \times \textbf{resource_area}_\text{node,tech}) \times (1 + \textit{cost_om_annual_investment_fraction}_\text{cost,node,tech})) + (\textit{cost_om_annual}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech}))&\quad
-            \text{if } (\neg (\exists (\textit{cost_energy_cap}_\text{cost,node,tech})))\land{}(\exists (\textit{cost_storage_cap}_\text{cost,node,tech}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage}))\land{}(\exists (\textit{cost_resource_area}_\text{cost,node,tech}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area}))\land{}(\neg (\exists (\textit{cost_purchase}_\text{cost,node,tech}) \land (\textit{cap_method}_\text{node,tech}\mathord{=}\text{binary} \lor \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})))\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{cost,node,tech}) \land \text{tech_group=supply_plus}))\land{}(\neg (\text{tech_group=transmission}))
+            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{node,tech,cost} \times (\textit{cost_energy_cap}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech}) \times (0.5 + \textit{cost_om_annual_investment_fraction}_\text{node,tech,cost})) + (\textit{cost_om_annual}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech}))&\quad
+            \text{if } (\neg (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area})))\land{}(\text{tech_group=transmission})\land{}(\exists (\textit{cost_energy_cap}_\text{node,tech,cost}))\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \text{tech_group=supply_plus}))\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage})))\land{}(\neg (\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land (\textit{cap_method}_\text{node,tech}\mathord{=}\text{binary} \lor \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})))
             \\
-            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{cost,node,tech} \times (\textit{cost_storage_cap}_\text{cost,node,tech} \times \textbf{storage_cap}_\text{node,tech} + \textit{cost_resource_cap}_\text{cost,node,tech} \times \textbf{resource_cap}_\text{node,tech} + \textit{cost_purchase}_\text{cost,node,tech} \times \textbf{purchased}_\text{node,tech}) \times (0.5 + \textit{cost_om_annual_investment_fraction}_\text{cost,node,tech})) + (\textit{cost_om_annual}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech}))&\quad
-            \text{if } (\neg (\exists (\textit{cost_energy_cap}_\text{cost,node,tech})))\land{}(\exists (\textit{cost_storage_cap}_\text{cost,node,tech}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage}))\land{}(\neg (\exists (\textit{cost_resource_area}_\text{cost,node,tech}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area})))\land{}(\exists (\textit{cost_purchase}_\text{cost,node,tech}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{binary})\land{}(\exists (\textit{cost_resource_cap}_\text{cost,node,tech}) \land \text{tech_group=supply_plus})\land{}(\text{tech_group=transmission})
+            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{node,tech,cost} \times (\textit{cost_storage_cap}_\text{node,tech,cost} \times \textbf{storage_cap}_\text{node,tech} + \textit{cost_resource_cap}_\text{node,tech,cost} \times \textbf{resource_cap}_\text{node,tech} + \textit{cost_purchase}_\text{node,tech,cost} \times \textbf{purchased}_\text{node,tech}) \times (0.5 + \textit{cost_om_annual_investment_fraction}_\text{node,tech,cost})) + (\textit{cost_om_annual}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech}))&\quad
+            \text{if } (\neg (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area})))\land{}(\text{tech_group=transmission})\land{}(\neg (\exists (\textit{cost_energy_cap}_\text{node,tech,cost})))\land{}(\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \text{tech_group=supply_plus})\land{}(\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage}))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{binary})
             \\
-            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{cost,node,tech} \times (\textit{cost_storage_cap}_\text{cost,node,tech} \times \textbf{storage_cap}_\text{node,tech} + \textit{cost_resource_cap}_\text{cost,node,tech} \times \textbf{resource_cap}_\text{node,tech} + \textit{cost_purchase}_\text{cost,node,tech} \times \textbf{purchased}_\text{node,tech}) \times (1 + \textit{cost_om_annual_investment_fraction}_\text{cost,node,tech})) + (\textit{cost_om_annual}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech}))&\quad
-            \text{if } (\neg (\exists (\textit{cost_energy_cap}_\text{cost,node,tech})))\land{}(\exists (\textit{cost_storage_cap}_\text{cost,node,tech}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage}))\land{}(\neg (\exists (\textit{cost_resource_area}_\text{cost,node,tech}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area})))\land{}(\exists (\textit{cost_purchase}_\text{cost,node,tech}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{binary})\land{}(\exists (\textit{cost_resource_cap}_\text{cost,node,tech}) \land \text{tech_group=supply_plus})\land{}(\neg (\text{tech_group=transmission}))
+            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{node,tech,cost} \times (\textit{cost_storage_cap}_\text{node,tech,cost} \times \textbf{storage_cap}_\text{node,tech} + \textit{cost_resource_cap}_\text{node,tech,cost} \times \textbf{resource_cap}_\text{node,tech} + \textit{cost_purchase}_\text{node,tech,cost} \times \textbf{units}_\text{node,tech}) \times (0.5 + \textit{cost_om_annual_investment_fraction}_\text{node,tech,cost})) + (\textit{cost_om_annual}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech}))&\quad
+            \text{if } (\neg (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area})))\land{}(\text{tech_group=transmission})\land{}(\neg (\exists (\textit{cost_energy_cap}_\text{node,tech,cost})))\land{}(\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \text{tech_group=supply_plus})\land{}(\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage}))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})
             \\
-            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{cost,node,tech} \times (\textit{cost_storage_cap}_\text{cost,node,tech} \times \textbf{storage_cap}_\text{node,tech} + \textit{cost_purchase}_\text{cost,node,tech} \times \textbf{purchased}_\text{node,tech}) \times (0.5 + \textit{cost_om_annual_investment_fraction}_\text{cost,node,tech})) + (\textit{cost_om_annual}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech}))&\quad
-            \text{if } (\neg (\exists (\textit{cost_energy_cap}_\text{cost,node,tech})))\land{}(\exists (\textit{cost_storage_cap}_\text{cost,node,tech}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage}))\land{}(\neg (\exists (\textit{cost_resource_area}_\text{cost,node,tech}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area})))\land{}(\exists (\textit{cost_purchase}_\text{cost,node,tech}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{binary})\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{cost,node,tech}) \land \text{tech_group=supply_plus}))\land{}(\text{tech_group=transmission})
+            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{node,tech,cost} \times (\textit{cost_storage_cap}_\text{node,tech,cost} \times \textbf{storage_cap}_\text{node,tech} + \textit{cost_resource_cap}_\text{node,tech,cost} \times \textbf{resource_cap}_\text{node,tech}) \times (0.5 + \textit{cost_om_annual_investment_fraction}_\text{node,tech,cost})) + (\textit{cost_om_annual}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech}))&\quad
+            \text{if } (\neg (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area})))\land{}(\text{tech_group=transmission})\land{}(\neg (\exists (\textit{cost_energy_cap}_\text{node,tech,cost})))\land{}(\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \text{tech_group=supply_plus})\land{}(\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage}))\land{}(\neg (\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land (\textit{cap_method}_\text{node,tech}\mathord{=}\text{binary} \lor \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})))
             \\
-            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{cost,node,tech} \times (\textit{cost_storage_cap}_\text{cost,node,tech} \times \textbf{storage_cap}_\text{node,tech} + \textit{cost_purchase}_\text{cost,node,tech} \times \textbf{purchased}_\text{node,tech}) \times (1 + \textit{cost_om_annual_investment_fraction}_\text{cost,node,tech})) + (\textit{cost_om_annual}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech}))&\quad
-            \text{if } (\neg (\exists (\textit{cost_energy_cap}_\text{cost,node,tech})))\land{}(\exists (\textit{cost_storage_cap}_\text{cost,node,tech}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage}))\land{}(\neg (\exists (\textit{cost_resource_area}_\text{cost,node,tech}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area})))\land{}(\exists (\textit{cost_purchase}_\text{cost,node,tech}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{binary})\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{cost,node,tech}) \land \text{tech_group=supply_plus}))\land{}(\neg (\text{tech_group=transmission}))
+            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{node,tech,cost} \times (\textit{cost_resource_cap}_\text{node,tech,cost} \times \textbf{resource_cap}_\text{node,tech} + \textit{cost_purchase}_\text{node,tech,cost} \times \textbf{purchased}_\text{node,tech}) \times (0.5 + \textit{cost_om_annual_investment_fraction}_\text{node,tech,cost})) + (\textit{cost_om_annual}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech}))&\quad
+            \text{if } (\neg (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area})))\land{}(\text{tech_group=transmission})\land{}(\neg (\exists (\textit{cost_energy_cap}_\text{node,tech,cost})))\land{}(\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \text{tech_group=supply_plus})\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage})))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{binary})
             \\
-            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{cost,node,tech} \times (\textit{cost_storage_cap}_\text{cost,node,tech} \times \textbf{storage_cap}_\text{node,tech} + \textit{cost_resource_cap}_\text{cost,node,tech} \times \textbf{resource_cap}_\text{node,tech} + \textit{cost_purchase}_\text{cost,node,tech} \times \textbf{units}_\text{node,tech}) \times (0.5 + \textit{cost_om_annual_investment_fraction}_\text{cost,node,tech})) + (\textit{cost_om_annual}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech}))&\quad
-            \text{if } (\neg (\exists (\textit{cost_energy_cap}_\text{cost,node,tech})))\land{}(\exists (\textit{cost_storage_cap}_\text{cost,node,tech}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage}))\land{}(\neg (\exists (\textit{cost_resource_area}_\text{cost,node,tech}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area})))\land{}(\exists (\textit{cost_purchase}_\text{cost,node,tech}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})\land{}(\exists (\textit{cost_resource_cap}_\text{cost,node,tech}) \land \text{tech_group=supply_plus})\land{}(\text{tech_group=transmission})
+            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{node,tech,cost} \times (\textit{cost_resource_cap}_\text{node,tech,cost} \times \textbf{resource_cap}_\text{node,tech} + \textit{cost_purchase}_\text{node,tech,cost} \times \textbf{units}_\text{node,tech}) \times (0.5 + \textit{cost_om_annual_investment_fraction}_\text{node,tech,cost})) + (\textit{cost_om_annual}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech}))&\quad
+            \text{if } (\neg (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area})))\land{}(\text{tech_group=transmission})\land{}(\neg (\exists (\textit{cost_energy_cap}_\text{node,tech,cost})))\land{}(\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \text{tech_group=supply_plus})\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage})))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})
             \\
-            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{cost,node,tech} \times (\textit{cost_storage_cap}_\text{cost,node,tech} \times \textbf{storage_cap}_\text{node,tech} + \textit{cost_resource_cap}_\text{cost,node,tech} \times \textbf{resource_cap}_\text{node,tech} + \textit{cost_purchase}_\text{cost,node,tech} \times \textbf{units}_\text{node,tech}) \times (1 + \textit{cost_om_annual_investment_fraction}_\text{cost,node,tech})) + (\textit{cost_om_annual}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech}))&\quad
-            \text{if } (\neg (\exists (\textit{cost_energy_cap}_\text{cost,node,tech})))\land{}(\exists (\textit{cost_storage_cap}_\text{cost,node,tech}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage}))\land{}(\neg (\exists (\textit{cost_resource_area}_\text{cost,node,tech}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area})))\land{}(\exists (\textit{cost_purchase}_\text{cost,node,tech}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})\land{}(\exists (\textit{cost_resource_cap}_\text{cost,node,tech}) \land \text{tech_group=supply_plus})\land{}(\neg (\text{tech_group=transmission}))
+            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{node,tech,cost} \times (\textit{cost_resource_cap}_\text{node,tech,cost} \times \textbf{resource_cap}_\text{node,tech}) \times (0.5 + \textit{cost_om_annual_investment_fraction}_\text{node,tech,cost})) + (\textit{cost_om_annual}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech}))&\quad
+            \text{if } (\neg (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area})))\land{}(\text{tech_group=transmission})\land{}(\neg (\exists (\textit{cost_energy_cap}_\text{node,tech,cost})))\land{}(\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \text{tech_group=supply_plus})\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage})))\land{}(\neg (\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land (\textit{cap_method}_\text{node,tech}\mathord{=}\text{binary} \lor \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})))
             \\
-            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{cost,node,tech} \times (\textit{cost_storage_cap}_\text{cost,node,tech} \times \textbf{storage_cap}_\text{node,tech} + \textit{cost_purchase}_\text{cost,node,tech} \times \textbf{units}_\text{node,tech}) \times (0.5 + \textit{cost_om_annual_investment_fraction}_\text{cost,node,tech})) + (\textit{cost_om_annual}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech}))&\quad
-            \text{if } (\neg (\exists (\textit{cost_energy_cap}_\text{cost,node,tech})))\land{}(\exists (\textit{cost_storage_cap}_\text{cost,node,tech}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage}))\land{}(\neg (\exists (\textit{cost_resource_area}_\text{cost,node,tech}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area})))\land{}(\exists (\textit{cost_purchase}_\text{cost,node,tech}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{cost,node,tech}) \land \text{tech_group=supply_plus}))\land{}(\text{tech_group=transmission})
+            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{node,tech,cost} \times (\textit{cost_storage_cap}_\text{node,tech,cost} \times \textbf{storage_cap}_\text{node,tech} + \textit{cost_purchase}_\text{node,tech,cost} \times \textbf{purchased}_\text{node,tech}) \times (0.5 + \textit{cost_om_annual_investment_fraction}_\text{node,tech,cost})) + (\textit{cost_om_annual}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech}))&\quad
+            \text{if } (\neg (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area})))\land{}(\text{tech_group=transmission})\land{}(\neg (\exists (\textit{cost_energy_cap}_\text{node,tech,cost})))\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \text{tech_group=supply_plus}))\land{}(\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage}))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{binary})
             \\
-            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{cost,node,tech} \times (\textit{cost_storage_cap}_\text{cost,node,tech} \times \textbf{storage_cap}_\text{node,tech} + \textit{cost_purchase}_\text{cost,node,tech} \times \textbf{units}_\text{node,tech}) \times (1 + \textit{cost_om_annual_investment_fraction}_\text{cost,node,tech})) + (\textit{cost_om_annual}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech}))&\quad
-            \text{if } (\neg (\exists (\textit{cost_energy_cap}_\text{cost,node,tech})))\land{}(\exists (\textit{cost_storage_cap}_\text{cost,node,tech}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage}))\land{}(\neg (\exists (\textit{cost_resource_area}_\text{cost,node,tech}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area})))\land{}(\exists (\textit{cost_purchase}_\text{cost,node,tech}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{cost,node,tech}) \land \text{tech_group=supply_plus}))\land{}(\neg (\text{tech_group=transmission}))
+            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{node,tech,cost} \times (\textit{cost_storage_cap}_\text{node,tech,cost} \times \textbf{storage_cap}_\text{node,tech} + \textit{cost_purchase}_\text{node,tech,cost} \times \textbf{units}_\text{node,tech}) \times (0.5 + \textit{cost_om_annual_investment_fraction}_\text{node,tech,cost})) + (\textit{cost_om_annual}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech}))&\quad
+            \text{if } (\neg (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area})))\land{}(\text{tech_group=transmission})\land{}(\neg (\exists (\textit{cost_energy_cap}_\text{node,tech,cost})))\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \text{tech_group=supply_plus}))\land{}(\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage}))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})
             \\
-            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{cost,node,tech} \times (\textit{cost_storage_cap}_\text{cost,node,tech} \times \textbf{storage_cap}_\text{node,tech} + \textit{cost_resource_cap}_\text{cost,node,tech} \times \textbf{resource_cap}_\text{node,tech}) \times (0.5 + \textit{cost_om_annual_investment_fraction}_\text{cost,node,tech})) + (\textit{cost_om_annual}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech}))&\quad
-            \text{if } (\neg (\exists (\textit{cost_energy_cap}_\text{cost,node,tech})))\land{}(\exists (\textit{cost_storage_cap}_\text{cost,node,tech}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage}))\land{}(\neg (\exists (\textit{cost_resource_area}_\text{cost,node,tech}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area})))\land{}(\neg (\exists (\textit{cost_purchase}_\text{cost,node,tech}) \land (\textit{cap_method}_\text{node,tech}\mathord{=}\text{binary} \lor \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})))\land{}(\exists (\textit{cost_resource_cap}_\text{cost,node,tech}) \land \text{tech_group=supply_plus})\land{}(\text{tech_group=transmission})
+            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{node,tech,cost} \times (\textit{cost_storage_cap}_\text{node,tech,cost} \times \textbf{storage_cap}_\text{node,tech}) \times (0.5 + \textit{cost_om_annual_investment_fraction}_\text{node,tech,cost})) + (\textit{cost_om_annual}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech}))&\quad
+            \text{if } (\neg (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area})))\land{}(\text{tech_group=transmission})\land{}(\neg (\exists (\textit{cost_energy_cap}_\text{node,tech,cost})))\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \text{tech_group=supply_plus}))\land{}(\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage}))\land{}(\neg (\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land (\textit{cap_method}_\text{node,tech}\mathord{=}\text{binary} \lor \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})))
             \\
-            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{cost,node,tech} \times (\textit{cost_storage_cap}_\text{cost,node,tech} \times \textbf{storage_cap}_\text{node,tech} + \textit{cost_resource_cap}_\text{cost,node,tech} \times \textbf{resource_cap}_\text{node,tech}) \times (1 + \textit{cost_om_annual_investment_fraction}_\text{cost,node,tech})) + (\textit{cost_om_annual}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech}))&\quad
-            \text{if } (\neg (\exists (\textit{cost_energy_cap}_\text{cost,node,tech})))\land{}(\exists (\textit{cost_storage_cap}_\text{cost,node,tech}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage}))\land{}(\neg (\exists (\textit{cost_resource_area}_\text{cost,node,tech}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area})))\land{}(\neg (\exists (\textit{cost_purchase}_\text{cost,node,tech}) \land (\textit{cap_method}_\text{node,tech}\mathord{=}\text{binary} \lor \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})))\land{}(\exists (\textit{cost_resource_cap}_\text{cost,node,tech}) \land \text{tech_group=supply_plus})\land{}(\neg (\text{tech_group=transmission}))
+            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{node,tech,cost} \times (\textit{cost_purchase}_\text{node,tech,cost} \times \textbf{purchased}_\text{node,tech}) \times (0.5 + \textit{cost_om_annual_investment_fraction}_\text{node,tech,cost})) + (\textit{cost_om_annual}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech}))&\quad
+            \text{if } (\neg (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area})))\land{}(\text{tech_group=transmission})\land{}(\neg (\exists (\textit{cost_energy_cap}_\text{node,tech,cost})))\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \text{tech_group=supply_plus}))\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage})))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{binary})
             \\
-            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{cost,node,tech} \times (\textit{cost_storage_cap}_\text{cost,node,tech} \times \textbf{storage_cap}_\text{node,tech}) \times (0.5 + \textit{cost_om_annual_investment_fraction}_\text{cost,node,tech})) + (\textit{cost_om_annual}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech}))&\quad
-            \text{if } (\neg (\exists (\textit{cost_energy_cap}_\text{cost,node,tech})))\land{}(\exists (\textit{cost_storage_cap}_\text{cost,node,tech}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage}))\land{}(\neg (\exists (\textit{cost_resource_area}_\text{cost,node,tech}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area})))\land{}(\neg (\exists (\textit{cost_purchase}_\text{cost,node,tech}) \land (\textit{cap_method}_\text{node,tech}\mathord{=}\text{binary} \lor \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})))\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{cost,node,tech}) \land \text{tech_group=supply_plus}))\land{}(\text{tech_group=transmission})
+            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{node,tech,cost} \times (\textit{cost_purchase}_\text{node,tech,cost} \times \textbf{units}_\text{node,tech}) \times (0.5 + \textit{cost_om_annual_investment_fraction}_\text{node,tech,cost})) + (\textit{cost_om_annual}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech}))&\quad
+            \text{if } (\neg (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area})))\land{}(\text{tech_group=transmission})\land{}(\neg (\exists (\textit{cost_energy_cap}_\text{node,tech,cost})))\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \text{tech_group=supply_plus}))\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage})))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})
             \\
-            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{cost,node,tech} \times (\textit{cost_storage_cap}_\text{cost,node,tech} \times \textbf{storage_cap}_\text{node,tech}) \times (1 + \textit{cost_om_annual_investment_fraction}_\text{cost,node,tech})) + (\textit{cost_om_annual}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech}))&\quad
-            \text{if } (\neg (\exists (\textit{cost_energy_cap}_\text{cost,node,tech})))\land{}(\exists (\textit{cost_storage_cap}_\text{cost,node,tech}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage}))\land{}(\neg (\exists (\textit{cost_resource_area}_\text{cost,node,tech}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area})))\land{}(\neg (\exists (\textit{cost_purchase}_\text{cost,node,tech}) \land (\textit{cap_method}_\text{node,tech}\mathord{=}\text{binary} \lor \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})))\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{cost,node,tech}) \land \text{tech_group=supply_plus}))\land{}(\neg (\text{tech_group=transmission}))
+            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{node,tech,cost} \times (0) \times (0.5 + \textit{cost_om_annual_investment_fraction}_\text{node,tech,cost})) + (\textit{cost_om_annual}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech}))&\quad
+            \text{if } (\neg (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area})))\land{}(\text{tech_group=transmission})\land{}(\neg (\exists (\textit{cost_energy_cap}_\text{node,tech,cost})))\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \text{tech_group=supply_plus}))\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage})))\land{}(\neg (\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land (\textit{cap_method}_\text{node,tech}\mathord{=}\text{binary} \lor \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})))
             \\
-            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{cost,node,tech} \times (\textit{cost_resource_cap}_\text{cost,node,tech} \times \textbf{resource_cap}_\text{node,tech} + \textit{cost_resource_area}_\text{cost,node,tech} \times \textbf{resource_area}_\text{node,tech} + \textit{cost_purchase}_\text{cost,node,tech} \times \textbf{purchased}_\text{node,tech}) \times (0.5 + \textit{cost_om_annual_investment_fraction}_\text{cost,node,tech})) + (\textit{cost_om_annual}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech}))&\quad
-            \text{if } (\neg (\exists (\textit{cost_energy_cap}_\text{cost,node,tech})))\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{cost,node,tech}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage})))\land{}(\exists (\textit{cost_resource_area}_\text{cost,node,tech}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area}))\land{}(\exists (\textit{cost_purchase}_\text{cost,node,tech}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{binary})\land{}(\exists (\textit{cost_resource_cap}_\text{cost,node,tech}) \land \text{tech_group=supply_plus})\land{}(\text{tech_group=transmission})
+            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{node,tech,cost} \times (\textit{cost_energy_cap}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech} + \textit{cost_storage_cap}_\text{node,tech,cost} \times \textbf{storage_cap}_\text{node,tech} + \textit{cost_resource_cap}_\text{node,tech,cost} \times \textbf{resource_cap}_\text{node,tech} + \textit{cost_purchase}_\text{node,tech,cost} \times \textbf{purchased}_\text{node,tech}) \times (1 + \textit{cost_om_annual_investment_fraction}_\text{node,tech,cost})) + (\textit{cost_om_annual}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech}))&\quad
+            \text{if } (\neg (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area})))\land{}(\neg (\text{tech_group=transmission}))\land{}(\exists (\textit{cost_energy_cap}_\text{node,tech,cost}))\land{}(\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \text{tech_group=supply_plus})\land{}(\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage}))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{binary})
             \\
-            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{cost,node,tech} \times (\textit{cost_resource_cap}_\text{cost,node,tech} \times \textbf{resource_cap}_\text{node,tech} + \textit{cost_resource_area}_\text{cost,node,tech} \times \textbf{resource_area}_\text{node,tech} + \textit{cost_purchase}_\text{cost,node,tech} \times \textbf{purchased}_\text{node,tech}) \times (1 + \textit{cost_om_annual_investment_fraction}_\text{cost,node,tech})) + (\textit{cost_om_annual}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech}))&\quad
-            \text{if } (\neg (\exists (\textit{cost_energy_cap}_\text{cost,node,tech})))\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{cost,node,tech}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage})))\land{}(\exists (\textit{cost_resource_area}_\text{cost,node,tech}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area}))\land{}(\exists (\textit{cost_purchase}_\text{cost,node,tech}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{binary})\land{}(\exists (\textit{cost_resource_cap}_\text{cost,node,tech}) \land \text{tech_group=supply_plus})\land{}(\neg (\text{tech_group=transmission}))
+            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{node,tech,cost} \times (\textit{cost_energy_cap}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech} + \textit{cost_storage_cap}_\text{node,tech,cost} \times \textbf{storage_cap}_\text{node,tech} + \textit{cost_resource_cap}_\text{node,tech,cost} \times \textbf{resource_cap}_\text{node,tech} + \textit{cost_purchase}_\text{node,tech,cost} \times \textbf{units}_\text{node,tech}) \times (1 + \textit{cost_om_annual_investment_fraction}_\text{node,tech,cost})) + (\textit{cost_om_annual}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech}))&\quad
+            \text{if } (\neg (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area})))\land{}(\neg (\text{tech_group=transmission}))\land{}(\exists (\textit{cost_energy_cap}_\text{node,tech,cost}))\land{}(\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \text{tech_group=supply_plus})\land{}(\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage}))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})
             \\
-            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{cost,node,tech} \times (\textit{cost_resource_area}_\text{cost,node,tech} \times \textbf{resource_area}_\text{node,tech} + \textit{cost_purchase}_\text{cost,node,tech} \times \textbf{purchased}_\text{node,tech}) \times (0.5 + \textit{cost_om_annual_investment_fraction}_\text{cost,node,tech})) + (\textit{cost_om_annual}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech}))&\quad
-            \text{if } (\neg (\exists (\textit{cost_energy_cap}_\text{cost,node,tech})))\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{cost,node,tech}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage})))\land{}(\exists (\textit{cost_resource_area}_\text{cost,node,tech}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area}))\land{}(\exists (\textit{cost_purchase}_\text{cost,node,tech}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{binary})\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{cost,node,tech}) \land \text{tech_group=supply_plus}))\land{}(\text{tech_group=transmission})
+            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{node,tech,cost} \times (\textit{cost_energy_cap}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech} + \textit{cost_storage_cap}_\text{node,tech,cost} \times \textbf{storage_cap}_\text{node,tech} + \textit{cost_resource_cap}_\text{node,tech,cost} \times \textbf{resource_cap}_\text{node,tech}) \times (1 + \textit{cost_om_annual_investment_fraction}_\text{node,tech,cost})) + (\textit{cost_om_annual}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech}))&\quad
+            \text{if } (\neg (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area})))\land{}(\neg (\text{tech_group=transmission}))\land{}(\exists (\textit{cost_energy_cap}_\text{node,tech,cost}))\land{}(\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \text{tech_group=supply_plus})\land{}(\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage}))\land{}(\neg (\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land (\textit{cap_method}_\text{node,tech}\mathord{=}\text{binary} \lor \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})))
             \\
-            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{cost,node,tech} \times (\textit{cost_resource_area}_\text{cost,node,tech} \times \textbf{resource_area}_\text{node,tech} + \textit{cost_purchase}_\text{cost,node,tech} \times \textbf{purchased}_\text{node,tech}) \times (1 + \textit{cost_om_annual_investment_fraction}_\text{cost,node,tech})) + (\textit{cost_om_annual}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech}))&\quad
-            \text{if } (\neg (\exists (\textit{cost_energy_cap}_\text{cost,node,tech})))\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{cost,node,tech}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage})))\land{}(\exists (\textit{cost_resource_area}_\text{cost,node,tech}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area}))\land{}(\exists (\textit{cost_purchase}_\text{cost,node,tech}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{binary})\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{cost,node,tech}) \land \text{tech_group=supply_plus}))\land{}(\neg (\text{tech_group=transmission}))
+            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{node,tech,cost} \times (\textit{cost_energy_cap}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech} + \textit{cost_resource_cap}_\text{node,tech,cost} \times \textbf{resource_cap}_\text{node,tech} + \textit{cost_purchase}_\text{node,tech,cost} \times \textbf{purchased}_\text{node,tech}) \times (1 + \textit{cost_om_annual_investment_fraction}_\text{node,tech,cost})) + (\textit{cost_om_annual}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech}))&\quad
+            \text{if } (\neg (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area})))\land{}(\neg (\text{tech_group=transmission}))\land{}(\exists (\textit{cost_energy_cap}_\text{node,tech,cost}))\land{}(\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \text{tech_group=supply_plus})\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage})))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{binary})
             \\
-            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{cost,node,tech} \times (\textit{cost_resource_cap}_\text{cost,node,tech} \times \textbf{resource_cap}_\text{node,tech} + \textit{cost_resource_area}_\text{cost,node,tech} \times \textbf{resource_area}_\text{node,tech} + \textit{cost_purchase}_\text{cost,node,tech} \times \textbf{units}_\text{node,tech}) \times (0.5 + \textit{cost_om_annual_investment_fraction}_\text{cost,node,tech})) + (\textit{cost_om_annual}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech}))&\quad
-            \text{if } (\neg (\exists (\textit{cost_energy_cap}_\text{cost,node,tech})))\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{cost,node,tech}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage})))\land{}(\exists (\textit{cost_resource_area}_\text{cost,node,tech}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area}))\land{}(\exists (\textit{cost_purchase}_\text{cost,node,tech}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})\land{}(\exists (\textit{cost_resource_cap}_\text{cost,node,tech}) \land \text{tech_group=supply_plus})\land{}(\text{tech_group=transmission})
+            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{node,tech,cost} \times (\textit{cost_energy_cap}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech} + \textit{cost_resource_cap}_\text{node,tech,cost} \times \textbf{resource_cap}_\text{node,tech} + \textit{cost_purchase}_\text{node,tech,cost} \times \textbf{units}_\text{node,tech}) \times (1 + \textit{cost_om_annual_investment_fraction}_\text{node,tech,cost})) + (\textit{cost_om_annual}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech}))&\quad
+            \text{if } (\neg (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area})))\land{}(\neg (\text{tech_group=transmission}))\land{}(\exists (\textit{cost_energy_cap}_\text{node,tech,cost}))\land{}(\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \text{tech_group=supply_plus})\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage})))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})
             \\
-            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{cost,node,tech} \times (\textit{cost_resource_cap}_\text{cost,node,tech} \times \textbf{resource_cap}_\text{node,tech} + \textit{cost_resource_area}_\text{cost,node,tech} \times \textbf{resource_area}_\text{node,tech} + \textit{cost_purchase}_\text{cost,node,tech} \times \textbf{units}_\text{node,tech}) \times (1 + \textit{cost_om_annual_investment_fraction}_\text{cost,node,tech})) + (\textit{cost_om_annual}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech}))&\quad
-            \text{if } (\neg (\exists (\textit{cost_energy_cap}_\text{cost,node,tech})))\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{cost,node,tech}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage})))\land{}(\exists (\textit{cost_resource_area}_\text{cost,node,tech}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area}))\land{}(\exists (\textit{cost_purchase}_\text{cost,node,tech}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})\land{}(\exists (\textit{cost_resource_cap}_\text{cost,node,tech}) \land \text{tech_group=supply_plus})\land{}(\neg (\text{tech_group=transmission}))
+            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{node,tech,cost} \times (\textit{cost_energy_cap}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech} + \textit{cost_resource_cap}_\text{node,tech,cost} \times \textbf{resource_cap}_\text{node,tech}) \times (1 + \textit{cost_om_annual_investment_fraction}_\text{node,tech,cost})) + (\textit{cost_om_annual}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech}))&\quad
+            \text{if } (\neg (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area})))\land{}(\neg (\text{tech_group=transmission}))\land{}(\exists (\textit{cost_energy_cap}_\text{node,tech,cost}))\land{}(\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \text{tech_group=supply_plus})\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage})))\land{}(\neg (\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land (\textit{cap_method}_\text{node,tech}\mathord{=}\text{binary} \lor \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})))
             \\
-            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{cost,node,tech} \times (\textit{cost_resource_area}_\text{cost,node,tech} \times \textbf{resource_area}_\text{node,tech} + \textit{cost_purchase}_\text{cost,node,tech} \times \textbf{units}_\text{node,tech}) \times (0.5 + \textit{cost_om_annual_investment_fraction}_\text{cost,node,tech})) + (\textit{cost_om_annual}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech}))&\quad
-            \text{if } (\neg (\exists (\textit{cost_energy_cap}_\text{cost,node,tech})))\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{cost,node,tech}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage})))\land{}(\exists (\textit{cost_resource_area}_\text{cost,node,tech}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area}))\land{}(\exists (\textit{cost_purchase}_\text{cost,node,tech}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{cost,node,tech}) \land \text{tech_group=supply_plus}))\land{}(\text{tech_group=transmission})
+            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{node,tech,cost} \times (\textit{cost_energy_cap}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech} + \textit{cost_storage_cap}_\text{node,tech,cost} \times \textbf{storage_cap}_\text{node,tech} + \textit{cost_purchase}_\text{node,tech,cost} \times \textbf{purchased}_\text{node,tech}) \times (1 + \textit{cost_om_annual_investment_fraction}_\text{node,tech,cost})) + (\textit{cost_om_annual}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech}))&\quad
+            \text{if } (\neg (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area})))\land{}(\neg (\text{tech_group=transmission}))\land{}(\exists (\textit{cost_energy_cap}_\text{node,tech,cost}))\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \text{tech_group=supply_plus}))\land{}(\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage}))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{binary})
             \\
-            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{cost,node,tech} \times (\textit{cost_resource_area}_\text{cost,node,tech} \times \textbf{resource_area}_\text{node,tech} + \textit{cost_purchase}_\text{cost,node,tech} \times \textbf{units}_\text{node,tech}) \times (1 + \textit{cost_om_annual_investment_fraction}_\text{cost,node,tech})) + (\textit{cost_om_annual}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech}))&\quad
-            \text{if } (\neg (\exists (\textit{cost_energy_cap}_\text{cost,node,tech})))\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{cost,node,tech}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage})))\land{}(\exists (\textit{cost_resource_area}_\text{cost,node,tech}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area}))\land{}(\exists (\textit{cost_purchase}_\text{cost,node,tech}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{cost,node,tech}) \land \text{tech_group=supply_plus}))\land{}(\neg (\text{tech_group=transmission}))
+            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{node,tech,cost} \times (\textit{cost_energy_cap}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech} + \textit{cost_storage_cap}_\text{node,tech,cost} \times \textbf{storage_cap}_\text{node,tech} + \textit{cost_purchase}_\text{node,tech,cost} \times \textbf{units}_\text{node,tech}) \times (1 + \textit{cost_om_annual_investment_fraction}_\text{node,tech,cost})) + (\textit{cost_om_annual}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech}))&\quad
+            \text{if } (\neg (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area})))\land{}(\neg (\text{tech_group=transmission}))\land{}(\exists (\textit{cost_energy_cap}_\text{node,tech,cost}))\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \text{tech_group=supply_plus}))\land{}(\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage}))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})
             \\
-            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{cost,node,tech} \times (\textit{cost_resource_cap}_\text{cost,node,tech} \times \textbf{resource_cap}_\text{node,tech} + \textit{cost_resource_area}_\text{cost,node,tech} \times \textbf{resource_area}_\text{node,tech}) \times (0.5 + \textit{cost_om_annual_investment_fraction}_\text{cost,node,tech})) + (\textit{cost_om_annual}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech}))&\quad
-            \text{if } (\neg (\exists (\textit{cost_energy_cap}_\text{cost,node,tech})))\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{cost,node,tech}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage})))\land{}(\exists (\textit{cost_resource_area}_\text{cost,node,tech}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area}))\land{}(\neg (\exists (\textit{cost_purchase}_\text{cost,node,tech}) \land (\textit{cap_method}_\text{node,tech}\mathord{=}\text{binary} \lor \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})))\land{}(\exists (\textit{cost_resource_cap}_\text{cost,node,tech}) \land \text{tech_group=supply_plus})\land{}(\text{tech_group=transmission})
+            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{node,tech,cost} \times (\textit{cost_energy_cap}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech} + \textit{cost_storage_cap}_\text{node,tech,cost} \times \textbf{storage_cap}_\text{node,tech}) \times (1 + \textit{cost_om_annual_investment_fraction}_\text{node,tech,cost})) + (\textit{cost_om_annual}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech}))&\quad
+            \text{if } (\neg (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area})))\land{}(\neg (\text{tech_group=transmission}))\land{}(\exists (\textit{cost_energy_cap}_\text{node,tech,cost}))\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \text{tech_group=supply_plus}))\land{}(\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage}))\land{}(\neg (\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land (\textit{cap_method}_\text{node,tech}\mathord{=}\text{binary} \lor \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})))
             \\
-            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{cost,node,tech} \times (\textit{cost_resource_cap}_\text{cost,node,tech} \times \textbf{resource_cap}_\text{node,tech} + \textit{cost_resource_area}_\text{cost,node,tech} \times \textbf{resource_area}_\text{node,tech}) \times (1 + \textit{cost_om_annual_investment_fraction}_\text{cost,node,tech})) + (\textit{cost_om_annual}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech}))&\quad
-            \text{if } (\neg (\exists (\textit{cost_energy_cap}_\text{cost,node,tech})))\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{cost,node,tech}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage})))\land{}(\exists (\textit{cost_resource_area}_\text{cost,node,tech}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area}))\land{}(\neg (\exists (\textit{cost_purchase}_\text{cost,node,tech}) \land (\textit{cap_method}_\text{node,tech}\mathord{=}\text{binary} \lor \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})))\land{}(\exists (\textit{cost_resource_cap}_\text{cost,node,tech}) \land \text{tech_group=supply_plus})\land{}(\neg (\text{tech_group=transmission}))
+            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{node,tech,cost} \times (\textit{cost_energy_cap}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech} + \textit{cost_purchase}_\text{node,tech,cost} \times \textbf{purchased}_\text{node,tech}) \times (1 + \textit{cost_om_annual_investment_fraction}_\text{node,tech,cost})) + (\textit{cost_om_annual}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech}))&\quad
+            \text{if } (\neg (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area})))\land{}(\neg (\text{tech_group=transmission}))\land{}(\exists (\textit{cost_energy_cap}_\text{node,tech,cost}))\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \text{tech_group=supply_plus}))\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage})))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{binary})
             \\
-            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{cost,node,tech} \times (\textit{cost_resource_area}_\text{cost,node,tech} \times \textbf{resource_area}_\text{node,tech}) \times (0.5 + \textit{cost_om_annual_investment_fraction}_\text{cost,node,tech})) + (\textit{cost_om_annual}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech}))&\quad
-            \text{if } (\neg (\exists (\textit{cost_energy_cap}_\text{cost,node,tech})))\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{cost,node,tech}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage})))\land{}(\exists (\textit{cost_resource_area}_\text{cost,node,tech}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area}))\land{}(\neg (\exists (\textit{cost_purchase}_\text{cost,node,tech}) \land (\textit{cap_method}_\text{node,tech}\mathord{=}\text{binary} \lor \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})))\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{cost,node,tech}) \land \text{tech_group=supply_plus}))\land{}(\text{tech_group=transmission})
+            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{node,tech,cost} \times (\textit{cost_energy_cap}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech} + \textit{cost_purchase}_\text{node,tech,cost} \times \textbf{units}_\text{node,tech}) \times (1 + \textit{cost_om_annual_investment_fraction}_\text{node,tech,cost})) + (\textit{cost_om_annual}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech}))&\quad
+            \text{if } (\neg (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area})))\land{}(\neg (\text{tech_group=transmission}))\land{}(\exists (\textit{cost_energy_cap}_\text{node,tech,cost}))\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \text{tech_group=supply_plus}))\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage})))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})
             \\
-            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{cost,node,tech} \times (\textit{cost_resource_area}_\text{cost,node,tech} \times \textbf{resource_area}_\text{node,tech}) \times (1 + \textit{cost_om_annual_investment_fraction}_\text{cost,node,tech})) + (\textit{cost_om_annual}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech}))&\quad
-            \text{if } (\neg (\exists (\textit{cost_energy_cap}_\text{cost,node,tech})))\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{cost,node,tech}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage})))\land{}(\exists (\textit{cost_resource_area}_\text{cost,node,tech}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area}))\land{}(\neg (\exists (\textit{cost_purchase}_\text{cost,node,tech}) \land (\textit{cap_method}_\text{node,tech}\mathord{=}\text{binary} \lor \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})))\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{cost,node,tech}) \land \text{tech_group=supply_plus}))\land{}(\neg (\text{tech_group=transmission}))
+            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{node,tech,cost} \times (\textit{cost_energy_cap}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech}) \times (1 + \textit{cost_om_annual_investment_fraction}_\text{node,tech,cost})) + (\textit{cost_om_annual}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech}))&\quad
+            \text{if } (\neg (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area})))\land{}(\neg (\text{tech_group=transmission}))\land{}(\exists (\textit{cost_energy_cap}_\text{node,tech,cost}))\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \text{tech_group=supply_plus}))\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage})))\land{}(\neg (\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land (\textit{cap_method}_\text{node,tech}\mathord{=}\text{binary} \lor \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})))
             \\
-            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{cost,node,tech} \times (\textit{cost_resource_cap}_\text{cost,node,tech} \times \textbf{resource_cap}_\text{node,tech} + \textit{cost_purchase}_\text{cost,node,tech} \times \textbf{purchased}_\text{node,tech}) \times (0.5 + \textit{cost_om_annual_investment_fraction}_\text{cost,node,tech})) + (\textit{cost_om_annual}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech}))&\quad
-            \text{if } (\neg (\exists (\textit{cost_energy_cap}_\text{cost,node,tech})))\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{cost,node,tech}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage})))\land{}(\neg (\exists (\textit{cost_resource_area}_\text{cost,node,tech}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area})))\land{}(\exists (\textit{cost_purchase}_\text{cost,node,tech}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{binary})\land{}(\exists (\textit{cost_resource_cap}_\text{cost,node,tech}) \land \text{tech_group=supply_plus})\land{}(\text{tech_group=transmission})
+            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{node,tech,cost} \times (\textit{cost_storage_cap}_\text{node,tech,cost} \times \textbf{storage_cap}_\text{node,tech} + \textit{cost_resource_cap}_\text{node,tech,cost} \times \textbf{resource_cap}_\text{node,tech} + \textit{cost_purchase}_\text{node,tech,cost} \times \textbf{purchased}_\text{node,tech}) \times (1 + \textit{cost_om_annual_investment_fraction}_\text{node,tech,cost})) + (\textit{cost_om_annual}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech}))&\quad
+            \text{if } (\neg (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area})))\land{}(\neg (\text{tech_group=transmission}))\land{}(\neg (\exists (\textit{cost_energy_cap}_\text{node,tech,cost})))\land{}(\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \text{tech_group=supply_plus})\land{}(\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage}))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{binary})
             \\
-            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{cost,node,tech} \times (\textit{cost_resource_cap}_\text{cost,node,tech} \times \textbf{resource_cap}_\text{node,tech} + \textit{cost_purchase}_\text{cost,node,tech} \times \textbf{purchased}_\text{node,tech}) \times (1 + \textit{cost_om_annual_investment_fraction}_\text{cost,node,tech})) + (\textit{cost_om_annual}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech}))&\quad
-            \text{if } (\neg (\exists (\textit{cost_energy_cap}_\text{cost,node,tech})))\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{cost,node,tech}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage})))\land{}(\neg (\exists (\textit{cost_resource_area}_\text{cost,node,tech}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area})))\land{}(\exists (\textit{cost_purchase}_\text{cost,node,tech}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{binary})\land{}(\exists (\textit{cost_resource_cap}_\text{cost,node,tech}) \land \text{tech_group=supply_plus})\land{}(\neg (\text{tech_group=transmission}))
+            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{node,tech,cost} \times (\textit{cost_storage_cap}_\text{node,tech,cost} \times \textbf{storage_cap}_\text{node,tech} + \textit{cost_resource_cap}_\text{node,tech,cost} \times \textbf{resource_cap}_\text{node,tech} + \textit{cost_purchase}_\text{node,tech,cost} \times \textbf{units}_\text{node,tech}) \times (1 + \textit{cost_om_annual_investment_fraction}_\text{node,tech,cost})) + (\textit{cost_om_annual}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech}))&\quad
+            \text{if } (\neg (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area})))\land{}(\neg (\text{tech_group=transmission}))\land{}(\neg (\exists (\textit{cost_energy_cap}_\text{node,tech,cost})))\land{}(\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \text{tech_group=supply_plus})\land{}(\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage}))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})
             \\
-            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{cost,node,tech} \times (\textit{cost_purchase}_\text{cost,node,tech} \times \textbf{purchased}_\text{node,tech}) \times (0.5 + \textit{cost_om_annual_investment_fraction}_\text{cost,node,tech})) + (\textit{cost_om_annual}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech}))&\quad
-            \text{if } (\neg (\exists (\textit{cost_energy_cap}_\text{cost,node,tech})))\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{cost,node,tech}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage})))\land{}(\neg (\exists (\textit{cost_resource_area}_\text{cost,node,tech}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area})))\land{}(\exists (\textit{cost_purchase}_\text{cost,node,tech}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{binary})\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{cost,node,tech}) \land \text{tech_group=supply_plus}))\land{}(\text{tech_group=transmission})
+            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{node,tech,cost} \times (\textit{cost_storage_cap}_\text{node,tech,cost} \times \textbf{storage_cap}_\text{node,tech} + \textit{cost_resource_cap}_\text{node,tech,cost} \times \textbf{resource_cap}_\text{node,tech}) \times (1 + \textit{cost_om_annual_investment_fraction}_\text{node,tech,cost})) + (\textit{cost_om_annual}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech}))&\quad
+            \text{if } (\neg (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area})))\land{}(\neg (\text{tech_group=transmission}))\land{}(\neg (\exists (\textit{cost_energy_cap}_\text{node,tech,cost})))\land{}(\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \text{tech_group=supply_plus})\land{}(\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage}))\land{}(\neg (\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land (\textit{cap_method}_\text{node,tech}\mathord{=}\text{binary} \lor \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})))
             \\
-            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{cost,node,tech} \times (\textit{cost_purchase}_\text{cost,node,tech} \times \textbf{purchased}_\text{node,tech}) \times (1 + \textit{cost_om_annual_investment_fraction}_\text{cost,node,tech})) + (\textit{cost_om_annual}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech}))&\quad
-            \text{if } (\neg (\exists (\textit{cost_energy_cap}_\text{cost,node,tech})))\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{cost,node,tech}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage})))\land{}(\neg (\exists (\textit{cost_resource_area}_\text{cost,node,tech}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area})))\land{}(\exists (\textit{cost_purchase}_\text{cost,node,tech}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{binary})\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{cost,node,tech}) \land \text{tech_group=supply_plus}))\land{}(\neg (\text{tech_group=transmission}))
+            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{node,tech,cost} \times (\textit{cost_resource_cap}_\text{node,tech,cost} \times \textbf{resource_cap}_\text{node,tech} + \textit{cost_purchase}_\text{node,tech,cost} \times \textbf{purchased}_\text{node,tech}) \times (1 + \textit{cost_om_annual_investment_fraction}_\text{node,tech,cost})) + (\textit{cost_om_annual}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech}))&\quad
+            \text{if } (\neg (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area})))\land{}(\neg (\text{tech_group=transmission}))\land{}(\neg (\exists (\textit{cost_energy_cap}_\text{node,tech,cost})))\land{}(\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \text{tech_group=supply_plus})\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage})))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{binary})
             \\
-            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{cost,node,tech} \times (\textit{cost_resource_cap}_\text{cost,node,tech} \times \textbf{resource_cap}_\text{node,tech} + \textit{cost_purchase}_\text{cost,node,tech} \times \textbf{units}_\text{node,tech}) \times (0.5 + \textit{cost_om_annual_investment_fraction}_\text{cost,node,tech})) + (\textit{cost_om_annual}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech}))&\quad
-            \text{if } (\neg (\exists (\textit{cost_energy_cap}_\text{cost,node,tech})))\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{cost,node,tech}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage})))\land{}(\neg (\exists (\textit{cost_resource_area}_\text{cost,node,tech}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area})))\land{}(\exists (\textit{cost_purchase}_\text{cost,node,tech}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})\land{}(\exists (\textit{cost_resource_cap}_\text{cost,node,tech}) \land \text{tech_group=supply_plus})\land{}(\text{tech_group=transmission})
+            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{node,tech,cost} \times (\textit{cost_resource_cap}_\text{node,tech,cost} \times \textbf{resource_cap}_\text{node,tech} + \textit{cost_purchase}_\text{node,tech,cost} \times \textbf{units}_\text{node,tech}) \times (1 + \textit{cost_om_annual_investment_fraction}_\text{node,tech,cost})) + (\textit{cost_om_annual}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech}))&\quad
+            \text{if } (\neg (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area})))\land{}(\neg (\text{tech_group=transmission}))\land{}(\neg (\exists (\textit{cost_energy_cap}_\text{node,tech,cost})))\land{}(\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \text{tech_group=supply_plus})\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage})))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})
             \\
-            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{cost,node,tech} \times (\textit{cost_resource_cap}_\text{cost,node,tech} \times \textbf{resource_cap}_\text{node,tech} + \textit{cost_purchase}_\text{cost,node,tech} \times \textbf{units}_\text{node,tech}) \times (1 + \textit{cost_om_annual_investment_fraction}_\text{cost,node,tech})) + (\textit{cost_om_annual}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech}))&\quad
-            \text{if } (\neg (\exists (\textit{cost_energy_cap}_\text{cost,node,tech})))\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{cost,node,tech}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage})))\land{}(\neg (\exists (\textit{cost_resource_area}_\text{cost,node,tech}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area})))\land{}(\exists (\textit{cost_purchase}_\text{cost,node,tech}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})\land{}(\exists (\textit{cost_resource_cap}_\text{cost,node,tech}) \land \text{tech_group=supply_plus})\land{}(\neg (\text{tech_group=transmission}))
+            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{node,tech,cost} \times (\textit{cost_resource_cap}_\text{node,tech,cost} \times \textbf{resource_cap}_\text{node,tech}) \times (1 + \textit{cost_om_annual_investment_fraction}_\text{node,tech,cost})) + (\textit{cost_om_annual}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech}))&\quad
+            \text{if } (\neg (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area})))\land{}(\neg (\text{tech_group=transmission}))\land{}(\neg (\exists (\textit{cost_energy_cap}_\text{node,tech,cost})))\land{}(\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \text{tech_group=supply_plus})\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage})))\land{}(\neg (\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land (\textit{cap_method}_\text{node,tech}\mathord{=}\text{binary} \lor \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})))
             \\
-            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{cost,node,tech} \times (\textit{cost_purchase}_\text{cost,node,tech} \times \textbf{units}_\text{node,tech}) \times (0.5 + \textit{cost_om_annual_investment_fraction}_\text{cost,node,tech})) + (\textit{cost_om_annual}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech}))&\quad
-            \text{if } (\neg (\exists (\textit{cost_energy_cap}_\text{cost,node,tech})))\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{cost,node,tech}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage})))\land{}(\neg (\exists (\textit{cost_resource_area}_\text{cost,node,tech}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area})))\land{}(\exists (\textit{cost_purchase}_\text{cost,node,tech}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{cost,node,tech}) \land \text{tech_group=supply_plus}))\land{}(\text{tech_group=transmission})
+            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{node,tech,cost} \times (\textit{cost_storage_cap}_\text{node,tech,cost} \times \textbf{storage_cap}_\text{node,tech} + \textit{cost_purchase}_\text{node,tech,cost} \times \textbf{purchased}_\text{node,tech}) \times (1 + \textit{cost_om_annual_investment_fraction}_\text{node,tech,cost})) + (\textit{cost_om_annual}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech}))&\quad
+            \text{if } (\neg (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area})))\land{}(\neg (\text{tech_group=transmission}))\land{}(\neg (\exists (\textit{cost_energy_cap}_\text{node,tech,cost})))\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \text{tech_group=supply_plus}))\land{}(\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage}))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{binary})
             \\
-            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{cost,node,tech} \times (\textit{cost_purchase}_\text{cost,node,tech} \times \textbf{units}_\text{node,tech}) \times (1 + \textit{cost_om_annual_investment_fraction}_\text{cost,node,tech})) + (\textit{cost_om_annual}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech}))&\quad
-            \text{if } (\neg (\exists (\textit{cost_energy_cap}_\text{cost,node,tech})))\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{cost,node,tech}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage})))\land{}(\neg (\exists (\textit{cost_resource_area}_\text{cost,node,tech}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area})))\land{}(\exists (\textit{cost_purchase}_\text{cost,node,tech}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{cost,node,tech}) \land \text{tech_group=supply_plus}))\land{}(\neg (\text{tech_group=transmission}))
+            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{node,tech,cost} \times (\textit{cost_storage_cap}_\text{node,tech,cost} \times \textbf{storage_cap}_\text{node,tech} + \textit{cost_purchase}_\text{node,tech,cost} \times \textbf{units}_\text{node,tech}) \times (1 + \textit{cost_om_annual_investment_fraction}_\text{node,tech,cost})) + (\textit{cost_om_annual}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech}))&\quad
+            \text{if } (\neg (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area})))\land{}(\neg (\text{tech_group=transmission}))\land{}(\neg (\exists (\textit{cost_energy_cap}_\text{node,tech,cost})))\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \text{tech_group=supply_plus}))\land{}(\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage}))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})
             \\
-            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{cost,node,tech} \times (\textit{cost_resource_cap}_\text{cost,node,tech} \times \textbf{resource_cap}_\text{node,tech}) \times (0.5 + \textit{cost_om_annual_investment_fraction}_\text{cost,node,tech})) + (\textit{cost_om_annual}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech}))&\quad
-            \text{if } (\neg (\exists (\textit{cost_energy_cap}_\text{cost,node,tech})))\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{cost,node,tech}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage})))\land{}(\neg (\exists (\textit{cost_resource_area}_\text{cost,node,tech}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area})))\land{}(\neg (\exists (\textit{cost_purchase}_\text{cost,node,tech}) \land (\textit{cap_method}_\text{node,tech}\mathord{=}\text{binary} \lor \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})))\land{}(\exists (\textit{cost_resource_cap}_\text{cost,node,tech}) \land \text{tech_group=supply_plus})\land{}(\text{tech_group=transmission})
+            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{node,tech,cost} \times (\textit{cost_storage_cap}_\text{node,tech,cost} \times \textbf{storage_cap}_\text{node,tech}) \times (1 + \textit{cost_om_annual_investment_fraction}_\text{node,tech,cost})) + (\textit{cost_om_annual}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech}))&\quad
+            \text{if } (\neg (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area})))\land{}(\neg (\text{tech_group=transmission}))\land{}(\neg (\exists (\textit{cost_energy_cap}_\text{node,tech,cost})))\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \text{tech_group=supply_plus}))\land{}(\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage}))\land{}(\neg (\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land (\textit{cap_method}_\text{node,tech}\mathord{=}\text{binary} \lor \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})))
             \\
-            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{cost,node,tech} \times (\textit{cost_resource_cap}_\text{cost,node,tech} \times \textbf{resource_cap}_\text{node,tech}) \times (1 + \textit{cost_om_annual_investment_fraction}_\text{cost,node,tech})) + (\textit{cost_om_annual}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech}))&\quad
-            \text{if } (\neg (\exists (\textit{cost_energy_cap}_\text{cost,node,tech})))\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{cost,node,tech}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage})))\land{}(\neg (\exists (\textit{cost_resource_area}_\text{cost,node,tech}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area})))\land{}(\neg (\exists (\textit{cost_purchase}_\text{cost,node,tech}) \land (\textit{cap_method}_\text{node,tech}\mathord{=}\text{binary} \lor \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})))\land{}(\exists (\textit{cost_resource_cap}_\text{cost,node,tech}) \land \text{tech_group=supply_plus})\land{}(\neg (\text{tech_group=transmission}))
+            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{node,tech,cost} \times (\textit{cost_purchase}_\text{node,tech,cost} \times \textbf{purchased}_\text{node,tech}) \times (1 + \textit{cost_om_annual_investment_fraction}_\text{node,tech,cost})) + (\textit{cost_om_annual}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech}))&\quad
+            \text{if } (\neg (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area})))\land{}(\neg (\text{tech_group=transmission}))\land{}(\neg (\exists (\textit{cost_energy_cap}_\text{node,tech,cost})))\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \text{tech_group=supply_plus}))\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage})))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{binary})
             \\
-            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{cost,node,tech} \times (0) \times (0.5 + \textit{cost_om_annual_investment_fraction}_\text{cost,node,tech})) + (\textit{cost_om_annual}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech}))&\quad
-            \text{if } (\neg (\exists (\textit{cost_energy_cap}_\text{cost,node,tech})))\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{cost,node,tech}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage})))\land{}(\neg (\exists (\textit{cost_resource_area}_\text{cost,node,tech}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area})))\land{}(\neg (\exists (\textit{cost_purchase}_\text{cost,node,tech}) \land (\textit{cap_method}_\text{node,tech}\mathord{=}\text{binary} \lor \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})))\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{cost,node,tech}) \land \text{tech_group=supply_plus}))\land{}(\text{tech_group=transmission})
+            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{node,tech,cost} \times (\textit{cost_purchase}_\text{node,tech,cost} \times \textbf{units}_\text{node,tech}) \times (1 + \textit{cost_om_annual_investment_fraction}_\text{node,tech,cost})) + (\textit{cost_om_annual}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech}))&\quad
+            \text{if } (\neg (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area})))\land{}(\neg (\text{tech_group=transmission}))\land{}(\neg (\exists (\textit{cost_energy_cap}_\text{node,tech,cost})))\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \text{tech_group=supply_plus}))\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage})))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})
             \\
-            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{cost,node,tech} \times (0) \times (1 + \textit{cost_om_annual_investment_fraction}_\text{cost,node,tech})) + (\textit{cost_om_annual}_\text{cost,node,tech} \times \textbf{energy_cap}_\text{node,tech}))&\quad
-            \text{if } (\neg (\exists (\textit{cost_energy_cap}_\text{cost,node,tech})))\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{cost,node,tech}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage})))\land{}(\neg (\exists (\textit{cost_resource_area}_\text{cost,node,tech}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area})))\land{}(\neg (\exists (\textit{cost_purchase}_\text{cost,node,tech}) \land (\textit{cap_method}_\text{node,tech}\mathord{=}\text{binary} \lor \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})))\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{cost,node,tech}) \land \text{tech_group=supply_plus}))\land{}(\neg (\text{tech_group=transmission}))
+            \textit{annualisation_weight} \times ((\textit{cost_depreciation_rate}_\text{node,tech,cost} \times (0) \times (1 + \textit{cost_om_annual_investment_fraction}_\text{node,tech,cost})) + (\textit{cost_om_annual}_\text{node,tech,cost} \times \textbf{energy_cap}_\text{node,tech}))&\quad
+            \text{if } (\neg (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land (\exists (\textit{resource_area_min}_\text{node,tech}) \lor \exists (\textit{resource_area_max}_\text{node,tech}) \lor \exists (\textit{resource_area_equals}_\text{node,tech}) \lor \exists (\textit{resource_area_per_energy_cap}_\text{node,tech}) \lor \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area})))\land{}(\neg (\text{tech_group=transmission}))\land{}(\neg (\exists (\textit{cost_energy_cap}_\text{node,tech,cost})))\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \text{tech_group=supply_plus}))\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land (\text{tech_group=supply_plus} \lor \text{tech_group=storage})))\land{}(\neg (\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land (\textit{cap_method}_\text{node,tech}\mathord{=}\text{binary} \lor \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer})))
             \\
         \end{cases}
 
@@ -1669,20 +1669,20 @@ The total annualised costs of a technology, including installation and operation
             \text{ tech }\negthickspace \in \negthickspace\text{ techs, }
             \text{ cost }\negthickspace \in \negthickspace\text{ costs }
             \\
-            \text{if } (\exists (\textit{cost_energy_cap}_\text{cost,node,tech}) \lor \exists (\textit{cost_om_annual}_\text{cost,node,tech}) \lor \exists (\textit{cost_om_annual_investment_fraction}_\text{cost,node,tech}) \lor \exists (\textit{cost_purchase}_\text{cost,node,tech}) \lor \exists (\textit{cost_resource_area}_\text{cost,node,tech}) \lor \exists (\textit{cost_resource_cap}_\text{cost,node,tech}) \lor \exists (\textit{cost_storage_cap}_\text{cost,node,tech}) \lor \exists (\textit{cost_export}_\text{cost,node,tech,timestep}) \lor \exists (\textit{cost_om_con}_\text{cost,node,tech,timestep}) \lor \exists (\textit{cost_om_prod}_\text{cost,node,tech,timestep}))
+            \text{if } (\exists (\textit{cost_energy_cap}_\text{node,tech,cost}) \lor \exists (\textit{cost_om_annual}_\text{node,tech,cost}) \lor \exists (\textit{cost_om_annual_investment_fraction}_\text{node,tech,cost}) \lor \exists (\textit{cost_purchase}_\text{node,tech,cost}) \lor \exists (\textit{cost_resource_area}_\text{node,tech,cost}) \lor \exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \lor \exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \lor \exists (\textit{cost_export}_\text{node,tech,cost,timestep}) \lor \exists (\textit{cost_om_con}_\text{node,tech,cost,timestep}) \lor \exists (\textit{cost_om_prod}_\text{node,tech,cost,timestep}))
         \end{array}
         \begin{cases}
             \textbf{cost_investment}_\text{node,tech,cost} + \sum\limits_{\text{timestep} \in \text{timesteps}} (\textbf{cost_var}_\text{node,tech,cost,timestep})&\quad
-            \text{if } (\exists (\textit{cost_export}_\text{cost,node,tech,timestep}) \lor \exists (\textit{cost_om_con}_\text{cost,node,tech,timestep}) \lor \exists (\textit{cost_om_prod}_\text{cost,node,tech,timestep}))\land{}(\exists (\textit{cost_energy_cap}_\text{cost,node,tech}) \lor \exists (\textit{cost_om_annual}_\text{cost,node,tech}) \lor \exists (\textit{cost_om_annual_investment_fraction}_\text{cost,node,tech}) \lor \exists (\textit{cost_purchase}_\text{cost,node,tech}) \lor \exists (\textit{cost_resource_area}_\text{cost,node,tech}) \lor \exists (\textit{cost_resource_cap}_\text{cost,node,tech}) \lor \exists (\textit{cost_storage_cap}_\text{cost,node,tech}))
-            \\
-            \sum\limits_{\text{timestep} \in \text{timesteps}} (\textbf{cost_var}_\text{node,tech,cost,timestep})&\quad
-            \text{if } (\exists (\textit{cost_export}_\text{cost,node,tech,timestep}) \lor \exists (\textit{cost_om_con}_\text{cost,node,tech,timestep}) \lor \exists (\textit{cost_om_prod}_\text{cost,node,tech,timestep}))\land{}(\neg (\exists (\textit{cost_energy_cap}_\text{cost,node,tech}) \lor \exists (\textit{cost_om_annual}_\text{cost,node,tech}) \lor \exists (\textit{cost_om_annual_investment_fraction}_\text{cost,node,tech}) \lor \exists (\textit{cost_purchase}_\text{cost,node,tech}) \lor \exists (\textit{cost_resource_area}_\text{cost,node,tech}) \lor \exists (\textit{cost_resource_cap}_\text{cost,node,tech}) \lor \exists (\textit{cost_storage_cap}_\text{cost,node,tech})))
+            \text{if } (\exists (\textit{cost_energy_cap}_\text{node,tech,cost}) \lor \exists (\textit{cost_om_annual}_\text{node,tech,cost}) \lor \exists (\textit{cost_om_annual_investment_fraction}_\text{node,tech,cost}) \lor \exists (\textit{cost_purchase}_\text{node,tech,cost}) \lor \exists (\textit{cost_resource_area}_\text{node,tech,cost}) \lor \exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \lor \exists (\textit{cost_storage_cap}_\text{node,tech,cost}))\land{}(\exists (\textit{cost_export}_\text{node,tech,cost,timestep}) \lor \exists (\textit{cost_om_con}_\text{node,tech,cost,timestep}) \lor \exists (\textit{cost_om_prod}_\text{node,tech,cost,timestep}))
             \\
             \textbf{cost_investment}_\text{node,tech,cost}&\quad
-            \text{if } (\neg (\exists (\textit{cost_export}_\text{cost,node,tech,timestep}) \lor \exists (\textit{cost_om_con}_\text{cost,node,tech,timestep}) \lor \exists (\textit{cost_om_prod}_\text{cost,node,tech,timestep})))\land{}(\exists (\textit{cost_energy_cap}_\text{cost,node,tech}) \lor \exists (\textit{cost_om_annual}_\text{cost,node,tech}) \lor \exists (\textit{cost_om_annual_investment_fraction}_\text{cost,node,tech}) \lor \exists (\textit{cost_purchase}_\text{cost,node,tech}) \lor \exists (\textit{cost_resource_area}_\text{cost,node,tech}) \lor \exists (\textit{cost_resource_cap}_\text{cost,node,tech}) \lor \exists (\textit{cost_storage_cap}_\text{cost,node,tech}))
+            \text{if } (\exists (\textit{cost_energy_cap}_\text{node,tech,cost}) \lor \exists (\textit{cost_om_annual}_\text{node,tech,cost}) \lor \exists (\textit{cost_om_annual_investment_fraction}_\text{node,tech,cost}) \lor \exists (\textit{cost_purchase}_\text{node,tech,cost}) \lor \exists (\textit{cost_resource_area}_\text{node,tech,cost}) \lor \exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \lor \exists (\textit{cost_storage_cap}_\text{node,tech,cost}))\land{}(\neg (\exists (\textit{cost_export}_\text{node,tech,cost,timestep}) \lor \exists (\textit{cost_om_con}_\text{node,tech,cost,timestep}) \lor \exists (\textit{cost_om_prod}_\text{node,tech,cost,timestep})))
+            \\
+            \sum\limits_{\text{timestep} \in \text{timesteps}} (\textbf{cost_var}_\text{node,tech,cost,timestep})&\quad
+            \text{if } (\neg (\exists (\textit{cost_energy_cap}_\text{node,tech,cost}) \lor \exists (\textit{cost_om_annual}_\text{node,tech,cost}) \lor \exists (\textit{cost_om_annual_investment_fraction}_\text{node,tech,cost}) \lor \exists (\textit{cost_purchase}_\text{node,tech,cost}) \lor \exists (\textit{cost_resource_area}_\text{node,tech,cost}) \lor \exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \lor \exists (\textit{cost_storage_cap}_\text{node,tech,cost})))\land{}(\exists (\textit{cost_export}_\text{node,tech,cost,timestep}) \lor \exists (\textit{cost_om_con}_\text{node,tech,cost,timestep}) \lor \exists (\textit{cost_om_prod}_\text{node,tech,cost,timestep}))
             \\
             0&\quad
-            \text{if } (\neg (\exists (\textit{cost_export}_\text{cost,node,tech,timestep}) \lor \exists (\textit{cost_om_con}_\text{cost,node,tech,timestep}) \lor \exists (\textit{cost_om_prod}_\text{cost,node,tech,timestep})))\land{}(\neg (\exists (\textit{cost_energy_cap}_\text{cost,node,tech}) \lor \exists (\textit{cost_om_annual}_\text{cost,node,tech}) \lor \exists (\textit{cost_om_annual_investment_fraction}_\text{cost,node,tech}) \lor \exists (\textit{cost_purchase}_\text{cost,node,tech}) \lor \exists (\textit{cost_resource_area}_\text{cost,node,tech}) \lor \exists (\textit{cost_resource_cap}_\text{cost,node,tech}) \lor \exists (\textit{cost_storage_cap}_\text{cost,node,tech})))
+            \text{if } (\neg (\exists (\textit{cost_energy_cap}_\text{node,tech,cost}) \lor \exists (\textit{cost_om_annual}_\text{node,tech,cost}) \lor \exists (\textit{cost_om_annual_investment_fraction}_\text{node,tech,cost}) \lor \exists (\textit{cost_purchase}_\text{node,tech,cost}) \lor \exists (\textit{cost_resource_area}_\text{node,tech,cost}) \lor \exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \lor \exists (\textit{cost_storage_cap}_\text{node,tech,cost})))\land{}(\neg (\exists (\textit{cost_export}_\text{node,tech,cost,timestep}) \lor \exists (\textit{cost_om_con}_\text{node,tech,cost,timestep}) \lor \exists (\textit{cost_om_prod}_\text{node,tech,cost,timestep})))
             \\
         \end{cases}
 
@@ -1726,7 +1726,7 @@ The energy produced by a technology per timestep, also known as the energy disch
             \text{ carrier }\negthickspace \in \negthickspace\text{ carriers, }
             \text{ timestep }\negthickspace \in \negthickspace\text{ timesteps }
             \\
-            \text{if } (\exists (\textit{carrier}_\text{carrier_tier,carrier,tech}) \land \textit{allowed_carrier_prod}_\text{node,tech}\mathord{=}\text{true} \land \text{carrier_tier} \in \text{[out,out_2,out_3]})
+            \text{if } (\exists (\textit{carrier}_\text{tech,carrier_tier,carrier}) \land \textit{allowed_carrier_prod}_\text{node,tech}\mathord{=}\text{true} \land \text{carrier_tier} \in \text{[out,out_2,out_3]})
         \end{array}
         \begin{cases}
             0 \leq \textbf{carrier_prod}_\text{node,tech,carrier,timestep}&\quad
@@ -1750,7 +1750,7 @@ The energy consumed by a technology per timestep, also known as the energy consu
             \text{ carrier }\negthickspace \in \negthickspace\text{ carriers, }
             \text{ timestep }\negthickspace \in \negthickspace\text{ timesteps }
             \\
-            \text{if } (\exists (\textit{carrier}_\text{carrier_tier,carrier,tech}) \land \textit{allowed_carrier_con}_\text{node,tech}\mathord{=}\text{true} \land \text{carrier_tier} \in \text{[in,in_2,in_3]})
+            \text{if } (\exists (\textit{carrier}_\text{tech,carrier_tier,carrier}) \land \textit{allowed_carrier_con}_\text{node,tech}\mathord{=}\text{true} \land \text{carrier_tier} \in \text{[in,in_2,in_3]})
         \end{array}
         \begin{cases}
             -inf \leq \textbf{carrier_con}_\text{node,tech,carrier,timestep}&\quad
@@ -1774,7 +1774,7 @@ The energy exported outside the system boundaries by a technology per timestep.
             \text{ carrier }\negthickspace \in \negthickspace\text{ carriers, }
             \text{ timestep }\negthickspace \in \negthickspace\text{ timesteps }
             \\
-            \text{if } (\exists (\textit{export_carrier}_\text{carrier,node,tech}) \land \textit{export}_\text{node,tech}\mathord{=}\text{true})
+            \text{if } (\exists (\textit{export_carrier}_\text{node,tech,carrier}) \land \textit{export}_\text{node,tech}\mathord{=}\text{true})
         \end{array}
         \begin{cases}
             0 \leq \textbf{carrier_export}_\text{node,tech,carrier,timestep}&\quad
diff --git a/doc/_static/math_storage_inter_cluster.rst b/doc/_static/math_storage_inter_cluster.rst
index bde41a078..d82647576 100644
--- a/doc/_static/math_storage_inter_cluster.rst
+++ b/doc/_static/math_storage_inter_cluster.rst
@@ -29,22 +29,22 @@ Set the upper bound on, or a fixed total of, a `supply_plus` (with storage) tech
         \end{array}
         \begin{cases}
             \textbf{storage}_\text{node,tech,timestep} = \textit{storage_initial}_\text{node,tech} \times \textbf{storage_cap}_\text{node,tech} + (\textbf{resource_con}_\text{node,tech,timestep} \times \textit{resource_eff}_\text{node,tech,timestep})&\quad
-            \text{if } (\textit{timesteps}_\text{timestep}\mathord{=}\text{timesteps[0]} \land \neg (\text{run_config.cyclic_storage}\mathord{=}\text{true}))\land{}(\textit{energy_eff}_\text{node,tech,timestep}\mathord{=}\text{0} \lor \textit{parasitic_eff}_\text{node,tech,timestep}\mathord{=}\text{0})
-            \\
-            \textbf{storage}_\text{node,tech,timestep} = \textit{storage_initial}_\text{node,tech} \times \textbf{storage_cap}_\text{node,tech} + (\textbf{resource_con}_\text{node,tech,timestep} \times \textit{resource_eff}_\text{node,tech,timestep}) - \frac{ \textbf{carrier_prod}_\text{node,tech,carrier,timestep} }{ (\textit{energy_eff}_\text{node,tech,timestep} \times \textit{parasitic_eff}_\text{node,tech,timestep}) }&\quad
-            \text{if } (\textit{timesteps}_\text{timestep}\mathord{=}\text{timesteps[0]} \land \neg (\text{run_config.cyclic_storage}\mathord{=}\text{true}))\land{}(\neg (\textit{energy_eff}_\text{node,tech,timestep}\mathord{=}\text{0} \lor \textit{parasitic_eff}_\text{node,tech,timestep}\mathord{=}\text{0}))
+            \text{if } (\textit{energy_eff}_\text{node,tech,timestep}\mathord{=}\text{0} \lor \textit{parasitic_eff}_\text{node,tech,timestep}\mathord{=}\text{0})\land{}(\textit{timesteps}_\text{timestep}\mathord{=}\text{timesteps[0]} \land \neg (\text{run_config.cyclic_storage}\mathord{=}\text{true}))
             \\
             \textbf{storage}_\text{node,tech,timestep} = ((1 - \textit{storage_loss}_\text{node,tech,timestep})^{\textit{timestep_resolution}_\text{timestep-1}}) \times \textbf{storage}_\text{node,tech,timestep-1} + (\textbf{resource_con}_\text{node,tech,timestep} \times \textit{resource_eff}_\text{node,tech,timestep})&\quad
-            \text{if } (((\textit{timesteps}_\text{timestep}\mathord{=}\text{timesteps[0]} \land \text{run_config.cyclic_storage}\mathord{=}\text{true}) \lor \neg (\textit{timesteps}_\text{timestep}\mathord{=}\text{timesteps[0]})) \land \neg (\exists (\textit{lookup_cluster_last_timestep}_\text{timestep})))\land{}(\textit{energy_eff}_\text{node,tech,timestep}\mathord{=}\text{0} \lor \textit{parasitic_eff}_\text{node,tech,timestep}\mathord{=}\text{0})
-            \\
-            \textbf{storage}_\text{node,tech,timestep} = ((1 - \textit{storage_loss}_\text{node,tech,timestep})^{\textit{timestep_resolution}_\text{timestep-1}}) \times \textbf{storage}_\text{node,tech,timestep-1} + (\textbf{resource_con}_\text{node,tech,timestep} \times \textit{resource_eff}_\text{node,tech,timestep}) - \frac{ \textbf{carrier_prod}_\text{node,tech,carrier,timestep} }{ (\textit{energy_eff}_\text{node,tech,timestep} \times \textit{parasitic_eff}_\text{node,tech,timestep}) }&\quad
-            \text{if } (((\textit{timesteps}_\text{timestep}\mathord{=}\text{timesteps[0]} \land \text{run_config.cyclic_storage}\mathord{=}\text{true}) \lor \neg (\textit{timesteps}_\text{timestep}\mathord{=}\text{timesteps[0]})) \land \neg (\exists (\textit{lookup_cluster_last_timestep}_\text{timestep})))\land{}(\neg (\textit{energy_eff}_\text{node,tech,timestep}\mathord{=}\text{0} \lor \textit{parasitic_eff}_\text{node,tech,timestep}\mathord{=}\text{0}))
+            \text{if } (\textit{energy_eff}_\text{node,tech,timestep}\mathord{=}\text{0} \lor \textit{parasitic_eff}_\text{node,tech,timestep}\mathord{=}\text{0})\land{}(((\textit{timesteps}_\text{timestep}\mathord{=}\text{timesteps[0]} \land \text{run_config.cyclic_storage}\mathord{=}\text{true}) \lor \neg (\textit{timesteps}_\text{timestep}\mathord{=}\text{timesteps[0]})) \land \neg (\exists (\textit{lookup_cluster_last_timestep}_\text{timestep})))
             \\
             \textbf{storage}_\text{node,tech,timestep} = (\textbf{resource_con}_\text{node,tech,timestep} \times \textit{resource_eff}_\text{node,tech,timestep})&\quad
-            \text{if } (\exists (\textit{lookup_cluster_last_timestep}_\text{timestep}) \land \neg (\textit{timesteps}_\text{timestep}\mathord{=}\text{timesteps[0]} \land \neg (\text{run_config.cyclic_storage}\mathord{=}\text{true})))\land{}(\textit{energy_eff}_\text{node,tech,timestep}\mathord{=}\text{0} \lor \textit{parasitic_eff}_\text{node,tech,timestep}\mathord{=}\text{0})
+            \text{if } (\textit{energy_eff}_\text{node,tech,timestep}\mathord{=}\text{0} \lor \textit{parasitic_eff}_\text{node,tech,timestep}\mathord{=}\text{0})\land{}(\exists (\textit{lookup_cluster_last_timestep}_\text{timestep}) \land \neg (\textit{timesteps}_\text{timestep}\mathord{=}\text{timesteps[0]} \land \neg (\text{run_config.cyclic_storage}\mathord{=}\text{true})))
+            \\
+            \textbf{storage}_\text{node,tech,timestep} = \textit{storage_initial}_\text{node,tech} \times \textbf{storage_cap}_\text{node,tech} + (\textbf{resource_con}_\text{node,tech,timestep} \times \textit{resource_eff}_\text{node,tech,timestep}) - \frac{ \textbf{carrier_prod}_\text{node,tech,carrier,timestep} }{ (\textit{energy_eff}_\text{node,tech,timestep} \times \textit{parasitic_eff}_\text{node,tech,timestep}) }&\quad
+            \text{if } (\neg (\textit{energy_eff}_\text{node,tech,timestep}\mathord{=}\text{0} \lor \textit{parasitic_eff}_\text{node,tech,timestep}\mathord{=}\text{0}))\land{}(\textit{timesteps}_\text{timestep}\mathord{=}\text{timesteps[0]} \land \neg (\text{run_config.cyclic_storage}\mathord{=}\text{true}))
+            \\
+            \textbf{storage}_\text{node,tech,timestep} = ((1 - \textit{storage_loss}_\text{node,tech,timestep})^{\textit{timestep_resolution}_\text{timestep-1}}) \times \textbf{storage}_\text{node,tech,timestep-1} + (\textbf{resource_con}_\text{node,tech,timestep} \times \textit{resource_eff}_\text{node,tech,timestep}) - \frac{ \textbf{carrier_prod}_\text{node,tech,carrier,timestep} }{ (\textit{energy_eff}_\text{node,tech,timestep} \times \textit{parasitic_eff}_\text{node,tech,timestep}) }&\quad
+            \text{if } (\neg (\textit{energy_eff}_\text{node,tech,timestep}\mathord{=}\text{0} \lor \textit{parasitic_eff}_\text{node,tech,timestep}\mathord{=}\text{0}))\land{}(((\textit{timesteps}_\text{timestep}\mathord{=}\text{timesteps[0]} \land \text{run_config.cyclic_storage}\mathord{=}\text{true}) \lor \neg (\textit{timesteps}_\text{timestep}\mathord{=}\text{timesteps[0]})) \land \neg (\exists (\textit{lookup_cluster_last_timestep}_\text{timestep})))
             \\
             \textbf{storage}_\text{node,tech,timestep} = (\textbf{resource_con}_\text{node,tech,timestep} \times \textit{resource_eff}_\text{node,tech,timestep}) - \frac{ \textbf{carrier_prod}_\text{node,tech,carrier,timestep} }{ (\textit{energy_eff}_\text{node,tech,timestep} \times \textit{parasitic_eff}_\text{node,tech,timestep}) }&\quad
-            \text{if } (\exists (\textit{lookup_cluster_last_timestep}_\text{timestep}) \land \neg (\textit{timesteps}_\text{timestep}\mathord{=}\text{timesteps[0]} \land \neg (\text{run_config.cyclic_storage}\mathord{=}\text{true})))\land{}(\neg (\textit{energy_eff}_\text{node,tech,timestep}\mathord{=}\text{0} \lor \textit{parasitic_eff}_\text{node,tech,timestep}\mathord{=}\text{0}))
+            \text{if } (\neg (\textit{energy_eff}_\text{node,tech,timestep}\mathord{=}\text{0} \lor \textit{parasitic_eff}_\text{node,tech,timestep}\mathord{=}\text{0}))\land{}(\exists (\textit{lookup_cluster_last_timestep}_\text{timestep}) \land \neg (\textit{timesteps}_\text{timestep}\mathord{=}\text{timesteps[0]} \land \neg (\text{run_config.cyclic_storage}\mathord{=}\text{true})))
             \\
         \end{cases}
 
@@ -68,22 +68,22 @@ Fix the quantity of energy stored in a `storage` technology at the end of each t
         \end{array}
         \begin{cases}
             \textbf{storage}_\text{node,tech,timestep} = \textit{storage_initial}_\text{node,tech} \times \textbf{storage_cap}_\text{node,tech} - \frac{ \textbf{carrier_prod}_\text{node,tech,carrier,timestep} }{ \textit{energy_eff}_\text{node,tech,timestep} } - (\textbf{carrier_con}_\text{node,tech,carrier,timestep} \times \textit{energy_eff}_\text{node,tech,timestep})&\quad
-            \text{if } (\textit{timesteps}_\text{timestep}\mathord{=}\text{timesteps[0]} \land \neg (\text{run_config.cyclic_storage}\mathord{=}\text{true}))\land{}(\textit{energy_eff}_\text{node,tech,timestep}\mathord{>}\text{0})
-            \\
-            \textbf{storage}_\text{node,tech,timestep} = \textit{storage_initial}_\text{node,tech} \times \textbf{storage_cap}_\text{node,tech} - (\textbf{carrier_con}_\text{node,tech,carrier,timestep} \times \textit{energy_eff}_\text{node,tech,timestep})&\quad
-            \text{if } (\textit{timesteps}_\text{timestep}\mathord{=}\text{timesteps[0]} \land \neg (\text{run_config.cyclic_storage}\mathord{=}\text{true}))\land{}(\textit{energy_eff}_\text{node,tech,timestep}\mathord{=}\text{0})
+            \text{if } (\textit{energy_eff}_\text{node,tech,timestep}\mathord{>}\text{0})\land{}(\textit{timesteps}_\text{timestep}\mathord{=}\text{timesteps[0]} \land \neg (\text{run_config.cyclic_storage}\mathord{=}\text{true}))
             \\
             \textbf{storage}_\text{node,tech,timestep} = ((1 - \textit{storage_loss}_\text{node,tech,timestep})^{\textit{timestep_resolution}_\text{timestep-1}}) \times \textbf{storage}_\text{node,tech,timestep-1} - \frac{ \textbf{carrier_prod}_\text{node,tech,carrier,timestep} }{ \textit{energy_eff}_\text{node,tech,timestep} } - (\textbf{carrier_con}_\text{node,tech,carrier,timestep} \times \textit{energy_eff}_\text{node,tech,timestep})&\quad
-            \text{if } (((\textit{timesteps}_\text{timestep}\mathord{=}\text{timesteps[0]} \land \text{run_config.cyclic_storage}\mathord{=}\text{true}) \lor \neg (\textit{timesteps}_\text{timestep}\mathord{=}\text{timesteps[0]})) \land \neg (\exists (\textit{lookup_cluster_last_timestep}_\text{timestep})))\land{}(\textit{energy_eff}_\text{node,tech,timestep}\mathord{>}\text{0})
+            \text{if } (\textit{energy_eff}_\text{node,tech,timestep}\mathord{>}\text{0})\land{}(((\textit{timesteps}_\text{timestep}\mathord{=}\text{timesteps[0]} \land \text{run_config.cyclic_storage}\mathord{=}\text{true}) \lor \neg (\textit{timesteps}_\text{timestep}\mathord{=}\text{timesteps[0]})) \land \neg (\textit{lookup_cluster_first_timestep}_\text{timestep}\mathord{=}\text{true}))
             \\
-            \textbf{storage}_\text{node,tech,timestep} = ((1 - \textit{storage_loss}_\text{node,tech,timestep})^{\textit{timestep_resolution}_\text{timestep-1}}) \times \textbf{storage}_\text{node,tech,timestep-1} - (\textbf{carrier_con}_\text{node,tech,carrier,timestep} \times \textit{energy_eff}_\text{node,tech,timestep})&\quad
-            \text{if } (((\textit{timesteps}_\text{timestep}\mathord{=}\text{timesteps[0]} \land \text{run_config.cyclic_storage}\mathord{=}\text{true}) \lor \neg (\textit{timesteps}_\text{timestep}\mathord{=}\text{timesteps[0]})) \land \neg (\exists (\textit{lookup_cluster_last_timestep}_\text{timestep})))\land{}(\textit{energy_eff}_\text{node,tech,timestep}\mathord{=}\text{0})
+            \textbf{storage}_\text{node,tech,timestep} = ((1 - \textit{storage_loss}_\text{node,tech,timestep})^{\textit{timestep_resolution}_\text{timestep=\textit{lookup_cluster_last_timestep}_\text{timestep}[timestep]}}) \times \textbf{storage}_\text{node,tech,timestep=\textit{lookup_cluster_last_timestep}_\text{timestep}[timestep]} - \frac{ \textbf{carrier_prod}_\text{node,tech,carrier,timestep} }{ \textit{energy_eff}_\text{node,tech,timestep} } - (\textbf{carrier_con}_\text{node,tech,carrier,timestep} \times \textit{energy_eff}_\text{node,tech,timestep})&\quad
+            \text{if } (\textit{energy_eff}_\text{node,tech,timestep}\mathord{>}\text{0})\land{}(\textit{lookup_cluster_first_timestep}_\text{timestep}\mathord{=}\text{true} \land \neg (\textit{timesteps}_\text{timestep}\mathord{=}\text{timesteps[0]} \land \neg (\text{run_config.cyclic_storage}\mathord{=}\text{true})))
             \\
-            \textbf{storage}_\text{node,tech,timestep} = \frac{ \textbf{carrier_prod}_\text{node,tech,carrier,timestep} }{ \textit{energy_eff}_\text{node,tech,timestep} } - (\textbf{carrier_con}_\text{node,tech,carrier,timestep} \times \textit{energy_eff}_\text{node,tech,timestep})&\quad
-            \text{if } (\exists (\textit{lookup_cluster_last_timestep}_\text{timestep}) \land \neg (\textit{timesteps}_\text{timestep}\mathord{=}\text{timesteps[0]} \land \neg (\text{run_config.cyclic_storage}\mathord{=}\text{true})))\land{}(\textit{energy_eff}_\text{node,tech,timestep}\mathord{>}\text{0})
+            \textbf{storage}_\text{node,tech,timestep} = \textit{storage_initial}_\text{node,tech} \times \textbf{storage_cap}_\text{node,tech} - (\textbf{carrier_con}_\text{node,tech,carrier,timestep} \times \textit{energy_eff}_\text{node,tech,timestep})&\quad
+            \text{if } (\textit{energy_eff}_\text{node,tech,timestep}\mathord{=}\text{0})\land{}(\textit{timesteps}_\text{timestep}\mathord{=}\text{timesteps[0]} \land \neg (\text{run_config.cyclic_storage}\mathord{=}\text{true}))
+            \\
+            \textbf{storage}_\text{node,tech,timestep} = ((1 - \textit{storage_loss}_\text{node,tech,timestep})^{\textit{timestep_resolution}_\text{timestep-1}}) \times \textbf{storage}_\text{node,tech,timestep-1} - (\textbf{carrier_con}_\text{node,tech,carrier,timestep} \times \textit{energy_eff}_\text{node,tech,timestep})&\quad
+            \text{if } (\textit{energy_eff}_\text{node,tech,timestep}\mathord{=}\text{0})\land{}(((\textit{timesteps}_\text{timestep}\mathord{=}\text{timesteps[0]} \land \text{run_config.cyclic_storage}\mathord{=}\text{true}) \lor \neg (\textit{timesteps}_\text{timestep}\mathord{=}\text{timesteps[0]})) \land \neg (\textit{lookup_cluster_first_timestep}_\text{timestep}\mathord{=}\text{true}))
             \\
-            \textbf{storage}_\text{node,tech,timestep} = (\textbf{carrier_con}_\text{node,tech,carrier,timestep} \times \textit{energy_eff}_\text{node,tech,timestep})&\quad
-            \text{if } (\exists (\textit{lookup_cluster_last_timestep}_\text{timestep}) \land \neg (\textit{timesteps}_\text{timestep}\mathord{=}\text{timesteps[0]} \land \neg (\text{run_config.cyclic_storage}\mathord{=}\text{true})))\land{}(\textit{energy_eff}_\text{node,tech,timestep}\mathord{=}\text{0})
+            \textbf{storage}_\text{node,tech,timestep} = ((1 - \textit{storage_loss}_\text{node,tech,timestep})^{\textit{timestep_resolution}_\text{timestep=\textit{lookup_cluster_last_timestep}_\text{timestep}[timestep]}}) \times \textbf{storage}_\text{node,tech,timestep=\textit{lookup_cluster_last_timestep}_\text{timestep}[timestep]} - (\textbf{carrier_con}_\text{node,tech,carrier,timestep} \times \textit{energy_eff}_\text{node,tech,timestep})&\quad
+            \text{if } (\textit{energy_eff}_\text{node,tech,timestep}\mathord{=}\text{0})\land{}(\textit{lookup_cluster_first_timestep}_\text{timestep}\mathord{=}\text{true} \land \neg (\textit{timesteps}_\text{timestep}\mathord{=}\text{timesteps[0]} \land \neg (\text{run_config.cyclic_storage}\mathord{=}\text{true})))
             \\
         \end{cases}
 
@@ -129,14 +129,14 @@ Fix the relationship between one day and the next of a `storage` technology's av
             \textbf{storage_inter_cluster}_\text{node,tech,datestep} = \textit{storage_initial}_\text{node,tech}&\quad
             \text{if } (\textit{datesteps}_\text{datestep}\mathord{=}\text{datesteps[0]} \land \neg (\text{run_config.cyclic_storage}\mathord{=}\text{true}))\land{}(\textit{datesteps}_\text{datestep}\mathord{=}\text{datesteps[0]} \land \neg (\text{run_config.cyclic_storage}\mathord{=}\text{true}))
             \\
-            \textbf{storage_inter_cluster}_\text{node,tech,datestep} = ((1 - \textit{storage_loss}_\text{node,tech,timestep})^{24}) \times \textbf{storage_inter_cluster}_\text{node,tech,datestep-1}&\quad
-            \text{if } (\textit{datesteps}_\text{datestep}\mathord{=}\text{datesteps[0]} \land \neg (\text{run_config.cyclic_storage}\mathord{=}\text{true}))\land{}((\textit{datesteps}_\text{datestep}\mathord{=}\text{datesteps[0]} \land \text{run_config.cyclic_storage}\mathord{=}\text{true}) \lor \neg (\textit{datesteps}_\text{datestep}\mathord{=}\text{datesteps[0]}))
-            \\
             \textbf{storage_inter_cluster}_\text{node,tech,datestep} = \textit{storage_initial}_\text{node,tech} + \textbf{storage}_\text{node,tech,timestep=\textit{lookup_datestep_last_cluster_timestep}_\text{datestep-1}}&\quad
-            \text{if } (\neg (\textit{datesteps}_\text{datestep}\mathord{=}\text{datesteps[0]} \land \neg (\text{run_config.cyclic_storage}\mathord{=}\text{true})))\land{}(\textit{datesteps}_\text{datestep}\mathord{=}\text{datesteps[0]} \land \neg (\text{run_config.cyclic_storage}\mathord{=}\text{true}))
+            \text{if } (\textit{datesteps}_\text{datestep}\mathord{=}\text{datesteps[0]} \land \neg (\text{run_config.cyclic_storage}\mathord{=}\text{true}))\land{}(\neg (\textit{datesteps}_\text{datestep}\mathord{=}\text{datesteps[0]} \land \neg (\text{run_config.cyclic_storage}\mathord{=}\text{true})))
+            \\
+            \textbf{storage_inter_cluster}_\text{node,tech,datestep} = ((1 - \textit{storage_loss}_\text{node,tech,timestep})^{24}) \times \textbf{storage_inter_cluster}_\text{node,tech,datestep-1}&\quad
+            \text{if } ((\textit{datesteps}_\text{datestep}\mathord{=}\text{datesteps[0]} \land \text{run_config.cyclic_storage}\mathord{=}\text{true}) \lor \neg (\textit{datesteps}_\text{datestep}\mathord{=}\text{datesteps[0]}))\land{}(\textit{datesteps}_\text{datestep}\mathord{=}\text{datesteps[0]} \land \neg (\text{run_config.cyclic_storage}\mathord{=}\text{true}))
             \\
             \textbf{storage_inter_cluster}_\text{node,tech,datestep} = ((1 - \textit{storage_loss}_\text{node,tech,timestep})^{24}) \times \textbf{storage_inter_cluster}_\text{node,tech,datestep-1} + \textbf{storage}_\text{node,tech,timestep=\textit{lookup_datestep_last_cluster_timestep}_\text{datestep-1}}&\quad
-            \text{if } (\neg (\textit{datesteps}_\text{datestep}\mathord{=}\text{datesteps[0]} \land \neg (\text{run_config.cyclic_storage}\mathord{=}\text{true})))\land{}((\textit{datesteps}_\text{datestep}\mathord{=}\text{datesteps[0]} \land \text{run_config.cyclic_storage}\mathord{=}\text{true}) \lor \neg (\textit{datesteps}_\text{datestep}\mathord{=}\text{datesteps[0]}))
+            \text{if } ((\textit{datesteps}_\text{datestep}\mathord{=}\text{datesteps[0]} \land \text{run_config.cyclic_storage}\mathord{=}\text{true}) \lor \neg (\textit{datesteps}_\text{datestep}\mathord{=}\text{datesteps[0]}))\land{}(\neg (\textit{datesteps}_\text{datestep}\mathord{=}\text{datesteps[0]} \land \neg (\text{run_config.cyclic_storage}\mathord{=}\text{true})))
             \\
         \end{cases}
 
diff --git a/doc/_themes/flask_calliope/static/flasky.css_t b/doc/_themes/flask_calliope/static/flasky.css_t
index 08905cbf5..8418cc0d0 100644
--- a/doc/_themes/flask_calliope/static/flasky.css_t
+++ b/doc/_themes/flask_calliope/static/flasky.css_t
@@ -818,6 +818,9 @@ h2 + span + dl.function, h2 + dl.function {
 dl.function dd {
     padding-top: 5px;
 }
+dl.class dd {
+    padding-bottom: 10px;
+}
 
 .function code {
     word-break: break-all;
diff --git a/doc/api/api.rst b/doc/api/api.rst
index b7a8cac08..318157f59 100644
--- a/doc/api/api.rst
+++ b/doc/api/api.rst
@@ -25,14 +25,6 @@ Time series
 .. automodule:: calliope.time.funcs
     :members: resample
 
-.. _api_backend_interface:
-
-Pyomo backend interface
-=======================
-
-.. autoclass:: calliope.backend.pyomo.interface.BackendInterfaceMethods
-    :members: access_model_inputs, update_param, activate_constraint, rerun
-
 .. _api_utility_classes:
 
 Utility classes: AttrDict, Exceptions, Logging
@@ -45,4 +37,12 @@ Utility classes: AttrDict, Exceptions, Logging
     :members:
 
 .. automodule:: calliope.core.util.logging
-    :members: set_log_verbosity
\ No newline at end of file
+    :members: set_log_verbosity
+
+Math formulation helper functions
+=================================
+
+.. automodule:: calliope.backend.helper_functions
+    :members:
+    :special-members: __call__
+    :inherited-members:
\ No newline at end of file
diff --git a/doc/conf.py b/doc/conf.py
index 4ad14079f..cb184d14f 100644
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -106,6 +106,8 @@
 MOCK_MODULES = ["xarray", "pandas", "numpy", "pyomo", "sklearn", "pyparsing"]
 autodoc_mock_imports = MOCK_MODULES
 autodoc_typehints = "both"
+autodoc_member_order = "bysource"
+autoclass_content = "both"
 
 intersphinx_mapping = {
     "python": ("http://docs.python.org/3", None),
diff --git a/doc/user/advanced_constraints.rst b/doc/user/advanced_constraints.rst
index 390ea0d42..ec015d2dd 100644
--- a/doc/user/advanced_constraints.rst
+++ b/doc/user/advanced_constraints.rst
@@ -340,7 +340,7 @@ This constraint can be applied to storage or transmission technologies. This exa
 
 .. literalinclude:: ../../calliope/example_models/urban_scale/scenarios.yaml
    :language: yaml
-   :dedent: 8
+   :dedent: 4
    :start-after: # heat_pipes-start
    :end-before: # heat_pipes-end
 
@@ -350,28 +350,4 @@ In the above example, heat pipes which distribute thermal energy in the network
 User-defined custom constraints
 -------------------------------
 
-It is possible to pass custom constraints to the Pyomo backend, using the :ref:`backend interface <api_backend_interface>`. This requires an understanding of the structure of Pyomo constraints. As an example, the following code reproduces the constraint which limits the maximum carrier consumption to less than or equal to the technology capacity:
-
-.. code-block:: python
-
-    model = calliope.Model(...)
-    model.run()  # or `model.run(build_only=True)` if you don't want the model to be optimised before adding the new constraint
-
-    constraint_name = 'max_capacity_90_constraint'
-    constraint_sets = ['loc_techs_supply']
-
-    def max_capacity_90_constraint_rule(backend_model, loc_tech):
-
-        return backend_model.energy_cap[loc_tech] <= (
-            backend_model.energy_cap_max[loc_tech] * 0.9
-        )
-
-    # Add the constraint
-    model.backend.add_constraint(constraint_name, constraint_sets, max_capacity_90_constraint_rule)
-
-    # Rerun the model with new constraint.
-    new_model = model.backend.rerun()  # `new_model` is a calliope model *without* a backend, it is only useful for saving the results to file
-
-.. note::
-    * We like the convention that constraint names end with 'constraint' and constraint rules have the same text, with an appended '_rule', but you are not required to follow this convention to have a working constraint.
-    * :python:`model.run(force_rerun=True)` will *not* implement the new constraint, :python:`model.backend.rerun()` is required. If you run :python:`model.run(force_rerun=True)`, the backend model will be rebuilt, killing any changes you've made.
\ No newline at end of file
+It is possible to supply custom constraints, using the :ref:`math YAML syntax <custom_math>`.
\ No newline at end of file
diff --git a/doc/user/custom_math.rst b/doc/user/custom_math.rst
index 5f6cef792..e1c1a43b1 100644
--- a/doc/user/custom_math.rst
+++ b/doc/user/custom_math.rst
@@ -1,3 +1,5 @@
+.. _custom_math:
+
 =======================
 Custom math formulation
 =======================
diff --git a/doc/user/tutorials_01_national.rst b/doc/user/tutorials_01_national.rst
index 7d7c0b75a..7eaca2079 100644
--- a/doc/user/tutorials_01_national.rst
+++ b/doc/user/tutorials_01_national.rst
@@ -27,7 +27,7 @@ The definition of this technology in the example model's configuration looks as
 
 .. literalinclude:: ../../calliope/example_models/national_scale/model_config/techs.yaml
    :language: yaml
-   :dedent: 4
+   :dedent: 2
    :start-after: # ccgt-start
    :end-before: # ccgt-end
 
@@ -50,7 +50,7 @@ This definition in the example model's configuration is more verbose:
 
 .. literalinclude:: ../../calliope/example_models/national_scale/model_config/techs.yaml
    :language: yaml
-   :dedent: 4
+   :dedent: 2
    :start-after: # csp-start
    :end-before: # csp-end
 
@@ -70,7 +70,7 @@ The second location allows a limited amount of battery storage to be deployed to
 
 .. literalinclude:: ../../calliope/example_models/national_scale/model_config/techs.yaml
    :language: yaml
-   :dedent: 4
+   :dedent: 2
    :start-after: # battery-start
    :end-before: # battery-end
 
@@ -88,7 +88,7 @@ Three more technologies are needed for a simple model. First, a definition of po
 
 .. literalinclude:: ../../calliope/example_models/national_scale/model_config/techs.yaml
    :language: yaml
-   :dedent: 4
+   :dedent: 2
    :start-after: # demand-start
    :end-before: # demand-end
 
@@ -103,7 +103,7 @@ What remains to set up is a simple transmission technology. Transmission technol
 
 .. literalinclude:: ../../calliope/example_models/national_scale/model_config/techs.yaml
    :language: yaml
-   :dedent: 4
+   :dedent: 2
    :start-after: # transmission-start
    :end-before: # transmission-end
 
@@ -127,7 +127,7 @@ Let's now look at the first location definition:
 
 .. literalinclude:: ../../calliope/example_models/national_scale/model_config/locations.yaml
    :language: yaml
-   :dedent: 4
+   :dedent: 2
    :start-after: # region-1-start
    :end-before: # region-1-end
 
@@ -141,7 +141,7 @@ The remaining location definitions look like this:
 
 .. literalinclude:: ../../calliope/example_models/national_scale/model_config/locations.yaml
    :language: yaml
-   :dedent: 4
+   :dedent: 2
    :start-after: # other-locs-start
    :end-before: # other-locs-end
 
@@ -151,7 +151,7 @@ For transmission technologies, the model also needs to know which locations can
 
 .. literalinclude:: ../../calliope/example_models/national_scale/model_config/locations.yaml
    :language: yaml
-   :dedent: 4
+   :dedent: 2
    :start-after: # links-start
    :end-before: # links-end
 
diff --git a/doc/user/tutorials_02_urban.rst b/doc/user/tutorials_02_urban.rst
index 2722a6421..5b154a61b 100644
--- a/doc/user/tutorials_02_urban.rst
+++ b/doc/user/tutorials_02_urban.rst
@@ -27,7 +27,7 @@ The definition of these technologies in the example model's configuration looks
 
 .. literalinclude:: ../../calliope/example_models/urban_scale/model_config/techs.yaml
    :language: yaml
-   :dedent: 4
+   :dedent: 2
    :start-after: # supply-start
    :end-before: # supply-end
 
@@ -41,7 +41,7 @@ The definition of this technology in the example model's configuration looks as
 
 .. literalinclude:: ../../calliope/example_models/urban_scale/model_config/techs.yaml
    :language: yaml
-   :dedent: 4
+   :dedent: 2
    :start-after: # pv-start
    :end-before: # pv-end
 
@@ -70,7 +70,7 @@ The definition of this technology in the example model's configuration looks as
 
 .. literalinclude:: ../../calliope/example_models/urban_scale/model_config/techs.yaml
    :language: yaml
-   :dedent: 4
+   :dedent: 2
    :start-after: # boiler-start
    :end-before: # boiler-end
 
@@ -88,7 +88,7 @@ This definition in the example model's configuration is more verbose:
 
 .. literalinclude:: ../../calliope/example_models/urban_scale/model_config/techs.yaml
    :language: yaml
-   :dedent: 4
+   :dedent: 2
    :start-after: # chp-start
    :end-before: # chp-end
 
@@ -105,7 +105,7 @@ Electricity and heat demand are defined here:
 
 .. literalinclude:: ../../calliope/example_models/urban_scale/model_config/techs.yaml
    :language: yaml
-   :dedent: 4
+   :dedent: 2
    :start-after: # demand-start
    :end-before: # demand-end
 
@@ -123,7 +123,7 @@ In this district, electricity and heat can be distributed between locations. Gas
 
 .. literalinclude:: ../../calliope/example_models/urban_scale/model_config/techs.yaml
    :language: yaml
-   :dedent: 4
+   :dedent: 2
    :start-after: # transmission-start
    :end-before: # transmission-end
 
@@ -146,7 +146,7 @@ Let's now look at the first location definition:
 
 .. literalinclude:: ../../calliope/example_models/urban_scale/model_config/locations.yaml
    :language: yaml
-   :dedent: 4
+   :dedent: 2
    :start-after: # X1-start
    :end-before: # X1-end
 
@@ -161,7 +161,7 @@ The remaining location definitions look like this:
 
 .. literalinclude:: ../../calliope/example_models/urban_scale/model_config/locations.yaml
    :language: yaml
-   :dedent: 4
+   :dedent: 2
    :start-after: # other-locs-start
    :end-before: # other-locs-end
 
@@ -171,7 +171,7 @@ The remaining location definitions look like this:
 
 .. literalinclude:: ../../calliope/example_models/urban_scale/model_config/locations.yaml
    :language: yaml
-   :dedent: 4
+   :dedent: 2
    :start-after: # N1-start
    :end-before: # N1-end
 
@@ -179,7 +179,7 @@ For transmission technologies, the model also needs to know which locations can
 
 .. literalinclude:: ../../calliope/example_models/urban_scale/model_config/locations.yaml
    :language: yaml
-   :dedent: 4
+   :dedent: 2
    :start-after: # links-start
    :end-before: # links-end
 
diff --git a/doc/user/tutorials_03_milp.rst b/doc/user/tutorials_03_milp.rst
index 309c5ad85..52773b920 100644
--- a/doc/user/tutorials_03_milp.rst
+++ b/doc/user/tutorials_03_milp.rst
@@ -12,7 +12,7 @@ The capacity of a technology is usually a continuous decision variable, which ca
 
 .. literalinclude:: ../../calliope/example_models/urban_scale/scenarios.yaml
    :language: yaml
-   :dedent: 8
+   :dedent: 4
    :start-after: # chp-start
    :end-before: # chp-end
 
@@ -25,7 +25,7 @@ The boiler does not have a unit limit, it still utilises the continuous variable
 
 .. literalinclude:: ../../calliope/example_models/urban_scale/scenarios.yaml
    :language: yaml
-   :dedent: 8
+   :dedent: 4
    :start-after: # boiler-start
    :end-before: # boiler-end
 
@@ -41,7 +41,7 @@ The heat pipes which distribute thermal energy in the network may be prone to di
 
 .. literalinclude:: ../../calliope/example_models/urban_scale/scenarios.yaml
    :language: yaml
-   :dedent: 8
+   :dedent: 4
    :start-after: # heat_pipes-start
    :end-before: # heat_pipes-end
 


Test patch:
diff --git a/calliope/test/test_backend_expression_parser.py b/calliope/test/test_backend_expression_parser.py
index 28c0f4883..9b32289a0 100644
--- a/calliope/test/test_backend_expression_parser.py
+++ b/calliope/test/test_backend_expression_parser.py
@@ -6,39 +6,32 @@
 import pytest
 
 from calliope import exceptions
-from calliope.backend import expression_parser
+from calliope.backend import expression_parser, helper_functions
 from calliope.test.common.util import check_error_or_warning
 
 SUB_EXPRESSION_CLASSIFIER = expression_parser.SUB_EXPRESSION_CLASSIFIER
 
 
-def dummy_func_1(as_latex=False, **kwargs):
-    def _dummy_func_1(x):
-        return x * 10
+class DummyFunc1(helper_functions.ParsingHelperFunction):
+    NAME = "dummy_func_1"
+    ALLOWED_IN = ["expression"]
 
-    def _as_latex(x):
+    def as_latex(self, x):
         return f"{x} * 10"
 
-    if as_latex:
-        return _as_latex
-    else:
-        return _dummy_func_1
+    def as_array(self, x):
+        return x * 10
 
 
-def dummy_func_2(as_latex=False, **kwargs):
-    def _dummy_func_2(x, y):
-        return x + y
+class DummyFunc2(helper_functions.ParsingHelperFunction):
+    NAME = "dummy_func_2"
+    ALLOWED_IN = ["expression"]
 
-    def _as_latex(x, y):
+    def as_latex(self, x, y):
         return f"{x} + {y}"
 
-    if as_latex:
-        return _as_latex
-    else:
-        return _dummy_func_2
-
-
-HELPER_FUNCS = {"dummy_func_1": dummy_func_1, "dummy_func_2": dummy_func_2}
+    def as_array(self, x):
+        return x * 10
 
 
 @pytest.fixture
@@ -178,7 +171,7 @@ def helper_function_one_parser_in_args(identifier, request):
 @pytest.fixture(scope="function")
 def eval_kwargs():
     return {
-        "helper_func_dict": HELPER_FUNCS,
+        "helper_functions": helper_functions._registry["expression"],
         "as_dict": True,
         "slice_dict": {},
         "sub_expression_dict": {},
@@ -633,12 +626,20 @@ def test_function(self, helper_function, string_val, expected, eval_kwargs):
     )
     def test_missing_function(self, string_val, helper_function, eval_kwargs):
         parsed_ = helper_function.parse_string(string_val, parse_all=True)
-
         with pytest.raises(exceptions.BackendError) as excinfo:
             parsed_[0].eval(**eval_kwargs)
 
         assert check_error_or_warning(excinfo, "Invalid helper function defined")
 
+    def test_function_mistype(self, helper_function, eval_kwargs):
+        parsed_ = helper_function.parse_string("dummy_func_1(1)", parse_all=True)
+
+        eval_kwargs["helper_functions"] = {"dummy_func_1": lambda **kwargs: lambda x: x}
+        with pytest.raises(TypeError) as excinfo:
+            parsed_[0].eval(**eval_kwargs)
+
+        assert check_error_or_warning(excinfo, "Helper function must be subclassed")
+
     @pytest.mark.parametrize(
         "string_val",
         [
@@ -1023,7 +1024,7 @@ class TestAsLatex:
     @pytest.fixture
     def latex_eval_kwargs(self, dummy_latex_backend_model, dummy_model_data):
         return {
-            "helper_func_dict": HELPER_FUNCS,
+            "helper_functions": helper_functions._registry["expression"],
             "as_dict": False,
             "as_latex": True,
             "index_slice_dict": {},
diff --git a/calliope/test/test_backend_helper_functions.py b/calliope/test/test_backend_helper_functions.py
index 1129a2078..1e91b767b 100644
--- a/calliope/test/test_backend_helper_functions.py
+++ b/calliope/test/test_backend_helper_functions.py
@@ -7,67 +7,154 @@
 from calliope.test.common.util import check_error_or_warning
 
 
-class TestFuncs:
-    def test_inheritance(self, dummy_model_data):
-        inheritance = helper_functions.inheritance(dummy_model_data)
-        boo_bool = inheritance("boo")
+@pytest.fixture(scope="module")
+def expression():
+    return helper_functions._registry["expression"]
+
+
+@pytest.fixture(scope="module")
+def where():
+    return helper_functions._registry["where"]
+
+
+@pytest.fixture(scope="class")
+def where_inheritance(where, parsing_kwargs):
+    return where["inheritance"](**parsing_kwargs)
+
+
+@pytest.fixture(scope="class")
+def where_any(where, parsing_kwargs):
+    return where["any"](**parsing_kwargs)
+
+
+@pytest.fixture(scope="class")
+def expression_sum(expression, parsing_kwargs):
+    return expression["sum"](**parsing_kwargs)
+
+
+@pytest.fixture(scope="class")
+def expression_reduce_carrier_dim(expression, parsing_kwargs):
+    return expression["reduce_carrier_dim"](**parsing_kwargs)
+
+
+@pytest.fixture(scope="class")
+def expression_reduce_primary_carrier_dim(expression, parsing_kwargs):
+    return expression["reduce_primary_carrier_dim"](**parsing_kwargs)
+
+
+@pytest.fixture(scope="class")
+def expression_select_from_lookup_arrays(expression, parsing_kwargs):
+    return expression["select_from_lookup_arrays"](**parsing_kwargs)
+
+
+@pytest.fixture(scope="class")
+def expression_get_val_at_index(expression, parsing_kwargs):
+    return expression["get_val_at_index"](**parsing_kwargs)
+
+
+@pytest.fixture(scope="class")
+def expression_roll(expression, parsing_kwargs):
+    return expression["roll"](**parsing_kwargs)
+
+
+class TestAsArray:
+    @pytest.fixture(scope="class")
+    def parsing_kwargs(self, dummy_model_data):
+        return {"model_data": dummy_model_data}
+
+    @pytest.mark.parametrize(
+        ["string_type", "func_name"], [("where", "inheritance"), ("expression", "sum")]
+    )
+    def test_duplicate_name_exception(self, string_type, func_name):
+        with pytest.raises(ValueError) as excinfo:
+
+            class MyNewFunc(helper_functions.ParsingHelperFunction):
+                NAME = func_name
+                ALLOWED_IN = [string_type]
+
+                def __call__(self):
+                    return None
+
+        assert check_error_or_warning(
+            excinfo,
+            f"`{string_type}` string helper function `{func_name}` already exists",
+        )
+
+    @pytest.mark.parametrize(
+        ["string_types", "func_name"],
+        [(["where"], "sum"), (["expression", "where"], "my_new_func")],
+    )
+    def test_new_func(self, string_types, func_name):
+        class MyNewFunc(helper_functions.ParsingHelperFunction):
+            NAME = func_name
+            ALLOWED_IN = string_types
+
+            def __call__(self):
+                return None
+
+        assert all(func_name in helper_functions._registry[i] for i in string_types)
+
+    def test_inheritance(self, where_inheritance, dummy_model_data):
+        boo_bool = where_inheritance("boo")
         assert boo_bool.equals(dummy_model_data.boo_inheritance_bool)
 
-    def test_where_sum_not_exists(self, dummy_model_data):
-        where_sum = helper_functions.where_sum(dummy_model_data)
-        summed = where_sum("foo", over="techs")
+    def test_any_not_exists(self, where_any):
+        summed = where_any("foo", over="techs")
         assert summed.equals(xr.DataArray(False))
 
     @pytest.mark.parametrize(
         ["var", "over", "expected"],
         [("with_inf", "techs", "nodes_true"), ("all_nan", "techs", "nodes_false")],
     )
-    def test_where_sum_exists(self, dummy_model_data, var, over, expected):
-        where_sum = helper_functions.where_sum(dummy_model_data)
-        summed = where_sum(var, over=over)
+    def test_any_exists(self, where_any, dummy_model_data, var, over, expected):
+        summed = where_any(var, over=over)
         assert summed.equals(dummy_model_data[expected])
 
     @pytest.mark.parametrize("over", ["techs", ["techs"]])
-    def test_expression_sum_one_dim(self, dummy_model_data, over):
-        expression_sum = helper_functions.expression_sum()
+    def test_sum_one_dim(self, expression_sum, dummy_model_data, over):
         summed_array = expression_sum(dummy_model_data.only_techs, over=over)
         assert not summed_array.shape
         assert summed_array == 6
 
     @pytest.mark.parametrize("over", ["techs", ["techs"]])
-    def test_expression_sum_one_of_two_dims(self, dummy_model_data, over):
-        expression_sum = helper_functions.expression_sum()
+    def test_sum_one_of_two_dims(self, expression_sum, dummy_model_data, over):
         summed_array = expression_sum(dummy_model_data.with_inf, over=over)
         assert summed_array.shape == (2,)
         assert np.array_equal(summed_array, [5, np.inf])
 
-    def test_expression_sum_two_dims(self, dummy_model_data):
-        expression_sum = helper_functions.expression_sum()
+    def test_expression_sum_two_dims(self, expression_sum, dummy_model_data):
         summed_array = expression_sum(
             dummy_model_data.with_inf_as_bool, over=["nodes", "techs"]
         )
         assert not summed_array.shape
         assert summed_array == 5
 
-    def test_squeeze_carriers(self, dummy_model_data):
-        squeeze_carriers = helper_functions.squeeze_carriers(dummy_model_data)
-        squeezed = squeeze_carriers(dummy_model_data.all_true_carriers, "foo")
+    def test_reduce_carrier_dim(self, expression_reduce_carrier_dim, dummy_model_data):
+        reduced = expression_reduce_carrier_dim(
+            dummy_model_data.all_true_carriers, "foo"
+        )
 
-        assert dummy_model_data.carrier.sel(carrier_tiers="foo").sum() == squeezed.sum()
-        assert not set(squeezed.dims).symmetric_difference(["techs"])
+        assert dummy_model_data.carrier.sel(carrier_tiers="foo").sum() == reduced.sum()
+        assert not set(reduced.dims).symmetric_difference(["techs"])
 
-    def test_squeeze_primary_carriers(self, dummy_model_data):
-        squeeze_carriers = helper_functions.squeeze_primary_carriers(dummy_model_data)
-        squeezed = squeeze_carriers(dummy_model_data.all_true_carriers, "out")
+    def test_reduce_primary_carrier_dim(
+        self, expression_reduce_primary_carrier_dim, dummy_model_data
+    ):
+        reduced = expression_reduce_primary_carrier_dim(
+            dummy_model_data.all_true_carriers, "out"
+        )
 
-        assert squeezed.sum() == 3
-        assert squeezed.max() == 1
-        assert not set(squeezed.dims).symmetric_difference(["techs"])
+        assert reduced.sum() == 3
+        assert reduced.max() == 1
+        assert not set(reduced.dims).symmetric_difference(["techs"])
 
-    def test_squeeze_primary_carriers_not_in_model(self, dummy_model_data):
-        squeeze_carriers = helper_functions.squeeze_primary_carriers(dummy_model_data)
+    def test_reduce_primary_carrier_dim_not_in_model(
+        self, expression_reduce_primary_carrier_dim, dummy_model_data
+    ):
         with pytest.raises(AttributeError):
-            squeeze_carriers(dummy_model_data.all_true_carriers, "foo")
+            expression_reduce_primary_carrier_dim(
+                dummy_model_data.all_true_carriers, "foo"
+            )
 
     @pytest.mark.parametrize(
         ["lookup", "expected"],
@@ -82,12 +169,10 @@ def test_squeeze_primary_carriers_not_in_model(self, dummy_model_data):
             ),
         ],
     )
-    def test_select_from_lookup_arrays(self, dummy_model_data, lookup, expected):
-        select_from_lookup_arrays = helper_functions.select_from_lookup_arrays(
-            dummy_model_data
-        )
-
-        new_array = select_from_lookup_arrays(
+    def test_select_from_lookup_arrays(
+        self, expression_select_from_lookup_arrays, dummy_model_data, lookup, expected
+    ):
+        new_array = expression_select_from_lookup_arrays(
             dummy_model_data.with_inf,
             **{k: dummy_model_data[v] for k, v in lookup.items()},
         )
@@ -100,58 +185,64 @@ def test_select_from_lookup_arrays(self, dummy_model_data, lookup, expected):
             assert new_array[dim].equals(dummy_model_data[dim])
 
     def test_select_from_lookup_arrays_fail_dim_not_in_component(
-        self, dummy_model_data
+        self, expression_select_from_lookup_arrays, dummy_model_data
     ):
-        select_from_lookup_arrays = helper_functions.select_from_lookup_arrays(
-            dummy_model_data
-        )
         with pytest.raises(exceptions.BackendError) as excinfo:
-            select_from_lookup_arrays(
+            expression_select_from_lookup_arrays(
                 dummy_model_data.nodes_true,
                 techs=dummy_model_data.lookup_techs,
             )
         assert check_error_or_warning(
             excinfo,
-            "Cannot select items from `nodes_true` on the dimensions {'techs'} since the array is not indexed over the dimensions {'techs'}",
+            "Cannot select items from `nodes_true` on the dimensions {'techs'} since "
+            "the array is not indexed over the dimensions {'techs'}",
         )
 
-    def test_select_from_lookup_arrays_fail_dim_slicer_mismatch(self, dummy_model_data):
-        select_from_lookup_arrays = helper_functions.select_from_lookup_arrays(
-            dummy_model_data
-        )
+    def test_select_from_lookup_arrays_fail_dim_slicer_mismatch(
+        self, expression_select_from_lookup_arrays, dummy_model_data
+    ):
         with pytest.raises(exceptions.BackendError) as excinfo:
-            select_from_lookup_arrays(
+            expression_select_from_lookup_arrays(
                 dummy_model_data.with_inf,
                 techs=dummy_model_data.lookup_techs,
                 nodes=dummy_model_data.link_remote_nodes,
             )
-
         assert check_error_or_warning(
             excinfo,
             ["lookup arrays used to select items from `with_inf", "'techs'", "'nodes'"],
         )
 
-    @pytest.mark.parametrize(["ix", "expected"], [(0, "foo"), (1, "bar"), (-1, "bar")])
-    def test_get_val_at_index(self, dummy_model_data, ix, expected):
-        get_val_at_index = helper_functions.get_val_at_index(dummy_model_data)
-        assert get_val_at_index(dim="timesteps", idx=ix) == expected
+    @pytest.mark.parametrize(["idx", "expected"], [(0, "foo"), (1, "bar"), (-1, "bar")])
+    def test_get_val_at_index(self, expression_get_val_at_index, idx, expected):
+        assert expression_get_val_at_index(timesteps=idx) == expected
+
+    @pytest.mark.parametrize("mapping", [{}, {"foo": 1, "bar": 1}])
+    def test_get_val_at_index_not_one_mapping(
+        self, expression_get_val_at_index, mapping
+    ):
+        with pytest.raises(ValueError) as excinfo:
+            expression_get_val_at_index(**mapping)
+        assert check_error_or_warning(
+            excinfo, "Supply one (and only one) dimension:index mapping"
+        )
 
     @pytest.mark.parametrize(["to_roll", "expected"], [(1, 3), (1.0, 3), (-3.0, 3)])
-    def test_roll(self, dummy_model_data, to_roll, expected):
-        roll = helper_functions.roll()
-        rolled = roll(dummy_model_data.with_inf, techs=to_roll)
+    def test_roll(self, expression_roll, dummy_model_data, to_roll, expected):
+        rolled = expression_roll(dummy_model_data.with_inf, techs=to_roll)
         assert rolled.sel(nodes="foo", techs="foobar") == expected
 
 
 class TestAsLatex:
-    def test_inheritance(self, dummy_model_data):
-        inheritance = helper_functions.inheritance(dummy_model_data, as_latex=True)
-        assert inheritance("boo") == r"\text{tech_group=boo}"
+    @pytest.fixture(scope="class")
+    def parsing_kwargs(self, dummy_model_data):
+        return {"model_data": dummy_model_data, "as_latex": True}
 
-    def test_where_sum_not_exists(self, dummy_model_data):
-        where_sum = helper_functions.where_sum(dummy_model_data, as_latex=True)
-        summed_string = where_sum("foo", over="techs")
-        assert summed_string == r"\sum\limits_{\text{tech} \in \text{techs}} (foo)"
+    def test_inheritance(self, where_inheritance):
+        assert where_inheritance("boo") == r"\text{tech_group=boo}"
+
+    def test_any_not_exists(self, where_any):
+        summed_string = where_any("foo", over="techs")
+        assert summed_string == r"\bigvee\limits_{\text{tech} \in \text{techs}} (foo)"
 
     @pytest.mark.parametrize(
         ["over", "expected_substring"],
@@ -165,40 +256,32 @@ def test_where_sum_not_exists(self, dummy_model_data):
         ],
     )
     @pytest.mark.parametrize(
-        "func", [helper_functions.where_sum, helper_functions.expression_sum]
+        ["func_string", "latex_func"],
+        [("where_any", r"\bigvee"), ("expression_sum", r"\sum")],
     )
-    def test_sum(self, dummy_model_data, over, expected_substring, func):
-        where_sum = func(model_data=dummy_model_data, as_latex=True)
-        summed_string = where_sum(r"\textit{with_inf}_\text{node,tech}", over=over)
+    def test_sum(self, request, over, expected_substring, func_string, latex_func):
+        func = request.getfixturevalue(func_string)
+        summed_string = func(r"\textit{with_inf}_\text{node,tech}", over=over)
         assert (
             summed_string
-            == rf"\sum\limits_{{{expected_substring}}} (\textit{{with_inf}}_\text{{node,tech}})"
+            == rf"{latex_func}\limits_{{{expected_substring}}} (\textit{{with_inf}}_\text{{node,tech}})"
         )
 
-    def test_squeeze_carriers(self, dummy_model_data):
-        squeeze_carriers = helper_functions.squeeze_carriers(
-            dummy_model_data, as_latex=True
-        )
-        squeezed_string = squeeze_carriers("foo", "out")
+    def test_squeeze_carriers(self, expression_reduce_carrier_dim):
+        reduced_string = expression_reduce_carrier_dim("foo", "out")
         assert (
-            squeezed_string
+            reduced_string
             == r"\sum\limits_{\text{carrier} \in \text{carrier_tier(out)}} (foo)"
         )
 
-    def test_squeeze_primary_carriers(self, dummy_model_data):
-        squeeze_carriers = helper_functions.squeeze_primary_carriers(
-            dummy_model_data, as_latex=True
-        )
-        squeezed_string = squeeze_carriers("foo", "out")
+    def test_squeeze_primary_carriers(self, expression_reduce_primary_carrier_dim):
+        reduced_string = expression_reduce_primary_carrier_dim("foo", "out")
         assert (
-            squeezed_string == r"\sum\limits_{\text{carrier=primary_carrier_out}} (foo)"
+            reduced_string == r"\sum\limits_{\text{carrier=primary_carrier_out}} (foo)"
         )
 
-    def test_select_from_lookup_arrays(self, dummy_model_data):
-        select_from_lookup_arrays = helper_functions.select_from_lookup_arrays(
-            dummy_model_data, as_latex=True
-        )
-        select_from_lookup_arrays_string = select_from_lookup_arrays(
+    def test_select_from_lookup_arrays(self, expression_select_from_lookup_arrays):
+        select_from_lookup_arrays_string = expression_select_from_lookup_arrays(
             r"\textit{node}_\text{node,tech}",
             nodes="new_nodes",
             techs=r"\textit{new_techs}_{node,tech}",
@@ -208,11 +291,8 @@ def test_select_from_lookup_arrays(self, dummy_model_data):
             == r"\textit{node}_\text{node=new_nodes[node],tech=\textit{new_techs}_{node,tech}[tech]}"
         )
 
-    def test_get_val_at_index(self, dummy_model_data):
-        get_val_at_index = helper_functions.get_val_at_index(
-            dummy_model_data, as_latex=True
-        )
-        outstring = get_val_at_index(dim="timesteps", idx=1)
+    def test_get_val_at_index(self, expression_get_val_at_index):
+        outstring = expression_get_val_at_index(timesteps="1")
         assert outstring == "timesteps[1]"
 
     @pytest.mark.parametrize(
@@ -227,7 +307,6 @@ def test_get_val_at_index(self, dummy_model_data):
             (r"\textit{foo}_\text{baz,foo,bar,foo}", r"baz,foo+1,bar,foo+1"),
         ],
     )
-    def test_roll(self, instring, expected_substring):
-        roll = helper_functions.roll(as_latex=True)
-        rolled_string = roll(instring, foo=-1)
+    def test_roll(self, expression_roll, instring, expected_substring):
+        rolled_string = expression_roll(instring, foo="-1")
         assert rolled_string == rf"\textit{{foo}}_\text{{{expected_substring}}}"
diff --git a/calliope/test/test_backend_where_parser.py b/calliope/test/test_backend_where_parser.py
index 20a32253e..1e0941e3f 100644
--- a/calliope/test/test_backend_where_parser.py
+++ b/calliope/test/test_backend_where_parser.py
@@ -3,12 +3,13 @@
 import pytest
 import xarray as xr
 
-from calliope.backend import expression_parser, parsing, where_parser
+from calliope.backend import expression_parser, helper_functions, where_parser
 from calliope.core.attrdict import AttrDict
 from calliope.exceptions import BackendError
 from calliope.test.common.util import check_error_or_warning
 
 SUB_EXPRESSION_CLASSIFIER = expression_parser.SUB_EXPRESSION_CLASSIFIER
+
 BASE_DIMS = ["nodes", "techs", "carriers", "costs", "timesteps", "carrier_tiers"]
 
 
@@ -89,7 +90,7 @@ def where(bool_operand, helper_function, data_var, comparison, subset):
 def eval_kwargs(dummy_model_data):
     return {
         "model_data": dummy_model_data,
-        "helper_func_dict": parsing.VALID_WHERE_HELPER_FUNCTIONS,
+        "helper_functions": helper_functions._registry["where"],
         "test": True,
         "errors": set(),
         "warnings": set(),