question

Alexandra D avatar image
0 Likes"
Alexandra D asked Alexandra D commented

time load/unload

Hi! In order to simulate correctly, the system must enter in the production supply chain a different loading time and a unloading time depending on the destination of the operator (Operator_P1, Operator_P2, Operator_P3). So, I created 2 tables:

Unloading (1 row, 2 columns: pp-uri; vp-uri, tp_1, cp_1); 1623922230394.png

  1. Loading (1 row, 2 columns: pp-uri; vp-uri, tp_1, cp_1) 

1623922269946.pngand I set the number label (row_number) to each processor with value 1 for pp-uri

ex1.jpg...........................................................

ex13.jpg and value 2 for vp-uri, tp_1, cp_1.

ex14.jpg...........................................

ex18.jpg

ex18.jpg

  1. Process flow now looks like this
  2. ex21.jpgCode Snippet:
  3. for Load Code_P1:
  4. setvarnum(Model.find("Operator_P1"), "loadtime",Table("Load")[token.machine.row_number][1]);
  5. for Load Code_P2:
  6. setvarnum(Model.find("Operator_P2"), "loadtime",Table("Load")[token.machine.row_number][1]);
  7. for Load Code_P3:
  8. setvarnum(Model.find("Operator_P3"), "loadtime",Table("Load")[token.machine.row_number][1]);
  9. for Unload Code_P1:
  10. setvarnum(Model.find("Operator_P1"),"unloadtime",Table("Unload")[token.machine.row_number][2]);
  11. for Unload Code_P2:
  12. setvarnum(Model.find("Operator_P2"), "unloadtime",Table("Unload")[token.machine.row_number][2]);
  13. for Unload Code_P3:
  14. setvarnum(Model.find("Operator_P3"), "unloadtime",Table("Unload")[token.machine.row_number][2]);
  15. I have done all these steps and it does not take into account my loading and unloading times.
  16. Can anyone tell me what I'm wrong about and what I should change? Please, help me!

LICENTA FIN.fsm

FlexSim 19.0.0
operatorflexsim 19.0.0loadingunloadingloading time
1623922230394.png (11.5 KiB)
1623922269946.png (11.0 KiB)
ex1.jpg (29.4 KiB)
ex13.jpg (29.0 KiB)
ex14.jpg (28.7 KiB)
ex18.jpg (29.3 KiB)
ex18.jpg (29.3 KiB)
ex21.jpg (134.1 KiB)
licenta-fin.fsm (73.3 KiB)
ex23.jpg (11.3 KiB)
ex22.jpg (11.0 KiB)
ex19.jpg (30.6 KiB)
5 |100000

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

1 Answer

Felix Möhlmann avatar image
0 Likes"
Felix Möhlmann answered Alexandra D commented

Hi @Alexandra D,

there are a couple things going wrong here:

First, the label "machine" that the "Load_Code_Px" activities refererences is not yet set when the token enters the activity for the first time. Just move the "Machine_Px" assign label activity up so it is done before the custom codes.

Also, that label actually points to the queue in front of the processor at that point (to make the operator unload the item there, probably to not overload processors?). The queues do not have the label "row_number".

To avoid adding labels to all queues, you can set the "machine" label to the processor itself, so the row_number can be read from there and then use

  1. token.machine.inObjects[1]

as destination in the unload acitivity.

In "Code_Unload_Px" you are trying to read from column two which doesn't exist.

In several "Load/Unload_Code_P2/3" activities you are setting the times for "Operator_P1" instead of P2 or P3.

Also, in "Table Code_x" you are referencing "token.label_with_time" - there is no such label defined on the token.

Lastly - and the hardest to find - the data in your "Load" and "Unload" tables is defined as "strings" (text) not numbers (the visual distinction is that text is aligned to the left of the cells, numbers to the right). To change this, right click on the column header and choose "Assign Data" -> "Assign Number Data".

setdatatype.png

licenta-fin_fixed.fsm


setdatatype.png (21.2 KiB)
· 21
5 |100000

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