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

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.

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.

Related

SCIP - run (nearly) same LP on different instances

I have an LP, formulated in the modelling language Zimpl, that I want to run on many instances, which are in different files.
Additionally, I want to change one parameter in this LP.
For a single call, my file test.zpl looks like this:
param FILE := "file1.dat"
param BOUND := 42
[test_body: Rest of LP]
Now I want to change those two parameters. SCIP has the -c option, to execute some command. But I cannot find by which command to achieve this. All parameter changes I found affect the algorithm, not the data.
The command change to change the problem does not seem to allow new parameters/variables.
In the end, I expect the solution to look something like
scip -c "[set my parameters]; read test_body.zpl; optimize; quit"
How do I set these problem parameters?
I am not aware of any commands that support the modification of model parameters as you wish. However, if you don't hardcode the value of param BOUND in the .zpl file (instead, move the value to the .dat file and use a proper read command in the model), then you could procede as follows:
Make a copy of your data file such that each copy contains a distinct value of param BOUND
Call scip.exe separately with each data file (you could also use a simple batch script)

Is there anyone success to generate midi from TFRecode file with magenta?

I got TFRecode file from magenta but it's difficult(and not precise description for me) to get midi file...
whoever solve this issue, share plz.
Known descrioption from Magenta groups(https://groups.google.com/a/tensorflow.org/forum/#!topic/magenta-discuss/)
The output format for the script is not a MIDI file. It is a TFRecord file containing NoteSequence protobufs with equivalent (but more readable and easily modifiable) representations of the input MIDIs.
You should be able to use sequence_proto_to_pretty_midi and then save the PrettyMIDI object as a midi file:
https://github.com/tensorflow/magenta/blob/master/magenta/lib/midi_io.py#L164
As an exercise, you might try to use the functions in note_sequence_io.py and midi_io.py to convert this file back to MIDIs.
If i achieve it I will share it for you also!
thx
We've recently added a model that you can train to generate new sequences. Have a look at https://github.com/tensorflow/magenta/blob/master/magenta/models/basic_rnn/README.md.
Thanks!

Ansys multiphysics: blank output file

I have a model of a heating process on Ansys Multiphysics, V11.
After running the simulation, I have a script to plot a temperature profile:
!---------------- POST PROCESSING -----------------------
/post1 ! tdatabase postprocessor
!---define profile temperature
path,s_temp1,2,,100 ! define a path
ppath,1,,dop/2,0,0 ! create a path point
ppath,2,,dop/2,1.5,0 ! create a path point
PDEF,surf_t1,TEMP, ,noav ! print a path
plpath,surf_t1 ! plot a path
What I now need, is to save the resulting path in a text file. I have already looked online for a solution, and found the following code to do it, which I appended after the lines above:
/OUTPUT,filename,extension
PRPATH,surf_t1
/OUTPUT
Ansys generates the file filename.extension but it is empty. I tried to place the OUTPUT command in a few locations in the script, but without any success.
I suspect I need to define something else, but I have no idea where to look, as Ansys documentation online is terribly chaotic, and all internet pages I've opened before writing this question are not better.
A final note: Ansys V11 is an old version of the software, but I don't want to upgrade it and fit the old model to the new software.
For the output of the simulation (which includes all calculation steps, and sub-steps description and node-by-node results) the output must be declared in the beginning of the code, and not in the postprocessing phase.
Declaring
/OUTPUT,filename,extension
in the preamble of the main script makes such that the output is stored in the right location, with the desired extension. At the end of the scripts, you must then declare
/OUTPUT
to reset the output file location for ANSYS.
The output to the PATH call made in the postprocessing script is however not printed in the file.
It is convenient to use
*CFOPEN,file,ext
*VWRITE,Vector(1,1).Vector(1,2)
(2F12.6)
*CFCLOSE
where Vector(1,1) is a two column array created by *DIM, and stores your data to output to file
As this is a special command, run it from file i.e. macro_output.mac

How to add variable names to the JMeter CSV output file?

I'm using JMeter for performance testing and generate an CSV file for data analysis.
How should I add JMeter Variable names to the CSV output? It seems that only pre-defined columns can be added (see screenshot).
This is my log-file:
14/03/2014,Login,OK,982
14/03/2014,Search,OK,2182
14/03/2014,Login,OK,3982
I would like to add a column with the ${username} to generate something like:
14/03/2014,Login,OK,982,user1
14/03/2014,Search,OK,2182,user7
14/03/2014,Login,OK,3982,user9
Try to pass sample_variables property, for example as command-line parameter -Jsample_variables=username,some_other_var
Also see FlexibleFileWriter plugin if you need custom formatting http://jmeter-plugins.org/wiki/FlexibleFileWriter/?utm_source=jmeter&utm_medium=helplink&utm_campaign=FlexibleFileWriter

How to get values of variables after simulation in open modelica?

I've simulated a model in open modelica, now is it possible to get values of all variables that they had during the simulation? If yes, how can I get them?
When you simulate you can give outputFormat="csv" and then you get a result file Model_res.csv containing all variable values for all the time steps. You can then open this file in Excel if you want.
https://build.openmodelica.org/Documentation/OpenModelica.Scripting.simulate.html
In OpenModelica Connection Editor (OMEdit) you go to Simulation->Simulation Setup, tab Output and select csv.
I'm not sure I understand your question. Normally, when you run OpenModelica, you'll get a results file. This file contains all the simulation data for all variables.
How you read that file depends on what platform you are running on and what tools you are using. Is that the issue?