Opened 4 years ago
Last modified 3 years ago
#6052 new defect
Issue with analyzeInitialSystem in HanserModelica
Reported by: | Francesco Casella | Owned by: | Karim Adbdelhak |
---|---|---|---|
Priority: | blocker | Milestone: | 1.19.0 |
Component: | Initialization | Version: | |
Keywords: | Cc: | dr.christiankral@… |
Description
There are three models in the HanserModelica library that fail for unspecified reasons during analyzeInitialSystem
, see:
- HanserModelica.Machines.TestDoubleLayer7over9
- HanserModelica.Machines.TestDoubleLayer10over12
- HanserModelica.Machines.TestSingleLayer12over12
@Karim, would you mind having a look at your earliest convenience? I think we should solve these for the next release, so we can claim 100% support over this nice library for teaching.
Attachments (1)
Change History (13)
comment:1 by , 4 years ago
comment:2 by , 4 years ago
Looks like the fill()
operator is indexed ... does this appear in the model like that? I don't think that this would be modelica language compliant.
If that is the case just replace it with an auxiliary variable which is created with fill
and index that variable instead.
follow-up: 5 comment:3 by , 4 years ago
First of all, I didn't notice that these three models work fine with the old frontend. I guess this can give some clue so as to what is going wrong.
Then, it is a bit weird that I am not getting the same error message that @christiankral is getting. If I try out TestDoubleLayer7over9
with the new frontend using v1.16.0-dev-545-ga1be2e6252
under Windows, the backend fails with
[1] 18:40:26 Translation Error No system for the symbolic initialization was generated
which is the same that happens with the Jenkins testing under Linux, currently with v1.16.0-dev.548+gd3091d6954
. There is no error in the frontend, apparently, even though the way the new frontend handles this model eventually breaks the backend.
@christiankral are you installing OMC using APT or are you compiling it yourself? Maybe there is something wrong with that?
comment:4 by , 4 years ago
I checked the flattened model with the old and new frontend. The main difference I see is that the OF can split the binding equation for N
into its scalar counterparts
parameter Real N[1].re = 108.2294825561955 "Real part of complex number"; parameter Real N[1].im = 0.0 "Imaginary part of complex number"; parameter Real N[2].re = -54.11474127809771 "Real part of complex number"; parameter Real N[2].im = 93.72948133211004 "Imaginary part of complex number"; parameter Real N[3].re = -54.11474127809775 "Real part of complex number"; parameter Real N[3].im = -93.72948133211004 "Imaginary part of complex number";
while the NF keeps it together and apparently defers their evaluation to the backend (which fails for some reason)
parameter Real N[1].re(fixed = false) "Real part of complex number"; parameter Real N[1].im(fixed = false) "Imaginary part of complex number"; parameter Real N[2].re(fixed = false) "Real part of complex number"; parameter Real N[2].im(fixed = false) "Imaginary part of complex number"; parameter Real N[3].re(fixed = false) "Real part of complex number"; parameter Real N[3].im(fixed = false) "Imaginary part of complex number"; ... initial equation N = HanserModelica.Machines.Functions.complexTurns(winding);
I'm not sure why the backend cannot handle that. @Karim, maybe you want to give a look?
comment:5 by , 4 years ago
Replying to casella:
@christiankral are you installing OMC using APT or are you compiling it yourself? Maybe there is something wrong with that?
I am using APT to install and update OMC.
comment:6 by , 4 years ago
Weird.
I am using the latest released version of HanserModelica, are you?
comment:8 by , 4 years ago
One more note to not miss any important detail: I suppose that the path /var/lib/jenkins2/...
shown in the error message is something like a virtual path as /var/lib/jenkins2
does physically not exist on my machine.
comment:10 by , 4 years ago
Milestone: | 1.17.0 → 1.18.0 |
---|
Retargeted to 1.18.0 after 1.17.0-dev.beta2 release
The new frontend drops the following error message:
Unfortunately I do not understand what exactly this error message means. Might this be a Modelica implementation issue of HanserModelica?