question

Paúl Alejandro R avatar image
0 Likes"
Paúl Alejandro R asked Paúl Alejandro R commented

Setup time using label

Hello everybody:

Please, somebody could tell me if it is possible to use the option "From/To Lookup Table" using a label instead of item Type, to set the Setup Time in procesors. Is the any way to modified the code?

Thanks for your advice.

FlexSim 18.1.1
labelssetup time
5 |100000

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

Raja Sekaran avatar image
1 Like"
Raja Sekaran answered Paúl Alejandro R commented

@Paúl Alejandro R

In the attached the model, I have modified the code in the setup time tab to get the setup time based on the last item type and current item type.

I hope this helps

Thanks

support-setuptime.fsm


· 4
5 |100000

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

Raja Sekaran avatar image Raja Sekaran commented ·

@Paúl Alejandro R

Does this method works for you?

0 Likes 0 ·
Paúl Alejandro R avatar image Paúl Alejandro R Raja Sekaran commented ·

No, it does not work how I wanted.

0 Likes 0 ·
Raja Sekaran avatar image Raja Sekaran Paúl Alejandro R commented ·

@Paúl Alejandro R

I have reattached your model with the changes that I have made. I have updated the code in the setup time tab. In that, Setup time will be calculated using From/To Lookup table and assign the value to the first entry item of the batch and set value to the "initSetupTime" label. Then setup time will be assigned for the second and upcoming items based on the label value "initSetupTime". Hope this is what you are trying to achieve.

Thanks

support-fromtolookuptable.fsm

0 Likes 0 ·
Show more comments
Jeff Nordgren avatar image
0 Likes"
Jeff Nordgren answered Joshua S commented
@Paúl Alejandro R

The attached model shows you how you can use a flowitem label for the processing time in a Processor. Will something like this work for you?

Thanks.

proctime-label-jn1.fsm


· 11
5 |100000

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

Paúl Alejandro R avatar image Paúl Alejandro R commented ·

Thank you @Joshua S and @Jeff Nordgren. However; I am trying to use the option "From/To Lookup Table" in Setup Time, as you can see in the attached screenshot. captura.png

This option let me choose a Global table, but rows and columns should contain item types but I need to use labels. I understand that item type are numbers, but labels could be text, so I want to use this option with a text label. The global table is in the second attached screenshot. captura-2.png

I could also use the option "If Item Type Changes ( 531, 0 )", but again it works only with item type, not with labels. captura-3.png

Is is possible to modiffied the code to use labels instead of item type?

Thanks.

0 Likes 0 ·
captura.png (23.9 KiB)
captura-2.png (3.5 KiB)
captura-3.png (24.9 KiB)
Jeff Nordgren avatar image Jeff Nordgren Paúl Alejandro R commented ·
@Paúl Alejandro R

Please look at the attached model. Is this more what you had in mind?

proctime-label-jn2.fsm

1 Like 1 ·
Jeff Nordgren avatar image Jeff Nordgren Paúl Alejandro R commented ·

@Paúl Alejandro R,

Can you send in your model or a sample model of what you are trying to do? That would help us be able to answer your question more definitively. Also, trying to do "lookups" using text (string) in any computer language is very, very slow compared to numbers. Why is it that you believe you need to use text labels instead of some kind of numeric value?

Thanks.

0 Likes 0 ·
yoni A avatar image yoni A commented ·

set-up-example.fsm

see attached example @Jeff Nordgren, @Joshua S

,

set-up-example.fsm

see attached example for set-up table @Jeff Nordgren, @Joshua S

0 Likes 0 ·
set-up-example.fsm (53.3 KiB)
set-up-example.fsm (53.3 KiB)
Joshua S avatar image Joshua S yoni A commented ·

@yoni A

Did you upload this model to help Paul, or did you have questions on how to make it work?

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

@yoni A, a number isn't a column or row name. If you want to call a row name from a numerical value you have to convert it to a string:

double returnvalue = table[string.fromNum(lastitemtype)]
    [string.fromNum(currentitemtype)];
0 Likes 0 ·
yoni A avatar image yoni A commented ·

how to make it work @Joshua S

0 Likes 0 ·
Paúl Alejandro R avatar image Paúl Alejandro R yoni A commented ·

Thank you all for your responses.

I am attaching an example model where I need setting a "Setuptime" using Labels. The items have a type (111,112, 113, 114, 115) and also a label "Color"(rojo, blanco, morado, verde, azul). I want to use the label "Color" to configured the setup time. I tried to follow your advice, but I was not able to make it works.model-example-pf-3.fsm

0 Likes 0 ·
Joshua S avatar image Joshua S Paúl Alejandro R commented ·

@Paúl Alejandro R

See the attached model for the changes. The values in the Table "Setup Color 2" might need to be changed

15421-model-example-pf-3.fsm

0 Likes 0 ·
Show more comments
Joshua S avatar image
0 Likes"
Joshua S answered Joshua S commented

You can change the references in the fields provided as shown below, it doesn't have to be item.Row or item.Col


pic1.png (24.7 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.

Joshua S avatar image Joshua S commented ·

@Paúl Alejandro R

What I showed you above will work for what you want, you can use a label that is a text and it will look up correctly. Here's an example model where I assigned a text label to the item at creation, then the process time is based on the table lookup. tablelookup.fsm

0 Likes 0 ·
tablelookup.fsm (22.5 KiB)

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.