# How to create more options for BufferMode in a Buffer process statement

**URL:** <https://forum.visualcomponents.com/t/how-to-create-more-options-for-buffermode-in-a-buffer-process-statement/6999>\
**Category:** General Questions\
**Created:** [August 18, 2024, 2:22pm UTC](https://forum.visualcomponents.com/t/how-to-create-more-options-for-buffermode-in-a-buffer-process-statement/6999 "2024-08-18T14:22:26Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ayodeji](https://forum.visualcomponents.com/letter_avatar_proxy/v4/letter/a/e99b99/32.png) [@Ayodeji](https://forum.visualcomponents.com/u/Ayodeji)\
**Post date:** [August 18, 2024, 2:22pm UTC](https://forum.visualcomponents.com/t/how-to-create-more-options-for-buffermode-in-a-buffer-process-statement/6999/1 "2024-08-18T14:22:26Z")

</div>

Hi everyone,

Is it possible to more options for BufferMode of a Buffer process statement:

 ![1](https://forum.visualcomponents.com/uploads/default/original/2X/c/c5611818916c83c4e8c3f63a4487291f91f9753c.jpeg)

I want to add more options such as SPT (shortest processing time), LPT (longest processing time), and OLDP (longest time in the system) in addition to FIFO and LIFO. My aim is to perform some simulation experiment where Sequencing rule is a parameter.

![2](https://forum.visualcomponents.com/uploads/default/original/2X/f/f628be0b3c262a7feb03773071c77168c5a4c927.jpeg)

The first 2 sequencing rules are already in VC i am looking for how to implement the last 3 sequencing rules.

Thanks in advance.

Regards.

---

<div class="post-metadata">

**Author:** ![TSy](https://forum.visualcomponents.com/user_avatar/forum.visualcomponents.com/tsy/32/761_2.png) [@TSy](https://forum.visualcomponents.com/u/TSy)\
**Post date:** [August 18, 2024, 5:17pm UTC](https://forum.visualcomponents.com/t/how-to-create-more-options-for-buffermode-in-a-buffer-process-statement/6999/2 "2024-08-18T17:17:13Z")

</div>

It is not possible to change the behavior of the built-in statements, only to reimplement something similar from scratch using Python API.

Some of the “buffer” eCat components have such custom Python-based buffer statements, which you could modify to fit your needs.

---

<div class="post-metadata">

**Author:** ![Ayodeji](https://forum.visualcomponents.com/letter_avatar_proxy/v4/letter/a/e99b99/32.png) [@Ayodeji](https://forum.visualcomponents.com/u/Ayodeji)\
**Post date:** [August 18, 2024, 5:23pm UTC](https://forum.visualcomponents.com/t/how-to-create-more-options-for-buffermode-in-a-buffer-process-statement/6999/3 "2024-08-18T17:23:04Z")

</div>

Thanks for your response @TSy

I will checkout the buffer in eCat components.

Regards.

---

<div class="post-metadata">

**Author:** ![Ayodeji](https://forum.visualcomponents.com/letter_avatar_proxy/v4/letter/a/e99b99/32.png) [@Ayodeji](https://forum.visualcomponents.com/u/Ayodeji)\
**Post date:** [September 25, 2024, 9:35am UTC](https://forum.visualcomponents.com/t/how-to-create-more-options-for-buffermode-in-a-buffer-process-statement/6999/5 "2024-09-25T09:35:17Z")

</div>

@TSy, Thank you very much for your comment. I have modified the FloorSpaceBuffer of the e-catalogue to fit my need for the sequencing rule. Now, I can add any sequencing rule I can think of using the FeedPriorityProperty.

I have practiced with the example below for the sake of simplicity.

 ![1](https://forum.visualcomponents.com/uploads/default/original/2X/d/d6c019fbfa6563c5b97b5a25e3c1c04754e4c977.jpeg)

 ![2](https://forum.visualcomponents.com/uploads/default/original/2X/7/79f14e786354c634e3d3a12372d0dc426aed6fdd.jpeg)

I want to go a step further by implementing dispatching rules when routing products from Pre\_Buffer to Buffer\_A and Buffer\_B.

 ![3](https://forum.visualcomponents.com/uploads/default/original/2X/0/0ae3ba16c59bd778f7181ec4f772f15dbc4831b9.jpeg)

The controller, at default, automatically completely fills up Buffer\_A before proceeding to fill Buffer\_B.

 ![4](https://forum.visualcomponents.com/uploads/default/original/2X/d/d585373b08a11584f7c3f4ce3d5b8e9b748f5956.jpeg)

 ![5](https://forum.visualcomponents.com/uploads/default/original/2X/a/afcd84bd0374cc590386f92aa5543476cf8bc1e3.jpeg)

This type of behaviour is not desirable for the production system I am trying to design because I want the optimal distribution of products between Buffer\_A and Buffer to ensure optimal machine utilization.

I want to solve this problem by implementing dispatching rules. My first idea is to dispatch products to the buffer with the minimum number of products in the queue (MINQ). I have implemented a function in the Pre\_Buffer that can count the number of products in the Pre\_Buffer, Buffer\_A and Buffer\_B.

 ![7](https://forum.visualcomponents.com/uploads/default/original/2X/8/855d37d204833a9da04018fd4046333c3810ae27.jpeg)

I have printed the number of products every time a product enters the Pre\_Buffer as shown below:

 ![6](https://forum.visualcomponents.com/uploads/default/original/2X/b/b3b79f53b96289a3f0764134952cb997b4d66378.jpeg)

My idea is to use this function to control how the products would be dispatched to the buffer with the minimum queue (i.e., the number of products). But I don’t know how to go further with this.

I understand that ProductFeedMode controls how a product exits a particular Buffer. However, I have been able to apply this only to sequencing rules such as FIFO, LIFO, etc.

I don’t know if this can also be used to implement a dispatching rule. I would appreciate any advice you can give to solve this problem.

@Tilma  
@Lefa  
@idkfa  
and every other forum member, I would appreciate any advice on how to solve this problem.

Here is the model of the default buffer behaviour and the idea I want to implement.

[DISPATCHING RULES.vcmx](https://forum.visualcomponents.com/uploads/short-url/dDiUSvBq9H336rwLMv2JQ3KK2xK.vcmx) (198.3 KB)

---

<div class="post-metadata">

**Author:** ![Ayodeji](https://forum.visualcomponents.com/letter_avatar_proxy/v4/letter/a/e99b99/32.png) [@Ayodeji](https://forum.visualcomponents.com/u/Ayodeji)\
**Post date:** [October 3, 2024, 9:38am UTC](https://forum.visualcomponents.com/t/how-to-create-more-options-for-buffermode-in-a-buffer-process-statement/6999/6 "2024-10-03T09:38:28Z")

</div>

@TSy

Please can you give any recommendations?

Best regards.
