deflex.Cycles.cycles

Cycles.cycles

Get all cycles of the model.

Cycles are a list of nodes with a flow between one node and the following node in the list and a flow from the last node of the lsit to the first node. Therefore, the number of nodes equals the number of flows.

Returns:
Return type:list of pandas.DataFrame

Examples

>>> from deflex import restore_results, fetch_test_files, Cycles
>>> fn = fetch_test_files("de03_fictive.dflx")
>>> cy = Cycles(restore_results(fn), storages=True, lines=True)
>>> len(cy.cycles)
9
>>> len(cy.used_cycles)
2
>>> type(cy.used_cycles[0])
<class 'pandas.core.frame.DataFrame'>