question

Patrick Zweekhorst avatar image
0 Likes"
Patrick Zweekhorst asked Phil BoBo edited

State gantt template does not work on BasicFR

Hi,

I think there is a (unknown) bug in the state gantt template. I thought I read something about this on the forum, but I could not find it anymore.

When I use the state gantt template the state does not change. The only state shown is the original state of the object. When I look at a state pie for the same object everything works fine. I found out that after installing the template everything works as expected, notice that I did not change anything in the installed collector or anything. It is the case in 2018.1.2 and 2018.0.5

Could this bug be fixed?

Thanks in advance,

Patrick Zweekhorst

FlexSim 18.1.2
state gantttemplate
· 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.

Phil BoBo avatar image Phil BoBo ♦♦ commented ·

I can't replicate the issue. It seems to be working fine to me:

Please post an example model demonstrating the issue.

0 Likes 0 ·
state-gantt.png (112.5 KiB)
Patrick Zweekhorst avatar image Patrick Zweekhorst Phil BoBo ♦♦ commented ·

Hi @phil.bobo,

Here is my example model. It seems to work on the operator, but not on a basisFR.

stategantt.fsm

Thank you for your time,

Patrick

0 Likes 0 ·
stategantt.fsm (32.8 KiB)
stategantt.png (17.7 KiB)

1 Answer

Phil BoBo avatar image
2 Likes"
Phil BoBo answered Phil BoBo edited

This is a combination of two issues:

First, you are explicitly setting the state tracked variable's value in your Custom Code activity. You should instead be using the Object.setState() or setstate() commands.

Explicitly setting the state value won't cause the On State Change event to fire. That's like explicitly setting the content value without an object actually entering or leaving the object.

Second, the BasicFR handles On State Change differently than the other objects. Its parameter list is different. The chart template isn't accounting for that.

You can fix it for now by installing the template and modifying the Wait for State Change activity. Sample the BasicFR and adjust the table to look like this:

I'll add a case to the dev list to look into updating the chart template to handle the BasicFR's OnStateChange.


on-state-change.png (28.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.

Patrick Zweekhorst avatar image Patrick Zweekhorst commented ·

Hi @phil.bobo,

Thanks for your solution.

Have a nice day,

Patrick

0 Likes 0 ·