Skip to content

Conversation

@volkm
Copy link
Contributor

@volkm volkm commented Oct 19, 2022

Checking whether a model is acyclic should be quite helpful.

Note that the current implementation first needs to find and exclude all states with self-loops, because the underlying Storm function is considering self-loops as cycles.

Thanks to @jipspel for some help.

}
}
}
return storm::utility::graph::hasCycle(matrix, subStates);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is problematic for MDPs, when we have one self-loop row first and then one non-selfloop row which induces a cycle with other states, right?

I think the "hasCycle" would need to have a "subChoices" input to make this work?
Alternatively, this method could also build an SCC decomposition and we then check if each SCC has size 1.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right, this is indeed problematic.
I am open for other suggestion. The SCC decomposition might be a good idea.
I actually just wanted to have a simple function to check for acyclity. Unfortunately, hasCycle is not exactly giving me what I want. Maybe it makes sense to implement a better function in Storm directly.

@sjunges sjunges marked this pull request as draft November 29, 2023 11:06
@sjunges
Copy link
Contributor

sjunges commented Aug 20, 2025

Shall we close this PR?

@volkm
Copy link
Contributor Author

volkm commented Aug 20, 2025

Yes, we can close it.

@volkm volkm closed this Aug 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants