Opened 7 years ago

Closed 7 years ago

#4729 closed defect (fixed)

The NF causes vector assignment of discrete variables to functions to look like implicit systems of equations

Reported by: casella Owned by: perost
Priority: high Milestone: 2.0.0
Component: New Instantiation Version:
Keywords: Cc:

Description

Many models in the MSL (e.g. Modelica.Blocks.Examples.NoiseExamples.Distributions) fail when compiled with the NF because of this kind of error:

[OpenModelica/OMCompiler/Compiler/BackEnd/BackendDAETransform.mo:307:7-307:48:writable]
Error: Internal error BackendDAETransform.analyseStrongComponentBlock failed 
(Sorry - Support for Discrete Equation Systems is not yet implemented)
$PRE.uniformNoise.state[2]
$PRE.uniformNoise.state[1]
$PRE.uniformNoise.state[4]
$PRE.uniformNoise.state[3]
$PRE.uniformNoise.state = Modelica.Math.Random.Utilities.initialStateWithXorshift64star(uniformNoise.localSeed, uniformNoise.actualGlobalSeed, 4)

The flattened model with the old FE contains this equation

  {pre(uniformNoise.state[1]), pre(uniformNoise.state[2]), pre(uniformNoise.state[3]), pre(uniformNoise.state[4])} = Modelica.Math.Random.Generators.Xorshift128plus.initialState(uniformNoise.localSeed, uniformNoise.actualGlobalSeed);

while the new FE reports this

pre(uniformNoise.state) = Modelica.Math.Random.Generators.generator.initialState(uniformNoise.localSeed, uniformNoise.actualGlobalSeed);

Apparently, there is some issue with the DAEs returned by the NF that makes an explicit vector assignment erroneously look like an implicit system of equations, which the backend cannot (and should not, in this case) handle.

Change History (2)

comment:1 Changed 7 years ago by casella

This issue seems to be fixed as of 07-02-2018, though there are still other issues further on with the reported model

comment:2 Changed 7 years ago by casella

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.