DLR-SR / Noise

Modelica library for generating stochastic signals to be included in the Modelica Standard Library
9 stars 11 forks source link

Modification of record component ignored #61

Closed tbeu closed 9 years ago

tbeu commented 9 years ago

Model Modelica_Noise.Blocks.Examples.NoiseExamples.ActuatorWithNoise gives translation warnings about ignoring record component modification.

Warning in Motor.smpm.frictionParameters.wRef
The record Motor.smpm.frictionParameters is modified in model Modelica_Noise.Blocks.Examples.NoiseExamples.Utilities.Parts.MotorWithCurrentControl and the component wRef is modified in model Modelica.Electrical.Machines.Interfaces.PartialBasicInductionMachine (=2*pi*fsNominal/p).
The component modification will be ignored.

Warning in Motor.smpm.statorCoreParameters.m
The record Motor.smpm.statorCoreParameters is modified in model Modelica_Noise.Blocks.Examples.NoiseExamples.Utilities.Parts.MotorWithCurrentControl and the component m is modified in model Modelica.Electrical.Machines.Interfaces.PartialBasicInductionMachine (=3).
The component modification will be ignored.

Warning in Motor.smpm.statorCoreParameters.wRef
The record Motor.smpm.statorCoreParameters is modified in model Modelica_Noise.Blocks.Examples.NoiseExamples.Utilities.Parts.MotorWithCurrentControl and the component wRef is modified in model Modelica.Electrical.Machines.Interfaces.PartialBasicInductionMachine (=2*pi*fsNominal).
The component modification will be ignored.

Warning in Motor.smpm.strayLoadParameters.wRef
The record Motor.smpm.strayLoadParameters is modified in model Modelica_Noise.Blocks.Examples.NoiseExamples.Utilities.Parts.MotorWithCurrentControl and the component wRef is modified in model Modelica.Electrical.Machines.Interfaces.PartialBasicInductionMachine (=2*pi*fsNominal/p).
The component modification will be ignored.

See #1783 for the same issue in Modelica.Electrical.Machines and how to fix it.

tbeu commented 9 years ago

I guess this is rather a problem of Modelica.Electrical.Machines.Interfaces.PartialBasicInductionMachine where only components of the parameter data records are set that are overwritten later (by your model Motor.smpm).

tbeu commented 9 years ago

I guess this is a non-issue and actually by design.

fvanderlinden commented 9 years ago

I have problems recreating this error. Dymola doesn't care and OpenModelica crashes when I check the model.

If I completely remove the record, it the issue then solved? Since this is only an example I do not necessarily need the record...

tbeu commented 9 years ago

It is only a warning in SimulationX 3.7. I guess you can close this "non-issue" if it is actually by design (to overwrite the previous default record component modification).