sedos-project / data_adapter_oemof

This respository holds the data adapters to connect oemof with the OEDatamodel-concrete.
GNU Affero General Public License v3.0
0 stars 1 forks source link

Feature: Extend Parameter mapper functionality #58

Closed FelixMau closed 7 months ago

FelixMau commented 7 months ago

When calculations have to be made it might be neccesary to declare input variables.

For example efficiency might be calculated from "inflow_efficiency" and "ourflow_efficiency". Therefore I would like to change the Parameter mapping. This might also be helpful to find wacc or other 'outside process' varaibles I think.

The resulting Map would look something like this:

parameter_map = {
        "DEFAULT": {
            "marginal_cost": "variable_costs", # regular expression
            "carrier_cost": "fuel_costs", # regular expression
        },
        "StorageAdapter": {
            "invest_relation_output_capacity": "e2p_ratio",
            "inflow_conversion_factor": "input_ratio",
            "efficiency": [
                     efficiency_calulator,    # Function to call
                     {"inflow_conversion_factor" : "input_ratio", # Keyword arguments
                       "outflow_conversion_factor" : 0.5} ],  # Maybe direct inputs would be helpful as well 
        },

@henhuy @nailend Please let me know your thoughts on that. I think I would change how the parameter mapper is interpreted in Mapper get method.

nailend commented 7 months ago

This is interesting, as I assumed we would have to do the calculations in the facade, but I like this approach much better!

henhuy commented 7 months ago

IMO we should not blow up functionality of the mapper. And also, we already have calculations covered in the Adapter class, where we have full python support - writing functions and keys in JSON or any other format gets ugly real quick. Regarding access to other processes (like WACC)- we must be implement this anyway and this is not covered by code from above.