MauroPen / MyPythonRepo

0 stars 0 forks source link

Divide trialsArray every 500 trials #32

Closed MauroPen closed 2 years ago

MauroPen commented 2 years ago

As learned from issue #21, large indexed arrays/tables are inefficient: this implies that if there are many trials to perform in a simulation, the time necessary to process the last trials increases.

The idea is to apply the same logic used to manage peopleArray through the concatenation of multiple peopleTrialArray. In this case, we may set a fixed number (500) after that trialArray should not be used anymore if not to concatenate the data about the subsequent 500 trials.

DOD: Times of execution for each trial are stable even in case of many trials (3000+)

MauroPen commented 2 years ago

trial500Array has been introduced. Every 500 trials its data are moved to trialArray through concatenate() and then reinitialized.