question

Steven Hamoen avatar image
0 Likes"
Steven Hamoen asked Jordan Johnson commented

Bugs?

Hi Guys,

I'm trying to have an event-triggered source listening to an "OnPartitionContentChange" event of a zone. But this gives an error on reset: "exception: Error: Invalid triggering event, event rank 1, at wait for event activity Inbound/Source inbound 2 in process flow "ProcessFlow" Actually it looks like al partition events give the same problem.

The wait for event also gives the same problem (once a token enters), just as the partitions on a list .

Is there a workaround?

The other thing I noticed is the refreshing of the quick properties is not working as intented:

FlexSim 20.2.1
flexsim 20.2.1quick propertiespartition events
· 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.

Matthew Gillespie avatar image Matthew Gillespie ♦♦ commented ·

@steven.hamoen Do you have replication steps for the Properties refresh issue? We haven't seen an issue like that.

0 Likes 0 ·
Steven Hamoen avatar image Steven Hamoen Matthew Gillespie ♦♦ commented ·

@matthew.gillespie It is as simple to first click on an object with quick properties larger then the window/screen and then pick one that is smaller.

If I minimize FlexSim and then maximize it again no remains are visible.

My setup is a 2 monitor setup, both 1920 x 1080, both controlled via a single USB-C dock with 2 HDMI ports. Scale is 100%. I have the same results on both monitors.



0 Likes 0 ·

1 Answer

·
Jordan Johnson avatar image
0 Likes"
Jordan Johnson answered Jordan Johnson commented

The issue with listening to partition content change (or any partition events, for that matter) is that the partition likely doesn't exist when you try to create the listener; listening to a partition doesn't create the partition. On a List, the problem can be worse if you don't keep empty partitions; the list destroys partitions when they become empty by default.

The only workaround that I know of is to listen to OnEntry/OnExit of the zone, and check the partition with the command zonegetpartitionfortoken(). You could use a Tracked Variable, and set it whenever that number changes, creating a persistent value for that partition. If you need to listen to all the partitions, then you could make a global table of TrackedVariables, one for each partition, and listen to those.

There is a question of whether it should work this way, or whether we should somehow exclude partition events from the WaitForEvent/EventTriggeredSource list. I will add that issue to the dev list, linked to this question.

· 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.

Paulo S20 avatar image Paulo S20 commented ·

Hi @Jordan Johnson , I'm having an issue setting up an event-triggered source for a group of task executors.


The task executors are created through a process flow (create object) and dynamically added to a group as well as the A Star module using some code:

contextdragconnection(ant, Model.find("AStarNavigator"),"A");
Group("Ants").addMember(ant);


When trying to set up an event-triggered source for the group of task executors, it simply doesn't work.


Is my issue similar to what you described in the comment above? Are there any known workarounds for something like this? My task executors are getting blocked / deadlocked and I'm trying to set up an event that listens to their "blocked" status and forces a reroute.

0 Likes 0 ·
Jordan Johnson avatar image Jordan Johnson ♦♦ Paulo S20 commented ·

The main issue is that the Event Triggered Source creates its listener nodes as part of the reset process. It listens to all objects in the specified group at that point. It sounds like your group is empty during the reset process, so the Event Triggered Source can't listen to anything.

A secondary issue is that you should never try to build behavior in your model based on state changes of objects. State is only good for collecting statistics.

Instead, you should implement the correct triggers on your objects. When a TE is connected to the AStar navigator, it gets a bunch more triggers. In this case, you'd probably look at code for the On AStar Block and On AStar Reroute triggers.

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.