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 Raja Sekaran commented ·

@Anggoro P Can you share your model?

0 Likes 0 ·
Anggoro P avatar image Anggoro P Raja Sekaran commented ·
initialmodel-tobe.fsm

here it is

thanks

0 Likes 0 ·
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.

int maxlevel = getprocessflowvar(current,"S_max");
int invonHand = getstat(getactivity(current, "List: DC"), "Content", STAT_CURRENT, current);
int invonOrder = getstat(getactivity(current, "Production Leadtime"), "Content", STAT_CURRENT, current);
int orderQty = maxlevel - invonHand - invonOrder;
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.

Raja Sekaran avatar image Raja Sekaran commented ·

@Anggoro P

I have reattached the model with some changes. In the attached model, I have used decide activity in order to check whether current inventory (inventory on hand / still in list + inventory on order) is reached the reorder level or not, based on this token will be created.
Use the below code in decide activity to place a reorder. reorderlevel-1.fsm

int reorderlevel = getprocessflowvar(current,"s_min");
int invonHand = getstat(getactivity(current, "List: DC"), "Content", STAT_CURRENT, current);
int invonOrder = getstat(getactivity(current, "Production Leadtime"), "Content", STAT_CURRENT, current);
int currentInvOnHand = invonHand + invonOrder;

if (reorderlevel >=  currentInvOnHand)
{
 /* place a reorder*/
}

0 Likes 0 ·
reorderlevel-1.fsm (29.5 KiB)
Anggoro P avatar image Anggoro P Raja Sekaran commented ·

@Raja Sekaran

Thanks a lot! To my understanding, the event-triggered source is just an arbitrary "helper", isn't it?

Also, I didn't get the idea of using zone. Can you briefly inform me the reasons? thanks

0 Likes 0 ·
Raja Sekaran avatar image Raja Sekaran Anggoro P commented ·

@Anggoro P As far as i know, Event-triggered source creates tokens when the particular event occurs on a particular activity or object. Actually, you don't need Zone activity in this model. you can remove those.

0 Likes 0 ·
Show more comments
Show more comments
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.

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.