You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
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.
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.
The text was updated successfully, but these errors were encountered: