Opened 5 years ago

Last modified 3 years ago

#5746 assigned discussion

Translation Error from Timer block

Reported by: trista.arinomo@… Owned by: AnHeuermann
Priority: critical Milestone:
Component: *unknown* Version: v1.14.0
Keywords: Cc:

Description

This is a duplicate from my entry on openmodelcia forum from july 2019:

Connecting two of my models (model A and model B) resulting in a Translation Error

[16] 10:21:48 Translation Warning
There are discrete tearing variables because otherwise the system could not have been torn (unsolvables). This may lead to problems during simulation.

[17] 10:21:48 Translation Error
[Modelica.Blocks.Logical: 819:7-819:23]: The language feature non-linear equations within when-equations is not supported. Suggested workaround: Perform non-linear operations outside the when-equation (this is slower, but works)

[18] 10:21:48 Translation Error
Internal error function createNonlinearResidualEquations failed

[19] 10:21:48 Translation Error
[C:/dev/OM64bit/OMCompiler/Compiler/SimCode/SimCodeUtil.mo: 3306:9-3306:50]: Internal error function createOdeSystem failed for component torn nonlinear Equationsystem{{{107:45}, {110:141}, {106:43}, {105:44}, {104:51}, {102:136}, {101:1}, {100:2}, {81:46}, {80:47}, {99:4}, {82:50,49,48,127}, {85:140}, {83:42}, {98:26}, {97:137}, {96:12}, {95:11}, {88:31,33,128,29,28,130,132,133,37,30,131,40,35,36,129,134,39,34,38,32}, {94:10}, {93:9}, {92:8}, {90:23}, {87:14}, {86:19}, {91:22}, {89:13}, {109:27}},
{84, 103, 108:55, 3, 41} Size: 3

[20] 10:21:48 Translation Error
[C:/dev/OM64bit/OMCompiler/Compiler/SimCode/SimCodeUtil.mo: 1478:5-1478:77]: Internal error createEquationsForSystems failed

[21] 10:21:48 Translation Error
[C:/dev/OM64bit/OMCompiler/Compiler/SimCode/SimCodeUtil.mo: 746:5-746:146]: Internal error function createSimCode failed [Transformation from optimised DAE to simulation code structure failed]

Simulation each model on their own works perfectly. The translation error points to Timer block, which is present multiple time in both model A and B, so i can not pinpoint the exact block causing this problem. is there any flags that can help me debug this error?

P.S: I can not share the models and trying to figure it out how can i reproduce this error with a simplify models.

Change History (8)

comment:1 Changed 5 years ago by casella

  • Milestone changed from Future to 1.16.0
  • Owner changed from somebody to AnHeuermann
  • Priority changed from high to critical
  • Status changed from new to assigned

Thanks for reporting this on trac.

I pass the issue to @AnHeuermann, our leading expert in tearing.

I guess we'll need a minimal working example to make progress, unless @AnHeuermann has some advice based on the available error output.

Last edited 5 years ago by casella (previous) (diff)

comment:2 Changed 5 years ago by trista.arinomo@…

  • Version changed from v1.16.0-dev to v1.14.0

Sorry, got the version wrong.
Version: v1.14.0-dev-26586-geb59bf2b38

comment:3 Changed 5 years ago by anonymous

Additional Information:

inside the model are two timers block and a ControlledCloserWithArc switch. Both component have a when-equation that assign the entry time

when u then
  entryTime = time;
end when;

so i made a copy of each model and moved the when-equation as a algothrim assignment. Now the model could be compiled and no error message is given. The simulation however still failed to finish.

I hope the information helps. I'm preparing an example model and hopefully can upload it ASAP.

thanks in advance.

comment:4 Changed 5 years ago by AnHeuermann

I guess we'll need a minimal working example to make progress, unless @AnHeuermann has some advice based on the available error output.

Yep, without an example I can only guess.

It seems you have one or multiple loops with (only) discrete variables and our iterative solvers can't solve discrete algebraic loops.

Reformulating your when-equations so that they are causalized and don't need to be solved simultaneously could be a solution. Even better if you can provide an example, and we can see if that can be treated by tearing.

comment:5 Changed 5 years ago by casella

In any case, as with #5747, please try the official 1.14.0 release first.

comment:6 Changed 4 years ago by casella

  • Milestone changed from 1.16.0 to 1.17.0

Retargeted to 1.17.0 after 1.16.0 release

comment:7 Changed 4 years ago by casella

  • Milestone changed from 1.17.0 to 1.18.0

Retargeted to 1.18.0 because of 1.17.0 timed release.

comment:8 Changed 3 years ago by casella

  • Milestone 1.18.0 deleted

Ticket retargeted after milestone closed

Note: See TracTickets for help on using tickets.