Change output file format to *.csv using dymosim.exe instead of *.mat

793 views Asked by At

I am trying to understand if it's possible to change the model output format to .csv instead of the default .mat file when simulating a model using dymosim.exe.

I can do this in dymola itself by using the function "convertMATtoCSV" in the base Data files library. Something like below,

DataFiles.convertMATtoCSV("output.mat", {"t"}, "output.csv");

Is there a way to do this conversion using dymosim.exe?

Kindly advise.

Thanks.

Note: cmd "dymosim.exe -h" has some options for .csv but I am not sure how to use this.

1

There are 1 answers

2
Hans Olsson On BEST ANSWER

No, it is currently not possible to have dymosim.exe generated by Dymola write the result as csv-file. The CSV-options used by dymosim.exe are only for running multiple simulations.

You can:

  • Generate a txt result instead, if that is easier to handle for you. (By setting Simulation Setup>Output>Textual data format, this is stored as last element of settings in dsin.txt).
  • Perform the conversion using dymola\bin\alist.exe
  • Have the model write a cvs-file as well
  • Set up to perform this as a post-processing command in Dymola 2017 FD01.