Link to server name ..

52 views
Skip to first unread message

Stephan Eibl

unread,
Jun 13, 2025, 2:11:32 PM6/13/25
to JaamSim Users Discussion Group
Dear All,
I identified the maximum utilization from the 3 servers A, B & C with the max function (for instance identifed as max 95%).
Is there a way to also get a link to the related server name (for instance B) ?
Appreciate your advice.
Stephan

Harry King

unread,
Jun 16, 2025, 1:03:25 AM6/16/25
to JaamSim Users Discussion Group
The following expression returns the server with the highest utilisation:

'sort(|x,y|(x.Utilisation > y.Utilisation), {[A],[B],[C]})(1)'

Harry

Stephan Eibl

unread,
Jun 16, 2025, 2:58:44 AM6/16/25
to JaamSim Users Discussion Group
Many thanks .. worked perfectly.

Stephan Eibl

unread,
Dec 22, 2025, 7:05:02 AM12/22/25
to JaamSim Users Discussion Group
Dear Harry,
Using a lambda function, Is it also possible in the previous example to get instead of [A], [B], and [C] as a number the server name (string) ? 
Many thanks
Best
Stephan

Stephan Eibl

unread,
Dec 30, 2025, 4:44:20 AM12/30/25
to JaamSim Users Discussion Group
Dear Community,

Is there a way to index the attributes.
In my case I sorted 3 servers according to the highest utilisation and now need the related variability.

The following advice from Harry gives the correct server name (e.g. server C) with the highest utilisation.
'sort(|x,y|(x.Utilisation > y.Utilisation), {[A],[B],[C]})(1)'

But how can I get the related value for an attribute [serverC].variability ?
The follfowing input gives an error.
'sort(|x,y|(x.Utilisation > y.Utilisation), {[A].variability,[B].variability,[C].variability})(1)'

Many thanks.
SE
Reply all
Reply to author
Forward
0 new messages