question

Raja Sekaran avatar image
0 Likes"
Raja Sekaran asked Raja Sekaran edited

Model stops working at certain time

Hi,

I have attached the model, model certainly stops working at time 5092 without giving any error messages or having any other issues. I would appreciate your suggestions. sample-model.fsm

Thanks in advance.

FlexSim 17.1.4
model run error
screenshot.jpg (173.8 KiB)
screenshot.jpg (173.8 KiB)
sample-model.fsm (45.1 KiB)
sample-model.fsm (45.1 KiB)
· 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.

Sam Stubbs avatar image Sam Stubbs ♦ commented ·

That's peculiar, I'll let one of the developers know, to help debug what the problem could be.

1 Like 1 ·

1 Answer

Sam Stubbs avatar image
1 Like"
Sam Stubbs answered Raja Sekaran edited

So we looked at your model more in depth, and found that your logic gets into a loop, which causes your model to crash. You have an Event Triggered source which creates a token every time something is pushed to a list, but then that token gets to an activity where it pushes to the list, creating another token, which then gets to the same activity, over and over.

Instead, change your Event Triggered source to listen to the On Entry of the queue itself instead of every time an item is pushed to a list.

sample-model.fsm


sample-model.fsm (45.9 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.

Raja Sekaran avatar image Raja Sekaran commented ·

Thanks, @Sam Stubbs. But if I changed the event triggered source to the On Entry of the queue, I am struggling to achieve the FIFO strategy (based on entry time of the item in the queue) in acquiring the operator.

Basically, in this model, I am trying to send items to floor storage based on three conditions

1. Match Itemtypes

2. Max content

3. FIFO

I can achieve the first two condition by using match item type codes (Set Destination activity) and Max content by checking the content in Floor storage subnodes length.

When floor storage reaches its max content, I push token again to List2 where the entry time of that particular token overwrote. This makes me difficult to achieve the third condition which is FIFO for acquiring the resource. Is there any way to give priority to that particular token to achieve that FIFO strategy?

0 Likes 0 ·
screenshot-1.png (8.5 KiB)
screenshot-2.png (25.8 KiB)
Sam Stubbs avatar image Sam Stubbs ♦ Raja Sekaran commented ·

I see. Then if you NEED to keep the trigger based on the push/pull of the list, then you'll need to add another bit of logic, that makes sure that you don't get into that infinite push/pull loop. Perhaps have a decide activity after the initially created tokens, that determines if the number of tokens exceeds a certain number, to send that token to the sink. Then you won't keep perpetually creating tokens. But I'm not sure if that works for your model. Whatever you do, you need to add another "safeguard" decision point somewhere after the Event Triggered source, and before the Push to List, to check to make sure conditions aren't going to loop.

1 Like 1 ·
Raja Sekaran avatar image Raja Sekaran Sam Stubbs ♦ commented ·

Thanks Sam for your suggestions. I will work on adding decision activity before push to list. Please let me know if you have any other suggestions to overcome this issue.

0 Likes 0 ·