Opened 15 years ago

Last modified 7 years ago

#1232 assigned defect

Equation systems in when equations not handled correctly

Reported by: Per Östlund Owned by: Willi Braun
Priority: high Milestone: Future
Component: Backend Version:
Keywords: Cc: Lennart Ochel, Patrick Täuber

Description

Equation systems are not handled correctly when put in when equations, such as in this example model:

model when_test
    Real x;
    Real y;
equation
    when sample(0, 10) then
        x = y;
        y = x;
    end when;
end when_test;

This model gives the following error messages when compiled:

generate_ode_system2_nonlinear_residuals failed
-SimCodegen.buildSolvedBlocks failed
Error processing file: test.mo
Error: Internal error generate_compute_output failed
Error: Internal error Generation of simulation code  failed

Change History (12)

comment:1 by Martin Sjölund, 10 years ago

Cc: Lennart Ochel added; Per Östlund removed
Component: Backend
Milestone: 1.9.1
Owner: changed from Per Östlund to Willi Braun
Status: newassigned

comment:2 by Lennart Ochel, 10 years ago

What is the expected behavior?

BTW: Error messages changed over the years. This is the current output:

Error: Internal error ./Compiler/BackEnd/BackendDAETransform.mo: function analyseStrongComponentBlock failed
Sorry - Support for Discrete Equation Systems is not yet implemented
x
y
when sample(1, 0.0, 10.0) then
  x := y
end when
when sample(1, 0.0, 10.0) then
  y := x
end when
Error: Internal error ./Compiler/BackEnd/BackendDAETransform.mo: function analyseStrongComponentBlock failed
Error: Internal error ./Compiler/BackEnd/BackendDAETransform.mo: function strongComponentsScalar failed
- sorting equations (strongComponents) failed
Error: Internal error Transformation Module sort components failed!

comment:3 by Martin Sjölund, 10 years ago

Milestone: 1.9.11.9.2

This ticket was not closed for 1.9.1, which has now been released. It was batch modified for milestone 1.9.2 (but maybe an empty milestone was more appropriate; feel free to change it).

comment:4 by Martin Sjölund, 10 years ago

Milestone: 1.9.21.9.3

Milestone changed to 1.9.3 since 1.9.2 was released.

in reply to:  2 comment:5 by Per Östlund, 10 years ago

Replying to lochel:

What is the expected behavior?

I have no idea, and I don't remember why I submitted this ticket in the first place. I guess the expected behaviour is to either handle this if it can be handled somehow, or to print a good error message. At the moment it print a lot of internal errors, which isn't very userfriendly.

comment:6 by Martin Sjölund, 9 years ago

Milestone: 1.9.31.9.4

Moved to new milestone 1.9.4

comment:7 by Martin Sjölund, 9 years ago

Milestone: 1.9.41.9.5

Milestone pushed to 1.9.5

comment:8 by Martin Sjölund, 9 years ago

Milestone: 1.9.51.10.0

Milestone renamed

comment:9 by Patrick Täuber, 9 years ago

Cc: Patrick Täuber added

comment:10 by Martin Sjölund, 8 years ago

Milestone: 1.10.01.11.0

Ticket retargeted after milestone closed

comment:11 by Martin Sjölund, 8 years ago

Milestone: 1.11.01.12.0

Milestone moved to 1.12.0 due to 1.11.0 already being released.

comment:12 by Francesco Casella, 7 years ago

Milestone: 1.12.0Future

The milestone of this ticket has been reassigned to "Future".

If you think the issue is still valid and relevant for you, please select milestone 1.13.0 for back-end, code generation and run-time issues, or 2.0.0 for front-end issues.

If you are aware that the problem is no longer present, please select the milestone corresponding to the version of OMC you used to check that, and set the status to "worksforme".

In both cases, a short informative comment would be welcome.

Note: See TracTickets for help on using tickets.