deflex.Cycles.suspicious_cycles

Cycles.suspicious_cycles

Get all cycles from a list of cycles that are suspicious.

Suspicious cycles are cycles that have a non-zero value in all flows within one time step.

One can detect all cycles and drop the unsuspicious cycles to get only the suspicious ones. A suspicious cycle indicates a problem in the model design, so one should have a closer look at all these cycles. A typical example for such cycles are storages that a charged and discharged in one time step. In some rare cases suspicious cycles are fine.

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(list(cy.simple_cycles))
9
>>> len(cy.suspicious_cycles)
0