question

Ahmed_mohamed L avatar image
0 Likes"
Ahmed_mohamed L asked Jeanette F commented

not to count setup time if the item type is the same

i have a model of a job shop with 5 machines and 3 products, i want to add setup time for each machine per product so that if the next job on the same machine has the same type there shouldn't be a setup time.

and if possible to set a parameter that allow change gears only after k jobs of the same type.

1667961467881.png

jjss flow process--.fsm

FlexSim 22.2.1
global tablessetup timejob shop
1667961467881.png (183.9 KiB)
· 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 @Ahmed_mohamed L, was Felix Möhlmann's answer helpful? If so, please click the "Accept" button at the bottom of their answer. 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

·
Felix Möhlmann avatar image
0 Likes"
Felix Möhlmann answered

The option "If Item Label Value Changes" for the setup time is made for this.

1667985687592.png

The minimum batch size of same-type items requires a bit of custom code though. To restrict which type is processed, youi can use the "Pull" behaviour. A label on the processor that contains the allowed type can be used in the "Pull Requirement" to only pull items of the matching type. At the start of the model and inbetween changeovers, all types should be allowed, so the code is set up to allow all types if the label's value is 0.

1667985877300.png

1667985900839.png

/**Custom Code*/
Object current = ownerobject(c);
Object item = param(1);
int port =  param(2);

// If no type is specified, pull anything
if(current.PullType == 0)
{
    return 1;
}

// Otherwise, only pull if type matches
return current.PullType == item.Type;


The second label "PullCount" is used to determine at what point the "PullType" should be reset. This is done in the On Entry trigger. (Note that, because there are two drilling machines, "current.name" can't be used for them, since their names are numbered. The row identifier has to be specified as "Drilling". The explicit naming of the row can of course also be done for the other processors, but using their own name makes copying the code faster.)

// Set type and reset count labels when a new type is pulled
if(item.Type != current.PullType)
{
    current.PullType = item.Type;
    current.PullCount = 0;
}

// Increment count
current.PullCount += 1;

// Check against table value
if(current.PullCount >= Table("change gear")[current.name][current.PullType])
{
    // Reset type label
    current.PullType = 0;
}

I noticed that the drilling time for type3 is set to 0. Is this correct?

jjss-flow-process-fm.fsm


5 |100000

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

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.