Closed brynpickering closed 11 months ago
Merging #512 (1e69f10) into main (3779e0d) will increase coverage by
0.21%
. Report is 1 commits behind head on main. The diff coverage is100.00%
.
@@ Coverage Diff @@
## main #512 +/- ##
==========================================
+ Coverage 93.21% 93.42% +0.21%
==========================================
Files 28 28
Lines 3817 3804 -13
Branches 877 873 -4
==========================================
- Hits 3558 3554 -4
+ Misses 168 162 -6
+ Partials 91 88 -3
Files | Coverage Δ | |
---|---|---|
src/calliope/backend/backend_model.py | 97.47% <100.00%> (+0.01%) |
:arrow_up: |
src/calliope/backend/where_parser.py | 97.67% <100.00%> (ø) |
|
src/calliope/core/model.py | 93.75% <100.00%> (+0.03%) |
:arrow_up: |
src/calliope/preprocess/checks.py | 85.16% <100.00%> (ø) |
|
src/calliope/preprocess/model_run.py | 91.82% <ø> (ø) |
|
src/calliope/preprocess/nodes.py | 93.75% <100.00%> (+3.17%) |
:arrow_up: |
Allow for input and output flows to have different efficiencies (mostly useful for storage techs, but also conversion).
I did try to expand this to cover capacities too (see https://github.com/calliope-project/calliope/tree/add_in_out_params), but this leads to a lot of additional verbosity and base math for what I came to realise was little additional benefit.
The beenfit generally of splitting out
in
andout
is that in reality there are technologies that work that way (conversion technologies that have a limit on e.g., biofuel flows in as well as on heat output; storage technologies with different charge capacities to discharge capacities; transmission links with different NTCs in each direction). However, expanding everything to account forflow_in_cap
andflow_out_cap
is cumbersome.Hopefully it will be possible to at least set a different rated capacity for different carriers with the intro of #484, which would cover conversion techs. However, for storage / transmission techs (same in and out carrier), the issue still remains.
introducing
flow_in_cap
andflow_out_cap
in custom mathIt should be possible, for storage techs, to not define
flow_cap_max
and then to define instead one's ownflow_in_cap_max
andflow_out_cap_max
and introduce that as the constraining params for input and output flows (althoughflow_cap
will still be linked toflow_out
, requiring careful consideration when applying costs).For transmission techs,
flow_cap
is forced to be the same in both directions so it again would be somewhat meaningless if introducingflow_in_cap_max
andflow_out_cap_max
. The custom math might also be hard as you need to do it per link, so need to write the custom math per link tech (tech_name:remote_node
) and make sure you're gettingflow_in
(export) andflow_out
(import) the right way around!Summary of changes in this pull request:
flow_eff
toflow_in_eff
(applies to flows into the technology) andflow_out_eff
(applies to flows out of a technology).om_prod
andom_con
tocost_flow_out
andcost_flow_in
.Reviewer checklist: