diff --git a/doc/_static/math.rst b/doc/_static/math.rst index 572c53c44..3da29fe68 100644 --- a/doc/_static/math.rst +++ b/doc/_static/math.rst @@ -38,7 +38,7 @@ Set the lower bound of a `storage`/`supply_plus` technology's energy capacity re \text{ node }\negthickspace \in \negthickspace\text{ nodes, } \text{ tech }\negthickspace \in \negthickspace\text{ techs } \\ - \text{if } (\exists (\textit{energy_cap_per_storage_cap_min}_\text{node,tech}) \land \neg (\exists (\textit{energy_cap_per_storage_cap_equals}_\text{node,tech}))) + \text{if } (\exists (\textbf{storage_cap}_\text{node,tech}) \land \exists (\textit{energy_cap_per_storage_cap_min}_\text{node,tech}) \land \neg (\exists (\textit{energy_cap_per_storage_cap_equals}_\text{node,tech}))) \end{array} \begin{cases} \textbf{energy_cap}_\text{node,tech} \geq \textbf{storage_cap}_\text{node,tech} \times \textit{energy_cap_per_storage_cap_min}_\text{node,tech}&\quad @@ -58,7 +58,7 @@ Set the upper bound of a `storage`/`supply_plus` technology's energy capacity re \text{ node }\negthickspace \in \negthickspace\text{ nodes, } \text{ tech }\negthickspace \in \negthickspace\text{ techs } \\ - \text{if } (\exists (\textit{energy_cap_per_storage_cap_max}_\text{node,tech}) \land \neg (\exists (\textit{energy_cap_per_storage_cap_equals}_\text{node,tech}))) + \text{if } (\exists (\textbf{storage_cap}_\text{node,tech}) \land \exists (\textit{energy_cap_per_storage_cap_max}_\text{node,tech}) \land \neg (\exists (\textit{energy_cap_per_storage_cap_equals}_\text{node,tech}))) \end{array} \begin{cases} \textbf{energy_cap}_\text{node,tech} \leq \textbf{storage_cap}_\text{node,tech} \times \textit{energy_cap_per_storage_cap_max}_\text{node,tech}&\quad @@ -78,7 +78,7 @@ Set a fixed relationship between a `storage`/`supply_plus` technology's energy c \text{ node }\negthickspace \in \negthickspace\text{ nodes, } \text{ tech }\negthickspace \in \negthickspace\text{ techs } \\ - \text{if } (\exists (\textit{energy_cap_per_storage_cap_equals}_\text{node,tech})) + \text{if } (\exists (\textbf{storage_cap}_\text{node,tech}) \land \exists (\textit{energy_cap_per_storage_cap_equals}_\text{node,tech})) \end{array} \begin{cases} \textbf{energy_cap}_\text{node,tech} = \textbf{storage_cap}_\text{node,tech} \times \textit{energy_cap_per_storage_cap_equals}_\text{node,tech}&\quad @@ -98,7 +98,7 @@ Set a `supply_plus` technology's energy capacity to equal its resource capacity. \text{ node }\negthickspace \in \negthickspace\text{ nodes, } \text{ tech }\negthickspace \in \negthickspace\text{ techs } \\ - \text{if } (\textit{resource_cap_equals_energy_cap}_\text{node,tech}\mathord{=}\text{true}) + \text{if } (\exists (\textbf{resource_cap}_\text{node,tech}) \land \textit{resource_cap_equals_energy_cap}_\text{node,tech}\mathord{=}\text{true}) \end{array} \begin{cases} \textbf{resource_cap}_\text{node,tech} = \textbf{energy_cap}_\text{node,tech}&\quad @@ -118,7 +118,7 @@ Set a technology's resource area to zero if its energy capacity upper bound is z \text{ node }\negthickspace \in \negthickspace\text{ nodes, } \text{ tech }\negthickspace \in \negthickspace\text{ techs } \\ - \text{if } ((\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 \textit{resource_unit}_\text{node,tech}\mathord{=}\text{energy_per_area}) \land \textit{energy_cap_max}_\text{node,tech}\mathord{=}\text{0}) + \text{if } (\exists (\textbf{resource_area}_\text{node,tech}) \land \textit{energy_cap_max}_\text{node,tech}\mathord{=}\text{0}) \end{array} \begin{cases} \textbf{resource_area}_\text{node,tech} = 0&\quad @@ -138,7 +138,7 @@ Set a fixed relationship between a technology's energy capacity and its resource \text{ node }\negthickspace \in \negthickspace\text{ nodes, } \text{ tech }\negthickspace \in \negthickspace\text{ techs } \\ - \text{if } (\exists (\textit{resource_area_per_energy_cap}_\text{node,tech})) + \text{if } (\exists (\textbf{resource_area}_\text{node,tech}) \land \exists (\textit{resource_area_per_energy_cap}_\text{node,tech})) \end{array} \begin{cases} \textbf{resource_area}_\text{node,tech} = \textbf{energy_cap}_\text{node,tech} \times \textit{resource_area_per_energy_cap}_\text{node,tech}&\quad @@ -157,7 +157,7 @@ Set an upper bound on the total area that all technologies with a resource_area \forall{} \text{ node }\negthickspace \in \negthickspace\text{ nodes } \\ - \text{if } (\exists (\textit{available_area}_\text{node}) \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})) + \text{if } (\exists (\textbf{resource_area}_\text{node,tech}) \land \exists (\textit{available_area}_\text{node})) \end{array} \begin{cases} \sum\limits_{\text{tech} \in \text{techs}} (\textbf{resource_area}_\text{node,tech}) \leq \textit{available_area}_\text{node}&\quad @@ -442,7 +442,7 @@ Set the upper bound of the amount of energy a `storage`/`supply_plus` technology \text{ tech }\negthickspace \in \negthickspace\text{ techs, } \text{ timestep }\negthickspace \in \negthickspace\text{ timesteps } \\ - \text{if } (\textit{include_storage}_\text{node,tech}\mathord{=}\text{true}) + \text{if } (\exists (\textbf{storage}_\text{node,tech,timestep})) \end{array} \begin{cases} \textbf{storage}_\text{node,tech,timestep} - \textbf{storage_cap}_\text{node,tech} \leq 0&\quad @@ -463,7 +463,7 @@ Set the lower bound of the stored energy a `storage`/`supply_plus` technology mu \text{ tech }\negthickspace \in \negthickspace\text{ techs, } \text{ timestep }\negthickspace \in \negthickspace\text{ timesteps } \\ - \text{if } (\textit{include_storage}_\text{node,tech}\mathord{=}\text{true} \land \exists (\textit{storage_discharge_depth}_\text{node,tech})) + \text{if } (\exists (\textbf{storage}_\text{node,tech,timestep}) \land \exists (\textit{storage_discharge_depth}_\text{node,tech})) \end{array} \begin{cases} \textbf{storage}_\text{node,tech,timestep} - (\textit{storage_discharge_depth}_\text{node,tech} \times \textbf{storage_cap}_\text{node,tech}) \geq 0&\quad @@ -641,26 +641,26 @@ Set the upper bound on, or a fixed total of, a `supply_plus` (with storage) tech \text{ carrier }\negthickspace \in \negthickspace\text{ carriers, } \text{ timestep }\negthickspace \in \negthickspace\text{ timesteps } \\ - \text{if } (\text{tech_group=supply_plus} \land \textit{include_storage}_\text{node,tech}\mathord{=}\text{true}) + \text{if } (\exists (\textbf{storage}_\text{node,tech,timestep}) \land \text{tech_group=supply_plus}) \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{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{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{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}))) + \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 } (\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})) + \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})) + \\ + \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 } (\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})) + \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})) + \\ + \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}) \\ \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 } (\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}))) + \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})) \\ \end{cases} @@ -678,7 +678,7 @@ Set the upper bound on, or a fixed total of, a `supply_plus` technology's abilit \text{ tech }\negthickspace \in \negthickspace\text{ techs, } \text{ timestep }\negthickspace \in \negthickspace\text{ timesteps } \\ - \text{if } (\exists (\textit{resource}_\text{node,tech,timestep}) \land \text{tech_group=supply_plus}) + \text{if } (\exists (\textbf{resource_con}_\text{node,tech,timestep}) \land \exists (\textit{resource}_\text{node,tech,timestep})) \end{array} \begin{cases} \textbf{resource_con}_\text{node,tech,timestep} = \textit{resource}_\text{node,tech,timestep} \times \textit{resource_scale}_\text{node,tech} \times \textbf{resource_area}_\text{node,tech}&\quad @@ -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{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{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{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}))) + \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{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})) + \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} = ((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{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})) + \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=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}) \\ \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{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}))) + \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}) \\ \end{cases} @@ -752,7 +752,7 @@ Fix the relationship between energy stored in a `storage` technology at the star \text{ node }\negthickspace \in \negthickspace\text{ nodes, } \text{ tech }\negthickspace \in \negthickspace\text{ techs } \\ - \text{if } (\exists (\textit{storage_initial}_\text{node,tech}) \land \textit{include_storage}_\text{node,tech}\mathord{=}\text{true} \land \text{run_config.cyclic_storage}\mathord{=}\text{true}) + \text{if } (\exists (\textbf{storage}_\text{node,tech,timestep}) \land \exists (\textit{storage_initial}_\text{node,tech}) \land \text{run_config.cyclic_storage}\mathord{=}\text{true}) \end{array} \begin{cases} \textbf{storage}_\text{node,tech,timestep=timesteps[-1]} \times ((1 - \textit{storage_loss}_\text{node,tech,timestep})^{\textit{timestep_resolution}_\text{timestep=timesteps[-1]}}) = \textit{storage_initial}_\text{node,tech} \times \textbf{storage_cap}_\text{node,tech}&\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{node,tech,carrier}) \land \textit{export}_\text{node,tech}\mathord{=}\text{true}) + \text{if } (\exists (\textbf{carrier_export}_\text{node,tech,carrier,timestep}) \land \exists (\textit{export_max}_\text{node,tech})) \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{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}) + \text{if } (\exists (\textbf{operating_units}_\text{node,tech,timestep}) \land \exists (\textit{carrier}_\text{tech,carrier_tier,carrier}) \land \neg (\text{tech_group=conversion_plus}) \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 @@ -906,7 +906,7 @@ Set the upper bound of a `conversion_plus` technology's ability to produce energ \text{ tech }\negthickspace \in \negthickspace\text{ techs, } \text{ timestep }\negthickspace \in \negthickspace\text{ timesteps } \\ - \text{if } (\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 (\textbf{operating_units}_\text{node,tech,timestep}) \land \text{tech_group=conversion_plus} \land \textit{allowed_carrier_prod}_\text{node,tech}\mathord{=}\text{true}) \end{array} \begin{cases} \sum\limits_{\text{carrier} \in \text{carrier_tier(out)}} (\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}&\quad @@ -928,7 +928,7 @@ Set the upper bound of a non-`conversion_plus` technology's ability to consume e \text{ carrier }\negthickspace \in \negthickspace\text{ carriers, } \text{ timestep }\negthickspace \in \negthickspace\text{ timesteps } \\ - \text{if } (\neg (\text{tech_group=conversion_plus}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer} \land \textit{allowed_carrier_con}_\text{node,tech}\mathord{=}\text{true}) + \text{if } (\exists (\textbf{operating_units}_\text{node,tech,timestep}) \land \neg (\text{tech_group=conversion_plus}) \land \textit{allowed_carrier_con}_\text{node,tech}\mathord{=}\text{true}) \end{array} \begin{cases} \textbf{carrier_con}_\text{node,tech,carrier,timestep} \geq -1 \times \textbf{operating_units}_\text{node,tech,timestep} \times \textit{timestep_resolution}_\text{timestep} \times \textit{energy_cap_per_unit}_\text{node,tech}&\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{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}) + \text{if } (\exists (\textbf{operating_units}_\text{node,tech,timestep}) \land \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{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 @@ -971,7 +971,7 @@ Set the lower bound of a `conversion_plus` technology's ability to produce energ \text{ tech }\negthickspace \in \negthickspace\text{ techs, } \text{ timestep }\negthickspace \in \negthickspace\text{ timesteps } \\ - \text{if } (\exists (\textit{energy_cap_min_use}_\text{node,tech}) \land \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 (\textbf{operating_units}_\text{node,tech,timestep}) \land \exists (\textit{energy_cap_min_use}_\text{node,tech}) \land \text{tech_group=conversion_plus} \land \textit{allowed_carrier_prod}_\text{node,tech}\mathord{=}\text{true}) \end{array} \begin{cases} \sum\limits_{\text{carrier} \in \text{carrier_tier(out)}} (\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 @@ -991,7 +991,7 @@ Fix the storage capacity of any technology using integer units to define its cap \text{ node }\negthickspace \in \negthickspace\text{ nodes, } \text{ tech }\negthickspace \in \negthickspace\text{ techs } \\ - \text{if } (((\text{tech_group=storage} \lor \text{tech_group=supply_plus}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer}) \land \textit{include_storage}_\text{node,tech}\mathord{=}\text{true}) + \text{if } (\exists (\textbf{operating_units}_\text{node,tech,timestep}) \land \exists (\textbf{storage}_\text{node,tech,timestep})) \end{array} \begin{cases} \textbf{storage_cap}_\text{node,tech} = \textbf{units}_\text{node,tech} \times \textit{storage_cap_per_unit}_\text{node,tech}&\quad @@ -1011,7 +1011,7 @@ Fix the energy capacity of any technology using integer units to define its capa \text{ node }\negthickspace \in \negthickspace\text{ nodes, } \text{ tech }\negthickspace \in \negthickspace\text{ techs } \\ - \text{if } (\exists (\textit{energy_cap_per_unit}_\text{node,tech}) \land \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer}) + \text{if } (\exists (\textbf{operating_units}_\text{node,tech,timestep}) \land \exists (\textit{energy_cap_per_unit}_\text{node,tech})) \end{array} \begin{cases} \textbf{energy_cap}_\text{node,tech} = \textbf{units}_\text{node,tech} \times \textit{energy_cap_per_unit}_\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{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}) + \text{if } (\exists (\textbf{purchased}_\text{node,tech}) \land (\exists (\textit{energy_cap_max}_\text{node,tech}) \lor \exists (\textit{energy_cap_equals}_\text{node,tech}))) \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{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}) + \text{if } (\exists (\textbf{purchased}_\text{node,tech}) \land \exists (\textit{energy_cap_min}_\text{node,tech}) \land \neg (\exists (\textit{energy_cap_equals}_\text{node,tech}))) \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{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}) + \text{if } (\exists (\textbf{purchased}_\text{node,tech}) \land (\exists (\textit{storage_cap_max}_\text{node,tech}) \lor \exists (\textit{storage_cap_equals}_\text{node,tech}))) \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{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}) + \text{if } (\exists (\textbf{purchased}_\text{node,tech}) \land \exists (\textit{storage_cap_min}_\text{node,tech}) \land \neg (\exists (\textit{storage_cap_equals}_\text{node,tech}))) \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 @@ -1118,20 +1118,20 @@ Set the upper bound on, or a fixed total of, the total number of units of a tech \forall{} \text{ tech }\negthickspace \in \negthickspace\text{ techs } \\ - \text{if } ((\textit{cap_method}_\text{node,tech}\mathord{=}\text{binary} \lor \textit{cap_method}_\text{node,tech}\mathord{=}\text{integer}) \land (\exists (\textit{units_max_systemwide}_\text{tech}) \lor \exists (\textit{units_equals_systemwide}_\text{tech}))) + \text{if } ((\exists (\textbf{purchased}_\text{node,tech}) \lor \exists (\textbf{units}_\text{node,tech})) \land (\exists (\textit{units_max_systemwide}_\text{tech}) \lor \exists (\textit{units_equals_systemwide}_\text{tech}))) \end{array} \begin{cases} \sum\limits_{\text{node} \in \text{nodes}} (\textbf{purchased}_\text{node,tech}) = \textit{units_equals_systemwide}_\text{tech}&\quad - \text{if } (\exists (\textit{units_equals_systemwide}_\text{tech}))\land{}(\textit{cap_method}_\text{node,tech}\mathord{=}\text{binary}) + \text{if } (\exists (\textit{units_equals_systemwide}_\text{tech}))\land{}(\exists (\textbf{purchased}_\text{node,tech})) \\ \sum\limits_{\text{node} \in \text{nodes}} (\textbf{units}_\text{node,tech}) = \textit{units_equals_systemwide}_\text{tech}&\quad - \text{if } (\exists (\textit{units_equals_systemwide}_\text{tech}))\land{}(\textit{cap_method}_\text{node,tech}\mathord{=}\text{integer}) + \text{if } (\exists (\textit{units_equals_systemwide}_\text{tech}))\land{}(\exists (\textbf{units}_\text{node,tech})) \\ \sum\limits_{\text{node} \in \text{nodes}} (\textbf{purchased}_\text{node,tech}) \leq \textit{units_max_systemwide}_\text{tech}&\quad - \text{if } (\neg (\exists (\textit{units_equals_systemwide}_\text{tech})))\land{}(\textit{cap_method}_\text{node,tech}\mathord{=}\text{binary}) + \text{if } (\neg (\exists (\textit{units_equals_systemwide}_\text{tech})))\land{}(\exists (\textbf{purchased}_\text{node,tech})) \\ \sum\limits_{\text{node} \in \text{nodes}} (\textbf{units}_\text{node,tech}) \leq \textit{units_max_systemwide}_\text{tech}&\quad - \text{if } (\neg (\exists (\textit{units_equals_systemwide}_\text{tech})))\land{}(\textit{cap_method}_\text{node,tech}\mathord{=}\text{integer}) + \text{if } (\neg (\exists (\textit{units_equals_systemwide}_\text{tech})))\land{}(\exists (\textbf{units}_\text{node,tech})) \\ \end{cases} @@ -1149,7 +1149,7 @@ Set a technology's ability to consume energy in the same timestep that it is pro \text{ tech }\negthickspace \in \negthickspace\text{ techs, } \text{ timestep }\negthickspace \in \negthickspace\text{ timesteps } \\ - \text{if } (\textit{force_asynchronous_prod_con}_\text{node,tech}\mathord{=}\text{true}) + \text{if } (\exists (\textbf{prod_con_switch}_\text{node,tech,timestep})) \end{array} \begin{cases} -1 \times \sum\limits_{\text{carrier} \in \text{carrier_tier(in)}} (\textbf{carrier_con}_\text{node,tech,carrier,timestep}) \leq (1 - \textbf{prod_con_switch}_\text{node,tech,timestep}) \times \textit{bigM}&\quad @@ -1170,7 +1170,7 @@ Set a technology's ability to produce energy in the same timestep that it is con \text{ tech }\negthickspace \in \negthickspace\text{ techs, } \text{ timestep }\negthickspace \in \negthickspace\text{ timesteps } \\ - \text{if } (\textit{force_asynchronous_prod_con}_\text{node,tech}\mathord{=}\text{true}) + \text{if } (\exists (\textbf{prod_con_switch}_\text{node,tech,timestep})) \end{array} \begin{cases} \sum\limits_{\text{carrier} \in \text{carrier_tier(out)}} (\textbf{carrier_prod}_\text{node,tech,carrier,timestep}) \leq \textbf{prod_con_switch}_\text{node,tech,timestep} \times \textit{bigM}&\quad @@ -1257,94 +1257,94 @@ The operating costs per timestep of a technology \end{array} \begin{cases} \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_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]}) + \text{if } (\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})\land{}(\exists (\textit{cost_om_prod}_\text{node,tech,cost,timestep}) \land \text{tech_group=conversion_plus}) \\ - \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_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{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})\land{}(\exists (\textit{cost_om_prod}_\text{node,tech,cost,timestep}) \land \neg (\text{tech_group=conversion_plus})) \\ - \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{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 } (\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})\land{}(\neg (\exists (\textit{cost_om_prod}_\text{node,tech,cost,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_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{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]})\land{}(\exists (\textit{cost_om_prod}_\text{node,tech,cost,timestep}) \land \text{tech_group=conversion_plus}) \\ - \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{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{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]})\land{}(\exists (\textit{cost_om_prod}_\text{node,tech,cost,timestep}) \land \neg (\text{tech_group=conversion_plus})) \\ - \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_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 } (\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]})\land{}(\neg (\exists (\textit{cost_om_prod}_\text{node,tech,cost,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{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{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})\land{}(\exists (\textit{cost_om_prod}_\text{node,tech,cost,timestep}) \land \text{tech_group=conversion_plus}) \\ - \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_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{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})\land{}(\exists (\textit{cost_om_prod}_\text{node,tech,cost,timestep}) \land \neg (\text{tech_group=conversion_plus})) \\ - \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{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 } (\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})\land{}(\neg (\exists (\textit{cost_om_prod}_\text{node,tech,cost,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_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{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]})\land{}(\exists (\textit{cost_om_prod}_\text{node,tech,cost,timestep}) \land \text{tech_group=conversion_plus}) \\ - \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{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{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]})\land{}(\exists (\textit{cost_om_prod}_\text{node,tech,cost,timestep}) \land \neg (\text{tech_group=conversion_plus})) \\ - \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_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 } (\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]})\land{}(\neg (\exists (\textit{cost_om_prod}_\text{node,tech,cost,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{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{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})))\land{}(\exists (\textit{cost_om_prod}_\text{node,tech,cost,timestep}) \land \text{tech_group=conversion_plus}) \\ \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{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}) + \text{if } (\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})))\land{}(\exists (\textit{cost_om_prod}_\text{node,tech,cost,timestep}) \land \neg (\text{tech_group=conversion_plus})) \\ - \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_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 } (\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})))\land{}(\neg (\exists (\textit{cost_om_prod}_\text{node,tech,cost,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_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 } (\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})\land{}(\exists (\textit{cost_om_prod}_\text{node,tech,cost,timestep}) \land \text{tech_group=conversion_plus}) \\ - \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{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 } (\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})\land{}(\exists (\textit{cost_om_prod}_\text{node,tech,cost,timestep}) \land \neg (\text{tech_group=conversion_plus})) \\ - \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_om_con}_\text{node,tech,cost,timestep} \times \textbf{resource_con}_\text{node,tech,timestep})&\quad + \text{if } (\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})\land{}(\neg (\exists (\textit{cost_om_prod}_\text{node,tech,cost,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_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 } (\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]})\land{}(\exists (\textit{cost_om_prod}_\text{node,tech,cost,timestep}) \land \text{tech_group=conversion_plus}) \\ - \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_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 } (\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]})\land{}(\exists (\textit{cost_om_prod}_\text{node,tech,cost,timestep}) \land \neg (\text{tech_group=conversion_plus})) \\ - \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{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_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]})\land{}(\neg (\exists (\textit{cost_om_prod}_\text{node,tech,cost,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_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 } (\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})\land{}(\exists (\textit{cost_om_prod}_\text{node,tech,cost,timestep}) \land \text{tech_group=conversion_plus}) \\ - \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_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 } (\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})\land{}(\exists (\textit{cost_om_prod}_\text{node,tech,cost,timestep}) \land \neg (\text{tech_group=conversion_plus})) \\ - \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_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_export}_\text{node,tech,cost,timestep})))\land{}(\exists (\textit{cost_om_con}_\text{node,tech,cost,timestep}) \land \text{tech_group=conversion_plus})\land{}(\neg (\exists (\textit{cost_om_prod}_\text{node,tech,cost,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_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 } (\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]})\land{}(\exists (\textit{cost_om_prod}_\text{node,tech,cost,timestep}) \land \text{tech_group=conversion_plus}) \\ - \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_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 } (\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]})\land{}(\exists (\textit{cost_om_prod}_\text{node,tech,cost,timestep}) \land \neg (\text{tech_group=conversion_plus})) \\ \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]}) + \text{if } (\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]})\land{}(\neg (\exists (\textit{cost_om_prod}_\text{node,tech,cost,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 } (\neg (\exists (\textit{cost_export}_\text{node,tech,cost,timestep})))\land{}(\neg (\exists (\textit{cost_om_con}_\text{node,tech,cost,timestep})))\land{}(\exists (\textit{cost_om_prod}_\text{node,tech,cost,timestep}) \land \text{tech_group=conversion_plus}) + \\ + \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 } (\neg (\exists (\textit{cost_export}_\text{node,tech,cost,timestep})))\land{}(\neg (\exists (\textit{cost_om_con}_\text{node,tech,cost,timestep})))\land{}(\exists (\textit{cost_om_prod}_\text{node,tech,cost,timestep}) \land \neg (\text{tech_group=conversion_plus})) \\ \textit{timestep_weights}_\text{timestep} \times (0)&\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{}(\neg (\exists (\textit{cost_om_con}_\text{node,tech,cost,timestep}))) + \text{if } (\neg (\exists (\textit{cost_export}_\text{node,tech,cost,timestep})))\land{}(\neg (\exists (\textit{cost_om_con}_\text{node,tech,cost,timestep})))\land{}(\neg (\exists (\textit{cost_om_prod}_\text{node,tech,cost,timestep}))) \\ \end{cases} @@ -1366,292 +1366,292 @@ The installation costs of a technology, including annualised investment costs an \end{array} \begin{cases} \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}) + \text{if } (\text{tech_group=transmission})\land{}(\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land \exists (\textbf{storage_cap}_\text{node,tech}))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \exists (\textbf{purchased}_\text{node,tech}))\land{}(\exists (\textit{cost_energy_cap}_\text{node,tech,cost}))\land{}(\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \exists (\textbf{resource_cap}_\text{node,tech}))\land{}(\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land \exists (\textbf{resource_area}_\text{node,tech})) \\ - \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{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{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 } (\text{tech_group=transmission})\land{}(\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land \exists (\textbf{storage_cap}_\text{node,tech}))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \exists (\textbf{purchased}_\text{node,tech}))\land{}(\exists (\textit{cost_energy_cap}_\text{node,tech,cost}))\land{}(\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \exists (\textbf{resource_cap}_\text{node,tech}))\land{}(\neg (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land \exists (\textbf{resource_area}_\text{node,tech}))) \\ - \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{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 } (\text{tech_group=transmission})\land{}(\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land \exists (\textbf{storage_cap}_\text{node,tech}))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \exists (\textbf{purchased}_\text{node,tech}))\land{}(\exists (\textit{cost_energy_cap}_\text{node,tech,cost}))\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \exists (\textbf{resource_cap}_\text{node,tech})))\land{}(\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land \exists (\textbf{resource_area}_\text{node,tech})) \\ - \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{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 } (\text{tech_group=transmission})\land{}(\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land \exists (\textbf{storage_cap}_\text{node,tech}))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \exists (\textbf{purchased}_\text{node,tech}))\land{}(\exists (\textit{cost_energy_cap}_\text{node,tech,cost}))\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \exists (\textbf{resource_cap}_\text{node,tech})))\land{}(\neg (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land \exists (\textbf{resource_area}_\text{node,tech}))) \\ - \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{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 } (\text{tech_group=transmission})\land{}(\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land \exists (\textbf{storage_cap}_\text{node,tech}))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \exists (\textbf{purchased}_\text{node,tech}))\land{}(\neg (\exists (\textit{cost_energy_cap}_\text{node,tech,cost})))\land{}(\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \exists (\textbf{resource_cap}_\text{node,tech}))\land{}(\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land \exists (\textbf{resource_area}_\text{node,tech})) \\ - \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{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 } (\text{tech_group=transmission})\land{}(\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land \exists (\textbf{storage_cap}_\text{node,tech}))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \exists (\textbf{purchased}_\text{node,tech}))\land{}(\neg (\exists (\textit{cost_energy_cap}_\text{node,tech,cost})))\land{}(\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \exists (\textbf{resource_cap}_\text{node,tech}))\land{}(\neg (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land \exists (\textbf{resource_area}_\text{node,tech}))) \\ - \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{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 } (\text{tech_group=transmission})\land{}(\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land \exists (\textbf{storage_cap}_\text{node,tech}))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \exists (\textbf{purchased}_\text{node,tech}))\land{}(\neg (\exists (\textit{cost_energy_cap}_\text{node,tech,cost})))\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \exists (\textbf{resource_cap}_\text{node,tech})))\land{}(\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land \exists (\textbf{resource_area}_\text{node,tech})) \\ - \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{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 } (\text{tech_group=transmission})\land{}(\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land \exists (\textbf{storage_cap}_\text{node,tech}))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \exists (\textbf{purchased}_\text{node,tech}))\land{}(\neg (\exists (\textit{cost_energy_cap}_\text{node,tech,cost})))\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \exists (\textbf{resource_cap}_\text{node,tech})))\land{}(\neg (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land \exists (\textbf{resource_area}_\text{node,tech}))) \\ - \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{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 } (\text{tech_group=transmission})\land{}(\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land \exists (\textbf{storage_cap}_\text{node,tech}))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \exists (\textbf{units}_\text{node,tech}))\land{}(\exists (\textit{cost_energy_cap}_\text{node,tech,cost}))\land{}(\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \exists (\textbf{resource_cap}_\text{node,tech}))\land{}(\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land \exists (\textbf{resource_area}_\text{node,tech})) \\ - \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{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 } (\text{tech_group=transmission})\land{}(\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land \exists (\textbf{storage_cap}_\text{node,tech}))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \exists (\textbf{units}_\text{node,tech}))\land{}(\exists (\textit{cost_energy_cap}_\text{node,tech,cost}))\land{}(\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \exists (\textbf{resource_cap}_\text{node,tech}))\land{}(\neg (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land \exists (\textbf{resource_area}_\text{node,tech}))) \\ - \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{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 } (\text{tech_group=transmission})\land{}(\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land \exists (\textbf{storage_cap}_\text{node,tech}))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \exists (\textbf{units}_\text{node,tech}))\land{}(\exists (\textit{cost_energy_cap}_\text{node,tech,cost}))\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \exists (\textbf{resource_cap}_\text{node,tech})))\land{}(\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land \exists (\textbf{resource_area}_\text{node,tech})) \\ - \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{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 } (\text{tech_group=transmission})\land{}(\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land \exists (\textbf{storage_cap}_\text{node,tech}))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \exists (\textbf{units}_\text{node,tech}))\land{}(\exists (\textit{cost_energy_cap}_\text{node,tech,cost}))\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \exists (\textbf{resource_cap}_\text{node,tech})))\land{}(\neg (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land \exists (\textbf{resource_area}_\text{node,tech}))) \\ \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}) + \text{if } (\text{tech_group=transmission})\land{}(\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land \exists (\textbf{storage_cap}_\text{node,tech}))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \exists (\textbf{units}_\text{node,tech}))\land{}(\neg (\exists (\textit{cost_energy_cap}_\text{node,tech,cost})))\land{}(\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \exists (\textbf{resource_cap}_\text{node,tech}))\land{}(\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land \exists (\textbf{resource_area}_\text{node,tech})) \\ - \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{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{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 } (\text{tech_group=transmission})\land{}(\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land \exists (\textbf{storage_cap}_\text{node,tech}))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \exists (\textbf{units}_\text{node,tech}))\land{}(\neg (\exists (\textit{cost_energy_cap}_\text{node,tech,cost})))\land{}(\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \exists (\textbf{resource_cap}_\text{node,tech}))\land{}(\neg (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land \exists (\textbf{resource_area}_\text{node,tech}))) \\ - \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{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 } (\text{tech_group=transmission})\land{}(\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land \exists (\textbf{storage_cap}_\text{node,tech}))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \exists (\textbf{units}_\text{node,tech}))\land{}(\neg (\exists (\textit{cost_energy_cap}_\text{node,tech,cost})))\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \exists (\textbf{resource_cap}_\text{node,tech})))\land{}(\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land \exists (\textbf{resource_area}_\text{node,tech})) \\ - \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{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 } (\text{tech_group=transmission})\land{}(\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land \exists (\textbf{storage_cap}_\text{node,tech}))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \exists (\textbf{units}_\text{node,tech}))\land{}(\neg (\exists (\textit{cost_energy_cap}_\text{node,tech,cost})))\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \exists (\textbf{resource_cap}_\text{node,tech})))\land{}(\neg (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land \exists (\textbf{resource_area}_\text{node,tech}))) \\ - \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{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 } (\text{tech_group=transmission})\land{}(\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land \exists (\textbf{storage_cap}_\text{node,tech}))\land{}(\neg (\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land (\exists (\textbf{purchased}_\text{node,tech}) \lor \exists (\textbf{units}_\text{node,tech}))))\land{}(\exists (\textit{cost_energy_cap}_\text{node,tech,cost}))\land{}(\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \exists (\textbf{resource_cap}_\text{node,tech}))\land{}(\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land \exists (\textbf{resource_area}_\text{node,tech})) \\ - \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{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 } (\text{tech_group=transmission})\land{}(\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land \exists (\textbf{storage_cap}_\text{node,tech}))\land{}(\neg (\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land (\exists (\textbf{purchased}_\text{node,tech}) \lor \exists (\textbf{units}_\text{node,tech}))))\land{}(\exists (\textit{cost_energy_cap}_\text{node,tech,cost}))\land{}(\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \exists (\textbf{resource_cap}_\text{node,tech}))\land{}(\neg (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land \exists (\textbf{resource_area}_\text{node,tech}))) \\ - \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{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 } (\text{tech_group=transmission})\land{}(\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land \exists (\textbf{storage_cap}_\text{node,tech}))\land{}(\neg (\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land (\exists (\textbf{purchased}_\text{node,tech}) \lor \exists (\textbf{units}_\text{node,tech}))))\land{}(\exists (\textit{cost_energy_cap}_\text{node,tech,cost}))\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \exists (\textbf{resource_cap}_\text{node,tech})))\land{}(\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land \exists (\textbf{resource_area}_\text{node,tech})) \\ - \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{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 } (\text{tech_group=transmission})\land{}(\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land \exists (\textbf{storage_cap}_\text{node,tech}))\land{}(\neg (\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land (\exists (\textbf{purchased}_\text{node,tech}) \lor \exists (\textbf{units}_\text{node,tech}))))\land{}(\exists (\textit{cost_energy_cap}_\text{node,tech,cost}))\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \exists (\textbf{resource_cap}_\text{node,tech})))\land{}(\neg (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land \exists (\textbf{resource_area}_\text{node,tech}))) \\ - \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{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 } (\text{tech_group=transmission})\land{}(\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land \exists (\textbf{storage_cap}_\text{node,tech}))\land{}(\neg (\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land (\exists (\textbf{purchased}_\text{node,tech}) \lor \exists (\textbf{units}_\text{node,tech}))))\land{}(\neg (\exists (\textit{cost_energy_cap}_\text{node,tech,cost})))\land{}(\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \exists (\textbf{resource_cap}_\text{node,tech}))\land{}(\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land \exists (\textbf{resource_area}_\text{node,tech})) \\ - \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{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 } (\text{tech_group=transmission})\land{}(\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land \exists (\textbf{storage_cap}_\text{node,tech}))\land{}(\neg (\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land (\exists (\textbf{purchased}_\text{node,tech}) \lor \exists (\textbf{units}_\text{node,tech}))))\land{}(\neg (\exists (\textit{cost_energy_cap}_\text{node,tech,cost})))\land{}(\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \exists (\textbf{resource_cap}_\text{node,tech}))\land{}(\neg (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land \exists (\textbf{resource_area}_\text{node,tech}))) \\ - \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{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 } (\text{tech_group=transmission})\land{}(\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land \exists (\textbf{storage_cap}_\text{node,tech}))\land{}(\neg (\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land (\exists (\textbf{purchased}_\text{node,tech}) \lor \exists (\textbf{units}_\text{node,tech}))))\land{}(\neg (\exists (\textit{cost_energy_cap}_\text{node,tech,cost})))\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \exists (\textbf{resource_cap}_\text{node,tech})))\land{}(\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land \exists (\textbf{resource_area}_\text{node,tech})) \\ - \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{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 } (\text{tech_group=transmission})\land{}(\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land \exists (\textbf{storage_cap}_\text{node,tech}))\land{}(\neg (\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land (\exists (\textbf{purchased}_\text{node,tech}) \lor \exists (\textbf{units}_\text{node,tech}))))\land{}(\neg (\exists (\textit{cost_energy_cap}_\text{node,tech,cost})))\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \exists (\textbf{resource_cap}_\text{node,tech})))\land{}(\neg (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land \exists (\textbf{resource_area}_\text{node,tech}))) \\ - \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{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 } (\text{tech_group=transmission})\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land \exists (\textbf{storage_cap}_\text{node,tech})))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \exists (\textbf{purchased}_\text{node,tech}))\land{}(\exists (\textit{cost_energy_cap}_\text{node,tech,cost}))\land{}(\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \exists (\textbf{resource_cap}_\text{node,tech}))\land{}(\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land \exists (\textbf{resource_area}_\text{node,tech})) \\ - \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{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 } (\text{tech_group=transmission})\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land \exists (\textbf{storage_cap}_\text{node,tech})))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \exists (\textbf{purchased}_\text{node,tech}))\land{}(\exists (\textit{cost_energy_cap}_\text{node,tech,cost}))\land{}(\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \exists (\textbf{resource_cap}_\text{node,tech}))\land{}(\neg (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land \exists (\textbf{resource_area}_\text{node,tech}))) \\ - \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{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 } (\text{tech_group=transmission})\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land \exists (\textbf{storage_cap}_\text{node,tech})))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \exists (\textbf{purchased}_\text{node,tech}))\land{}(\exists (\textit{cost_energy_cap}_\text{node,tech,cost}))\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \exists (\textbf{resource_cap}_\text{node,tech})))\land{}(\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land \exists (\textbf{resource_area}_\text{node,tech})) \\ - \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{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 } (\text{tech_group=transmission})\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land \exists (\textbf{storage_cap}_\text{node,tech})))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \exists (\textbf{purchased}_\text{node,tech}))\land{}(\exists (\textit{cost_energy_cap}_\text{node,tech,cost}))\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \exists (\textbf{resource_cap}_\text{node,tech})))\land{}(\neg (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land \exists (\textbf{resource_area}_\text{node,tech}))) \\ - \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{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 } (\text{tech_group=transmission})\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land \exists (\textbf{storage_cap}_\text{node,tech})))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \exists (\textbf{purchased}_\text{node,tech}))\land{}(\neg (\exists (\textit{cost_energy_cap}_\text{node,tech,cost})))\land{}(\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \exists (\textbf{resource_cap}_\text{node,tech}))\land{}(\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land \exists (\textbf{resource_area}_\text{node,tech})) \\ - \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{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 } (\text{tech_group=transmission})\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land \exists (\textbf{storage_cap}_\text{node,tech})))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \exists (\textbf{purchased}_\text{node,tech}))\land{}(\neg (\exists (\textit{cost_energy_cap}_\text{node,tech,cost})))\land{}(\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \exists (\textbf{resource_cap}_\text{node,tech}))\land{}(\neg (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land \exists (\textbf{resource_area}_\text{node,tech}))) \\ - \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{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 } (\text{tech_group=transmission})\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land \exists (\textbf{storage_cap}_\text{node,tech})))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \exists (\textbf{purchased}_\text{node,tech}))\land{}(\neg (\exists (\textit{cost_energy_cap}_\text{node,tech,cost})))\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \exists (\textbf{resource_cap}_\text{node,tech})))\land{}(\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land \exists (\textbf{resource_area}_\text{node,tech})) \\ - \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{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 } (\text{tech_group=transmission})\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land \exists (\textbf{storage_cap}_\text{node,tech})))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \exists (\textbf{purchased}_\text{node,tech}))\land{}(\neg (\exists (\textit{cost_energy_cap}_\text{node,tech,cost})))\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \exists (\textbf{resource_cap}_\text{node,tech})))\land{}(\neg (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land \exists (\textbf{resource_area}_\text{node,tech}))) \\ - \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{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 } (\text{tech_group=transmission})\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land \exists (\textbf{storage_cap}_\text{node,tech})))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \exists (\textbf{units}_\text{node,tech}))\land{}(\exists (\textit{cost_energy_cap}_\text{node,tech,cost}))\land{}(\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \exists (\textbf{resource_cap}_\text{node,tech}))\land{}(\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land \exists (\textbf{resource_area}_\text{node,tech})) \\ - \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{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 } (\text{tech_group=transmission})\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land \exists (\textbf{storage_cap}_\text{node,tech})))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \exists (\textbf{units}_\text{node,tech}))\land{}(\exists (\textit{cost_energy_cap}_\text{node,tech,cost}))\land{}(\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \exists (\textbf{resource_cap}_\text{node,tech}))\land{}(\neg (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land \exists (\textbf{resource_area}_\text{node,tech}))) \\ - \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{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 } (\text{tech_group=transmission})\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land \exists (\textbf{storage_cap}_\text{node,tech})))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \exists (\textbf{units}_\text{node,tech}))\land{}(\exists (\textit{cost_energy_cap}_\text{node,tech,cost}))\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \exists (\textbf{resource_cap}_\text{node,tech})))\land{}(\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land \exists (\textbf{resource_area}_\text{node,tech})) \\ - \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{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 } (\text{tech_group=transmission})\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land \exists (\textbf{storage_cap}_\text{node,tech})))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \exists (\textbf{units}_\text{node,tech}))\land{}(\exists (\textit{cost_energy_cap}_\text{node,tech,cost}))\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \exists (\textbf{resource_cap}_\text{node,tech})))\land{}(\neg (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land \exists (\textbf{resource_area}_\text{node,tech}))) \\ - \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{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 } (\text{tech_group=transmission})\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land \exists (\textbf{storage_cap}_\text{node,tech})))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \exists (\textbf{units}_\text{node,tech}))\land{}(\neg (\exists (\textit{cost_energy_cap}_\text{node,tech,cost})))\land{}(\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \exists (\textbf{resource_cap}_\text{node,tech}))\land{}(\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land \exists (\textbf{resource_area}_\text{node,tech})) \\ - \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{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 } (\text{tech_group=transmission})\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land \exists (\textbf{storage_cap}_\text{node,tech})))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \exists (\textbf{units}_\text{node,tech}))\land{}(\neg (\exists (\textit{cost_energy_cap}_\text{node,tech,cost})))\land{}(\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \exists (\textbf{resource_cap}_\text{node,tech}))\land{}(\neg (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land \exists (\textbf{resource_area}_\text{node,tech}))) \\ - \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{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 } (\text{tech_group=transmission})\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land \exists (\textbf{storage_cap}_\text{node,tech})))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \exists (\textbf{units}_\text{node,tech}))\land{}(\neg (\exists (\textit{cost_energy_cap}_\text{node,tech,cost})))\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \exists (\textbf{resource_cap}_\text{node,tech})))\land{}(\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land \exists (\textbf{resource_area}_\text{node,tech})) \\ - \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{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 } (\text{tech_group=transmission})\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land \exists (\textbf{storage_cap}_\text{node,tech})))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \exists (\textbf{units}_\text{node,tech}))\land{}(\neg (\exists (\textit{cost_energy_cap}_\text{node,tech,cost})))\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \exists (\textbf{resource_cap}_\text{node,tech})))\land{}(\neg (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land \exists (\textbf{resource_area}_\text{node,tech}))) \\ - \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{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 } (\text{tech_group=transmission})\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land \exists (\textbf{storage_cap}_\text{node,tech})))\land{}(\neg (\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land (\exists (\textbf{purchased}_\text{node,tech}) \lor \exists (\textbf{units}_\text{node,tech}))))\land{}(\exists (\textit{cost_energy_cap}_\text{node,tech,cost}))\land{}(\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \exists (\textbf{resource_cap}_\text{node,tech}))\land{}(\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land \exists (\textbf{resource_area}_\text{node,tech})) \\ - \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{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 } (\text{tech_group=transmission})\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land \exists (\textbf{storage_cap}_\text{node,tech})))\land{}(\neg (\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land (\exists (\textbf{purchased}_\text{node,tech}) \lor \exists (\textbf{units}_\text{node,tech}))))\land{}(\exists (\textit{cost_energy_cap}_\text{node,tech,cost}))\land{}(\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \exists (\textbf{resource_cap}_\text{node,tech}))\land{}(\neg (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land \exists (\textbf{resource_area}_\text{node,tech}))) \\ - \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{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 } (\text{tech_group=transmission})\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land \exists (\textbf{storage_cap}_\text{node,tech})))\land{}(\neg (\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land (\exists (\textbf{purchased}_\text{node,tech}) \lor \exists (\textbf{units}_\text{node,tech}))))\land{}(\exists (\textit{cost_energy_cap}_\text{node,tech,cost}))\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \exists (\textbf{resource_cap}_\text{node,tech})))\land{}(\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land \exists (\textbf{resource_area}_\text{node,tech})) \\ - \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{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 } (\text{tech_group=transmission})\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land \exists (\textbf{storage_cap}_\text{node,tech})))\land{}(\neg (\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land (\exists (\textbf{purchased}_\text{node,tech}) \lor \exists (\textbf{units}_\text{node,tech}))))\land{}(\exists (\textit{cost_energy_cap}_\text{node,tech,cost}))\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \exists (\textbf{resource_cap}_\text{node,tech})))\land{}(\neg (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land \exists (\textbf{resource_area}_\text{node,tech}))) \\ - \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{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 } (\text{tech_group=transmission})\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land \exists (\textbf{storage_cap}_\text{node,tech})))\land{}(\neg (\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land (\exists (\textbf{purchased}_\text{node,tech}) \lor \exists (\textbf{units}_\text{node,tech}))))\land{}(\neg (\exists (\textit{cost_energy_cap}_\text{node,tech,cost})))\land{}(\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \exists (\textbf{resource_cap}_\text{node,tech}))\land{}(\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land \exists (\textbf{resource_area}_\text{node,tech})) \\ - \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{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 } (\text{tech_group=transmission})\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land \exists (\textbf{storage_cap}_\text{node,tech})))\land{}(\neg (\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land (\exists (\textbf{purchased}_\text{node,tech}) \lor \exists (\textbf{units}_\text{node,tech}))))\land{}(\neg (\exists (\textit{cost_energy_cap}_\text{node,tech,cost})))\land{}(\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \exists (\textbf{resource_cap}_\text{node,tech}))\land{}(\neg (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land \exists (\textbf{resource_area}_\text{node,tech}))) \\ - \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{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 } (\text{tech_group=transmission})\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land \exists (\textbf{storage_cap}_\text{node,tech})))\land{}(\neg (\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land (\exists (\textbf{purchased}_\text{node,tech}) \lor \exists (\textbf{units}_\text{node,tech}))))\land{}(\neg (\exists (\textit{cost_energy_cap}_\text{node,tech,cost})))\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \exists (\textbf{resource_cap}_\text{node,tech})))\land{}(\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land \exists (\textbf{resource_area}_\text{node,tech})) \\ - \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{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 } (\text{tech_group=transmission})\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land \exists (\textbf{storage_cap}_\text{node,tech})))\land{}(\neg (\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land (\exists (\textbf{purchased}_\text{node,tech}) \lor \exists (\textbf{units}_\text{node,tech}))))\land{}(\neg (\exists (\textit{cost_energy_cap}_\text{node,tech,cost})))\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \exists (\textbf{resource_cap}_\text{node,tech})))\land{}(\neg (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land \exists (\textbf{resource_area}_\text{node,tech}))) \\ - \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{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 } (\neg (\text{tech_group=transmission}))\land{}(\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land \exists (\textbf{storage_cap}_\text{node,tech}))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \exists (\textbf{purchased}_\text{node,tech}))\land{}(\exists (\textit{cost_energy_cap}_\text{node,tech,cost}))\land{}(\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \exists (\textbf{resource_cap}_\text{node,tech}))\land{}(\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land \exists (\textbf{resource_area}_\text{node,tech})) \\ - \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{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 (\text{tech_group=transmission}))\land{}(\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land \exists (\textbf{storage_cap}_\text{node,tech}))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \exists (\textbf{purchased}_\text{node,tech}))\land{}(\exists (\textit{cost_energy_cap}_\text{node,tech,cost}))\land{}(\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \exists (\textbf{resource_cap}_\text{node,tech}))\land{}(\neg (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land \exists (\textbf{resource_area}_\text{node,tech}))) \\ - \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{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 } (\neg (\text{tech_group=transmission}))\land{}(\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land \exists (\textbf{storage_cap}_\text{node,tech}))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \exists (\textbf{purchased}_\text{node,tech}))\land{}(\exists (\textit{cost_energy_cap}_\text{node,tech,cost}))\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \exists (\textbf{resource_cap}_\text{node,tech})))\land{}(\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land \exists (\textbf{resource_area}_\text{node,tech})) \\ - \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{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 (\text{tech_group=transmission}))\land{}(\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land \exists (\textbf{storage_cap}_\text{node,tech}))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \exists (\textbf{purchased}_\text{node,tech}))\land{}(\exists (\textit{cost_energy_cap}_\text{node,tech,cost}))\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \exists (\textbf{resource_cap}_\text{node,tech})))\land{}(\neg (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land \exists (\textbf{resource_area}_\text{node,tech}))) \\ - \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{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 } (\neg (\text{tech_group=transmission}))\land{}(\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land \exists (\textbf{storage_cap}_\text{node,tech}))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \exists (\textbf{purchased}_\text{node,tech}))\land{}(\neg (\exists (\textit{cost_energy_cap}_\text{node,tech,cost})))\land{}(\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \exists (\textbf{resource_cap}_\text{node,tech}))\land{}(\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land \exists (\textbf{resource_area}_\text{node,tech})) \\ - \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{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 (\text{tech_group=transmission}))\land{}(\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land \exists (\textbf{storage_cap}_\text{node,tech}))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \exists (\textbf{purchased}_\text{node,tech}))\land{}(\neg (\exists (\textit{cost_energy_cap}_\text{node,tech,cost})))\land{}(\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \exists (\textbf{resource_cap}_\text{node,tech}))\land{}(\neg (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land \exists (\textbf{resource_area}_\text{node,tech}))) \\ - \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{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 } (\neg (\text{tech_group=transmission}))\land{}(\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land \exists (\textbf{storage_cap}_\text{node,tech}))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \exists (\textbf{purchased}_\text{node,tech}))\land{}(\neg (\exists (\textit{cost_energy_cap}_\text{node,tech,cost})))\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \exists (\textbf{resource_cap}_\text{node,tech})))\land{}(\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land \exists (\textbf{resource_area}_\text{node,tech})) \\ - \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{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 (\text{tech_group=transmission}))\land{}(\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land \exists (\textbf{storage_cap}_\text{node,tech}))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \exists (\textbf{purchased}_\text{node,tech}))\land{}(\neg (\exists (\textit{cost_energy_cap}_\text{node,tech,cost})))\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \exists (\textbf{resource_cap}_\text{node,tech})))\land{}(\neg (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land \exists (\textbf{resource_area}_\text{node,tech}))) \\ - \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{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 } (\neg (\text{tech_group=transmission}))\land{}(\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land \exists (\textbf{storage_cap}_\text{node,tech}))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \exists (\textbf{units}_\text{node,tech}))\land{}(\exists (\textit{cost_energy_cap}_\text{node,tech,cost}))\land{}(\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \exists (\textbf{resource_cap}_\text{node,tech}))\land{}(\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land \exists (\textbf{resource_area}_\text{node,tech})) \\ - \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{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 (\text{tech_group=transmission}))\land{}(\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land \exists (\textbf{storage_cap}_\text{node,tech}))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \exists (\textbf{units}_\text{node,tech}))\land{}(\exists (\textit{cost_energy_cap}_\text{node,tech,cost}))\land{}(\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \exists (\textbf{resource_cap}_\text{node,tech}))\land{}(\neg (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land \exists (\textbf{resource_area}_\text{node,tech}))) \\ - \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{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 } (\neg (\text{tech_group=transmission}))\land{}(\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land \exists (\textbf{storage_cap}_\text{node,tech}))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \exists (\textbf{units}_\text{node,tech}))\land{}(\exists (\textit{cost_energy_cap}_\text{node,tech,cost}))\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \exists (\textbf{resource_cap}_\text{node,tech})))\land{}(\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land \exists (\textbf{resource_area}_\text{node,tech})) \\ - \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{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 (\text{tech_group=transmission}))\land{}(\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land \exists (\textbf{storage_cap}_\text{node,tech}))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \exists (\textbf{units}_\text{node,tech}))\land{}(\exists (\textit{cost_energy_cap}_\text{node,tech,cost}))\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \exists (\textbf{resource_cap}_\text{node,tech})))\land{}(\neg (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land \exists (\textbf{resource_area}_\text{node,tech}))) \\ - \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{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 } (\neg (\text{tech_group=transmission}))\land{}(\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land \exists (\textbf{storage_cap}_\text{node,tech}))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \exists (\textbf{units}_\text{node,tech}))\land{}(\neg (\exists (\textit{cost_energy_cap}_\text{node,tech,cost})))\land{}(\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \exists (\textbf{resource_cap}_\text{node,tech}))\land{}(\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land \exists (\textbf{resource_area}_\text{node,tech})) \\ - \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{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 (\text{tech_group=transmission}))\land{}(\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land \exists (\textbf{storage_cap}_\text{node,tech}))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \exists (\textbf{units}_\text{node,tech}))\land{}(\neg (\exists (\textit{cost_energy_cap}_\text{node,tech,cost})))\land{}(\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \exists (\textbf{resource_cap}_\text{node,tech}))\land{}(\neg (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land \exists (\textbf{resource_area}_\text{node,tech}))) \\ - \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{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 } (\neg (\text{tech_group=transmission}))\land{}(\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land \exists (\textbf{storage_cap}_\text{node,tech}))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \exists (\textbf{units}_\text{node,tech}))\land{}(\neg (\exists (\textit{cost_energy_cap}_\text{node,tech,cost})))\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \exists (\textbf{resource_cap}_\text{node,tech})))\land{}(\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land \exists (\textbf{resource_area}_\text{node,tech})) \\ - \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{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 (\text{tech_group=transmission}))\land{}(\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land \exists (\textbf{storage_cap}_\text{node,tech}))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \exists (\textbf{units}_\text{node,tech}))\land{}(\neg (\exists (\textit{cost_energy_cap}_\text{node,tech,cost})))\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \exists (\textbf{resource_cap}_\text{node,tech})))\land{}(\neg (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land \exists (\textbf{resource_area}_\text{node,tech}))) \\ - \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{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 } (\neg (\text{tech_group=transmission}))\land{}(\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land \exists (\textbf{storage_cap}_\text{node,tech}))\land{}(\neg (\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land (\exists (\textbf{purchased}_\text{node,tech}) \lor \exists (\textbf{units}_\text{node,tech}))))\land{}(\exists (\textit{cost_energy_cap}_\text{node,tech,cost}))\land{}(\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \exists (\textbf{resource_cap}_\text{node,tech}))\land{}(\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land \exists (\textbf{resource_area}_\text{node,tech})) \\ - \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{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 (\text{tech_group=transmission}))\land{}(\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land \exists (\textbf{storage_cap}_\text{node,tech}))\land{}(\neg (\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land (\exists (\textbf{purchased}_\text{node,tech}) \lor \exists (\textbf{units}_\text{node,tech}))))\land{}(\exists (\textit{cost_energy_cap}_\text{node,tech,cost}))\land{}(\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \exists (\textbf{resource_cap}_\text{node,tech}))\land{}(\neg (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land \exists (\textbf{resource_area}_\text{node,tech}))) \\ - \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{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 } (\neg (\text{tech_group=transmission}))\land{}(\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land \exists (\textbf{storage_cap}_\text{node,tech}))\land{}(\neg (\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land (\exists (\textbf{purchased}_\text{node,tech}) \lor \exists (\textbf{units}_\text{node,tech}))))\land{}(\exists (\textit{cost_energy_cap}_\text{node,tech,cost}))\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \exists (\textbf{resource_cap}_\text{node,tech})))\land{}(\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land \exists (\textbf{resource_area}_\text{node,tech})) \\ - \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{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 (\text{tech_group=transmission}))\land{}(\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land \exists (\textbf{storage_cap}_\text{node,tech}))\land{}(\neg (\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land (\exists (\textbf{purchased}_\text{node,tech}) \lor \exists (\textbf{units}_\text{node,tech}))))\land{}(\exists (\textit{cost_energy_cap}_\text{node,tech,cost}))\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \exists (\textbf{resource_cap}_\text{node,tech})))\land{}(\neg (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land \exists (\textbf{resource_area}_\text{node,tech}))) \\ - \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{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 } (\neg (\text{tech_group=transmission}))\land{}(\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land \exists (\textbf{storage_cap}_\text{node,tech}))\land{}(\neg (\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land (\exists (\textbf{purchased}_\text{node,tech}) \lor \exists (\textbf{units}_\text{node,tech}))))\land{}(\neg (\exists (\textit{cost_energy_cap}_\text{node,tech,cost})))\land{}(\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \exists (\textbf{resource_cap}_\text{node,tech}))\land{}(\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land \exists (\textbf{resource_area}_\text{node,tech})) \\ - \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{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 (\text{tech_group=transmission}))\land{}(\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land \exists (\textbf{storage_cap}_\text{node,tech}))\land{}(\neg (\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land (\exists (\textbf{purchased}_\text{node,tech}) \lor \exists (\textbf{units}_\text{node,tech}))))\land{}(\neg (\exists (\textit{cost_energy_cap}_\text{node,tech,cost})))\land{}(\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \exists (\textbf{resource_cap}_\text{node,tech}))\land{}(\neg (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land \exists (\textbf{resource_area}_\text{node,tech}))) \\ - \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{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 } (\neg (\text{tech_group=transmission}))\land{}(\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land \exists (\textbf{storage_cap}_\text{node,tech}))\land{}(\neg (\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land (\exists (\textbf{purchased}_\text{node,tech}) \lor \exists (\textbf{units}_\text{node,tech}))))\land{}(\neg (\exists (\textit{cost_energy_cap}_\text{node,tech,cost})))\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \exists (\textbf{resource_cap}_\text{node,tech})))\land{}(\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land \exists (\textbf{resource_area}_\text{node,tech})) \\ - \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{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 (\text{tech_group=transmission}))\land{}(\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land \exists (\textbf{storage_cap}_\text{node,tech}))\land{}(\neg (\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land (\exists (\textbf{purchased}_\text{node,tech}) \lor \exists (\textbf{units}_\text{node,tech}))))\land{}(\neg (\exists (\textit{cost_energy_cap}_\text{node,tech,cost})))\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \exists (\textbf{resource_cap}_\text{node,tech})))\land{}(\neg (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land \exists (\textbf{resource_area}_\text{node,tech}))) \\ - \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{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 } (\neg (\text{tech_group=transmission}))\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land \exists (\textbf{storage_cap}_\text{node,tech})))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \exists (\textbf{purchased}_\text{node,tech}))\land{}(\exists (\textit{cost_energy_cap}_\text{node,tech,cost}))\land{}(\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \exists (\textbf{resource_cap}_\text{node,tech}))\land{}(\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land \exists (\textbf{resource_area}_\text{node,tech})) \\ \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{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}) + \text{if } (\neg (\text{tech_group=transmission}))\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land \exists (\textbf{storage_cap}_\text{node,tech})))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \exists (\textbf{purchased}_\text{node,tech}))\land{}(\exists (\textit{cost_energy_cap}_\text{node,tech,cost}))\land{}(\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \exists (\textbf{resource_cap}_\text{node,tech}))\land{}(\neg (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land \exists (\textbf{resource_area}_\text{node,tech}))) \\ - \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{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 } (\neg (\text{tech_group=transmission}))\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land \exists (\textbf{storage_cap}_\text{node,tech})))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \exists (\textbf{purchased}_\text{node,tech}))\land{}(\exists (\textit{cost_energy_cap}_\text{node,tech,cost}))\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \exists (\textbf{resource_cap}_\text{node,tech})))\land{}(\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land \exists (\textbf{resource_area}_\text{node,tech})) \\ - \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{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 (\text{tech_group=transmission}))\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land \exists (\textbf{storage_cap}_\text{node,tech})))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \exists (\textbf{purchased}_\text{node,tech}))\land{}(\exists (\textit{cost_energy_cap}_\text{node,tech,cost}))\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \exists (\textbf{resource_cap}_\text{node,tech})))\land{}(\neg (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land \exists (\textbf{resource_area}_\text{node,tech}))) \\ - \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{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 } (\neg (\text{tech_group=transmission}))\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land \exists (\textbf{storage_cap}_\text{node,tech})))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \exists (\textbf{purchased}_\text{node,tech}))\land{}(\neg (\exists (\textit{cost_energy_cap}_\text{node,tech,cost})))\land{}(\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \exists (\textbf{resource_cap}_\text{node,tech}))\land{}(\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land \exists (\textbf{resource_area}_\text{node,tech})) \\ - \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{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 (\text{tech_group=transmission}))\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land \exists (\textbf{storage_cap}_\text{node,tech})))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \exists (\textbf{purchased}_\text{node,tech}))\land{}(\neg (\exists (\textit{cost_energy_cap}_\text{node,tech,cost})))\land{}(\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \exists (\textbf{resource_cap}_\text{node,tech}))\land{}(\neg (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land \exists (\textbf{resource_area}_\text{node,tech}))) \\ - \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{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 } (\neg (\text{tech_group=transmission}))\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land \exists (\textbf{storage_cap}_\text{node,tech})))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \exists (\textbf{purchased}_\text{node,tech}))\land{}(\neg (\exists (\textit{cost_energy_cap}_\text{node,tech,cost})))\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \exists (\textbf{resource_cap}_\text{node,tech})))\land{}(\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land \exists (\textbf{resource_area}_\text{node,tech})) \\ - \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{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 (\text{tech_group=transmission}))\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land \exists (\textbf{storage_cap}_\text{node,tech})))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \exists (\textbf{purchased}_\text{node,tech}))\land{}(\neg (\exists (\textit{cost_energy_cap}_\text{node,tech,cost})))\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \exists (\textbf{resource_cap}_\text{node,tech})))\land{}(\neg (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land \exists (\textbf{resource_area}_\text{node,tech}))) \\ - \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{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 } (\neg (\text{tech_group=transmission}))\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land \exists (\textbf{storage_cap}_\text{node,tech})))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \exists (\textbf{units}_\text{node,tech}))\land{}(\exists (\textit{cost_energy_cap}_\text{node,tech,cost}))\land{}(\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \exists (\textbf{resource_cap}_\text{node,tech}))\land{}(\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land \exists (\textbf{resource_area}_\text{node,tech})) \\ - \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{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 (\text{tech_group=transmission}))\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land \exists (\textbf{storage_cap}_\text{node,tech})))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \exists (\textbf{units}_\text{node,tech}))\land{}(\exists (\textit{cost_energy_cap}_\text{node,tech,cost}))\land{}(\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \exists (\textbf{resource_cap}_\text{node,tech}))\land{}(\neg (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land \exists (\textbf{resource_area}_\text{node,tech}))) \\ - \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{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 } (\neg (\text{tech_group=transmission}))\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land \exists (\textbf{storage_cap}_\text{node,tech})))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \exists (\textbf{units}_\text{node,tech}))\land{}(\exists (\textit{cost_energy_cap}_\text{node,tech,cost}))\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \exists (\textbf{resource_cap}_\text{node,tech})))\land{}(\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land \exists (\textbf{resource_area}_\text{node,tech})) \\ - \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{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 (\text{tech_group=transmission}))\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land \exists (\textbf{storage_cap}_\text{node,tech})))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \exists (\textbf{units}_\text{node,tech}))\land{}(\exists (\textit{cost_energy_cap}_\text{node,tech,cost}))\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \exists (\textbf{resource_cap}_\text{node,tech})))\land{}(\neg (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land \exists (\textbf{resource_area}_\text{node,tech}))) \\ - \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{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 } (\neg (\text{tech_group=transmission}))\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land \exists (\textbf{storage_cap}_\text{node,tech})))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \exists (\textbf{units}_\text{node,tech}))\land{}(\neg (\exists (\textit{cost_energy_cap}_\text{node,tech,cost})))\land{}(\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \exists (\textbf{resource_cap}_\text{node,tech}))\land{}(\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land \exists (\textbf{resource_area}_\text{node,tech})) \\ \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}) + \text{if } (\neg (\text{tech_group=transmission}))\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land \exists (\textbf{storage_cap}_\text{node,tech})))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \exists (\textbf{units}_\text{node,tech}))\land{}(\neg (\exists (\textit{cost_energy_cap}_\text{node,tech,cost})))\land{}(\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \exists (\textbf{resource_cap}_\text{node,tech}))\land{}(\neg (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land \exists (\textbf{resource_area}_\text{node,tech}))) \\ - \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{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 } (\neg (\text{tech_group=transmission}))\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land \exists (\textbf{storage_cap}_\text{node,tech})))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \exists (\textbf{units}_\text{node,tech}))\land{}(\neg (\exists (\textit{cost_energy_cap}_\text{node,tech,cost})))\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \exists (\textbf{resource_cap}_\text{node,tech})))\land{}(\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land \exists (\textbf{resource_area}_\text{node,tech})) \\ - \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{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 (\text{tech_group=transmission}))\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land \exists (\textbf{storage_cap}_\text{node,tech})))\land{}(\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land \exists (\textbf{units}_\text{node,tech}))\land{}(\neg (\exists (\textit{cost_energy_cap}_\text{node,tech,cost})))\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \exists (\textbf{resource_cap}_\text{node,tech})))\land{}(\neg (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land \exists (\textbf{resource_area}_\text{node,tech}))) \\ - \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{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 } (\neg (\text{tech_group=transmission}))\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land \exists (\textbf{storage_cap}_\text{node,tech})))\land{}(\neg (\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land (\exists (\textbf{purchased}_\text{node,tech}) \lor \exists (\textbf{units}_\text{node,tech}))))\land{}(\exists (\textit{cost_energy_cap}_\text{node,tech,cost}))\land{}(\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \exists (\textbf{resource_cap}_\text{node,tech}))\land{}(\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land \exists (\textbf{resource_area}_\text{node,tech})) \\ - \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{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 (\text{tech_group=transmission}))\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land \exists (\textbf{storage_cap}_\text{node,tech})))\land{}(\neg (\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land (\exists (\textbf{purchased}_\text{node,tech}) \lor \exists (\textbf{units}_\text{node,tech}))))\land{}(\exists (\textit{cost_energy_cap}_\text{node,tech,cost}))\land{}(\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \exists (\textbf{resource_cap}_\text{node,tech}))\land{}(\neg (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land \exists (\textbf{resource_area}_\text{node,tech}))) \\ - \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{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 } (\neg (\text{tech_group=transmission}))\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land \exists (\textbf{storage_cap}_\text{node,tech})))\land{}(\neg (\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land (\exists (\textbf{purchased}_\text{node,tech}) \lor \exists (\textbf{units}_\text{node,tech}))))\land{}(\exists (\textit{cost_energy_cap}_\text{node,tech,cost}))\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \exists (\textbf{resource_cap}_\text{node,tech})))\land{}(\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land \exists (\textbf{resource_area}_\text{node,tech})) \\ - \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{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 (\text{tech_group=transmission}))\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land \exists (\textbf{storage_cap}_\text{node,tech})))\land{}(\neg (\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land (\exists (\textbf{purchased}_\text{node,tech}) \lor \exists (\textbf{units}_\text{node,tech}))))\land{}(\exists (\textit{cost_energy_cap}_\text{node,tech,cost}))\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \exists (\textbf{resource_cap}_\text{node,tech})))\land{}(\neg (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land \exists (\textbf{resource_area}_\text{node,tech}))) + \\ + \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 } (\neg (\text{tech_group=transmission}))\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land \exists (\textbf{storage_cap}_\text{node,tech})))\land{}(\neg (\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land (\exists (\textbf{purchased}_\text{node,tech}) \lor \exists (\textbf{units}_\text{node,tech}))))\land{}(\neg (\exists (\textit{cost_energy_cap}_\text{node,tech,cost})))\land{}(\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \exists (\textbf{resource_cap}_\text{node,tech}))\land{}(\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land \exists (\textbf{resource_area}_\text{node,tech})) + \\ + \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 (\text{tech_group=transmission}))\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land \exists (\textbf{storage_cap}_\text{node,tech})))\land{}(\neg (\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land (\exists (\textbf{purchased}_\text{node,tech}) \lor \exists (\textbf{units}_\text{node,tech}))))\land{}(\neg (\exists (\textit{cost_energy_cap}_\text{node,tech,cost})))\land{}(\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \exists (\textbf{resource_cap}_\text{node,tech}))\land{}(\neg (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land \exists (\textbf{resource_area}_\text{node,tech}))) + \\ + \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 } (\neg (\text{tech_group=transmission}))\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land \exists (\textbf{storage_cap}_\text{node,tech})))\land{}(\neg (\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land (\exists (\textbf{purchased}_\text{node,tech}) \lor \exists (\textbf{units}_\text{node,tech}))))\land{}(\neg (\exists (\textit{cost_energy_cap}_\text{node,tech,cost})))\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \exists (\textbf{resource_cap}_\text{node,tech})))\land{}(\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land \exists (\textbf{resource_area}_\text{node,tech})) \\ \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}))) + \text{if } (\neg (\text{tech_group=transmission}))\land{}(\neg (\exists (\textit{cost_storage_cap}_\text{node,tech,cost}) \land \exists (\textbf{storage_cap}_\text{node,tech})))\land{}(\neg (\exists (\textit{cost_purchase}_\text{node,tech,cost}) \land (\exists (\textbf{purchased}_\text{node,tech}) \lor \exists (\textbf{units}_\text{node,tech}))))\land{}(\neg (\exists (\textit{cost_energy_cap}_\text{node,tech,cost})))\land{}(\neg (\exists (\textit{cost_resource_cap}_\text{node,tech,cost}) \land \exists (\textbf{resource_cap}_\text{node,tech})))\land{}(\neg (\exists (\textit{cost_resource_area}_\text{node,tech,cost}) \land \exists (\textbf{resource_area}_\text{node,tech}))) \\ \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{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})) + \text{if } (\exists (\textbf{cost_investment}_\text{node,tech,cost}) \lor \exists (\textbf{cost_var}_\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_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})) + \text{if } (\exists (\textbf{cost_investment}_\text{node,tech,cost}))\land{}(\exists (\textbf{cost_var}_\text{node,tech,cost,timestep})) \\ \textbf{cost_investment}_\text{node,tech,cost}&\quad - \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}))) + \text{if } (\exists (\textbf{cost_investment}_\text{node,tech,cost}))\land{}(\neg (\exists (\textbf{cost_var}_\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})) + \text{if } (\neg (\exists (\textbf{cost_investment}_\text{node,tech,cost})))\land{}(\exists (\textbf{cost_var}_\text{node,tech,cost,timestep})) \\ 0&\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{}(\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}))) + \text{if } (\neg (\exists (\textbf{cost_investment}_\text{node,tech,cost})))\land{}(\neg (\exists (\textbf{cost_var}_\text{node,tech,cost,timestep}))) \\ \end{cases} @@ -1702,7 +1702,7 @@ A technology's energy capacity, also known as its nominal or nameplate capacity. \text{ node }\negthickspace \in \negthickspace\text{ nodes, } \text{ tech }\negthickspace \in \negthickspace\text{ techs } \\ - \text{if } None + \forall\mathbb{R}\; \end{array} \begin{cases} \textit{energy_cap_min}_\text{node,tech} \leq \textbf{energy_cap}_\text{node,tech}&\quad @@ -1726,6 +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 } \\ + \forall\mathbb{R}\; \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} @@ -1750,6 +1751,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 } \\ + \forall\mathbb{R}\; \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} @@ -1774,6 +1776,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 } \\ + \forall\mathbb{R}\; \text{if } (\exists (\textit{export_carrier}_\text{node,tech,carrier}) \land \textit{export}_\text{node,tech}\mathord{=}\text{true}) \end{array} \begin{cases} @@ -1796,6 +1799,7 @@ The area in space utilised directly (e.g., solar PV panels) or indirectly (e.g., \text{ node }\negthickspace \in \negthickspace\text{ nodes, } \text{ tech }\negthickspace \in \negthickspace\text{ techs } \\ + \forall\mathbb{R}\; \text{if } (\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}) \end{array} \begin{cases} @@ -1819,6 +1823,7 @@ The energy consumed from outside the system boundaries by a `supply_plus` techno \text{ tech }\negthickspace \in \negthickspace\text{ techs, } \text{ timestep }\negthickspace \in \negthickspace\text{ timesteps } \\ + \forall\mathbb{R}\; \text{if } (\text{tech_group=supply_plus}) \end{array} \begin{cases} @@ -1841,6 +1846,7 @@ The upper limit on energy that can be consumed from outside the system boundarie \text{ node }\negthickspace \in \negthickspace\text{ nodes, } \text{ tech }\negthickspace \in \negthickspace\text{ techs } \\ + \forall\mathbb{R}\; \text{if } (\text{tech_group=supply_plus}) \end{array} \begin{cases} @@ -1863,6 +1869,7 @@ The upper limit on energy that can be stored by a `supply_plus` or `storage` tec \text{ node }\negthickspace \in \negthickspace\text{ nodes, } \text{ tech }\negthickspace \in \negthickspace\text{ techs } \\ + \forall\mathbb{R}\; \text{if } ((\text{tech_group=storage} \lor \text{tech_group=supply_plus}) \land \textit{include_storage}_\text{node,tech}\mathord{=}\text{true}) \end{array} \begin{cases} @@ -1886,6 +1893,7 @@ The energy stored by a `supply_plus` or `storage` technology in each timestep. \text{ tech }\negthickspace \in \negthickspace\text{ techs, } \text{ timestep }\negthickspace \in \negthickspace\text{ timesteps } \\ + \forall\mathbb{R}\; \text{if } ((\text{tech_group=storage} \lor \text{tech_group=supply_plus}) \land \textit{include_storage}_\text{node,tech}\mathord{=}\text{true}) \end{array} \begin{cases} @@ -1908,6 +1916,7 @@ Binary switch defining whether a technology has been purchased or not, for any t \text{ node }\negthickspace \in \negthickspace\text{ nodes, } \text{ tech }\negthickspace \in \negthickspace\text{ techs } \\ + \forall\mathbb{Z}\; \text{if } (\textit{cap_method}_\text{node,tech}\mathord{=}\text{binary}) \end{array} \begin{cases} @@ -1930,6 +1939,7 @@ Integer number of a technology that has been purchased, for any technology set t \text{ node }\negthickspace \in \negthickspace\text{ nodes, } \text{ tech }\negthickspace \in \negthickspace\text{ techs } \\ + \forall\mathbb{Z}\; \text{if } (\textit{cap_method}_\text{node,tech}\mathord{=}\text{integer}) \end{array} \begin{cases} @@ -1953,6 +1963,7 @@ Integer number of a technology that is operating in each timestep, for any techn \text{ tech }\negthickspace \in \negthickspace\text{ techs, } \text{ timestep }\negthickspace \in \negthickspace\text{ timesteps } \\ + \forall\mathbb{Z}\; \text{if } (\textit{cap_method}_\text{node,tech}\mathord{=}\text{integer}) \end{array} \begin{cases} @@ -1976,6 +1987,7 @@ Binary switch to force asynchronous carrier production/consumption of a `storage \text{ tech }\negthickspace \in \negthickspace\text{ techs, } \text{ timestep }\negthickspace \in \negthickspace\text{ timesteps } \\ + \forall\mathbb{Z}\; \text{if } (\textit{force_asynchronous_prod_con}_\text{node,tech}\mathord{=}\text{true}) \end{array} \begin{cases} @@ -1999,6 +2011,7 @@ Virtual source of energy to ensure model feasibility. This should only be consid \text{ carrier }\negthickspace \in \negthickspace\text{ carriers, } \text{ timestep }\negthickspace \in \negthickspace\text{ timesteps } \\ + \forall\mathbb{R}\; \text{if } (\text{run_config.ensure_feasibility}\mathord{=}\text{true}) \end{array} \begin{cases} @@ -2022,6 +2035,7 @@ Virtual sink of energy to ensure model feasibility. This should only be consider \text{ carrier }\negthickspace \in \negthickspace\text{ carriers, } \text{ timestep }\negthickspace \in \negthickspace\text{ timesteps } \\ + \forall\mathbb{R}\; \text{if } (\text{run_config.ensure_feasibility}\mathord{=}\text{true}) \end{array} \begin{cases} diff --git a/doc/_static/math_storage_inter_cluster.rst b/doc/_static/math_storage_inter_cluster.rst index d82647576..d9de0e215 100644 --- a/doc/_static/math_storage_inter_cluster.rst +++ b/doc/_static/math_storage_inter_cluster.rst @@ -25,26 +25,26 @@ Set the upper bound on, or a fixed total of, a `supply_plus` (with storage) tech \text{ carrier }\negthickspace \in \negthickspace\text{ carriers, } \text{ timestep }\negthickspace \in \negthickspace\text{ timesteps } \\ - \text{if } (\text{tech_group=supply_plus} \land \textit{include_storage}_\text{node,tech}\mathord{=}\text{true}) + \text{if } (\exists (\textbf{storage}_\text{node,tech,timestep}) \land \text{tech_group=supply_plus}) \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{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{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 } (\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}))) + \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 } (\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})) + \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})) + \\ + \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 } (\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}))) + \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})) + \\ + \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}) \\ \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 } (\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}))) + \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})) \\ \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{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{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=\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}))) + \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{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})) + \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} = ((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}) \\ \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})) + \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} = \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} = ((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}))) + \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}) \\ \end{cases} @@ -101,7 +101,7 @@ Fix the relationship between energy stored in a `storage` technology at the star \text{ node }\negthickspace \in \negthickspace\text{ nodes, } \text{ tech }\negthickspace \in \negthickspace\text{ techs } \\ - \text{if } (\exists (\textit{storage_initial}_\text{node,tech}) \land \textit{include_storage}_\text{node,tech}\mathord{=}\text{true} \land \text{run_config.cyclic_storage}\mathord{=}\text{true}) + \text{if } (\exists (\textbf{storage}_\text{node,tech,timestep}) \land \exists (\textit{storage_initial}_\text{node,tech}) \land \text{run_config.cyclic_storage}\mathord{=}\text{true}) \end{array} \begin{cases} \textbf{storage_inter_cluster}_\text{node,tech,datestep=datesteps[-1]} \times ((1 - \textit{storage_loss}_\text{node,tech,timestep})^{24}) = \textit{storage_initial}_\text{node,tech} \times \textbf{storage_cap}_\text{node,tech}&\quad @@ -246,6 +246,7 @@ The virtual energy stored by a `supply_plus` or `storage` technology in each tim \text{ tech }\negthickspace \in \negthickspace\text{ techs, } \text{ timestep }\negthickspace \in \negthickspace\text{ timesteps } \\ + \forall\mathbb{R}\; \text{if } ((\text{tech_group=storage} \lor \text{tech_group=supply_plus}) \land \textit{include_storage}_\text{node,tech}\mathord{=}\text{true}) \end{array} \begin{cases} @@ -270,6 +271,7 @@ The virtual energy stored by a `supply_plus` or `storage` technology between day \text{ tech }\negthickspace \in \negthickspace\text{ techs, } \text{ datestep }\negthickspace \in \negthickspace\text{ datesteps } \\ + \forall\mathbb{R}\; \text{if } (\textit{include_storage}_\text{node,tech}\mathord{=}\text{true}) \end{array} \begin{cases} @@ -294,6 +296,7 @@ Virtual variable to limit the maximum value of `storage` in a given representati \text{ tech }\negthickspace \in \negthickspace\text{ techs, } \text{ cluster }\negthickspace \in \negthickspace\text{ clusters } \\ + \forall\mathbb{R}\; \text{if } (\textit{include_storage}_\text{node,tech}\mathord{=}\text{true}) \end{array} \begin{cases} @@ -318,6 +321,7 @@ Virtual variable to limit the minimum value of `storage` in a given representati \text{ tech }\negthickspace \in \negthickspace\text{ techs, } \text{ cluster }\negthickspace \in \negthickspace\text{ clusters } \\ + \forall\mathbb{R}\; \text{if } (\textit{include_storage}_\text{node,tech}\mathord{=}\text{true}) \end{array} \begin{cases} diff --git a/doc/api/api.rst b/doc/api/api.rst index ec2dda34a..85b47d7b2 100644 --- a/doc/api/api.rst +++ b/doc/api/api.rst @@ -11,14 +11,6 @@ Model class .. autoclass:: calliope.Model :members: -.. _api_backend_interface: - -Optimisation backend interface -============================== - -.. automodule:: calliope.backend.backends - :members: BackendModel - .. _api_time_masks: Time series diff --git a/src/calliope/backend/backend_model.py b/src/calliope/backend/backend_model.py index dc05c133b..f474f7552 100644 --- a/src/calliope/backend/backend_model.py +++ b/src/calliope/backend/backend_model.py @@ -211,7 +211,7 @@ def _add_component( if component_dict is None: component_dict = self.inputs.math[component_type][name] - if component_dict.get("active", False): + if break_early and component_dict.get("active", False): self.log( component_type, name, "Component deactivated and therefore not built." ) @@ -223,7 +223,10 @@ def _add_component( ) top_level_where = parsed_component.generate_top_level_where_array( - self.inputs, align_to_foreach_sets=False, break_early=break_early + self.inputs, + self._dataset, + align_to_foreach_sets=False, + break_early=break_early, ) if break_early and not top_level_where.any(): return parsed_component @@ -242,7 +245,9 @@ def _add_component( .astype(np.dtype("O")) ) for element in equations: - where = element.evaluate_where(self.inputs, initial_where=top_level_where) + where = element.evaluate_where( + self.inputs, self._dataset, initial_where=top_level_where + ) if break_early and not where.any(): continue diff --git a/src/calliope/backend/expression_parser.py b/src/calliope/backend/expression_parser.py index cf0bee6a7..34770a11e 100644 --- a/src/calliope/backend/expression_parser.py +++ b/src/calliope/backend/expression_parser.py @@ -597,17 +597,18 @@ def eval( """ references.add(self.name) evaluated: Optional[Union[dict, xr.DataArray, str]] + as_latex = eval_kwargs.get("as_latex", False) if as_dict: evaluated = {"param_or_var_name": self.name} elif backend_interface is not None and backend_dataset is not None: - if as_values: + if as_values and not as_latex: evaluated = backend_interface.get_parameter( self.name, as_backend_objs=False ) else: evaluated = backend_dataset[self.name] - if eval_kwargs.get("as_latex", False): + if as_latex: evaluated = self.as_latex(evaluated) else: evaluated = None diff --git a/src/calliope/backend/latex_backend_model.py b/src/calliope/backend/latex_backend_model.py index e6d4823aa..19dbeafa9 100644 --- a/src/calliope/backend/latex_backend_model.py +++ b/src/calliope/backend/latex_backend_model.py @@ -347,15 +347,22 @@ def add_variable( name: str, variable_dict: Optional[parsing.UnparsedVariableDict] = None, ) -> None: - domain_dict = {"real": r"\R", "integer": r"\Z"} + domain_dict = {"real": r"\mathbb{R}\;", "integer": r"\mathbb{Z}\;"} self.valid_math_element_names.add(name) + def _variable_setter(where: xr.DataArray) -> xr.DataArray: + return where.where(where) + if variable_dict is None: variable_dict = self.inputs.math["variables"][name] parsed_component = self._add_component( - name, variable_dict, lambda where: where, "variables", break_early=False + name, + variable_dict, + _variable_setter, + "variables", + break_early=False, ) where_array = self.variables[name] @@ -445,7 +452,7 @@ def generate_math_doc(self, format: _ALLOWED_MATH_FILE_FORMATS = "tex") -> str: def _add_latex_strings(self, where, element, equation_strings): expr = element.evaluate_expression(self.inputs, self, as_latex=True) - where_latex = element.evaluate_where(self.inputs, as_latex=True) + where_latex = element.evaluate_where(self.inputs, self._dataset, as_latex=True) if self.include == "all" or (self.include == "valid" and where.any()): equation_strings.append({"expression": expr, "where": where_latex}) @@ -460,7 +467,9 @@ def _generate_math_string( sets: Optional[list[str]] = None, ) -> None: if parsed_component is not None: - where = parsed_component.evaluate_where(self.inputs, as_latex=True) + where = parsed_component.evaluate_where( + self.inputs, self._dataset, as_latex=True + ) sets = parsed_component.sets if self.include == "all" or ( diff --git a/src/calliope/backend/parsing.py b/src/calliope/backend/parsing.py index 7d8409964..23b4425a0 100644 --- a/src/calliope/backend/parsing.py +++ b/src/calliope/backend/parsing.py @@ -249,6 +249,7 @@ def add_expression_group_combination( def evaluate_where( # noqa: F811 self, model_data: xr.Dataset, + backend_dataset: Optional[xr.Dataset], as_latex: Literal[False] = False, initial_where: xr.DataArray = TRUE_ARRAY, ) -> xr.DataArray: @@ -258,6 +259,7 @@ def evaluate_where( # noqa: F811 def evaluate_where( # noqa: F811 self, model_data: xr.Dataset, + backend_dataset: Optional[xr.Dataset], as_latex: Literal[True], ) -> str: "Expecting string if requesting latex string" @@ -265,6 +267,7 @@ def evaluate_where( # noqa: F811 def evaluate_where( # noqa: F811 self, model_data: xr.Dataset, + backend_dataset: Optional[xr.Dataset] = None, as_latex: bool = False, initial_where: xr.DataArray = TRUE_ARRAY, ) -> Union[xr.DataArray, str]: @@ -286,6 +289,7 @@ def evaluate_where( # noqa: F811 helper_functions=helper_functions._registry["where"], as_latex=as_latex, model_data=model_data, + backend_dataset=backend_dataset, ) for where in self.where ] @@ -704,6 +708,7 @@ def combine_exists_and_foreach(self, model_data: xr.Dataset) -> xr.DataArray: def generate_top_level_where_array( self, model_data: xr.Dataset, + backend_dataset: Optional[xr.Dataset] = None, align_to_foreach_sets: bool = True, break_early: bool = True, ) -> xr.DataArray: @@ -733,7 +738,9 @@ def generate_top_level_where_array( return foreach_where self.parse_top_level_where() - where = self.evaluate_where(model_data, initial_where=foreach_where) + where = self.evaluate_where( + model_data, backend_dataset, initial_where=foreach_where + ) if break_early and not where.any(): return where diff --git a/src/calliope/backend/where_parser.py b/src/calliope/backend/where_parser.py index 1d937b7f2..c9723591c 100644 --- a/src/calliope/backend/where_parser.py +++ b/src/calliope/backend/where_parser.py @@ -4,7 +4,7 @@ from __future__ import annotations import operator -from typing import Any, Union +from typing import Any, Optional, Union import numpy as np import pyparsing as pp @@ -162,12 +162,17 @@ def __repr__(self): "Return string representation of the parsed grammar" return f"DATA_VAR:{self.data_var}" - def as_latex(self, model_data: xr.Dataset, apply_where: bool = True) -> str: + def as_latex( + self, data: xr.Dataset, data_var_type: str, apply_where: bool = True + ) -> str: """stringify conditional for use in a LaTex math formula""" # TODO: add dims from a YAML schema of params that includes default dims - data_var_string = rf"\textit{{{self.data_var}}}" + if data_var_type == "parameters": + data_var_string = rf"\textit{{{self.data_var}}}" + else: + data_var_string = rf"\textbf{{{self.data_var}}}" - var = model_data.get(self.data_var, None) + var = data.get(self.data_var, None) if var is not None and var.shape: data_var_string += ( rf"_\text{{{','.join(str(i).removesuffix('s') for i in var.dims)}}}" @@ -176,10 +181,15 @@ def as_latex(self, model_data: xr.Dataset, apply_where: bool = True) -> str: data_var_string = rf"\exists ({data_var_string})" return data_var_string - def _data_var_exists(self, model_data: xr.Dataset) -> xr.DataArray: + def _data_var_exists( + self, model_data: xr.Dataset, data_var_type: str + ) -> xr.DataArray: "mask by setting all (NaN | INF/-INF) to False, otherwise True" var = model_data.get(self.data_var, xr.DataArray(np.nan)) - return var.notnull() & (var != np.inf) & (var != -np.inf) + if data_var_type == "parameters": + return var.notnull() & (var != np.inf) & (var != -np.inf) + else: + return var.notnull() 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" @@ -187,7 +197,11 @@ def _data_var_with_default(self, model_data: xr.Dataset) -> xr.DataArray: return model_data.get(self.data_var, xr.DataArray(default)).fillna(default) def eval( - self, model_data: xr.Dataset, apply_where: bool = True, **kwargs + self, + model_data: xr.Dataset, + backend_dataset: Optional[xr.Dataset] = None, + apply_where: bool = True, + **kwargs, ) -> Union[str, np.bool_, xr.DataArray]: """ Get parsed model data variable from the Calliope model dataset. @@ -204,16 +218,40 @@ def eval( Union[np.bool_, xr.DataArray]: False if data variable not in model data, array otherwise. """ + if backend_dataset is None: + backend_dataset = xr.Dataset() + if self.data_var in backend_dataset.data_vars.keys(): + data_var_type = backend_dataset[self.data_var].attrs["obj_type"] + else: + data_var_type = "parameters" + + if data_var_type not in ["parameters", "global_expressions", "variables"]: + raise TypeError( + f"Cannot check values in {data_var_type.removesuffix('s')} arrays in math `where` strings. " + f"Received {data_var_type.removesuffix('s')}: `{self.data_var}`." + ) + if data_var_type != "parameters" and not apply_where: + raise TypeError( + f"Can only check for existence of values in {data_var_type.removesuffix('s')} arrays in math `where` strings. " + "These arrays cannot be used for comparison with expected values. " + f"Received `{self.data_var}`." + ) + + if data_var_type == "parameters": + source_array = model_data + else: + source_array = backend_dataset + if kwargs.get("as_latex", False): - return self.as_latex(model_data, apply_where) + return self.as_latex(source_array, data_var_type, apply_where) - if self.data_var not in model_data: + if data_var_type == "parameters" and self.data_var not in model_data: return np.False_ if apply_where: - return self._data_var_exists(model_data) + return self._data_var_exists(source_array, data_var_type) else: - return self._data_var_with_default(model_data) + return self._data_var_with_default(source_array) class ComparisonParser(expression_parser.EvalComparisonOp): diff --git a/src/calliope/math/base.yaml b/src/calliope/math/base.yaml index 8b22dd82f..da084bbf2 100644 --- a/src/calliope/math/base.yaml +++ b/src/calliope/math/base.yaml @@ -2,49 +2,49 @@ constraints: energy_capacity_per_storage_capacity_min: description: "Set the lower bound of a `storage`/`supply_plus` technology's energy capacity relative to its storage capacity." foreach: [nodes, techs] - where: "energy_cap_per_storage_cap_min AND NOT energy_cap_per_storage_cap_equals" + where: "storage_cap AND energy_cap_per_storage_cap_min AND NOT energy_cap_per_storage_cap_equals" equations: - expression: energy_cap >= storage_cap * energy_cap_per_storage_cap_min energy_capacity_per_storage_capacity_max: description: "Set the upper bound of a `storage`/`supply_plus` technology's energy capacity relative to its storage capacity." foreach: [nodes, techs] - where: "energy_cap_per_storage_cap_max AND NOT energy_cap_per_storage_cap_equals" + where: "storage_cap AND energy_cap_per_storage_cap_max AND NOT energy_cap_per_storage_cap_equals" equations: - expression: energy_cap <= storage_cap * energy_cap_per_storage_cap_max energy_capacity_per_storage_capacity_equals: description: "Set a fixed relationship between a `storage`/`supply_plus` technology's energy capacity and its storage capacity." foreach: [nodes, techs] - where: "energy_cap_per_storage_cap_equals" + where: "storage_cap AND energy_cap_per_storage_cap_equals" equations: - expression: energy_cap == storage_cap * energy_cap_per_storage_cap_equals resource_capacity_equals_energy_capacity: description: "Set a `supply_plus` technology's energy capacity to equal its resource capacity." foreach: [nodes, techs] - where: resource_cap_equals_energy_cap=True + where: resource_cap AND resource_cap_equals_energy_cap=True equations: - expression: resource_cap == energy_cap force_zero_resource_area: description: "Set a technology's resource area to zero if its energy capacity upper bound is zero." foreach: [nodes, techs] - where: "(resource_area_min OR resource_area_max OR resource_area_equals OR resource_unit=energy_per_area) AND energy_cap_max=0" + where: "resource_area AND energy_cap_max=0" equations: - expression: resource_area == 0 resource_area_per_energy_capacity: description: "Set a fixed relationship between a technology's energy capacity and its resource area." foreach: [nodes, techs] - where: "resource_area_per_energy_cap" + where: "resource_area AND resource_area_per_energy_cap" equations: - expression: resource_area == energy_cap * resource_area_per_energy_cap resource_area_capacity_per_loc: description: "Set an upper bound on the total area that all technologies with a resource_area can occupy at a given node." foreach: [nodes] - where: "available_area AND (resource_area_min OR resource_area_max OR resource_area_equals OR resource_area_per_energy_cap OR resource_unit=energy_per_area)" + where: "resource_area AND available_area" equations: - expression: sum(resource_area, over=techs) <= available_area @@ -152,14 +152,14 @@ constraints: storage_max: description: "Set the upper bound of the amount of energy a `storage`/`supply_plus` technology can store." foreach: [nodes, techs, timesteps] - where: "include_storage=True" + where: "storage" equations: - expression: storage - storage_cap <= 0 storage_discharge_depth_limit: description: "Set the lower bound of the stored energy a `storage`/`supply_plus` technology must keep in reserve at all times." foreach: [nodes, techs, timesteps] - where: "include_storage=True AND storage_discharge_depth" + where: "storage AND storage_discharge_depth" equations: - expression: storage - storage_discharge_depth * storage_cap >= 0 @@ -242,7 +242,7 @@ constraints: balance_supply_plus_with_storage: description: "Set the upper bound on, or a fixed total of, a `supply_plus` (with storage) technology's ability to produce energy based on the quantity of consumed resource and available stored energy." foreach: [nodes, techs, carriers, timesteps] - where: "inheritance(supply_plus) AND include_storage=True" + where: "storage AND inheritance(supply_plus)" equations: - expression: storage == $storage_previous_step + resource_con * resource_eff - $carrier_prod sub_expressions: @@ -258,7 +258,7 @@ constraints: resource_availability_supply_plus: description: "Set the upper bound on, or a fixed total of, a `supply_plus` technology's ability to consume its available energy resource." foreach: [nodes, techs, timesteps] - where: "resource AND inheritance(supply_plus)" + where: "resource_con AND resource" equations: - where: "force_resource=True" expression: "resource_con == $available_resource" @@ -284,7 +284,7 @@ constraints: set_storage_initial: description: "Fix the relationship between energy stored in a `storage` technology at the start and end of the whole model period." foreach: [nodes, techs] - where: "storage_initial AND include_storage=True AND run.cyclic_storage=True" + where: "storage AND storage_initial AND run.cyclic_storage=True" equations: - expression: storage[timesteps=$final_step] * ((1 - storage_loss) ** timestep_resolution[timesteps=$final_step]) == storage_initial * storage_cap slices: @@ -315,7 +315,7 @@ constraints: carrier_export_max: description: "Set the upper bound of a technology's carrier export, for any technologies that can export energy out of the system." foreach: [nodes, techs, carriers, timesteps] - where: "export_max AND export_carrier AND export=True" + where: "carrier_export AND export_max" equations: - where: "cap_method=integer" expression: carrier_export <= export_max * operating_units @@ -332,56 +332,56 @@ constraints: carrier_production_max_milp: description: "Set the upper bound of a non-`conversion_plus` technology's ability to produce energy, for any technology using integer units to define its capacity." foreach: [nodes, techs, carriers, timesteps] - where: "carrier AND NOT inheritance(conversion_plus) AND cap_method=integer AND allowed_carrier_prod=True" + where: "operating_units AND carrier AND NOT inheritance(conversion_plus) AND allowed_carrier_prod=True" equations: - expression: carrier_prod <= operating_units * timestep_resolution * energy_cap_per_unit * parasitic_eff carrier_production_max_conversion_plus_milp: description: "Set the upper bound of a `conversion_plus` technology's ability to produce energy across all of its `out` energy carriers, if it uses integer units to define its capacity." foreach: [nodes, techs, timesteps] - where: "inheritance(conversion_plus) AND cap_method=integer AND allowed_carrier_prod=True" + where: "operating_units AND inheritance(conversion_plus) AND allowed_carrier_prod=True" equations: - 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." foreach: [nodes, techs, carriers, timesteps] - where: "NOT inheritance(conversion_plus) AND cap_method=integer AND allowed_carrier_con=True" + where: "operating_units AND NOT inheritance(conversion_plus) AND allowed_carrier_con=True" equations: - expression: carrier_con >= -1 * operating_units * timestep_resolution * energy_cap_per_unit carrier_production_min_milp: description: "Set the lower bound of a non-`conversion_plus` technology's ability to produce energy, for any technology using integer units to define its capacity." foreach: [nodes, techs, carriers, timesteps] - where: "carrier AND energy_cap_min_use AND NOT inheritance(conversion_plus) AND cap_method=integer AND allowed_carrier_prod=True" + where: "operating_units AND carrier AND energy_cap_min_use AND NOT inheritance(conversion_plus) AND allowed_carrier_prod=True" equations: - expression: carrier_prod >= operating_units * timestep_resolution * energy_cap_per_unit * energy_cap_min_use carrier_production_min_conversion_plus_milp: description: "Set the lower bound of a `conversion_plus` technology's ability to produce energy across all of its `out` energy carriers, if it uses integer units to define its capacity." foreach: [nodes, techs, timesteps] - where: "energy_cap_min_use AND inheritance(conversion_plus) AND cap_method=integer AND allowed_carrier_prod=True" + where: "operating_units AND energy_cap_min_use AND inheritance(conversion_plus) AND allowed_carrier_prod=True" equations: - 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." foreach: [nodes, techs] - where: "(inheritance(storage) OR inheritance(supply_plus)) AND cap_method=integer AND include_storage=True" + where: "operating_units AND storage" equations: - expression: storage_cap == units * storage_cap_per_unit energy_capacity_units_milp: description: "Fix the energy capacity of any technology using integer units to define its capacity." foreach: [nodes, techs] - where: "energy_cap_per_unit AND cap_method=integer" + where: "operating_units AND energy_cap_per_unit" equations: - expression: energy_cap == units * energy_cap_per_unit energy_capacity_max_purchase_milp: description: "Set the upper bound on, or a fixed total of, a technology's energy capacity, for any technology with binary capacity purchasing." foreach: [nodes, techs] - where: "cost_purchase AND (energy_cap_max OR energy_cap_equals) AND cap_method=binary" + where: "purchased AND (energy_cap_max OR energy_cap_equals)" equations: - where: energy_cap_equals expression: energy_cap == energy_cap_equals * energy_cap_scale * purchased @@ -391,14 +391,14 @@ constraints: energy_capacity_min_purchase_milp: description: "Set the lower bound on a technology's energy capacity, for any technology with binary capacity purchasing." foreach: [nodes, techs] - where: "cost_purchase AND energy_cap_min AND NOT energy_cap_equals AND cap_method=binary" + where: "purchased AND energy_cap_min AND NOT energy_cap_equals" equations: - expression: energy_cap >= energy_cap_min * energy_cap_scale * purchased storage_capacity_max_purchase_milp: description: "Set the upper bound on, or a fixed total of, a technology's storage capacity, for any technology with binary capacity purchasing." foreach: [nodes, techs] - where: "cost_purchase AND (storage_cap_max OR storage_cap_equals) AND cap_method=binary" + where: "purchased AND (storage_cap_max OR storage_cap_equals)" equations: - where: storage_cap_equals expression: storage_cap == storage_cap_equals * purchased @@ -408,14 +408,14 @@ constraints: storage_capacity_min_purchase_milp: description: "Set the lower bound on a technology's storage capacity, for any technology with binary capacity purchasing." foreach: [nodes, techs] - where: "cost_purchase AND storage_cap_min AND NOT storage_cap_equals AND cap_method=binary" + where: "purchased AND storage_cap_min AND NOT storage_cap_equals" equations: - expression: storage_cap >= storage_cap_min * purchased unit_capacity_systemwide_milp: description: "Set the upper bound on, or a fixed total of, the total number of units of a technology that can be purchased across all nodes where the technology can exist, for any technology using integer units to define its capacity." foreach: [techs] - where: "(cap_method=binary OR cap_method=integer) AND (units_max_systemwide OR units_equals_systemwide)" + where: "(purchased OR units) AND (units_max_systemwide OR units_equals_systemwide)" equations: - where: units_equals_systemwide expression: $summed_components == units_equals_systemwide @@ -423,22 +423,22 @@ constraints: expression: $summed_components <= units_max_systemwide sub_expressions: summed_components: - - where: cap_method=binary + - where: purchased expression: sum(purchased, over=nodes) - - where: cap_method=integer + - where: units expression: sum(units, over=nodes) asynchronous_con_milp: description: "Set a technology's ability to consume energy in the same timestep that it is producing energy, for any technology using the asynchronous production/consumption binary switch." foreach: [nodes, techs, timesteps] - where: "force_asynchronous_prod_con=True" + where: "prod_con_switch" equations: - 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" + where: "prod_con_switch" equations: - expression: reduce_carrier_dim(carrier_prod, carrier_tier=out) <= prod_con_switch * bigM @@ -683,43 +683,43 @@ global_expressions: - where: "NOT cost_energy_cap" expression: "0" cost_storage_cap: - - where: "cost_storage_cap AND (inheritance(supply_plus) OR inheritance(storage))" + - where: "cost_storage_cap AND storage_cap" expression: cost_storage_cap * storage_cap - - where: "NOT (cost_storage_cap AND (inheritance(supply_plus) OR inheritance(storage)))" + - where: "NOT (cost_storage_cap AND storage_cap)" expression: "0" cost_resource_cap: - - where: "cost_resource_cap AND inheritance(supply_plus)" + - where: "cost_resource_cap AND resource_cap" expression: cost_resource_cap * resource_cap - - where: "NOT (cost_resource_cap AND inheritance(supply_plus))" + - where: "NOT (cost_resource_cap AND resource_cap)" expression: "0" cost_resource_area: - - where: "cost_resource_area AND (resource_area_min OR resource_area_max OR resource_area_equals OR resource_area_per_energy_cap OR resource_unit=energy_per_area)" + - where: "cost_resource_area AND resource_area" expression: "cost_resource_area * resource_area" - - where: "NOT (cost_resource_area AND (resource_area_min OR resource_area_max OR resource_area_equals OR resource_area_per_energy_cap OR resource_unit=energy_per_area))" + - where: "NOT (cost_resource_area AND resource_area)" expression: "0" cost_of_purchase: - - where: "cost_purchase AND cap_method=binary" + - where: "cost_purchase AND purchased" expression: "cost_purchase * purchased" - - where: "cost_purchase AND cap_method=integer" + - where: "cost_purchase AND units" expression: "cost_purchase * units" - - where: "NOT (cost_purchase AND (cap_method=binary OR cap_method=integer))" + - where: "NOT (cost_purchase AND (purchased OR units))" expression: "0" cost: description: "The total annualised costs of a technology, including installation and operation costs." unit: cost foreach: [nodes, techs, costs] - where: "cost_energy_cap OR cost_om_annual OR cost_om_annual_investment_fraction OR cost_purchase OR cost_resource_area OR cost_resource_cap OR cost_storage_cap OR cost_export OR cost_om_con OR cost_om_prod" + where: "cost_investment OR cost_var" equations: - expression: $cost_investment + $cost_var_sum sub_expressions: cost_investment: - - where: "(cost_energy_cap OR cost_om_annual OR cost_om_annual_investment_fraction OR cost_purchase OR cost_resource_area OR cost_resource_cap OR cost_storage_cap)" + - where: "cost_investment" expression: cost_investment - - where: "NOT ((cost_energy_cap OR cost_om_annual OR cost_om_annual_investment_fraction OR cost_purchase OR cost_resource_area OR cost_resource_cap OR cost_storage_cap))" + - where: "NOT cost_investment" expression: "0" cost_var_sum: - - where: "cost_export OR cost_om_con OR cost_om_prod" + - where: "cost_var" expression: sum(cost_var, over=timesteps) - - where: "NOT (cost_export OR cost_om_con OR cost_om_prod)" + - where: "NOT cost_var" expression: "0" diff --git a/tests/conftest.py b/tests/conftest.py index 326fc3aa3..3823cad61 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -234,10 +234,29 @@ def populate_backend_model(backend): { "foreach": ["nodes", "techs"], "where": "with_inf", - "bounds": {"min": "0", "max": ".inf"}, + "bounds": {"min": -np.inf, "max": np.inf}, + }, + ) + backend.add_variable("no_dim_var", {"bounds": {"min": -1, "max": 1}}) + backend.add_global_expression( + "multi_dim_expr", + { + "foreach": ["nodes", "techs"], + "where": "all_true", + "equations": [{"expression": "multi_dim_var * all_true"}], + }, + ) + backend.add_constraint( + "no_dim_constr", + { + "foreach": [], + "equations": [ + { + "expression": "sum(multi_dim_expr, over=[nodes, techs]) + no_dim_var <= 2" + } + ], }, ) - backend.add_variable("no_dim_var", {"bounds": {"min": "-1", "max": "1"}}) return backend @@ -251,3 +270,9 @@ def dummy_pyomo_backend_model(dummy_model_data): def dummy_latex_backend_model(dummy_model_data): backend = latex_backend_model.LatexBackendModel(dummy_model_data) return populate_backend_model(backend) + + +@pytest.fixture(scope="class") +def valid_latex_backend(dummy_model_data): + backend = latex_backend_model.LatexBackendModel(dummy_model_data, include="valid") + return populate_backend_model(backend) diff --git a/tests/test_backend_latex_backend.py b/tests/test_backend_latex_backend.py index 7de4779ac..2cd69960c 100644 --- a/tests/test_backend_latex_backend.py +++ b/tests/test_backend_latex_backend.py @@ -66,10 +66,6 @@ def test_invalid_format(self, build_all, tmpdir_factory, filepath, format): class TestLatexBackendModel: - @pytest.fixture(scope="class") - def valid_latex_backend(self, dummy_model_data): - return latex_backend_model.LatexBackendModel(dummy_model_data, include="valid") - @pytest.mark.parametrize( "backend_obj", ["valid_latex_backend", "dummy_latex_backend_model"] ) @@ -123,8 +119,8 @@ def test_add_expression(self, request, dummy_model_data, backend_obj): "expr", { "foreach": ["nodes", "techs"], - "where": "with_inf", - "equations": [{"expression": "var + param"}], + "where": "multi_dim_var", + "equations": [{"expression": "multi_dim_var + no_dims"}], }, ) # some null values might be introduced by the foreach array, so we just check the upper bound @@ -135,6 +131,32 @@ def test_add_expression(self, request, dummy_model_data, backend_obj): assert "expr" in latex_backend_model.valid_math_element_names assert "math_string" in latex_backend_model.global_expressions["expr"].attrs + @pytest.mark.parametrize( + "backend_obj", ["valid_latex_backend", "dummy_latex_backend_model"] + ) + def test_add_expression_with_variable_in_where( + self, request, dummy_model_data, backend_obj + ): + latex_backend_model = request.getfixturevalue(backend_obj) + latex_backend_model.add_global_expression( + "var_init_expr", + { + "foreach": ["nodes", "techs"], + "where": "with_inf", + "equations": [{"expression": "multi_dim_var + no_dims"}], + }, + ) + # some null values might be introduced by the foreach array, so we just check the upper bound + assert ( + latex_backend_model.global_expressions["var_init_expr"].sum() + <= dummy_model_data.with_inf_as_bool.sum() + ) + assert "var_init_expr" in latex_backend_model.valid_math_element_names + assert ( + "math_string" + in latex_backend_model.global_expressions["var_init_expr"].attrs + ) + @pytest.mark.parametrize( "backend_obj", ["valid_latex_backend", "dummy_latex_backend_model"] ) @@ -145,7 +167,7 @@ def test_add_constraint(self, request, dummy_model_data, backend_obj): { "foreach": ["nodes", "techs"], "where": "with_inf", - "equations": [{"expression": "var >= param"}], + "equations": [{"expression": "multi_dim_var >= no_dims"}], }, ) # some null values might be introduced by the foreach array, so we just check the upper bound @@ -156,6 +178,29 @@ def test_add_constraint(self, request, dummy_model_data, backend_obj): assert "constr" not in latex_backend_model.valid_math_element_names assert "math_string" in latex_backend_model.constraints["constr"].attrs + @pytest.mark.parametrize( + "backend_obj", ["valid_latex_backend", "dummy_latex_backend_model"] + ) + def test_add_constraint_with_variable_and_expression_in_where( + self, request, dummy_model_data, backend_obj + ): + latex_backend_model = request.getfixturevalue(backend_obj) + latex_backend_model.add_constraint( + "var_init_constr", + { + "foreach": ["nodes", "techs"], + "where": "multi_dim_var and multi_dim_expr", + "equations": [{"expression": "no_dim_var >= multi_dim_var"}], + }, + ) + # some null values might be introduced by the foreach array, so we just check the upper bound + assert ( + latex_backend_model.constraints["var_init_constr"].sum() + <= dummy_model_data.with_inf_as_bool.sum() + ) + assert "var_init_constr" not in latex_backend_model.valid_math_element_names + assert "math_string" in latex_backend_model.constraints["var_init_constr"].attrs + def test_add_constraint_not_valid(self, valid_latex_backend): valid_latex_backend.add_constraint( "invalid_constr", @@ -163,8 +208,8 @@ def test_add_constraint_not_valid(self, valid_latex_backend): "foreach": ["nodes", "techs"], "where": "False", "equations": [ - {"expression": "var >= param"}, - {"expression": "var >= expr"}, + {"expression": "multi_dim_var >= no_dims"}, + {"expression": "multi_dim_var >= multi_dim_expr"}, ], }, ) @@ -180,13 +225,13 @@ def test_add_constraint_one_not_valid(self, valid_latex_backend): "foreach": ["nodes", "techs"], "where": "with_inf", "equations": [ - {"expression": "var >= param"}, - {"expression": "var <= expr", "where": "False"}, + {"expression": "multi_dim_var >= no_dims"}, + {"expression": "multi_dim_var >= multi_dim_expr", "where": "False"}, ], }, ) assert ( - "expr" + "multi_dim_expr" not in valid_latex_backend.constraints["valid_constr"].attrs["math_string"] ) @@ -194,7 +239,7 @@ def test_add_objective(self, dummy_latex_backend_model): dummy_latex_backend_model.add_objective( "obj", { - "equations": [{"expression": "sum(var, over=[nodes, techs])"}], + "equations": [{"expression": "sum(no_dim_var, over=[nodes, techs])"}], "sense": "minimize", }, ) diff --git a/tests/test_backend_where_parser.py b/tests/test_backend_where_parser.py index bfb4a2060..51e358a90 100644 --- a/tests/test_backend_where_parser.py +++ b/tests/test_backend_where_parser.py @@ -87,9 +87,10 @@ def where(bool_operand, helper_function, data_var, comparison, subset): @pytest.fixture(scope="function") -def eval_kwargs(dummy_model_data): +def eval_kwargs(dummy_model_data, dummy_pyomo_backend_model): return { "model_data": dummy_model_data, + "backend_dataset": dummy_pyomo_backend_model._dataset, "helper_functions": helper_functions._registry["where"], "test": True, "errors": set(), @@ -109,7 +110,11 @@ def _parse_where_string(where_string): class TestParserElements: @pytest.mark.parametrize( ["data_var_string", "expected"], - [("with_inf", "with_inf"), ("all_inf", "all_inf"), ("all_nan", "all_nan")], + [ + ("with_inf", "with_inf"), + ("all_inf", "all_inf"), + ("all_nan", "all_nan"), + ], ) def test_data_var( self, data_var, dummy_model_data, data_var_string, expected, eval_kwargs @@ -130,18 +135,36 @@ def test_data_var( ("all_nan", "all_false"), ], ) + @pytest.mark.parametrize("kwarg", [{"apply_where": True}, {}]) def test_data_var_with_where( - self, data_var, dummy_model_data, data_var_string, expected, eval_kwargs + self, data_var, dummy_model_data, data_var_string, expected, eval_kwargs, kwarg ): parsed_ = data_var.parse_string(data_var_string, parse_all=True) - # apply_where=True is the default, but we also test being explicit. assert ( - parsed_[0] - .eval(apply_where=True, **eval_kwargs) - .equals(dummy_model_data[expected]) + parsed_[0].eval(**kwarg, **eval_kwargs).equals(dummy_model_data[expected]) ) - assert parsed_[0].eval(**eval_kwargs).equals(dummy_model_data[expected]) + + @pytest.mark.parametrize( + ["data_var_string", "expected_similar"], + [ + ("multi_dim_var", "with_inf_as_bool"), + ("multi_dim_expr", "all_true"), + ], + ) + def test_data_var_with_where_decision_variable_or_expr( + self, data_var, dummy_model_data, data_var_string, expected_similar, eval_kwargs + ): + """ + Can't quite compare in the same way for decision variables / global expressions + as with params, because there is a random element to the `node_tech` initialisation array + """ + parsed_ = data_var.parse_string(data_var_string, parse_all=True) + evaluated = parsed_[0].eval(**eval_kwargs) + + # There's a chance that some values that *should* be True in evaluated are made False by a NaN value in `node_tech`, + # #so we check that at least all the remaining True values match + assert (evaluated & dummy_model_data[expected_similar]).equals(evaluated) @pytest.mark.parametrize( "data_var_string", ["_foo", "__type__", "1foo", "with _ inf"] @@ -152,13 +175,36 @@ def test_data_var_fail_malformed_string(self, data_var, data_var_string): assert check_error_or_warning(excinfo, "Expected") @pytest.mark.parametrize("data_var_string", ["foo", "with_INF", "all_infs"]) - def test_data_var_fail_not_in_model( - self, data_var, dummy_model_data, data_var_string, eval_kwargs - ): + def test_data_var_fail_not_in_model(self, data_var, data_var_string, eval_kwargs): parsed_ = data_var.parse_string(data_var_string, parse_all=True) evaluated_ = parsed_[0].eval(**eval_kwargs) assert not evaluated_ + @pytest.mark.parametrize( + "data_var_string", ["multi_dim_var", "no_dim_var", "multi_dim_expr"] + ) + def test_data_var_fail_not_parameter_where_false( + self, data_var, data_var_string, eval_kwargs + ): + parsed_ = data_var.parse_string(data_var_string, parse_all=True) + with pytest.raises(TypeError) as excinfo: + parsed_[0].eval(apply_where=False, **eval_kwargs) + assert check_error_or_warning( + excinfo, + [ + "Can only check for existence of values", + f"Received `{data_var_string}`", + ], + ) + + def test_data_var_fail_cannot_handle_constraint(self, data_var, eval_kwargs): + parsed_ = data_var.parse_string("no_dim_constr", parse_all=True) + with pytest.raises(TypeError) as excinfo: + parsed_[0].eval(**eval_kwargs) + assert check_error_or_warning( + excinfo, ["Cannot check values", "Received constraint: `no_dim_constr`"] + ) + @pytest.mark.parametrize( ["config_string", "expected_val"], [