-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Thanks for the fast fix. The lookup problem is indeed solved now.
Unfortunately I get a C++ error now:
[choe...@eurybates oscillator]$ LC_ALL=C omc oscillator.mos
true
true
record SimulationResult
resultFile = "",
simulationOptions = "startTime = 0.0, stopTime = 10.0,
numberOfIntervals = 500, tolerance = 1e-06, method = 'dassl',
fileNamePrefix = 'oscillator', storeInTemp = false, noClean = false,
options = '', outputFormat = 'plt'",
messages = "Simulation failed for model: oscillator
Error: Error building simulator. Buildlog: g++ -I. -o oscillator
oscillator.cpp oscillator_functions.cpp -lsim -linteractive
- -I"/opt/openmodelica//include/omc" -march=native -mfpmath=sse
- -lsendData -lQtNetwork -lQtCore -lQtGui -lpthread
- -L"/opt/openmodelica//lib/omc" -lc_runtime -lf2c oscillator_records.c
oscillator.cpp: In function 'int function_updateDependents()':
oscillator.cpp:918:3: error: 'Modelica_Math_sin_rettype' was not
declared in this scope
Since Modelica.Math.sin is a stdlib function, is there something I need
to do, to get it working?
Am 02.01.2011 16:48, schrieb Martin Sjölund:
> This seems to be an issue with evaluation of parameters without
> eq-bindings (it should look at start=binding and give a warning). It's
> easy to fix it in the model, but thanks for reporting this; I'll look
> into the compiler and see if I can make this work quickly.
>
> sinevoltage1(freqHz=50,V=240); // works
>
> --
> Martin Sjölund
>
> On 2010-12-29 13:20, Christoph Höger wrote:
>> Hi all,
>>
>> the following code
>>
>> model oscillator
>> Modelica.Electrical.Analog.Basic.Capacitor capacitor1;
>> Modelica.Electrical.Analog.Sources.SineVoltage sinevoltage1;
>> Modelica.Electrical.Analog.Basic.Inductor inductor1;
>> Modelica.Electrical.Analog.Basic.Ground ground1;
>>
>> equation
>> connect(inductor1.n,ground1.p);
>> connect(capacitor1.p,inductor1.p);
>> connect(sinevoltage1.p,capacitor1.p);
>> connect(capacitor1.n,sinevoltage1.n);
>> connect(capacitor1.n,inductor1.n);
>> end oscillator;
>>
>> throws a lookup error (sinevoltage1.freqHz, sineVoltage1.V) with omc
>> (current trunk) although the flattened output contains the lines:
>>
>> parameter Real sinevoltage1.V(quantity = "ElectricPotential", unit =
>> "V", start = 1.0) "Amplitude of sine wave";
>> parameter Real sinevoltage1.phase(quantity = "Angle", unit = "rad",
>> displayUnit = "deg") = 0.0 "Phase of sine wave";
>> parameter Real sinevoltage1.freqHz(quantity = "Frequency", unit =
>> "Hz", start = 1.0) "Frequency of sine wave";
>>
>> Any ideas how to circumvent?
>>
>> best regards,
>>
>> Christoph
- --
Christoph Höger
Technische Universität Berlin
Fakultät IV - Elektrotechnik und Informatik
Übersetzerbau und Programmiersprachen
Sekr. TEL12-2, Ernst-Reuter-Platz 7, 10587 Berlin
Tel.: +49 (30) 314-24890
E-Mail: [email protected]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/
iEYEARECAAYFAk0h3ocACgkQhMBO4cVSGS+V3ACfcVhxOb4HjIB219J2Mje94Y0t
YGcAniAAHZqr/pu3igFR5Pf1ypsOXpgQ
=1Zs3
-----END PGP SIGNATURE-----