question

Nicholas A2 avatar image
0 Likes"
Nicholas A2 asked Ben Wilson commented

profiletasksequence() error

My organization is new to using Flexsim. When creating simple models we have no issues. I recently attempted to add a second operator to a model I created. When running with one operator I have no issues and it works flawlessly. When I added a second operator, I had to adjust the process flow to get the second operator to move. As soon as I did that I populated a new error. Another colleague and I took the training class. Unfortunately, that was 6 months ago and we just started to really get into using the software again.

I searched the forums and located two other posts regarding this issue. They provided great information, but I am still a little lost due to a lack of experience. I was wondering if someone could help point me in the right direction on how to overcome this error. I have included the model, error, and system console script.

Forum Post Model.fsm

Thanks,

Nicholas

FlexSim 20.1.1
process flowflexsim 20.1.1tasksequencestask error
· 1
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

Jason Lightfoot avatar image
1 Like"
Jason Lightfoot answered Jason Lightfoot commented

If you run this script it will profile the task sequence that is running on the operator:

  1. applicationcommand("outputconsole");
  2. Object op3=Model.find("Operator3");
  3. profiletasksequence(gettasksequence(op3,0));

Which will output this:

  1. Task Sequence:    Total number of tasks = 6,  Priority = 0,  Preempt = None
  2.         Currently active task = 5,  Tasks left to finish = 2
  3.  
  4. Wait for Task            involved1: NULL involved2: NULL var1: 29 var2: NULL var3: NULL var4: NULL
  5. Nodefunction            involved1: Tools/ProcessFlow/ProcessFlow/Create TS: Assign Task Sequence to Operator3>variables/callbackNode involved2: Tools/ProcessFlow/ProcessFlow>stats/instances/ProcessFlow var1: /Tools/ProcessFlow/ProcessFlow>stats/instances/ProcessFlow/tokens/1 var2: NULL var3: NULL var4: NULL
  6. Travel            involved1: Queue3 involved2: NULL var1: 0 var2: 0 var3: 0 var4: 0
  7. Nodefunction            involved1: Tools/ProcessFlow/ProcessFlow/Travel:To Queue3~2>variables/callbackNode involved2: Tools/ProcessFlow/ProcessFlow>stats/instances/ProcessFlow var1: /Tools/ProcessFlow/ProcessFlow>stats/instances/ProcessFlow/tokens/1 var2: NULL var3: NULL var4: NULL
  8. ACTIVE >>> Load            involved1: NULL involved2: NULL var1: 0 var2: 0 var3: 0 var4: 0
  9. Nodefunction            involved1: Tools/ProcessFlow/ProcessFlow/Load: Flowitem from Queue3>variables/callbackNode involved2: Tools/ProcessFlow/ProcessFlow>stats/instances/ProcessFlow var1: /Tools/ProcessFlow/ProcessFlow>stats/instances/ProcessFlow/tokens/1 var2: NULL var3: NULL var4: NULL

You can also see this task sequence in the variables part of the operator's tree:

You can see in both that the active task is a Load task, but both involved objects (Involved1 and involed2) which relate to the item to load and where to load from are NULL.

The issue is that in this Load activity, you reference token.item but the token only has these labels so it evaluates token.item as NULL:



1611154055676.png (11.5 KiB)
1611154256096.png (3.1 KiB)
1611154296288.png (3.2 KiB)
· 2
5 |100000

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