reno.diagrams.StockDiagramNode#
- class reno.diagrams.StockDiagramNode(ref, diagram)#
Bases:
DiagramNodeNode for a stock component.
Methods
__init__(ref, diagram)Initialize a new node for the passed parent diagram and the provided reno component.
add_edge(edge)Add the given edge to _both_ involved nodes.
add_to_graphviz([g])Add this node to the digraphviz Digraph, accounting for sparklines if needed.
check_str_or_listpart_in_dict(keys, dictionary)Utility function to retrieve the value in a dictionary where the key is found in the passed value (either a singular string which would be a direct match, or a list where the key is found in that list).
check_str_or_listpart_in_list(vals, ...)Utility function to determine if a passed value (either a string or list of strings) is in (or at least one instance of the list is in) the passed containing list.
configure_color(config)Determine what colors should be used for this node given the configuration.
configure_render(config)Decide if this node should be rendered based on configuration and underlying reference.
configure_sparklines(config)Set whether to render a sparkline for this reference based on config.
generate_sparkline()Returns the filepath of the saved plot so graphviz can display in a node.
graphviz_ref_node([g])Add a node for the reference itself to the graph.
Find and add all the necessary edges that connect to this stock.
Attributes
default_colordefault_font_colordefault_sparkline_edge_colorother_attrsshapestyle- Parameters:
ref (reno.Reference)
diagram (ModelDiagram)
- __annotations__ = {}#
- __module__ = 'reno.diagrams'#
- configure_sparklines(config)#
Set whether to render a sparkline for this reference based on config.
- Parameters:
config (RenderConfig)
- Return type:
None
- map_edges()#
Find and add all the necessary edges that connect to this stock.
This is based on inflows, outflows, and any references found in the stock minimum/maximum constraint equations.
- Return type:
None