question

Stan Davis avatar image
0 Likes"
Stan Davis asked Stan Davis commented

How to Reevaluate Resource Activity List Back Orders via Code

Probably a simple answer, but how does one call the reevaluateBackOrders() method on the list behind an object-mode Resource activity via custom code?

I tried this but no joy...

List mylist = Model.find("Tools/ProcessFlow/ProcessFlow/Resource");

mylist.reevaluateBackOrders();


Thanks, Stan

FlexSim 21.2.4
backorder reevaluation
· 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

Felix Möhlmann avatar image
0 Likes"
Felix Möhlmann answered Stan Davis commented

The activity creates copies of the list for each process flow instance. If it is an instanced flow, these will be subnodes of "...>stats/instances" ("..." is the path to the activity object). In case of a general process flow, there is only one instance under "...>stats/globalInstance".

The actual list node can be found under those instance nodes.

1636712665137.png

The following code should then work to reevaluate the back orders:

  1. List resourceList = Model.find("/Tools/ProcessFlow/ProcessFlow/Resource>stats/globalInstance/list");
  2. resourceList.reevaluateBackOrders();

1636712665137.png (15.3 KiB)
· 3
5 |100000

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