Help - Search - Members - Calendar
Full Version: How read a vector parameter from an external file?
Modelica Forum > Modelica > Modelica
Rene Nölle
Dear Community!

Does anybody know how to load a parameter in form of a vector from an external file?

To load a scalar parameter is quite easy by using the Modelica.Utilities.Examples.readRealParameter-function.

The parameter text file could look like:

position = {110,10,80}; // position of the vehicle
v_max = 100; // maximum speed


I'm thankful for any hints smile.gif

Have a nice day!

René
Dietmar Winkler
Just have a look at the readMATmatrix and readCVSmatrix functions of the DataFiles.mo Library (comes with Dymola but is not linked...just look in Modelica/Library/DataFiles.mo).

/Dietmar
Rene Nölle
Dear Dietmar,

thank you very much for your help!

Unfortunately the mentioned functions require the special MATLAB-format and also the CSV-format is not suitable for my problem :/

I just want to read a specific parameter form a text file. Therefore I tried to extend the readRealParameter function to a readRealVectorParameter, but until now without success.

Greetings to Berlin!?

René
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2012 Invision Power Services, Inc.