question

Kamil KS avatar image
0 Likes"
Kamil KS asked Joshua S answered

Can list calculate the code only when the task is pulled from the list ?

Hello,

I have created pretty complex Flexsim model using list in PF with priorities logic. I have found out that when there are more than 100 tasks on the list the model is slowing down pretty significantly. I think the problem is that my Expression Field is ,,Dynamic" as below on the screen.

I can't switch this off because in that case the model will do the math with this code when the item is pushed on the list while I need the exact data when the item is pulled from the list.

Is there an option that my code will be calculated only when the items are pulled from the list ? Unfortuanatelly I can't upload my model on public QA.

My code is also using a puller to get the distance to the task.

int distance = (distancetotravel(puller,bufor))/10000;

FlexSim 19.0.2
list
dynamic.png (23.5 KiB)
puller.png (24.5 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

·
Joshua S avatar image
0 Likes"
Joshua S answered

If you reference puller anywhere in the code for that expression, it won't evaluate it till it is pulled. Try this and see if it help your performance.

5 |100000

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

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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