Opened 6 years ago
Last modified 2 years ago
#5346 new defect
Duplicate model function in OMEdit should work without compromises
Reported by: | Francesco Casella | Owned by: | Adeel Asghar |
---|---|---|---|
Priority: | blocker | Milestone: | 2.0.0 |
Component: | OMEdit | Version: | |
Keywords: | Cc: | dr.christian.kral@…, Dietmar Winkler, massimo ceraolo, Per Östlund, Adrian Pop |
Description (last modified by )
A very common model development pattern, particularly among beginners, is to start duplicating existing and working models, possibly putting them in a completely different package, and then applying some changes.
OMEdit currently falls short of providing this basic feature, because the duplicated models are often invalid for various reasons. Expert users can try to fix them manually, but this is not an option for beginners.
I had a discussion at the last Modelica Design meeting with Leo Gall, and basically on of the reasons why he can't start using OMC seriously with his customers is that he cannot follow this pattern. Christian Kral is also suffering with his students, and I guess many others are longing for this feature, even though they don't open tickets.
I think having a decent Duplicate functionality is definitely a must-have for 2.0.0, so I'm opening this combo ticket as a blocker for that release.
Currently open issues on this topic are: #4240, #4536, #4799, #4875, #5191, #5343, #5344, #5393. We should have them all fixed in time for 2.0.0
Of course it would be nice if at least the issues that are easier to fix are done in time for 1.14.0. @adeas31, what do you think?
Change History (23)
comment:1 by , 6 years ago
comment:2 by , 6 years ago
Just my upvote for this desperately needed feature. Basically OMEdit can not really be used for new users trying to learn from existing working examples by extending them or modifying them because of this. Not unless there is an expert at hand to help fixing broken class references.
comment:3 by , 6 years ago
Description: | modified (diff) |
---|
comment:4 by , 6 years ago
I would add that if we can't fix Duplicate in certain conditions, we should rather disable it than keeping it flawed.
follow-up: 7 comment:5 by , 6 years ago
I think, that if a new user would not have the Duplicate feature in OMEdit, he would probably copy and paste the text of the model and would end up in the same situation as now. The copied model is not working. I therefore very much support the idea of having this issue fixed.
follow-up: 8 comment:6 by , 6 years ago
I am trying to fix these tickets since few weeks now. I made some positive progress and hopefully will finish it next week. I don't think it will work 100% in regards of preserving the formatting but at least the duplication will work. We can improve the preservation of formatting later.
comment:8 by , 6 years ago
Replying to adeas31:
I am trying to fix these tickets since few weeks now. I made some positive progress and hopefully will finish it next week. I don't think it will work 100% in regards of preserving the formatting but at least the duplication will work. We can improve the preservation of formatting later.
Sounds like a very good plan :)
comment:9 by , 6 years ago
Few of the issues are fixed in ed41047/OMEdit. However, still there are some issues (#4536, #5344) that requires proper refactoring. Per mentioned in ticket:4536#comment:3 that this could be solved with new frontend.
@ChristianKral can you try #4240 again with the latest?
comment:10 by , 6 years ago
Cc: | added |
---|
comment:11 by , 6 years ago
I tried it again and the issue does not occur any more. I reported this status in #4240.
comment:12 by , 6 years ago
What is the status on this? I've just tested it again with
OMEdit 1.11.0~1-gf048cec Connected to OpenModelica 1.14.0~dev-5851-ga72ff35
and it still does not update the relative class references after duplication.
follow-up: 19 comment:18 by , 5 years ago
Hello, everyone.
I realized that 'Duplicate' feature has bug at latest OMEdit release v1.14.0 and v1.14.1 .
When duplicate some model,
(s.t. MSL's example model Modelica.Mechanics.Translational.Examples.SignConvention
)
OMEdit raises error. The error says that name of duplicate target is a modelica's keyword,
despite SignConvention
is not a Modelica's keyword!
Should this issue be discussed on this ticket? Or should I create a new ticket?
comment:19 by , 5 years ago
Replying to anonymous:
Hello, everyone.
I realized that 'Duplicate' feature has bug at latest OMEdit release v1.14.0 and v1.14.1 .
When duplicate some model,
(s.t. MSL's example modelModelica.Mechanics.Translational.Examples.SignConvention
)
OMEdit raises error. The error says that name of duplicate target is a modelica's keyword,
despiteSignConvention
is not a Modelica's keyword!
Should this issue be discussed on this ticket? Or should I create a new ticket?
This was solved two days ago. Try the latest nightly.
comment:23 by , 2 years ago
Continue on github: https://github.com/OpenModelica/OpenModelica/issues/5346
Maybe a cut/copy/paste on the model tree, in Dymola's way, is the most friendly way to manage and move models inside and across packages.
The absence of this feature is the first reason of difficulty for my students when using OMEdit, as Kral's, in addition to ticket #3776, which is somehow related.
If fast promotion of OMEdit usage is concerned, probably the most proper milestone for this ticket is 1.14.0, as the one of #3776. However, since I presume that #3776 is easier to solve, maybe it is correct that that ticket has priority over this one.