Skip to content

Commit 8fc14c2

Browse files
committed
Add new presentation_group for liquid fuels production
1 parent 2184181 commit 8fc14c2

File tree

1 file changed

+104
-0
lines changed

1 file changed

+104
-0
lines changed

app/serializers/node_serializer_data.rb

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -621,6 +621,106 @@ module NodeSerializerData
621621
}
622622
}.freeze
623623

624+
LIQUID_FUELS_ATTRIBUTES_AND_METHODS = {
625+
technical: {
626+
'demand * loss_output_conversion / BILLIONS' => {
627+
label: 'Annual fuel production',
628+
key: :annual_fuel_production,
629+
unit: 'PJ / year'
630+
},
631+
'input_capacity * number_of_units' => {
632+
label: 'Installed input capacity',
633+
key: :total_installed_input_capacity,
634+
unit: 'MW'
635+
},
636+
'1 - loss_output_conversion' => {
637+
label: 'Production efficiency',
638+
key: :production_efficiency,
639+
unit: '%',
640+
formatter: FORMAT_FAC_TO_PERCENT
641+
},
642+
full_load_hours: { label: 'Full load hours', unit: 'hour / year' },
643+
free_co2_factor: { label: 'CCS capture rate', unit: '%', formatter: FORMAT_FAC_TO_PERCENT },
644+
technical_lifetime: { label: 'Technical lifetime', unit: 'years', formatter: ->(n) { n.to_i } }
645+
}
646+
}.freeze
647+
648+
# If the node belongs to the liquid_fuels presentation group then
649+
# add these
650+
LIQUID_FUELS_ATTRIBUTES_AND_METHODS = LIQUID_FUELS_ATTRIBUTES_AND_METHODS.merge({
651+
cost: {
652+
'initial_investment_per(:mw_input_capacity) + cost_of_installing_per(:mw_input_capacity) + decommissioning_costs_per(:mw_input_capacity)' => {
653+
label: 'Investment over lifetime per MW input',
654+
key: :total_initial_investment_per_mw_input_capacity,
655+
unit: 'EUR / MW',
656+
formatter: ->(n) { n.to_i }
657+
},
658+
'fixed_operation_and_maintenance_costs_per(:mw_input_capacity)' => {
659+
label: 'Fixed operation and maintenance costs',
660+
key: :fixed_operation_and_maintenance_costs_per_mw_input_capacity,
661+
unit: 'EUR / MW / year',
662+
formatter: ->(n) { n.to_i }
663+
},
664+
'variable_operation_and_maintenance_costs_per(:full_load_hour)' => {
665+
label: 'Variable operation and maintenance costs',
666+
unit: 'EUR / full load hour'
667+
},
668+
:wacc => {
669+
label: 'Weighted average cost of capital',
670+
unit: '%',
671+
formatter: FORMAT_FAC_TO_PERCENT
672+
},
673+
:takes_part_in_ets => {
674+
label: 'Do emissions have to be paid through the ETS?',
675+
unit: 'boolean',
676+
formatter: ->(x) { x == 1 }
677+
}
678+
}
679+
}).freeze
680+
681+
# If the node belongs to the liquid_fuels_ccs presentation group then
682+
# add these
683+
LIQUID_FUELS_CCS_ATTRIBUTES_AND_METHODS = LIQUID_FUELS_ATTRIBUTES_AND_METHODS.merge({
684+
cost: {
685+
'initial_investment_per(:mw_input_capacity) + cost_of_installing_per(:mw_input_capacity) + decommissioning_costs_per(:mw_input_capacity)' => {
686+
label: 'Investment over lifetime per MW input',
687+
key: :total_initial_investment_per_mw_input_capacity,
688+
unit: 'EUR / MW',
689+
formatter: ->(n) { n.to_i }
690+
},
691+
'ccs_investment_per(:mw_input_capacity)' => {
692+
label: 'Additional initial investment for CCS',
693+
key: :ccs_investment_per_mw_input_capacity,
694+
unit: 'EUR / MW',
695+
formatter: ->(n) { n.to_i }
696+
},
697+
'fixed_operation_and_maintenance_costs_per(:mw_input_capacity)' => {
698+
label: 'Fixed operation and maintenance costs',
699+
key: :fixed_operation_and_maintenance_costs_per_mw_input_capacity,
700+
unit: 'EUR / MW / year',
701+
formatter: ->(n) { n.to_i }
702+
},
703+
'variable_operation_and_maintenance_costs_per(:full_load_hour)' => {
704+
label: 'Variable operation and maintenance costs',
705+
unit: 'EUR / full load hour'
706+
},
707+
:variable_operation_and_maintenance_costs_for_ccs_per_full_load_hour => {
708+
label: 'Additional variable operation and maintenance costs for CCS',
709+
unit: 'EUR / full load hour'
710+
},
711+
:wacc => {
712+
label: 'Weighted average cost of capital',
713+
unit: '%',
714+
formatter: FORMAT_FAC_TO_PERCENT
715+
},
716+
:takes_part_in_ets => {
717+
label: 'Do emissions have to be paid through the ETS?',
718+
unit: 'boolean',
719+
formatter: ->(x) { x == 1 }
720+
}
721+
}
722+
}).freeze
723+
624724
CO2_GENERIC_ATTRIBUTES_AND_METHODS = {
625725
cost: {
626726
'total_initial_investment_per(:plant)' => {
@@ -818,6 +918,10 @@ def attributes_and_methods_to_show
818918
P2P_ATTRIBUTES_AND_METHODS
819919
when :v2g
820920
V2G_ATTRIBUTES_AND_METHODS
921+
when :liquid_fuels
922+
LIQUID_FUELS_ATTRIBUTES_AND_METHODS
923+
when :liquid_fuels_ccs
924+
LIQUID_FUELS_CCS_ATTRIBUTES_AND_METHODS
821925
when :biomass
822926
BIOMASS_ATTRIBUTES_AND_METHODS
823927
when :steel

0 commit comments

Comments
 (0)