question

Robert Hambright avatar image
0 Likes"
Robert Hambright asked Robert Hambright commented

Simulating breakdowns for dimension changes

Hello.

In my model, I have a scheduled source with items arriving at time 0 that have 4 different dimensions. The dimensions are assigned a label that represents if a dimension change is necessary before that dimension is processed. There are two types of changes (long and short) and if that dimension requires the change, the label is 1. If it doesn't require the change, the dimension is 0.

I can get the processor to shut down based on those labels, but it shuts down after every item because they are all assigned the label, which is not what I want. Is it possible to have the processor only shut down one time before the next dimension is loaded?

For example, if the last item of dimension 1 is on the processor, the processor will finish that item and then shut down for X time because the next item is a different dimension. Then after the shutdown, the item from dimension 2 is loaded. And so on for all the dimensions.

Thanks for the help.

dimension-changes.fsm

FlexSim 16.2.1
processordimension changes
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

Joerg Vogel avatar image
1 Like"
Joerg Vogel answered Joerg Vogel commented

You can store the current state in a label in the processor. If the dimension changes, then you update the value and shut the processor down.

· 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.

Joerg Vogel avatar image Joerg Vogel commented ·

Sure, I wrote the source code in the Setup Time of the Processor

1 Like 1 ·
Joerg Vogel avatar image Joerg Vogel Joerg Vogel commented ·

If you need an different state, you can use the command setstate(current,STATE_BREAKDOWN); Inside the bonus if-statement. You have to add block brackets after the condition. Like:

if(downtime){ 
   colorred(current); // bonus: change Processor color 
                     //if there is a setup > 0. 
		     //Color is set to green back in the 
		     //Setupfinish trigger 
   setstate(current,STATE_BREAKDOWN);    
}
1 Like 1 ·
Robert Hambright avatar image Robert Hambright Joerg Vogel commented ·

The state and color are helpful, thanks.

Thank you. I have two questions about the code that you wrote.

1. When the processor switches to Dim4 from Dim3, the downtime should be short. In your model, it did not change from long so it is going down for 50 instead of 5. It does switch correctly for Dim2 to Dim 3, but not for 3 to 4.

2. I noticed that the code relies on the items alternating between long and short so that the if statements can be triggered. However, there are many more short times than long for the larger model. So how can I alter the code to account for something like 2 short downtimes in a row? I have attached an example below where I added Dim5 which is short (just like Dim4).

additional-dimension-changes-jv.fsm

Thanks for the help

0 Likes 0 ·
Show more comments
Robert Hambright avatar image Robert Hambright commented ·

Can you possibly demonstrate this? I understand what you are saying, but I do not know how to do it in the model. Thanks.

0 Likes 0 ·