question

Laurenz Peleman avatar image
0 Likes"
Laurenz Peleman asked Phil BoBo commented

Tracked Variable method is not valid for non-categorical types

Dear all

When running a model I have been working on quite some time, suddenly Flexsim throws the following exception:

exception: FlexScript exception: Tracked Variable method 'getTotalTimeAt' at /Source>stats/state_current is not valid for non-categorical types.

The Object Source in the statement has been in the model since the beginning, while the error only appears just now. What's more, I do not retrieve any variable like "getTotalTimeAt" on that object. Do you know where this error might arise from?

Thanks in advance, kind regards

Laurenz Peleman

Choose One
exceptions
· 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.

Sam Stubbs avatar image Sam Stubbs ♦ commented ·

@Laurenz Peleman Are you running the 17.2 version of the software?

0 Likes 0 ·

1 Answer

Jordan Johnson avatar image
0 Likes"
Jordan Johnson answered Phil BoBo commented

Look at the state_current node of the source in the tree. It should look like this:

Notice that state_current is purple, and that the "Type" value is categorical. It sounds like your state_current node has a different "Type" value (probably unkown). If that is the case, you can set it back with this code:

setsdtvalue(model().find("Source1>stats/state_current"), "type", STAT_TYPE_CATEGORICAL)

Of course, you will need to modify the path to point to the correct source in the model.

If that's not the issue at all, you will probably need to post a model so we can take a closer look. If it's confidential, post a private question, or email [email protected].


· 2
5 |100000

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

David Chan avatar image David Chan commented ·
@jordan.johnson

The same error occurred when I imported a 3d shape for Shape object in v18.2.3. wonder if this a bug.

David

0 Likes 0 ·
Phil BoBo avatar image Phil BoBo ♦♦ David Chan commented ·

Yes, this is a bug in 18.2.3. It has been fixed in 19.0.0.

0 Likes 0 ·