question

Sebastien avatar image
0 Likes"
Sebastien asked Ryan Clark commented

Model repeatability and Process Flow activities

Hi,

I just have a question:

Does the deletion of several activities in a process flow that were not taking any time within the model (like assigning labels, breaths, etc...) give different results (according to distributions etc) than a model with those activities ?

Here is an example:

Instead of having two activities, one for assigning a label and one for storing the label in a table, I only use one activity that creates the label and assigns it in a table. And the distribution results are totally different. Is this normal ?


FlexSim 20.2.3
process flow activitiesrepeatability
· 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.

Ryan Clark avatar image Ryan Clark commented ·

Hi @Sebastien,

Sorry we haven't responded in a while! Do you still need help with this question? If so, please respond with additional comments so that we can continue to help you. If you do need additional help, please post your model or a sample model that demonstrates your question, so we can better assist you.

Proprietary models can be posted as a private question visible only to FlexSim U.S. support staff. You can also contact your local FlexSim distributor for phone or email help.

If we don't hear back in the next 3 business days, we'll assume you were able to solve your problem and we'll close this case in our tracker. You can always comment back at any time to reopen your question, or you can contact your local FlexSim distributor for phone or email help.

0 Likes 0 ·

1 Answer

Joerg Vogel avatar image
0 Likes"
Joerg Vogel answered Sebastien edited

There are some obstacles which can have an influence on results. Statistics > Repeat Random Streams is off. This is the suggested setting to get randomly results in a final model. If your are still testing or building a model to improve it, you set this option to be active.Then each simulation run returns same results.

Another fact is, sometimes it does matter, which code block gets executed before another one. There exists a sequence of code execution in the background of FlexSim. At a point of time there are some events evaluated and some data read and set. If a data is changed before it is read in another code block at this point of time, this can alter a behavior in a model. You find in process flow sometimes an unnecessary seeming delay of 0 time units as a Breathe activity. This breathing lets finish a cycle execution to update data change to start a new cycle over your not finished executed code for this time point.

BUT it should not matter if you create labels and set data to a global table whether in two activities or a in single source code block. If you write source code that process data for two different assignments like labels and table cells, then you can write this data in local variables which values you set into your both assignments.

· 4
5 |100000

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

Sebastien avatar image Sebastien commented ·

Thank you for the answer @Joerg Vogel

I had "repeat random stream" on and "breath" activities after each Wait for Event as recommended.

I am investigating further and by checking the Event Log. I found that each event like this one

403,709686 BeginTask: NodeFunction /Patient1 /Tools/People/Flows/Activities/Walk/Travel>variables/callbackNode parnode(1): /Tools/People/Flows/Activities/Walk>stats/instances/Patient1 parval(2): 2545307090944,000000 parval(3): 0,000000 parval(4): 0,000000


gives a different parval(2). Is this what causes the model to not be repeatable ?

0 Likes 0 ·
Joerg Vogel avatar image Joerg Vogel commented ·

It seems to be a numerical reference to an instance of an instanced process flow structure. If you compare more events in a same simulation run, the value changes. If you load a model with Repeat Random Stream active the value should be for the first run the same. If a simple reset action sets a model in the same state as loaded anew, I am not absolutely sure (@Phil BoBo can you say something to pointer values, if they get same values in repeated simulation runs after hitting reset? Thank you)
@Sebastien, do you know, if the involved node function is a default engine code or is it an own written customized code? It seems to me, that it is a default process flow already present in FlexSim. You can load and edit such process flow structures, but you are responsible for your adjustments then. Deleting Breathing activities is not recommended in default process flow structures. There exists a purpose for them, even if you think they haven’t got an impact on the code, but they are necessary to achieve a well defined state in code execution.

If you need an answer for your model, then please ask a new question and attach it! If it contains confidential data, then try to simplify it and erase confidential data or build a smaller example model. Perhaps you can contact your distributor to discuss how to transfer confidential models.

0 Likes 0 ·
Sebastien avatar image Sebastien Joerg Vogel commented ·

@Joerg Vogel when I look at the model tree it looks like a default engine node.

1638713530352.pngWhen I create a new model with a new person flow, then it comes automaticaly.

0 Likes 0 ·
1638713530352.png (31.1 KiB)
Sebastien avatar image Sebastien Sebastien commented ·

@Joerg Vogel It seems those parval values don't have influence over the model as the differences are limited to this value only and the rest of the result is identical.

Yet, by investigating further in the event log, I found that sometimes the following AStarNavigation events happen before or after a specific event. (The mentioned specific event happens exactely at the same time as in the other runs but the AStarNavigation has different "Event" times). Do you know what could cause this issue ? I have more than triple checked the section in the manual already.


1113,898315 AStar::Traveler::ArrivalEvent /AStarNavigator>variables/travelmembers/Patient_120 <no path>
1113,898315 BeginTask: NodeFunction /Patient120 /Tools/People/Flows/Activities/Wait In Line/Travel>variables/callbackNode
1113,898315 Engine: Send Object MAIN:/project/model /Patient120
1113,898315 Engine: Receive Object /L1_ES_WS1 /L1_ES_WS1/Patient120
1113,898315 TaskSequence: Finish TS /L1_ES_WS1/Patient120 /L1_ES_WS1/Patient120 >variables/activetasksequence/ts4344
1113,898315 Trigger: OnResourceAvailable /L1_ES_WS1/Patient120 <no path>
0 Likes 0 ·