OpenModelica / OMSens

OpenModelica sensitivity analysis and optimization module.
12 stars 20 forks source link

OMSens and aggregate models #13

Open GianniFerretti opened 3 years ago

GianniFerretti commented 3 years ago

Good afternoon,

I tried OMSens with a simple cascade of two first order systems:

image image

It didn't work:

image

I would also suggest to set the analysis results destination folder in the same directory of the model to be analyzed.

It is not possible to distinguish the state variables:

image image

It is not possible to distinguish the parameters of the blocks:

image image

I would also suggest to select the parameters to be considered for the analysis through an annotation.

Best Regards

Gianni

casella commented 3 years ago

@adrpo wrote me somewhere (I can't find it now) that he probably has a clue about the error. Can @adrpo or @adeas31 take care of that?

The tool seems quite powerful, but if you can't use libraries and you can only use self-contained models, its usability is very severely restricted.

Thanks!

adeas31 commented 3 years ago

I remember @JKRT did some work on it. Basically his idea was to write a sort of wrapper model and propagate variables to it so OMSens can use them.

casella commented 3 years ago

@JKRT, maybe we can discuss this at the next devmeeting on Monday? This should be clarified for end users.

Vivek106singh commented 3 years ago

I tried making a wrapper model but still getting same error. Please provide some small example

JKRT commented 3 years ago

I remember @JKRT did some work on it. Basically his idea was to write a sort of wrapper model and propagate variables to it so OMSens can use them.

That is true I did indeed! I need to find this email... I have a vague memory that I helped some students a while back with exactly this issue (Or if I resolved it for myself). The problem is as usual with me that I have a memory of a goldfish.. Seems I missed this issue but I think that was due to me having Covid-19 around that time last year.. @JKRT, maybe we can discuss this at the next devmeeting on Monday? This should be clarified for end users. Yes and I also have some other questions for you I wish to discuss:) (Concerning what you know about related research in Equation oriented language in general. I have some sort of a mockup for VSS now but I need to know what to focus on so I am bugging everyone currently..)

//John/Night Owl

GianniFerretti commented 3 years ago

At this link you can download the file

https://www.dropbox.com/s/xajttmyhwbxlstp/ADM1.rar?dl=0

containing the BSM2_Framework package, defining the monolithic ADM1 model, while in the class Example the same aggregated model is defined. OMSens seems to work of the monolithic but not on the aggregate model.

Best regards

Gianni

casella commented 6 months ago

Thanks @adrpo, this is highly appreciated 😃

casella commented 6 months ago

@adrpo can you please port this to maintenance/v1.23, so we also get it in the 1.23.0 release? Thanks!