question

Óscar Manuel CMN avatar image
0 Likes"
Óscar Manuel CMN asked tannerp answered

Order by setup times

Hi!

I want to extract the order from the list by ordering them accorgind to their setup times. These times are dependent on the sequence os tasks. I have created 2 tables, one called "Previous Work", which stores the last type of work that each machine processed. The other table called "Setup Times" stores th setup times. The rows in this last table represent the type of the last job processed on the machine to consider and the columns represent the type of job you have now.

I tried different thing in the 3D model but it always gave me some problems. Finally modify the process flow but it gives a problem in the column of the table "Previous Work"

The original model is FIFO-WHN1-SQ-K2

The modified model is SIMSET-WHN1-SQ-K2

FIFO-WHN1-SQ-K2.fsm

SIMSET-WHN1-SQ-K2.fsm

19.0.0 Version

FlexSim 19.0.9
flexsim 19.0.9setup 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.

tannerp avatar image
0 Likes"
tannerp answered

These changes are looking good! The problem is happening with the expression field. When objects are first pulled from the list, they don't have the "Destination" field yet. So it might be a good idea to assign a default "Destination" label or make a statement that accounts for the first pass through of the tokens.

This was one idea I had:

Hopefully this helps. As a gentle reminder, please review the Answers Best Practices under Additional Pointers. #5 talks about follow up questions. If you feel that your original post has been resolved, please accept the answer and ask new questions in a new post. That way, the threads on this page do not become so long and hard for other users, who may have similar questions, to read through. Thanks!

prueba2_1.fsm


no-puller.png (23.9 KiB)
prueba2-1.fsm (1.5 MiB)
5 |100000

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

Braydn T avatar image
0 Likes"
Braydn T answered Óscar Manuel CMN commented

@Óscar Manuel CMN

You are trying to access a table entry, but your token.destination label is not a number, so it can't access the table. For example, instead of M1, you should use a number, like 1.

· 32
5 |100000

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

Óscar Manuel CMN avatar image Óscar Manuel CMN commented ·

But how do I indicate the column number depending on the machine you want to go?

If I make a label that contains the column number on the machine I want to go, it gives me the same problem

0 Likes 0 ·
tannerp avatar image tannerp Óscar Manuel CMN commented ·

@Óscar Manuel CMN,

You can try putting a number label on each of the processors that indicates the column to which each processor is correlated in the table. The "Assign Labels: Destination" activity can then access that when it accesses the "Destination" label, which is a pointer. This is shown below:

Then, when you perform a table lookup, you can use the number value to access the correct table column rather than having to do anything fancy with the pointer/string conversion thing. I'm sure that doing some type of conversion or search/find thing is possible, but I think this is easier.

I also added a column in the "Pedidos" list called "ST" so that those labels are shown in the table if/when you get to that point.

Last thing: Unfortunately, you can't use the "item.TipoTrabajo" here because it needs to be a token reference (i.e. token.myItem.TipoTrabajo; in other words, token -> item -> label "TipoTrabajo"). The problem with that is the token doesn't have a reference to the item. So you can't do token -> ___ -> label "TipoTrabajo" and likewise, you can't do ___ -> item -> label "TipoTrabajo".

Essentially, you can't assign a label based on a pulled item's value before you've pulled the item. Hopefully this helps/makes sense.

setup time labels help.fsm

0 Likes 0 ·
Óscar Manuel CMN avatar image Óscar Manuel CMN tannerp commented ·

Thanks for clarifications.

If I can´t use the label "TipoTrabajo" and I need to first extract the item from the list, then, I have to extract all the requests, assign them a label with their Setup time, put them back in the list and then extract the one with less setup time?

PD: the model attached in the previous answer "setup-time-labels-help.fms" cannot be opened

0 Likes 0 ·
Show more comments