Do we want hierarchical classes (subclasses)? #1504
Replies: 10 comments
-
In GitLab by @manuelma on Dec 4, 2018, 13:04 I like this for future versions. It probably impacts the generic data structure as well, since we would need something like a |
Beta Was this translation helpful? Give feedback.
-
In GitLab by @poncelet on Dec 4, 2018, 13:20
I believe so too. Do you have an idea how much effort it would require to adapt the data structure/tree view etc. to accommodate subclasses?
I fully understand that from toolbox perspective, this can be something to explore/develop in a later stage. However, if we in the end want to support it in the toolbox, there might be missed opportunities for Spine model to make advantage of this functionality. So in that sense, it is a strategic decision to be made, and I would like to consider it as early as possible. |
Beta Was this translation helpful? Give feedback.
-
In GitLab by @manuelma on Dec 4, 2018, 13:29
It's though to say, since we don't have a clear requirement yet. I can say that adding a few fields and using those in the treeview, for example, is never too much effort, just something that needs to be done carefully. But I'm with you, we can take this decision now (or soon) and plan to have it working for version 0.3 or 0.4, something like that. Remember our priority now is to consolidate and document the current version. |
Beta Was this translation helpful? Give feedback.
-
In GitLab by @DillonJ on Dec 4, 2018, 17:17 As we discussed in the storage issue https://gitlab.vtt.fi/spine/model/issues/6, this will impact on archetypes and we should discuss this idea as part of the archetype discussion (the post features/methods implementation). My feeling is that it would be either archetypes or subclasses and not both... maybe we could implement archetypes using sublcasses or at least on top of subclasses. It doesn't only impact the generic data structure, it IS the generic data structure :-) , |
Beta Was this translation helpful? Give feedback.
-
In GitLab by @DillonJ on Dec 4, 2018, 17:19 I was also making the point that using features/methods we can essentially implement the idea of a subclass already. We create a feature parameter and then use the value in conditionals in the model... this is the essential functionality in my view |
Beta Was this translation helpful? Give feedback.
-
In GitLab by @poncelet on Dec 4, 2018, 17:49
I disagree because (i) subclasses are more likely to be used in other models (see e.g., NREL) which to me is a main reason for the toolbox to support it, and (ii) subclasses cannot provide the functionality we want for archetypes, and should in my view not be seen as a replacement for archetypes (see my comments in issue spine-tools/SpineOpt.jl#62).
Regarding this, this should be discussed I guess over in Issue spine-tools/SpineOpt.jl#62. As made clear in my comment above, I don't think subclasses can be a replacement of archetypes. I do however believe that archetypes can build on subclasses (so definitively not an either-or for me). |
Beta Was this translation helpful? Give feedback.
-
In GitLab by @jkiviluo on Dec 5, 2018, 15:30 Currently (subject to change as argument evolves), I think we should support sub-classes in Spine Toolbox (e.g. so that NREL can directly implement their data structure), but we wouldn't use it in Spine Model where archetype/feature/method should be sufficient. If at some point it is not sufficient, we could start using sub-classes also in Spine Model, but I would first try to manage without them - this helps to keep things easier to understand. This approach can help other tool makers to experiment what is the best approach for their purpose. Actually, it can help us too. |
Beta Was this translation helpful? Give feedback.
-
In GitLab by @DillonJ on Dec 5, 2018, 15:46 Let's be mindful of project resources and where we are right now. Our current focus is to try and stabilize the toolbox and complete milestone 2 so we can implement the case studies - and we're quite behind where we should be on those. Sub classes and archetypes together would create a lot of complexity and in my opinion, create too many ways to do similar things and this could cause problems. I think we need to decide how we do archetypes first and consider the question of subclasses in this context. If we're going to make big changes that impact right across the project from the data structure, toolbox, JuMPAllOut and SpineModel, then we should consider them carefully and try and find the optimal balance between function, impact and effort. We should also try and do it as a single piece of work to minimize the impact. I think cooperation with NREL is good, but I don't feel that this should dictate changes that have a big impact on the project. Currently, I don't see a reciprocal impact where Spine is impacting NREL development. Also, in my view, it is fairly straightforward to implement subclasses using features/methods. You define a feature parameter for each object called |
Beta Was this translation helpful? Give feedback.
-
In GitLab by @poncelet on Apr 30, 2019, 10:21 In SpineModel Issue#106, we have been discussing possibly changing the database design. After some discussions, there seems to be multiple motivations for making changes to our current generic data structure. The ideas that have been discussed are:
Next steps are that @juha_k does a proposal and we have a next call to discuss it next Monday 1pm CET. |
Beta Was this translation helpful? Give feedback.
-
In GitLab by @manuelma on Apr 30, 2019, 13:10
We do have only one parameter definition table currently. The 'problem' is that table has two fields, one called |
Beta Was this translation helpful? Give feedback.
-
In GitLab by @poncelet on Dec 4, 2018, 11:07
Our current data structure does not support the use of subclasses (related to inheritance). This issue aims to open the discussion regarding whether Spine toolbox should support subclasses.
The idea of subclasses has been put forward in the context of the archetype discussion (see https://gitlab.vtt.fi/spine/model/issues/62#note_2963). In that context, the discussion concluded that subclasses are not sufficient to provide all the functionality we desire for archetypes.
However, this discussion does not relate to archetypes (and even to a certain degree to Spine model), but more general whether the subclasses could be a valuable feature for Spine toolbox (thus in the end, could supporting subclasses be valuable to potential users of the toolbox)?
The advantages for subclasses are:
Beta Was this translation helpful? Give feedback.
All reactions