Open MaGering opened 1 year ago
@MaGering I am not sure if I understand the problem. Wouldn't it be enough to just pass another foreign key to the infer
method and save the additional profiles in a separate csv file? At least, this is how its currently handled.
building.infer_metadata(
package_name="oemof-tabular-dispatch-example",
foreign_keys={
"bus": ["volatile", "dispatchable", "storage", "load"],
"profile": ["load", "volatile"],
"from_to_bus": ["link"],
"chp": [],
"a_efficiency": ["dispatchable"],
"b_efficiency": ["dispatchable"],
},
**kwargs,
)
I think I am getting it: You are having multiple components of the same type, e.g. heat_pumps, but you don't want to give all of them the same efficiencies due to e.g. local differences.
In this case it should be enough to write different names in the cells of the efficiency
column of your component.
Compare with the volatile component and respective volatile_profiles
I think I am getting it: You are having multiple components of the same type, e.g. heat_pumps, but you don't want to give all of them the same efficiencies due to e.g. local differences.
In this case it should be enough to write different names in the cells of the
efficiency
column of your component. Compare with the volatile component and respective volatile_profiles
Yes exactly, that's the case where the problem occurs. For the field profile
this works just fine. But how about that efficiency
or marginal_cost
etc.?
Concerning the solution in your first comment: Will oemof.tabular map it to the correct attribute if I put for example "heatpump_small_efficiency" in front of it? I assumed that the key must be named exactly the same as the name of the attribute. So that the key must be called marginal_cost
for example and not wind_marginal_cost
.
@MaGering sorry for not answering... is this solved anyways?
It is not possible to pass different foreign efficiency profiles, since the sequences name written into the
datapackage.json
isefficiency_profile
for all components that haveefficiency
as attribute.This is due to this code:
In case where
key
equals toefficiency
the name is set withreference
toefficiency_profile
. Instead it should be set tor.name + "_" + key + "_profile"
This way different efficiency sequences for different components can be passed.