Just some minutes ago, oemof.solph v0.6.2 (codenamed “robust results”) has landed (GitHub, Zenodo, PyPI). It is no surprise that one focus of this release is the Results object. It is now in a status which we consider stable for productive use. At the same time, we also fixed the old processing.results, which is still handy e.g. when using TSAM, to work with Pandas 3.x.
We recommend to also update oemof.network. Today’s release v0.5.2 (GitHub, Zenodo, PyPI) allows to compare Nodes and their string representations. This sounds rather technical but is a real game changer when analysing results. Consider the following:
...
bus1 = Bus(label="b1")
bus2 = Bus(label="b2", inputs={bus1: Flow())
energy_system.add(bus1, bus2)
...
model = Model(energy_system)
model.solve()
results = Results(model)
Now, all of the following options will give the flow from bus1 to bus2:
results["flow"][(bus1,bus2)]results["flow"][("b1","b2")]results["flow"][("b1",bus2)]results["flow"][(b1,"b2")]
No more converting keys to strings or anything. I hope you like this as much as I do. As a bonus, results["flow"] is just short for results.to_df("flow") and returns a pandas.DataFrame, helping you with further data analysis.
