question

Chen avatar image
0 Likes"
Chen asked Chen commented

Slowing down production speed when storage is near full capacity

Hello, is there a way to slow down production speed( processing speed of the processor) by let's say 10% if the storage capacity is 85% full or greater and speeding it up to to normal when it goes below the 85% threshold ?

FlexSim 21.2.4
racksstorage system
5 |100000

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

1 Answer

·
Jason Lightfoot avatar image
1 Like"
Jason Lightfoot answered Chen commented

The processing time can be an expression or function which can inspect the state of another object and return different values.

· 13
5 |100000

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

Chen avatar image Chen commented ·

However, I have set the processing time by case which is necessary for different products in my simulation. So I don't how to set such a function without disturbing the other processing timesscreenshot-2023-07-14-104903.png

0 Likes 0 ·
Felix Möhlmann avatar image Felix Möhlmann Chen commented ·

You can keep the general structure of the Values By Case option and adjust the code to first determine the base time to use and then check whether that base value is reduced or not.

"storageLevel[item.Type]" is just a placeholder to show the general intend of the logic. You would have to implement a solution to get the storage capacity (either total or type specific) that works with your model.

Object current = ownerobject(c);
Object item = param(1);

Variant value = item.Type;
double processTime = 0;

if (value == 1) {
    processTime = 10;
}
if (value == 2) {
    processTime = 20;
}
if (value == 3) {
    processTime = 30;
}
if (value == 4) {
    processTime = 40;
}
if (value == 5) {
    processTime = 50;
}

if(storageLevel[item.Type] > 0.85)
{
    processTime /= 0.9;
}

return processTime;
2 Likes 2 ·
Chen avatar image Chen Felix Möhlmann commented ·
For the item.Type part is where I have to represent the rack in the code?


0 Likes 0 ·
Show more comments

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.