question

Steven Hamoen avatar image
0 Likes"
Steven Hamoen asked tannerp commented

Source Bug?

I think have come accross a bug in the source. If you have the following settings:

I would expect that after 10 seconds my source waits 10 seconds and then creates the next 10 products etc. So at time 10,20,30 etc there 10 products created. But after it hits 10 seconds, it keeps on creating products and doesn't stop anymore.

FlexSim 20.2.3
flexsim 20.2.3sourcearrival schedule
sourcebug.png (26.9 KiB)
· 5
5 |100000

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

Jason Lightfoot avatar image Jason Lightfoot ♦ commented ·

I think it's always done this, so it's compatible with old models - you'd need to add a time zero row with a quantity of zero to get the behaviour you describe. The only reason I can think for preserving this behaviour is if someone wants an initial delay after reset that is different to the row intervals, but that would be better handled as an explicit field so that the behaviour is clear. Showing the interpretation of the table alongside the entered data would also help e.g the first few arrival times.

0 Likes 0 ·
Steven Hamoen avatar image Steven Hamoen Jason Lightfoot ♦ commented ·

@jason.lightfoot, Maybe you are right and just forget about those things but if you do the same with a arrival sequence the source quits after creating 1 product, here it starts creating an infinite amount of products which in the end will crash your model. Actually I received a model where the Arrivaltime was 0, so the problem was even worse.

0 Likes 0 ·
tannerp avatar image tannerp commented ·

@steven.hamoen,

While I agree that this can be confusing, I think Jason's explanation is accurate. To help add supporting documentation, I created a small example model in which the table is set up to have a delivery of 1 red item at time 0 and 2 green items at time 10.

As you can see in the demonstration, the entire table is repeated every 10 seconds, and this happens in time 0. So whatever the highest time value in the table is (i.e. 10 seconds) also represents the time that the table will begin to execute again (i.e. 0 seconds).

I guess another way to think of it is that the last row and first row execute simultaneously. In your case, that means the same row is executed infinitely.

repeat arrival table.fsm

0 Likes 0 ·
Steven Hamoen avatar image Steven Hamoen commented ·

@tanner.p My problem is not so much that you need to do it a specific way to get things done, but the problem is that your model crashes and you have no idea why with just standard settings. You can keep this functionality in place but still prevent the source to go into an infinite loop by just making in an extra check in the source code:

else if (v_repeat)
     createevent(holder,0, 0, "Schedulecreatepart",first(node_v_schedule));
0 Likes 0 ·
tannerp avatar image tannerp Steven Hamoen commented ·

@steven.hamoen This is clever. Thanks for the input. I will tag @Matthew Gillespie so the devs can consider this suggestion.

0 Likes 0 ·

0 Answers

·

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.