Closed YouGuessedMyName closed 1 month ago
I would probably opt for creating a submodel (potentially via storm, we have multiple ways of doing this) and then displaying this submodel (while maybe clarifying which outgoing transitions were omitted?)
You might also be able to write some JavaScript for dynamic state collapsing and insert it into the generated visjs code
The problem with implementing this is the fact that the python pyvis library does not support click events. The solution proposed by Linus is probably possible, but might be complicated because the auto-generated code is very difficult to follow. We should probably consider replacing pyvis by our own python bindings to the underlying visjs library.
I agree with Ivo, the pyvis library just generates visjs code and I don’t think it adds that much value to us, in one instance even made it more complicated because it added color values we didn’t want. Writing a visjs generator ourself removes the magic happening in pyvis and would maybe also make stuff like click events possible. I think it would be really nice to be able to explore the model by clicking.
Now that pyvis is phased out, this is possible. I will start implementing it soon.
Working! We should meet at some point to discuss if this is what you wanted.
Is there a place I can see the current version?
If you clone the branch '56-bindings' and run the notebook 'study.ipnb' under 'notebooks'. You can see how it works. Just run the first two cells, enable misc > explore in the layout menu, and press the reload button. You can then click the states and explore the model that way.
Oh and ignore any Javascript errors, I will fix those later.
Only show a couple states and "explore" the model interactively by clicking on states to reveal their successors.
I suspect this is not possible with the current visualization library, but I will look into it.