RE: Plotting Graphs

274 views
Skip to first unread message

Mike H

unread,
Jun 14, 2016, 11:11:23 AM6/14/16
to Jaamsim Users Discussion Group
Hi Harry

I wanted to plot a graph of the QueueLength of Queue1.
The graph is in View 2, and the model in View 1 for ease of viewing.
All my units for the X-Axis are in hours, yet my graph X-Axis is showing Seconds... It show the correct numerical values, but not units.

You may have seen this example of Mortgage applications and review, its from the Arena manual, and seems to be working fine.

Have I done something stupid?

Thanks
Mike H


Mortgage2.cfg

Harry King

unread,
Jun 14, 2016, 1:22:56 PM6/14/16
to Jaamsim Users Discussion Group
Hi Mike,

Attached is a corrected version of your model that includes the following changes:

1) The keyword XAxisLabelFormat has been changed to %.0f. The default input is %.0fs, which adds an "s" after the number. This default seemed like a good idea at the time, but, based on your experience, I think I will remove the "s" from future releases.

2) The keyword YAxisLabelFormat has been changed to %.0f. The default input is %.1f, which shows one decimal place. There is no need for a decimal place for an integer valued output. For future reference, the format string works as follows: the "%" indicates the start of a format string, the ".1" portion indicates the number of decimal places, and the "f" indicates the standard format for floating point numbers. Everything else in the format string, before the "%" or after the "f" is considered to be text to be reproduced in the output.

3) The X-axis inputs XAxisStart, XAxisEnd, and XLines have been reworked to be consistent with this type of graph. The graph assumes that the value at the present simulation time is show on the right end of the graph at t=0 ("Now"). The times to the left of "Now" should be negative to indicate that they were recorded before "Now". Therefore, XAxisStart should be -480 h, XAxisEnd should be 0 h, and the entries in XLines should all be negative.

Harry
Mortgage2 - HK.cfg

Mike H

unread,
Jun 15, 2016, 4:03:51 AM6/15/16
to Jaamsim Users Discussion Group
Hi Harry

I looked at XAxisLabelFormat in the model and the manual, but I did not twig what it was, even though I have used the Java input format before for something else.  I expected the model to take the units from XAxisUnit.  Now you have pointed out how this works I will remember in the future.

The graph does not work quite as I expected, but your explanation makes sense.

Thankyou.
Mike H

Jose Antonio Medrano Garcia

unread,
Jun 23, 2016, 5:26:44 PM6/23/16
to Jaamsim Users Discussion Group
Sorry to intrude in this, I try to learn from the models other people make, something caught my attention in this model, the "NextComponent" for the EntityGenerator 1 is set to Queue 2.  Should it be Server 2 which has Queue 2 assigned to it?  Is there a difference one way or the other?  Thanks for your answer, I´m a little confused.

Harry King

unread,
Jun 23, 2016, 11:35:28 PM6/23/16
to Jaamsim Users Discussion Group
Antonio,

You can send entities either to the Queue or to the Server, Seize, EntityGate, etc. It works exactly in the same way. When the Server, etc. receives an entity is just redirects it to its Queue. This is case even when the Server is idle, otherwise the Queue would not record entities that had a waiting time of zero.

Harry

Jose Antonio Medrano Garcia

unread,
Jun 25, 2016, 1:15:29 PM6/25/16
to Jaamsim Users Discussion Group
Thanks for your answer Harry, I supposed it was so but wanted to make sure.  Now, another question, suppose 2 or more servers share a queue and you send an entity to a specific server, as you say, it gets redirected to the queue, does this mean that once it enters the queue it can be assigned to a different server from the one it was originally intended?

Harry King

unread,
Jun 25, 2016, 5:43:44 PM6/25/16
to Jaamsim Users Discussion Group
Antonio,

That's correct, once an entity goes to the Queue it can be assigned to any Server whose WaitQueue input specified that Queue. Separate Queues are needed if you want an entity to be serviced by a particular Server.

Harry

Harry King

unread,
Jul 18, 2016, 11:58:07 PM7/18/16
to Jaamsim Users Discussion Group
Mike,

The default for XAxisLabelFormat has been changed to %.0f instead of %.0fs in release 2016-15.

Harry
Reply all
Reply to author
Forward
0 new messages