question

Theresa B avatar image
0 Likes"
Theresa B asked Jason Lightfoot commented

Where is the Custom Draw Code trigger

Hi, again,

Easy one this time!

I'm trying to understand this question/answer (Why does different run speed have different output?) because I'm having similar issues with different behaviours given low vs. high run speed.

Searching through the manual for "Custom Draw Code" gives me

  • "If any of your objects have code in the "Custom Draw" trigger, make sure that that code does not include any calls to functions that use the random number generator, such as statistical distributions. "

And under the description for Drawing commands:

So it's a Trigger and a field in an object's Properties window but I can't find it in the drop down box (OnDraw is there though but clicking through only seems to offer the opportunity to edit the code there).

Where is/what is meant by custom draw code?

Thanks in advance.


FlexSim 22.2.0
custom draw code
5 |100000

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

1 Answer

Kavika F avatar image
1 Like"
Kavika F answered Jason Lightfoot commented

Hey @Theresa B, in Phil's answer, I believe when he said "Custom Draw Code" he was referring to the On Draw Trigger with Custom Code in it.

1662737607529.png

Their On Draw trigger had some model logic for opening/closing ports, which will lead to the different statistical results.

1662737669710.png


1662737607529.png (4.0 KiB)
1662737669710.png (9.5 KiB)
· 3
5 |100000

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

Theresa B avatar image Theresa B commented ·

Ah, got you. Thanks, Kavika!

Is it only the On Draw Trigger that affects the output depending on the run speed?

0 Likes 0 ·
Jason Lightfoot avatar image Jason Lightfoot ♦♦ Theresa B commented ·
That trigger is the only one whose firing must not affect the model. Whether it does or not is a reflection of your implementation.

During an experiment run, the draw trigger should not fire at all, so if the model was dependant on the draw code, your experiments would not work. It's best to assume the draw trigger will not fire at all and attach all logic and location updates to actual events in the event list.

2 Likes 2 ·
Joerg Vogel avatar image Joerg Vogel Theresa B commented ·
View output! It hasn’t any impact on model throughput.
0 Likes 0 ·