Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redundant stuff in Simulation #44

Open
dexterurbane opened this issue Aug 15, 2017 · 2 comments
Open

Redundant stuff in Simulation #44

dexterurbane opened this issue Aug 15, 2017 · 2 comments

Comments

@dexterurbane
Copy link
Contributor

Simulation provides write access to SimComponents and TimeSeries collections, but also provides add and remove functions. Based on the principle that multiple ways of doing the same thing can be confusing, consider getting rid of the add and remove functions. This could aid decoupling, e.g. if a class or function just uses the TimeSeriesCollection, say, then it doesn't need to be coupled to the Simulation class. On the other hand, the write access to the collections reduces the encapsulation of the Simulation class. However, I think I still favour this plan.

@dexterurbane
Copy link
Contributor Author

Oops, Simulation doesn't provide write access: this would be via a MutableComponentCollection. This issue is therefore less compelling. Changed from type:enhancement to type:question.

@dexterurbane
Copy link
Contributor Author

RE the TimeSeriesCollection, I think full write access makes sense, as the members play no role in the simulation other than being referenced by other things - it is just a convenience to have the collection located as part of the simulation.

For SimComponents, I think write access makes no sense, as the members are much more closely bound to the Simulation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant