Write data stream directly to a controller

92 views
Skip to first unread message

cvr...@gmail.com

unread,
Nov 10, 2016, 6:09:14 AM11/10/16
to Jaamsim Users Discussion Group
I am getting data from a spreadsheet. At present I have a PHP program to create a text file from the spreadsheet data, which is fed to Jaamsim. I wish to rewrite it in Java with the hope that I could pass it (say as a text string) directly to a Jaamsim controller. Any pointers to manuals or resources on the web will be appreciated.

Harry King

unread,
Nov 10, 2016, 3:44:54 PM11/10/16
to Jaamsim Users Discussion Group
cvrajan,

What you are asking for is an API for JaamSim. This something we are working on, but it is too soon to give an estimate of when it will be available. In the meantime, you need to use the input file and format your inputs appropriately. Incidentally, if you only need to change a few inputs, you can load your model from two separate files - one that is constant and the other that you prepared using your PHP program.

I'm not sure what you mean by a JaamSim "controller". Do you mean one of the objects in JaamSim or the Simulation object that controls the simulation run?

Harry

cvr...@gmail.com

unread,
Nov 11, 2016, 1:12:18 AM11/11/16
to Jaamsim Users Discussion Group
What I meant is a simulation object (eg: timeseries value). Suppose the user wishes to change the input values between simulation runs. Instead of loading text files, I wish to change it programmatically. For example under Basic Objects-->TimeSeries--> Time series start control I have values "{  0:00:00  0  }  {  8:00:00  1  }  {  16:00:00  0  }". I wish to change these values as a text stream at run time. If you have any API under beta testing, perhaps I could help you out in testing it.
Thanks

Harry King

unread,
Nov 11, 2016, 11:01:55 AM11/11/16
to Jaamsim Users Discussion Group
cvrajan,

We have only just started work on the API, so there is nothing to give you yet. Knowing that someone an application for a new feature is always a great motivator, though.

The best I can offer you right now is the "script" option (the -s tag) described on page 116 of the present user manual (2016-08). This will let you launch JaamSim and pipe the TimeSeries input without writing a separate file. An example is given in the release notes under release 2016-07.

Harry
Reply all
Reply to author
Forward
0 new messages