question

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

Problem with Job shop model

job-shop-example.fsmI am working with a List Job Shop model, and it works pretty good, but I can not understand why some items which have in their job list the step M do not go through this step before go to step Finish.

Please, any explanation is welcome

Choose One
listsrouting logic
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

·
Jason Lightfoot avatar image
1 Like"
Jason Lightfoot answered Jason Lightfoot commented

You've used "type" with a lower 't' in the field for "step" in the list, while it should be an uppercase. But this isn't the only problem as you're using a numeric with gettablestr() it would then be looking for column 2747 etc.. If you want a single line for the field that does what you want, try:

gettablestr("Steps", value.stepRow, getrank(node(numtostring(value.Type),first(reftable("Steps")))))
· 6
5 |100000

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

Jason Lightfoot avatar image Jason Lightfoot ♦ commented ·

An overloaded gettablestr and gettablenum where strings in the row and column fields are treated as headers would probably be worth having.

0 Likes 0 ·
Matthew Gillespie avatar image Matthew Gillespie ♦♦ Jason Lightfoot ♦ commented ·

@jason.lightfoot The gettablenum and gettablestr commands are deprecated and won't be receiving any new features. You can already use row and column headers to get values from a table using the Table class:

double value = Table("Steps")["Row 3"]["Col 5"];
1 Like 1 ·
Jason Lightfoot avatar image Jason Lightfoot ♦ Matthew Gillespie ♦♦ commented ·

How very modern! So here's the new expression (for 17.1 and later versions):

Table("Steps")[value.stepRow][numtostring(value.Type)]
1 Like 1 ·
Show more comments
Jason Lightfoot avatar image Jason Lightfoot ♦ commented ·

How was it working before? Well value.type was always returning 2, so you were only getting column 2's process steps.

0 Likes 0 ·

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.