- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » Problems simulating...
Problems simulating Modelica.Electrical.Analog.Lines.M_OLine
Problems simulating Modelica.Electrical.Analog.Lines.M_OLine
Hello!
I'm trying to do a simulation using the Modelica.Electrical.Analog.Lines.M_OLine component, but I am obtaining the following errors:
Translation 00:37:26 0:0-0:0 Internal error ./Compiler/BackEnd/SimCodeUtil.mo: function createSimCode failed [Transformation from optimised DAE to simulation code structure failed]
Translation 00:37:26 0:0-0:0 Internal error ./Compiler/BackEnd/SimCodeUtil.mo: function createEquationsForSystem1 failed
Translation 00:37:26 0:0-0:0 Internal error ./Compiler/BackEnd/SimCodeUtil.mo: function createEquationsForSystem1 failed for component {403:460}
Translation 00:37:26 0:0-0:0 Internal error ./Compiler/BackEnd/SimCodeUtil.mo: function createOdeSystem failed for component {403:460}
I believe I have a problem with my compiler but I have no ideia on how to fix it.
I am very new in the use of Modelica programming and would appreciate any help of somebody who have already experienced this type of error and could give me any hint to solve this problem.
Thank you very much.
Re: Problems simulating Modelica.Electrical.Analog.Lines.M_OLine
You're posting the wrong error-messages. The ones at the top are usually more relevant:
Code:
messages = "Simulation failed for model: Modelica.Electrical.Analog.Lines.M_OLine
Error: Internal error Inverse Algorithm needs to be solved for {s[1].inductance.Lm[2,1],s[1].inductance.Lm[4,4],s[1].inductance.Lm[4,1],s[1].inductance.Lm[2,2],s[1].inductance.Lm[2,3],s[1].inductance.Lm[2,4],s[1].inductance.Lm[3,1],s[1].inductance.Lm[3,2],s[1].inductance.Lm[1,3],s[1].inductance.Lm[3,3],s[1].inductance.Lm[3,4],s[1].inductance.Lm[1,1],s[1].inductance.Lm[1,4],s[1].inductance.Lm[4,2],s[1].inductance.Lm[1,2],s[1].inductance.Lm[4,3]} in for s in 1:4 loop
for z in 1:4 loop
s.inductance.Lm[1, z, s] := if z >= s then s[1].inductance.L[4 * s - 4 + z - div((-1 + s) * s, 2)] else s[1].inductance.Lm[s, z];
end for;
end for;
. This has not been implemented yet.
- sjoelund.se
- 1700 Posts
Re: Problems simulating Modelica.Electrical.Analog.Lines.M_OLine
I posted the first four messages I received in the message window. Is there any other place where I can check for error messages ?
I am sending a link from which anyone interested can download the model I am trying to simulate. It's very simple, I just added four sine voltage sources and resistors to the M_Oline model, once I am still learning how to use the Modelica.
https://www.dropbox.com/s/pgccfvgn7cx9e … on_Line.mo
Thank you, sjoelund.se, for your reply.
Kind Regards,
Ariadne.
Re: Problems simulating Modelica.Electrical.Analog.Lines.M_OLine
simulate(transmission_Line);getErrorString(); returns:
Code:
record SimulationResult
resultFile = "",
simulationOptions = "startTime = 0.0, stopTime = 1.0, numberOfIntervals = 500, tolerance = 0.000001, method = 'dassl', fileNamePrefix = 'transmission_Line', storeInTemp = false, noClean = false, options = '', outputFormat = 'mat', variableFilter = '.*', measureTime = false, cflags = '', simflags = ''",
messages = "Simulation failed for model: transmission_Line
Error: Internal error Inverse Algorithm needs to be solved for {m_oline1.s[1].inductance.Lm[1,2],m_oline1.s[1].inductance.Lm[3,2],m_oline1.s[1].inductance.Lm[4,1],m_oline1.s[1].inductance.Lm[3,1],m_oline1.s[1].inductance.Lm[3,4],m_oline1.s[1].inductance.Lm[2,1],m_oline1.s[1].inductance.Lm[4,2],m_oline1.s[1].inductance.Lm[2,2],m_oline1.s[1].inductance.Lm[2,4],m_oline1.s[1].inductance.Lm[3,3],m_oline1.s[1].inductance.Lm[1,1],m_oline1.s[1].inductance.Lm[4,3],m_oline1.s[1].inductance.Lm[1,3],m_oline1.s[1].inductance.Lm[1,4],m_oline1.s[1].inductance.Lm[4,4],m_oline1.s[1].inductance.Lm[2,3]} in for s in 1:4 loop
for z in 1:4 loop
m_oline1.s.inductance.Lm[1, z, s] := if z >= s then m_oline1.s[1].inductance.L[4 * s - 4 + z - div((-1 + s) * s, 2)] else m_oline1.s[1].inductance.Lm[s, z];
end for;
end for;
. This has not been implemented yet.
Error: Internal error ./Compiler/BackEnd/SimCodeUtil.mo: function createSingleAlgorithmCode failed!
Error: Internal error ./Compiler/BackEnd/SimCodeUtil.mo: function createOdeSystem failed for component Algorithm 340 {1140, 1132, 1129, 1133, 1130, 1137, 1128, 1136, 1134, 1131, 1141, 1127, 1139, 1138, 1126, 1135}
Error: Internal error ./Compiler/BackEnd/SimCodeUtil.mo: function createEquationsForSystem1 failed for component Algorithm 340 {1140, 1132, 1129, 1133, 1130, 1137, 1128, 1136, 1134, 1131, 1141, 1127, 1139, 1138, 1126, 1135}
Error: Internal error ./Compiler/BackEnd/SimCodeUtil.mo: function createEquationsForSystem1 failed
Error: Internal error ./Compiler/BackEnd/SimCodeUtil.mo: function createOdeSystem failed for component {345:1150}
Error: Internal error ./Compiler/BackEnd/SimCodeUtil.mo: function createEquationsForSystem1 failed for component {345:1150}
Error: Internal error ./Compiler/BackEnd/SimCodeUtil.mo: function createEquationsForSystem1 failed
Error: Internal error ./Compiler/BackEnd/SimCodeUtil.mo: function createOdeSystem failed for component {346:1151}
Error: Internal error ./Compiler/BackEnd/SimCodeUtil.mo: function createEquationsForSystem1 failed for component {346:1151}
Error: Internal error ./Compiler/BackEnd/SimCodeUtil.mo: function createEquationsForSystem1 failed
Error: Internal error ./Compiler/BackEnd/SimCodeUtil.mo: function createOdeSystem failed for component {347:1152}
Error: Internal error ./Compiler/BackEnd/SimCodeUtil.mo: function createEquationsForSystem1 failed for component {347:1152}
Error: Internal error ./Compiler/BackEnd/SimCodeUtil.mo: function createEquationsForSystem1 failed
Error: Internal error ./Compiler/BackEnd/SimCodeUtil.mo: function createOdeSystem failed for component {348:1153}
Error: Internal error ./Compiler/BackEnd/SimCodeUtil.mo: function createEquationsForSystem1 failed for component {348:1153}
Error: Internal error ./Compiler/BackEnd/SimCodeUtil.mo: function createEquationsForSystem1 failed
Error: Internal error ./Compiler/BackEnd/SimCodeUtil.mo: function createOdeSystem failed for component {349:1154}
Error: Internal error ./Compiler/BackEnd/SimCodeUtil.mo: function createEquationsForSystem1 failed for component {349:1154}
Error: Internal error ./Compiler/BackEnd/SimCodeUtil.mo: function createEquationsForSystem1 failed
Error: Internal error ./Compiler/BackEnd/SimCodeUtil.mo: function createOdeSystem failed for component {350:1155}
Error: Internal error ./Compiler/BackEnd/SimCodeUtil.mo: function createEquationsForSystem1 failed for component {350:1155}
Error: Internal error ./Compiler/BackEnd/SimCodeUtil.mo: function createEquationsForSystem1 failed
Error: Internal error ./Compiler/BackEnd/SimCodeUtil.mo: function createOdeSystem failed for component {352:1156}
Error: Internal error ./Compiler/BackEnd/SimCodeUtil.mo: function createEquationsForSystem1 failed for component {352:1156}
Error: Internal error ./Compiler/BackEnd/SimCodeUtil.mo: function createEquationsForSystem1 failed
Error: Internal error ./Compiler/BackEnd/SimCodeUtil.mo: function createOdeSystem failed for component {353:1157}
Error: Internal error ./Compiler/BackEnd/SimCodeUtil.mo: function createEquationsForSystem1 failed for component {353:1157}
Error: Internal error ./Compiler/BackEnd/SimCodeUtil.mo: function createEquationsForSystem1 failed
Error: Internal error ./Compiler/BackEnd/SimCodeUtil.mo: function createOdeSystem failed for component {351:1158}
Error: Internal error ./Compiler/BackEnd/SimCodeUtil.mo: function createEquationsForSystem1 failed for component {351:1158}
Error: Internal error ./Compiler/BackEnd/SimCodeUtil.mo: function createEquationsForSystem1 failed
Error: Internal error ./Compiler/BackEnd/SimCodeUtil.mo: function createOdeSystem failed for component {354:1159}
Error: Internal error ./Compiler/BackEnd/SimCodeUtil.mo: function createEquationsForSystem1 failed for component {354:1159}
Error: Internal error ./Compiler/BackEnd/SimCodeUtil.mo: function createEquationsForSystem1 failed
Error: Internal error ./Compiler/BackEnd/SimCodeUtil.mo: function createOdeSystem failed for component {355:1160}
Error: Internal error ./Compiler/BackEnd/SimCodeUtil.mo: function createEquationsForSystem1 failed for component {355:1160}
Error: Internal error ./Compiler/BackEnd/SimCodeUtil.mo: function createEquationsForSystem1 failed
Error: Internal error ./Compiler/BackEnd/SimCodeUtil.mo: function createOdeSystem failed for component {357:1161}
Error: Internal error ./Compiler/BackEnd/SimCodeUtil.mo: function createEquationsForSystem1 failed for component {357:1161}
Error: Internal error ./Compiler/BackEnd/SimCodeUtil.mo: function createEquationsForSystem1 failed
Error: Internal error ./Compiler/BackEnd/SimCodeUtil.mo: function createOdeSystem failed for component {358:1162}
Error: Internal error ./Compiler/BackEnd/SimCodeUtil.mo: function createEquationsForSystem1 failed for component {358:1162}
Error: Internal error ./Compiler/BackEnd/SimCodeUtil.mo: function createEquationsForSystem1 failed
Error: Internal error ./Compiler/BackEnd/SimCodeUtil.mo: function createOdeSystem failed for component {356:1163}
Error: Internal error ./Compiler/BackEnd/SimCodeUtil.mo: function createEquationsForSystem1 failed for component {356:1163}
Error: Internal error ./Compiler/BackEnd/SimCodeUtil.mo: function createEquationsForSystem1 failed
...
- sjoelund.se
- 1700 Posts
Re: Problems simulating Modelica.Electrical.Analog.Lines.M_OLine
I am sorry, I don't know what this error means.
I've searched the internet for an example which applies the M-Oline model but I found nothing. Also, there wasn't anything in Peter Fritzon's book that I could use to help solve that problem, therefore, I am completely lost.
Do you have any idea about what is causing these errors, or where I could search for help ?
Kind Regards,
Ariadne.
Re: Problems simulating Modelica.Electrical.Analog.Lines.M_OLine
I found what is causing it...
Change M_Transformer to
Code:
equation
for s in 1:N loop
for z in 1:N loop
Lm[z,s] = if (z>=s) then L[(s-1)*N+z-div((s-1)*s,2)] else Lm[s,z];
end for;
end for;
Instead of algorithm, and it works... I'll submit a bug-report to modelica.org since there is no good reason to keep it an algorithm.
- sjoelund.se
- 1700 Posts
Re: Problems simulating Modelica.Electrical.Analog.Lines.M_OLine
Dear sjoelund.se,
I haven't been able to test your solution yet because I am having trouble finding a way to edit the M_transformer model.
I tried to create a new library with a copy of the M_transformer model that had the correction you suggest, but I keep receiving error messages when I try to use my new library. How did you edit the M_transformer model in a way that it can be used in the M_oline model ? Did you use the OMedit to apply that changes ?
Kind Regards,
Ariadne
Re: Problems simulating Modelica.Electrical.Analog.Lines.M_OLine
No, I opened nano and edited the system library.
- sjoelund.se
- 1700 Posts
Re: Problems simulating Modelica.Electrical.Analog.Lines.M_OLine
Also, based on the comments in https://trac.modelica.org/Modelica/tick … #comment:1 this will possibly be the default behaviour in the to-be released version of MSL 3.2.1 (we ship a development version).
- sjoelund.se
- 1700 Posts
Re: Problems simulating Modelica.Electrical.Analog.Lines.M_OLine
Dear sjoelund.se,
I used nano to edit the system's library and now the error I reported seems to be fixed. But now, I am receiving another error, which I present below:
Code:
Translation 14:27:29 0:0-0:0 Error building simulator. Buildlog: falign-functions -msse2 -mfpmath=sse -I"C:/OpenModelica1.9.0//include/omc" -I. -L"C:/Users/Usuario/Documents/OpenModelica" -c -o Multiple_Lines.o Multiple_Lines.c
'falign-functions' it's not recognized as an internal or external command, operable program or batch file
mingw32-make: [Multiple_Lines.o] Error 1 (ignored)
falign-functions -msse2 -mfpmath=sse -I"C:/OpenModelica1.9.0//include/omc" -I. -L"C:/Users/Usuario/Documents/OpenModelica" -c -o Multiple_Lines_records.o Multiple_Lines_records.c
'falign-functions' it's not recognized as an internal or external command, operable program or batch file
mingw32-make: [Multiple_Lines_records.o] Error 1 (ignored)
g++ -I. -o Multiple_Lines.exe Multiple_Lines.o Multiple_Lines_records.o -I"C:/OpenModelica1.9.0//include/omc" -I. -L"C:/Users/Usuario/Documents/OpenModelica" -L"C:/Users/Usuario/Documents/OpenModelica" -falign-functions -msse2 -mfpmath=sse -L"C:/OpenModelica1.9.0//lib/omc" -Wl,--stack,0x2000000,-rpath,'C:/OpenModelica1.9.0//lib/omc' -lSimulationRuntimeC -linteractive -lregex -lexpat -lgc -static-libgcc -luuid -lole32 -lws2_32 -lsundials_kinsol -lsundials_nvecserial -llapack-mingw -Wl,-Bstatic -lf2c -Wl,-Bdynamic
g++: Multiple_Lines.o: No such file or directory
g++: Multiple_Lines_records.o: No such file or directory
mingw32-make: *** [omc_main_target] Error 1
I don't know if the error was caused because I am not a Linux user and I used Cygwin to run nano and then edit the system's library. Also, I had never used nano before, so I don't know if I commited some mistake. Do you know what could be the source of the problem ?
I am sorry for keeping asking you so many questions, but at the moment I have no one else to help me.
Thank you very much.
Re: Problems simulating Modelica.Electrical.Analog.Lines.M_OLine
Hi!
I was able to change the M_transformer code using MDT plugin, which, by the way, is very easy to install. After that, I was able to run my simulation, but only in a 32 bit Windows. When I try to run the same simulation in a 64 bit Windows I receive the error reported in my last post. Could this really be the source of the problem ?
I was thinking of using a 32 bit virtual machine to solve the problem. But.. Does anyone one know if there is a simpler solution ?
Regards,
Ariadne
- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » Problems simulating...