question

Amelie C avatar image
0 Likes"
Amelie C asked api answered

FlexScript exception: Property "value" accessed on invalid node

I wanted to implement the pull mechanism COBACABANA in FlexSim. I have a problem with the query at the pre shop pool where all orders are sorted according to their latest release date and only the orders where the necessary production cards for all the workstations are available at all stations. The limit on amount of cards per workstation assigned to a specific production order is 1000. There are three different production lines which are constrained by space. For each line the different requirements are listed for the cards.

The query defined in the pool is as follow :

WHERE ((LineConstraint ==1) AND (CW_Cards + model().find("Tools/GlobalLists/CW_List>variables/fields/CW_Cards_1/total").value) <= 1000 AND (IP_Cards + model().find("Tools/GlobalLists/IP_List>variables/fields/IP_Cards_1/total").value) <= 1000 AND (ASS_Cards + model().find("Tools/GlobalLists/ASS_List>variables/fields/ASS_Cards_1/total").value) <= 1000 AND (ISOL_Cards + model().find("Tools/GlobalLists/ISOL_List>variables/fields/ISOL_Cards/total").value)<=1000 AND (EP_Cards + model().find("Tools/GlobalLists/EP_List>variables/fields/EP_Cards_1/total").value) <= 1000) OR ((LineConstraint ==2) AND (CW_Cards + model().find("Tools/GlobalLists/CW_List>variables/fields/CW_Cards_2/total").value) <= 1000 AND (IP_Cards + model().find("Tools/GlobalLists/IP_List>variables/fields/IP_Cards_2/total").value) <= 1000 AND (ASS_Cards + model().find("Tools/GlobalLists/ASS_List>variables/fields/ASS_Cards_2/total").value) <= 1000 AND (ISOL_Cards + model().find("Tools/GlobalLists/ISOL_List>variables/fields/ISOL_Cards/total").value)<=1000 AND (EP_Cards + model().find("Tools/GlobalLists/EP_List>variables/fields/EP_Cards_2/total").value) <= 1000) OR ((LineConstraint ==3) AND (CW_Cards + model().find("Tools/GlobalLists/CW_List>variables/fields/CW_Cards_3/total").value) <= 1000 AND (IP_Cards + model().find("Tools/GlobalLists/IP_List>variables/fields/IP_Cards_3/total").value) <= 1000 AND (ASS_Cards + model().find("Tools/GlobalLists/ASS_List>variables/fields/ASS_Cards_3/total").value) <= 1000 AND (ISOL_Cards + model().find("Tools/GlobalLists/ISOL_List>variables/fields/ISOL_Cards/total").value)<=1000 AND (EP_Cards + model().find("Tools/GlobalLists/EP_List>variables/fields/EP_Cards_3/total").value) <= 1000) ORDER BY CountdownToLatestRelease ASC

I think there is a problem with how I try to receive the actual amount of cards per workstation. The exception I get in FlexSim is:

exception: FlexScript exception: Property "value" accessed on invalid node.

I have created a global list for each workstation with three label fields for example workstation CW : CW_Cards_1 (for line 1) CW_Cards_2 (for line 2) CW_Cards_3 (for line 3). Do I have to set an expression field in the global list with total ?

Thank you already!

probeersel1cobacabana.fsm

Choose One
querypull strategyglobal list
· 7
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Regan Blackett avatar image Regan Blackett ♦ commented ·

I'm pretty sure you are not allowed to do this:

model().find("Tools/GlobalLists/CW_List>variables/fields/CW_Cards_1/total").value

It looks like you are trying to access a field value on a different list other than the one you are pulling from in "Pull from Pool", and there is no "total" node below the CW_Cards_1 field node you are referencing. Which I'll be honest doesn't make sense to me, what are exactly are you trying to to do with this query?

0 Likes 0 ·
Amelie C avatar image Amelie C Regan Blackett ♦ commented ·

I try to get the dynamic amount of total cards that are assigned to a production order for each machine. The order can only being pulled from the list (Pool) when the total amount of cards already assigned to a production order with the additional amount of cards needed for the production that is pulled from the list (Pool) is smaller than 1000. Therefore it is necessary to get the total amount of cards that are already assigned to other orders.

Which option can work to get the total amount of production cards per machine that are already assigned to production orders which are not finished yet ?

0 Likes 0 ·
Regan Blackett avatar image Regan Blackett ♦ Amelie C commented ·

What do the tokens you are pushing to Pool represent? Are those the cards that need to be assigned to a machine or the orders that need be pulled? What do the tokens at Pull from Pool represent? When does your model "know" that a card is assigned to a machine?

0 Likes 0 ·
Show more comments

1 Answer

api avatar image
0 Likes"
api answered
Closing outdated question
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.