ALSETLab / RaPId

RaPId (a recursive acronym for "Rapid Parameter Identification") utilizes different optimization and simulation technologies to provide a framework for model validation and calibration of any kind of dynamical systems, but specifically catered to power systems.
GNU Lesser General Public License v3.0
40 stars 12 forks source link

Installation script: run a simple test example at the end #12

Open MaximeBaudette opened 9 years ago

MaximeBaudette commented 9 years ago

Suggestion From Luigi:

Note @lvanfretti : I'm adding this new issue, to close the previous one, as the solution implemented by @tinrabuzin is working.

MaximeBaudette commented 8 years ago

@lvanfretti Could you specify the motivation behind having a specific examples run at the end of the installation ?

Since we implemented the test of dependencies in the installation script, I haven't experienced any situation where no error raised in the install process was coupled to a non working Rapid toobox

lvanfretti commented 8 years ago

@MaximeBaudette what I would like is to make sure that at least the basic example would run without any human intervation.

The most natural thing would be to do it right at installation, but I guess we can have a simple test script for debbuging dependencies and installation. My simple example is ideal for that because it will not put a lot of burden to the machine, and is small enough to set up several tests of the different functionalities and options of the tool.

If someone reports a bug, we can ask to display the output of the installation script or test script.

If you guys can get my basic script working again, and give me an hour or such, I can create some examples / cases of what we want to test.

Finally, it is also a pretty nighfty thing to have the user get something already running when they install rapid so they can start playing... so that was why I want it in the installation, but if you want to make it a separate test script, that is fine with me.

tinrabuzin commented 8 years ago

@lvanfretti If you check out the two pull request you can see how I implemented it now... But, ofc, I'll adapt it to yours and Maxime's decision.

lvanfretti commented 8 years ago

@tinrabizin you will have to show me, I don't have my M$ Guidos image with me.

MaximeBaudette commented 8 years ago

@tinrabuzin I'll approve the pull request for now. I still find this solution to be an overkill, as windows are opened for simulink, the graph visualization... We can think of another to do it in the future, but for now this is what will be implemented

lvanfretti commented 8 years ago

@maximebaudette there are commands to close the simulink model automatically. It doesn't even need to be opened... but maybe that's inside either the rapid workflow or the FMI workflow.

tinrabuzin commented 8 years ago

@MaximeBaudette @lvanfretti For some reason, the model is closed automatically, at least on my computer. However, I open the model on purpose. To prevent it, you can just remove the two lines starting with open_system.

MaximeBaudette commented 8 years ago

to get me wrong, it gets closed upon completion, but it is open during the iterations

lvanfretti commented 8 years ago

@tinrabuzin which workflow opens the simulink model? Is it RaPId or the FMI? If it is RaPId, I guess we can use this: link. If it is the FMI Toolbox, then we have to check if there is an option to set the default to 'don't open the simulink model'.

tinrabuzin commented 8 years ago

@lvanfretti I opened it with my script on purpose wtih open_system. I'll remove this now.

MaximeBaudette commented 8 years ago

now I added some try catch around the example. it would be off course awesome to add custom message depending on the error code received, but for now we'll be fine wih "something went wrong"

janlav commented 8 years ago

@MaximeBaudette is this issue resolve now?

MaximeBaudette commented 8 years ago

@janlav Yes and no. I consider that the test example at the installation is working. I'd prefer if the simulink remained hidden (@tinrabuzin did you fix that or not?). I intended to leave the issue open so we can discuss whether we need that test or not.