Comments (1)
@SabineHaas In case you want to plot graphs with pygraphviz
e.g. BEV component
def draw_graph(energysystem):
# Draw the graph
from oemof.network.graph import create_nx_graph
G = create_nx_graph(energysystem)
# Specify layout and draw the graph
pos = nx.drawing.nx_agraph.graphviz_layout(
G, prog="neato", args="-Gepsilon=0.0001"
)
fig, ax = plt.subplots(figsize=(10, 8))
node_colors = list()
for i in list(G.nodes()):
if "storage" in i:
node_colors.append("royalblue")
elif "BEV-V2G" in i:
node_colors.append("firebrick")
elif "BEV-G2V" in i:
node_colors.append("lightblue")
elif "BEV-inflex" in i:
node_colors.append("darkviolet")
elif "excess" in i:
node_colors.append("green")
elif "shortage" in i:
node_colors.append("yellow")
elif "load" in i:
node_colors.append("orange")
elif "wind" in i:
node_colors.append("pink")
elif "bus" in i:
node_colors.append("grey")
else:
node_colors.append("violet")
nx.draw(
G,
pos,
# **options,
with_labels=True,
node_size=3000,
# node_color='lightblue',
font_size=10,
font_weight="bold",
node_color=node_colors,
# node_color=["red", "blue", "green", "yellow", "orange"],
)
labels = nx.get_edge_attributes(G, "weight")
nx.draw_networkx_edge_labels(G, pos=pos, edge_labels=labels)
# Customize the plot as needed
ax.set_title("OEMOF Energy System Graph")
# Show the plot
plt.show()
```
from oemof-tabular.
Related Issues (20)
- tools/postprocessing.py content needed in oemoflex HOT 6
- Adapt multi-period investment tests for BEV facades
- Add dev install version
- Rename `custom_attributes` HOT 1
- Breaking changes due to oemof.network v.0.5.0 HOT 3
- Rework periodic value deserialisation
- Windows installation error: Failed building wheel for cchardet HOT 1
- Bug: MultiPeriodConstraint tests fail upgrading solph 0.5.2dev0 to 0.5.2dev1 HOT 2
- Upgrade to oemof.solph 0.5.2 HOT 1
- oemof.solph tag on dev not correct? HOT 1
- Patch release v0.0.5 - Miraculous Mary
- Replace the specification of frequency for hours in pandas data_range HOT 1
- Implement representative years HOT 1
- Extraction Turbine HOT 1
- Add emissions to facades
- Implement decommissioning via max value HOT 1
- Implement transport market share constraint
- Implement mileage constraint
- Postprocessing does not work for components which add pyomo variables HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from oemof-tabular.