Using salabim without global variables #13
First of all, thank you for this very nice package, it is a real pleasure to write simulations with salabim!
I am only wondering how to avoid using global variables for the simulation state (queues, etc).
All examples from the documentation (along with all the examples I looked at in the git repo) use a pattern like the following:
That is, important state objects are created in the global context, and they are accessed directly by components.
This prevents two usages:
What would be the best way to make these state objects available to components? Put everything in a big class?
The text was updated successfully, but these errors were encountered: