Problem with Job shop model

Problem with Job shop model

paul_alejandro_r
Not applicable
159 Views
7 Replies
Message 1 of 8

Problem with Job shop model

paul_alejandro_r
Not applicable

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

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

jason_lightfoot_adsk
Autodesk
Autodesk
Accepted solution

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")))))
Message 3 of 8

jason_lightfoot_adsk
Autodesk
Autodesk

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

0 Likes
Message 4 of 8

jason_lightfoot_adsk
Autodesk
Autodesk

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

0 Likes
Message 5 of 8

Matthew_Gillespie
Autodesk
Autodesk

@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"];


Matthew Gillespie
FlexSim Software Developer

Message 6 of 8

jason_lightfoot_adsk
Autodesk
Autodesk

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

Table("Steps")[value.stepRow][numtostring(value.Type)]
Message 7 of 8

JordanLJohnson
Autodesk
Autodesk

or

Table("Steps")[value.stepRow][string.fromNum(value.Type)]
.


Jordan Johnson
Principal Software Engineer
>

Message 8 of 8

jason_lightfoot_adsk
Autodesk
Autodesk

D'oh!

0 Likes