JaamSim 2016-07 released

182 views
Skip to first unread message

Harry King

unread,
Apr 4, 2016, 7:06:25 PM4/4/16
to Jaamsim Users Discussion Group

Changes in release 2016-07:

  • Faster execution speed. Expression evaluation has been optimized to increase model execution speed. For models with many complex expressions and especially ExpressionThreshold objects, the increase in execution speed can be as much as 50%.
  • Selected run outputs. New keywords RunOutputList and UnitTypeList have been added to Simulation to specify the outputs to be saved for each simulation run. These outputs are saved in column format to a new output file named <configuration file name>.dat. If the new tag “-s” is included on the command line, the run outputs will be returned to the command line (standard out) – see the next item below. When specified, run outputs will be generated regardless of the PrintReport keyword.
  • Command line inputs and outputs. Inputs and outputs can be piped on the command line to/from JaamSim using the following syntax:

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.

  • Resource logic modified to avoid deadlocks. A new keyword StrictOrder has been added to Resource to help users avoid logical deadlocks in their models. When a resource becomes available, it is assigned to the entity that has the highest priority in its Queue. In the case of entities with equal priorities, the resource is assigned to the one that has waited the longest. If the selected entity cannot accept seize the resources because of an OperatingThreshold restriction or because it needs to seize other resources which are not available yet, then there are two options: 1) the resource can be held for the selected entity, or 2) it can be assigned to the first entity that is able to seize the resource.  The StrictOrder keyword determines which option is used – TRUE for option 1 and FALSE for option 2.  The default value is set to FALSE because this option is less likely to cause a deadlock.  THIS DEFAULT COULD CAUSE MODEL RESULTS TO CHANGE – Earlier releases of JaamSim had assumed the equivalent of TRUE for StrictOrder. If this change affects the results for your model, the solution is to set StrictOrder to TRUE for all the Resources.
  • StateGraphics keyword provided for EntityDelay. EntityDelay objects can now have their appearance change when their state changes, in the same way as Server and other objects that have the state output.
  • Bug fixes for Seize and Release. The inputs for the ResourceList and NumberOfUnitsList keywords are now checked to ensure that the same number of entries are specified in each list.
  • Bug fixes for Input Editor related to keywords accepting a list of objects. When specifying a list of entities for keywords such as the Graph keyword DataSource, it is necessary to include braces around each object in the list. These braces are now included correctly when the input is selected from the drop down menu in the Input Editor.

Known issues:
  • Custom outputs defined for one object cannot depend reliably on the custom outputs for another object.
Outstanding Feature Requests:
  • See the Release Notes
Enjoy!

Harry

Andres Collart

unread,
Apr 10, 2016, 9:56:37 AM4/10/16
to Jaamsim Users Discussion Group
Hi Harry,

Great update. I'm just trying out the Command Line Inputs/Outputs and it all seems to be working well except for the -b flag. I'm working on Mac (OSX El Capitan). 

When I run the command 'java -jar JaamSim2016-07.jar -s -b Logistics.cfg' it opens the Jaamsim window but the run is not started automatically. I still have to click the Run icon to get it to start up. Once started it does its runs and is outputting to the terminal as expected.

I'm looking to port this to be called automatically by another program, so this might be an issue for those types of implementations.

Thanks,
Andres

Harry King

unread,
Apr 10, 2016, 1:34:51 PM4/10/16
to Jaamsim Users Discussion Group
Andres,

I haven't tried the command line on my Mac yet, but one potential problem you should watch out for is the minus sign character "-" used in the tags. There are lots of other dash symbols, some of which look identical to the minus sign but have different Unicodes. If you have copied and pasted the command from the manual or release notes, you may have got one of these other dash characters. The first version of the manual and release notes (2016-07) had the wrong dash character in several places thanks to WORD auto-formatting. The current versions (2016-07a) are okay.

If the dash character isn't the problem, try replacing -b with -batch. It's possible that the -b tag collides with something else.

Harry

Andres Collart

unread,
Apr 10, 2016, 1:48:33 PM4/10/16
to Jaamsim Users Discussion Group
Harry,

Thanks for the quick reply. I verified that I was using the minus sign as I typed everything in, no change. I also tried -batch but that didn't change anything either. Happy to run any other tests you think might work or even record my screen if that'll help.

Thanks,
Andres

Harry King

unread,
Apr 10, 2016, 1:56:11 PM4/10/16
to Jaamsim Users Discussion Group
Andres,

I was hoping that there might be an easy answer. I'll try it myself later today.

In the meantime, you can try some more experiments yourself. Does the -b tag work correctly without the -s tag? Does the -m tag work correctly?

Harry

Andres Collart

unread,
Apr 10, 2016, 2:13:43 PM4/10/16
to Jaamsim Users Discussion Group
Harry,

Looks like the -b tag works without the -s tag. Since I wasn't providing inputs that was likely getting it stuck since it was expecting some. With just "java -jar JaamSim2016-07.jar -b Logistics.cgf" it works automatically. 

Only thing is that I'm not getting the output streamed back out to the command line which I find odd. When I do it with the '-s' and then manually hit run the output does show up in command line through stdout. 

-Andres

Harry King

unread,
Apr 10, 2016, 6:33:49 PM4/10/16
to Jaamsim Users Discussion Group
Andres,

Thanks for solving this problem yourself!

Regarding your question about stdout. Output is sent to stdout ONLY when the -s tag is set. Otherwise, the output is saved as a separate file with the extension .dat. Try a test of -s using the echo command to pass input to jaamsim, similar to the one I provided in the release notes.

Harry

Andres Collart

unread,
Apr 10, 2016, 9:00:21 PM4/10/16
to Jaamsim Users Discussion Group
Thanks Harry, tried it with Echo and it ran with -s. I also started another thread with the python version of what I'm doing here, could be of use to some others.
Reply all
Reply to author
Forward
0 new messages