Multiple Server

345 views
Skip to first unread message

E.T.

unread,
Feb 6, 2017, 4:32:50 AM2/6/17
to Jaamsim Users Discussion Group
Hi, I'd like to know whether it would be possible to add a NumberOfServers keyword to Server Entity, so you could have several instance of the same server.
I've already modelled this using Resources (see the example in "JaamSim 2016-21 released"), but it would be more "natural" to have it as a Server parameter.

In fact I'm preparing another example where the next task is to "optimize" the number of stations in a toll (see attach), and since I started with Servers, now I'll have to
replace them by the Resource+Delay artifact.

Thanks!

PS: Starting the course, where I'll teach JaamSim for Discrete Event Simulation to electronic&automatic engineers, this week, finally ;-)
Peajemplo_2.cfg

E.T.

unread,
Feb 6, 2017, 12:22:17 PM2/6/17
to Jaamsim Users Discussion Group
I've made the change, it worked alright, but when I tried to modify the capacity (i.e. number of servers) of the manual station (Resource "VMs")
depending on the RunIndexes (1 or 2, they are intended to allocate more servers depending on the hour), it doesn't work,
the ExpressionEntity "NumVMs" seems to ignore the current RunIndex(i) value. Might it be a bug? Am I dong something wrong?
Peajemplo_3nok.cfg

Harry King

unread,
Feb 6, 2017, 2:50:24 PM2/6/17
to Jaamsim Users Discussion Group
Hi Enrique,

I'm glad to hear that you have started the course you are teaching!

Regarding your first post, it would be possible to program something that combined the Seize, EntityDelay, and Release logic into a single object. The Resource(s) being seized and released would still be separate object(s). I've hesitated doing this up to now because it is just a shortcut that will not be widely applicable. Furthermore, it will not share much code with the three separate objects, which will make it difficult to keep consistent.

The model in your second post is attempting to change the number of Resources over time. This is something that I am working on right now -- see the post entitled "using TimeSeries for capacity" (https://groups.google.com/forum/#!topic/jaamsim-users/BRT4BDAJc5A). The next release (2017-02) will include this feature.

Harry

E.T.

unread,
Feb 7, 2017, 4:11:12 AM2/7/17
to Jaamsim Users Discussion Group
Thanks Harry. In my case it appears that the change in capacity responds (somehow*) to the TimeSeries,
what is puzzling in the model attached in the second message is that it does not respond to the [Simulation].RunIndex, this is what I thought might be a bug?

(* In my example it is not critical that the change is immediate, it appears reasonable to update the capacity of the resource after a seize or release event.)

Harry King

unread,
Feb 8, 2017, 12:10:34 AM2/8/17
to Jaamsim Users Discussion Group
Hi Enrique,

Thanks for the clarification. The problem with the attribute not responding to [Simulation].RunIndex is indeed a bug. We are looking into it.

Harry

E.T.

unread,
Feb 8, 2017, 8:33:39 AM2/8/17
to Jaamsim Users Discussion Group, Víctor Elipe Ferrández
Please find attached another (possibly related) example, distilled from a problem a student of mine was encountering.

In this case the model worked well the first time (try changing the name of the attribute, for instance, save and run), but the error appears the second time (re-open the example).
If the value was NOT originated in a TimeSeries, there wouldn't be a problem (say you assign the value to anAttribute in the EntityGenerator).

It appears to be a corruption thing with the units?

Hope it helps, thanks
TimeSeriesBug2.cfg

Harry King

unread,
Feb 8, 2017, 1:25:47 PM2/8/17
to Jaamsim Users Discussion Group, v_el...@hotmail.com
Enrique,

This is a different problem. Assigning an attribute's initial value using an expression is problematic when the expression depends on another object. The initial value can now depend on the order in which the two objects are initialised by JaamSim. The problem is even worse if the expression depends on the other object's custom output or attribute. In that case, the other object's custom output or attribute may not even be defined yet when the attribute definition is processed.

The solution to this problem will involve both greater capabilities for JaamSim and greater restrictions on what users can input. In the meantime, it would be best to initialise attributes with constant values.

Harry
Reply all
Reply to author
Forward
0 new messages