itesla / ipsl

The iTesla Power System Library is a Modelica library developed as part of the iTesla project. The library contains a set of power system component models for phasor time domain simulations.
Mozilla Public License 2.0
23 stars 71 forks source link

Correcting Tin's shameful mistake #122

Closed tinrabuzin closed 8 years ago

MaximeBaudette commented 8 years ago

Looks good :-)

MaximeBaudette commented 8 years ago

@dietmarw I actually thought about where to place that .png file, whether it should be inside the /iPSL/ or not. My thought was that when generating the broken down version of the library, would Dymola preserve this png file or not? If yes, than I see no problems in putting it inside, otherwise I think I prefer putting it outside.

dietmarw commented 8 years ago

The problem is that iPSL as a Modelica library is what's inside iPSL and not one level above. So installing iPSL via OMEdit's library menu or impact simply gives you iPSL/*. So Resources are part of the package and jumping outside in order to fetch images might actually cause problems. Thinks about having a project directory of several packages. If others would also have a Resources folder on the same level that their packages are but not inside the package than you would end up different packages overwriting each others Resources. Do you understand the problem?

dietmarw commented 8 years ago

As for your Dymola question. If you break down a package then all you need to change (and this you have to do even if you would refer to a level up) is change the root name of the package. E.g., modelica://iPSL/Resources/Images/foo.png would become: modelica://iPSLSubA/Resources/Images/foo.png and modelica://iPSLSubB/Resources/Images/foo.png .

If this is what you were asking.

MaximeBaudette commented 8 years ago

@dietmarw No my worry is that Dymola doesn't take care of that additional folder within the /iPSL folder. The thing is, very often I use the following procedure to clean the repository (I haven't found another way of doing it so simply):

Then I'm afraid that my picture will disappear.

dietmarw commented 8 years ago

Ah. I see. No you don't have to worry about that. Although Dymola tends to do all kind of crazy stuff with your Modelica files it never touched any non-modelica files as long as I can think. But leaving your resources where they are now will definitely break stuff when put on a normal system ;-)

dietmarw commented 8 years ago

And you can simply test it. After all your files are under version control so you don't have to worry about loosing stuff.