Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
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?