GMLReporter#

class eclypse.report.reporters.gml.GMLReporter[source]#

Bases: Reporter

Class to report simulation metrics in GML format using NetworkX.

Methods

__init__(report_path)

Initialize the GML reporter.

report(_, __, callback)

Extract graph data from callback and prepare it for writing.

write(_, data)

Write graphs in GML format.

__init__(report_path)[source]#

Initialize the GML reporter.

Parameters:

report_path (str | Path)

report(_, __, callback)[source]#

Extract graph data from callback and prepare it for writing.

Parameters:
  • _ (str) – The name of the event.

  • __ (int) – The index of the event trigger (step).

  • callback (EclypseEvent) – The executed callback containing the data to report.

Returns:

Graph entries to write lazily.

Return type:

Generator[tuple[str, nx.DiGraph], None, None]

async write(_, data)[source]#

Write graphs in GML format.

Parameters:
  • callback_type (str) – The type of the callback.

  • data (list[tuple[str, nx.DiGraph]]) – The graphs to write.

  • _ (str)