question

Kadircan T avatar image
0 Likes"
Kadircan T asked Kadircan T commented

Release Batch at a Certain Time

Hello,

In my model, I accumulate tokens in a batch. At the same time, I want these tokens to be released at certain cut-off times. I want to give these cut-off times through a table. So either when the batch activity reaches its limit or when the cut-off time comes, the tokens will be released. How can I do this?

FlexSim 23.1.1
batchtime
· 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.

Jeanette F avatar image Jeanette F ♦♦ commented ·

Hi @Kadircan T, was Jeanette F's answers helpful? If so, please click the "Accept" button at the bottom of the one that best answers your question. Or if you still have questions, add a comment and we'll continue the conversation.

If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always unaccept and comment back to reopen your question.

0 Likes 0 ·

1 Answer

·
Jeanette F avatar image
0 Likes"
Jeanette F answered Kadircan T commented

Hello @Kadircan T,

In the batch activity at the bottom there is an option called max wait timer. You can select this option and in the time field select the drop down arrow and select By Global Table Lookup.1683404175825.png


1683404175825.png (26.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.

Kadircan T avatar image Kadircan T commented ·

Thank you for your response. But this feature in the batch activity does not provide exactly the solution I want. Because this feature allows the batch to release after a certain second after a certain start time. What I want to do is when a certain time comes, for example 11:00:00, if the batch activity is still going on, I want to finish this activity and release the tokens.

0 Likes 0 ·
Jason Lightfoot avatar image Jason Lightfoot ♦ Kadircan T commented ·
Then use an expression for the timeout for the remaining time to the next release time.

If the batch quantity is met but you still need to hold until a release time then add a delay on the success branch for the time to the next release.

0 Likes 0 ·
Kadircan T avatar image Kadircan T Jason Lightfoot ♦ commented ·

Thank you for your answers. Right now I have over 100 cut-off times for many different labels so I am trying to solve the problem using date-time source. For example:

* The capacity of a vehicle is 5000 packages. If the vehicle is full by 10 AM, it can leave early but at 10 AM it has to leave even if the vehicle is not full.

I understand your solution but I need a different solution because the cut-off data is big.

0 Likes 0 ·
Show more comments
Jeanette F avatar image Jeanette F ♦♦ Kadircan T commented ·

Then use the max idle timer.

0 Likes 0 ·
Kadircan T avatar image Kadircan T commented ·

Hello @Jeanette F and @Jason Lightfoot

I've just adjusted the model as given below.

1) Goods will release when they reach the given batch quantity. or

2) Good will release when the scheduled source creates a cutoff token.

I used a list to control the tokens for release and hold. Then I wanted to add control because if batched goods release before the cutoff time, the upcoming scheduled cutoff shouldn't release any batch and vice versa. So I used decide and zone control.

I created partitions in Zone by cutoff because there can be different cutoffs in the given Zone and added a conditinal decide. For the condition I used

getstat(getactivity(processFlow, "Zone"), Model.find("/Tools/ProcessFlow/ProcessFlow/Zone>stats/instances/ProcessFlow/partitions/"+(token.CutOff)), stats_content, current) < 1

Because there can be many different partitions but the content in the partition can be less than or equal to 1

but it doesn't work as I thought. How should I update my conditional decide? or do you have other recommendations?Cut_Off_Logic.fsm

0 Likes 0 ·
cut-off-logic.fsm (36.7 KiB)
Jason Lightfoot avatar image Jason Lightfoot ♦ Kadircan T commented ·

Here's a possible solution for you to review against your requirements. I can add some descriptions later, but if you have questions about in the meantime please post them here. The key point is that the departure schedule is defined in the global table. The number released and the time is printed to the console.

BatchReleaseSchedule.fsm

1 Like 1 ·
Kadircan T avatar image Kadircan T Jason Lightfoot ♦ commented ·
Thank you for your answer. I will try to implement to my model
0 Likes 0 ·

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.