Simulating breakdowns for dimension changes

Simulating breakdowns for dimension changes

robert_hambright
Not applicable
6 Views
6 Replies
Message 1 of 7

Simulating breakdowns for dimension changes

robert_hambright
Not applicable

[ FlexSim 16.2.1 ]

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

0 Likes
Accepted solutions (1)
7 Views
6 Replies
Replies (6)
Message 2 of 7

joerg_vogel_HsH
Mentor
Mentor
Accepted solution

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.

Message 3 of 7

robert_hambright
Not applicable

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
Message 4 of 7

joerg_vogel_HsH
Mentor
Mentor

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

Message 5 of 7

joerg_vogel_HsH
Mentor
Mentor

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);    
}
Message 6 of 7

robert_hambright
Not applicable

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
Message 7 of 7

robert_hambright
Not applicable

I believe I have altered it to do what I want. Thanks for the initial help to get it started!

I changed the source code in your model:

fixed-dimension-changes-jv.fsm

0 Likes