- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » AdvancedNoise
AdvancedNoise
Re: AdvancedNoise
It seems we have some issues with function inlining which generates undefined variables in the C code.
I opened a ticket about it and we'll have a look:
https://trac.openmodelica.org/OpenModelica/ticket/4239
- adrpo
- 885 Posts
Re: AdvancedNoise
Ok. Thanks for the quick response. Beats the hell out of Wolfram's so called technical support with their Modelica product!
I also tried to simulate the normalNoise component in Open Modelica which is contained in the Modelica_Noise library that came with Open Modelica and it too had build errors.
Re: AdvancedNoise
You should not use Modelica_Noise library as is a bit outdated and we don't support it very well.
The Noise library was already included in the Modelica Standard Library (MSL) 3.2.2.
Just go to Modelica.Blocks.Noise or Modelica.Blocks.Examples.NoiseExamples to use those. To see what we support from the Noise library included in MSL go here:
https://test.openmodelica.org/libraries … rsive.html
and search for Noise. It seems all the example models are working.
- adrpo
- 885 Posts
Re: AdvancedNoise
I can confirm that the issue is connected to function inlining.
One can disable inlining of functions as a workaround using the following omc-flag:
Code:
-d=-inlineFunctions
.
- lochel
- 45 Posts
Re: AdvancedNoise
The AdvancedNoise library contains the parts of the Noise library that didn't make it into MSL due to the above mentioned issues in OpenModelica (and some other issues in other tools).
- sjoelund.se
- 1700 Posts
Re: AdvancedNoise
lochel,
In Peter Fritzson's book he talks about preventing inline functions with an annotation. But, you are saying to use -d=-inlineFunctions. Is this a Modelica language thing or is it something unique to Open Modelica? Is this a directive? Also, where exactly in the code does one place it?
Thanks.
Roger
Re: AdvancedNoise
It's a compiler debug-flag. If you use mos-scripts, you pass it when calling omc, so "omc -d=-noinlineFunctions script.mos". In OMShell, you can use setCommandLineOptions("-d=-noinlineFunctions"). In OMEdit, it is hidden under Options->Simulation->OMC Flags
- sjoelund.se
- 1700 Posts
- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » AdvancedNoise