Exceptions when using default State Gantt chart template with BasicTE

Exceptions when using default State Gantt chart template with BasicTE

Tdmasure
Not applicable
54 Views
3 Replies
Message 1 of 4

Exceptions when using default State Gantt chart template with BasicTE

Tdmasure
Not applicable

[ FlexSim 22.2.4 ]

The built-in state gantt chart does not work with the BasicTE library object. State is not updated correctly and exceptions are thrown when the update should happen. Exception is only happening with BasicTE, not with other TaskExecuter objects.

Project below demonstrates the problem.

BasicTE_StateGanttChart.fsm

Image below shows the exceptions during simulation run and that the state gantt is not updated.

screenshot-2023-03-30-173937.png

0 Likes
Accepted solutions (1)
55 Views
3 Replies
Replies (3)
Message 2 of 4

joerg_vogel_HsH
Mentor
Mentor
@Tdmasure ,a Basic Taskexecuter is an object stripped of almost every typical automated features of a standard object. You have to build most features yourself. If you experience some errors, then it is because there are missing data values a standard object automatically creates.
0 Likes
Message 3 of 4

JordanLJohnson
Autodesk
Autodesk
Accepted solution

This is a bug, thank you for reporting it.

Until the bug is fixed, here is a workaround:

  1. Install the chart (on the Advanced panel in Properties)
  2. Open the properties for the Statistics Collector that appears in the Toolbox
  3. Edit the code for the BasicFR State Change Finish and Start events:
    /**Custom Code*/
    StatisticsCollector collector = ownerobject(c);
    treenode listenTo = param(1);
    Array objects = collector.Objects.as(Group).toFlatArray();
    Array result;
    for (int i = 1; i <= objects.length; i++)
        if (isclasstype(objects,"BasicFR") || isclasstype(objects, "BasicTE"))
            result.push(objects);
    result.push(-1);
    return result;
  4. Edit the code for the Non BasicFR State Change Finish and Start events:
    /**Custom Code*/
    StatisticsCollector collector = ownerobject(c);
    treenode listenTo = param(1);
    Array objects = collector.Objects.as(Group).toFlatArray();
    Array result;
    for (int i = 1; i <= objects.length; i++)
        if (!isclasstype(objects,"BasicFR") && !isclasstype(objects, "BasicTE"))
            result.push(objects);
    
    result.push(-1);
    return result;

Here is your model with these changes applied:

basicte-stateganttchart_1.fsm

.


Jordan Johnson
Principal Software Engineer
>

Message 4 of 4

Matthew_Gillespie
Autodesk
Autodesk

@Tdmasure This issue is fixed in 23.0.6 released today.



Matthew Gillespie
FlexSim Software Developer