Cannot evaluate...

19 views
Skip to first unread message

Bernard Mialhe

unread,
Dec 10, 2022, 12:26:22 PM12/10/22
to Jaamsim Users Discussion Group
Hi ,
I got some difficulties with Assign function.

In a ExpressionEntity I put this :
-----------------------------------
'([Transport6_1].NumberProcessed == 0) &&
 ([Transport6_2].NumberProcessed == 0) &&
 ([Queue_Pack1_Cont].NumberInProgress == 0) &&
 ([Queue_Pack1_Cont_1].NumberInProgress == [InputValue_Cass1].Value) &&
 ([Assign1].A == 1) &&
 ([Assign2].A < [InputValue_Cass1]) &&
 ([Assign3].A == 0) &&
 ([Assign4].A == 0)
 ? 2 :
 ([Assign1].A == 1) &&
 ([Assign2].A == [InputValue_Cass1]) &&
 ([Assign3].A == 0) &&
 ([Assign4].A == 0)
 ? 3 :
 ([Assign1].A == 1) &&
 ([Assign2].A == [InputValue_Cass1]) &&
 ([Assign3].A == [InputValue_Cass1]) &&
 ([Assign4].A == 0)
 ? 4 : 1'
------------------------------------------

"Assign" function are initialized to 0.
But I get a : "cannot evaluate..." return message

A idea for this ?

Thanx

Harry King

unread,
Dec 10, 2022, 12:45:25 PM12/10/22
to Jaamsim Users Discussion Group
Bernard,

There are a number of places in your expression where you have entered   ([Assign2].A < [InputValue_Cass1])  or something similar. This is an error because you comparing a number to an object. You probably meant to enter  ([Assign2].A < [InputValue_Cass1].Value).

The best way to debug a complex expression is to copy it section by section into the Input Builder and see if it generates an error message in the box at the bottom of the editor (PRESENT VALUE or ERROR). Or, you can copy the entire expression into the Input Editor and look at the pop-up error message which will show the error message and the location of the error in the expression.

Harry

Bernard Mialhe

unread,
Dec 10, 2022, 12:51:43 PM12/10/22
to Jaamsim Users Discussion Group
You're right a stupid missing, (.Value)... to much time with eyes staring the screen...
Thanks for your rapid eye (of the tiger).
And Congrats. This Jaamsim development  is amazing.
Reply all
Reply to author
Forward
0 new messages