question

Anggoro P avatar image
0 Likes"
Anggoro P asked Anggoro P commented

Event-Triggered based on inventory position (inv on hand + inv on order)

Hi, I have a plant, a DC (list) , and customers.

The production is triggered if the inventory position (inventory on hand / still in list + inventory on order / still in delay or production leadtime in my case) is equal or below a reorder level (I created a process flow variable for this). How can I capture this number under event-triggered activity?

Similar question for determining how many products to produce. I use "create tokens" activity for creating tokens if the mentioned event triggered. The problem is how to write the quantity here. My idea is to calculate: max level (as a process flow variable) - inventory on hand - inventory on order.

Any idea how to adjust the model? @Raja Sekaran @Jörg Vogel

Thank you :)

Choose One
event-triggered sourceinventorycreate token
a.jpg (108.6 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.

Raja Sekaran avatar image
2 Likes"
Raja Sekaran answered Anggoro P commented

Hi @Anggoro P

I have attached the model with some changes. eventtriggersource.fsm

I have changed the rule for reorder level like this. I think this will work for your situation.

and use the below code to write the order quantity.

  1. int maxlevel = getprocessflowvar(current,"S_max");
  2. int invonHand = getstat(getactivity(current, "List: DC"), "Content", STAT_CURRENT, current);
  3. int invonOrder = getstat(getactivity(current, "Production Leadtime"), "Content", STAT_CURRENT, current);
  4. int orderQty = maxlevel - invonHand - invonOrder;
  5. return orderQty;

I hope this will help you to proceed further.

Thanks


capture2.png (7.6 KiB)
· 10
5 |100000

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

Anggoro P avatar image
0 Likes"
Anggoro P answered

@Raja Sekaran

Yes it works for the token quantity. thanks!

The one for trigger event hasn't solved yet. Because currently we are using "OnContentChange" which only considers inventory on hand. Like the token quantity, we need also use inventory position as the trigger

5 |100000

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