Message Boards Message Boards

0
|
6323 Views
|
3 Replies
|
0 Total Likes
View groups...
Share
Share this post:

How to retrieve the result file names from WSMSimulationData?

Posted 10 years ago

I have tried to simulate a modelica model from Mathemathica. I realized that all the simulation data are represented by WSMSimulationData. For instance I used the following API.

  1. Needs["WSMLink`"];
  2. M= WSMSimulate["IntroductoryExamples.HelloWorld", {0, 10}]

By using M which is WSMSimulationData we can get all the variable names in the Model M["VariableNames"] In standard output format, only the simulation interval and the number of variables in a object are printed explicitly. Is there any API to print or could be able to get the names of all the simulation data such as resultfile(.mat) name, the simulation executable(.exe) file, and experiment setting(. sim) file etc

POSTED BY: Alachew Mengist
3 Replies

There is no documented way to get this information. What follows is therefor subject to change in future versions.

As with most objects in Mathematica, you can "look behind the curtain" by using FullForm:

In:

M // FullForm

Out:

WSMSimulationData["/tmp/WolframSystemModeler-malte/WSMLink/wsml_HelloWorld_lsim_247785_1.mat","IntroductoryExamples.HelloWorld",2,List[0.`,10.`],1,List[],List["x"]]

From this you can see that the first element is a path to where the result file is stored.

The simulation settings file (.sim) and simulation executable (.exe) information is not stored in the WSMSimulationData object, as they are not needed for anything you can do with such an object.

POSTED BY: Malte Lenz
Posted 10 years ago

Dear Malte,

Thank you for your reply. I used SystemModeler 3.0.2 and Mathemathica 10. All the simulation results found under " /tmp/.." . The results I got by using FullForm is not the same as you mentioned .See the attached example. Moreover Wolfram systemModeler has the functionality to Export the simulation executable(.exe), the result file(.mat) and the simulation setting file(.sim). Is there any possible ways in Mathemathica too?

Attachments:
POSTED BY: Alachew Mengist

You are using an old version of SystemModeler, 3, where this information is unfortunately not available.

There is currently no way to export an executable or simulation results from Mathematica, but we hope to have such functionality in future releases.

POSTED BY: Malte Lenz
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract