Changes in release 2016-07:
program1.exe | java -jar jaamsim2016-07.jar -s -b config.cfg | program2.exe
This command will instruct JaamSim to load the configuration file “config.cfg” and then process any additional configuration file inputs from program1. The run outputs specified by the RunOutputList keyword (see previous item) will be returned to the command line and processed by program2. The new tag “-s” (or “-script”) tells JaamSim to read the additional inputs from the command line (standard in) and return the specified run outputs to the command line (standard out). The existing tag “-b” (or “-batch”) is needed to tell JaamSim to execute the run automatically and to close itself when finished. Note that this feature only work with the .jar file, not the executable, and that it is necessary to include “java -jar“, otherwise the input and output streams will not be connected properly to standard in and standard out. This feature can be demonstrated by entering:
echo Define DisplayEntity { Fred } | java -jar jaamsim2016-07.jar -s config.cfg
This input will cause a new DisplayEntity named “Fred” to be added to the model defined by config.cfg. The “-b” has been removed from the command so that the model does not start immediately.