put strong connectivity check in config.SHORTCIRCUIT_SIA. #114
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As Will advised, I changed the code in order to work in the SHORTCIRCUIT_SIA. As a result, it works in the same way as before, but let an user know the reason why the subsystem is trivial.
If you have the other advice for trivial cases, please let me know it.
It works like this:
tpm = np.array(
[
[1, 0, 0],
[1, 0, 0],
[1, 0, 0],
[1, 0, 0],
[1, 0, 0],
[1, 0, 0],
[1, 1, 1],
[1, 1, 1],
]
)
cm = np.array([
[0,0,0],
[0,1,1],
[0,1,1],
])
labels= ["A", "B","C"]
state0= (1,1,1)
For all possible subsystems,
┌────────────────────────────────────────┐
│ NullSystemIrreducibilityAnalysis │
│ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ │
│ Subsystem: A,B,C │
│ Φ: 0.0 │
│ CAUSE: (0,1,1) │
│ II_c: 1.0 │
│ EFFECT: (1,1,1) │
│ II_e: 2.0 │
│ Reasons: NOT_STRONGLY_CONNECTED │
└────────────────────────────────────────┘
Subsystem(B, C)
┌──────────────────────────────────┐
│ SystemIrreducibilityAnalysis │
│ ━━━━━━━━━━━━━━━━━━━━━━━ │
│ Subsystem: B,C │
│ Current state: (1,1) │
│ φ_s: 2.0 │
│ Normalized φ_s: 1.0 │
│ CAUSE: (1,1) │
│ II_c: 2.0 │
│ EFFECT: (1,1) │
│ II_e: 2.0 │
│ #(tied MIPs): 0 │
│ Partition: │
│ 2 parts: {B,C} │
│ [[0 1] │
│ [1 0]] │
└──────────────────────────────────┘
Subsystem(A)
┌─────────────────────────────────────┐
│ NullSystemIrreducibilityAnalysis │
│ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ │
│ Subsystem: A │
│ Φ: 0.0 │
│ CAUSE: (0) │
│ II_c: 0.0 │
│ EFFECT: (0) │
│ II_e: 0.0 │
│ Reasons: NO_CAUSE, NO_EFFECT │
└─────────────────────────────────────┘