Page 1 of 1

Automating experiments on different models

Posted: Sunday 22 November, 2020 - 17:55
by Creater0822
I'm wondering if there's a way to automatically run an experiment on multiple ED models.
For example: If I have a Source atom with variable inter-arrival-time, is it possible to for-loop over time = 2s to 20s by steps of 1s and have each slightly different model ran through an experiment wizard?

Re: Automating experiments on different models

Posted: Monday 23 November, 2020 - 08:38
by HarryBunnik
Hi Creator0822,

Yes, that is possible. You can get the current run that the experiment wizard is in, using the following line of code:

Code: Select all

Att([CurRun], refExperimentSupport)
So by checking in which run you are, you can multiply the inter-arrival time:

Code: Select all

 
 Do(
   var([valBasicTime], vbValue, 10), 
 
   valBasicTime + 2 * Att([CurRun], refExperimentSupport)
 )
And perhaps this community post is also interesting. It handles about writing away data in such cases.

I hope this helps you! Success!

Harry

Re: Automating experiments on different models

Posted: Monday 23 November, 2020 - 12:18
by Creater0822
Hi Harry,

After looking at the code I've learnt that the

Code: Select all

Att()
function is made to return the value of a given attribute from a given object. Looking back at my question I realized I've been too vague, my apologies. But nonetheless you've given me some new ideas and questions. Now that I've seen the

Code: Select all

Att()
function, is there a function that can return a list of all attribute names within an object?

But now to describing my question a bit more carefully:
What I'm essentially looking for are the reports of the many experiment results from the different models, i.e. each model with a different inter-arrival time. My idea was to shave off the time I would normally have to spend on manually editing a (global) variable, then run & export every single one of the results as csv to finally have all the csv files analyzed in Excel.

Ideally it would help tremendously if I could have the results of one or two performance measure from a whole experiment (with N number of observations) given to me as a 1D (or 2D array in case two PFMs) with the values Average, St.Deviation, LB (95%), UB (95%), Minimum and Maximum.

For example if I want one PFM result from my model with 10 different inter-arrival-times, it would be a 2D vector, where for each of the inter-arrival-times I'd get the six mentioned statistical values for one PFM. Similarly with two PFMs a 3D vector, where for each of the 10 different inter-arrival times I'd get the six statistical values for both PFMs and so on. If this way of storing data can somehow work internally in ED, I could then apply whatever mathematical operations within ED itself through 4D scripting and eliminate the need of a second application such as Excel entirely.

Given such a large question I'd like to thank you in advance either way, with your answers I've been progressing way quicker through this software than I otherwise would on my own.

Re: Automating experiments on different models

Posted: Tuesday 24 November, 2020 - 10:18
by HarryBunnik
Hi Creator0822,

To see an overview of the attributes defined either have a look in the atom editor (Ribbon: Tools, 5th icon from the left). This will show a more advanced overview of the library and the model tree. Here there is a tab named attributes, which gives per atom an overview of all attributes defined.
Another option (since ED 10.3) is to select an atom and press Shift + F11 (Atom data, can also be found in the ribbon under Display). Here you can see some useful information from the selected atom, among which an overview of the attributes.
Please note that changing attributes can have unexpected side effects! ;-)

As far as your question goes, you could write this data in a table within ED and have for each scenario a different range (row) in the table.

Gr. Harry

Re: Automating experiments on different models

Posted: Tuesday 24 November, 2020 - 16:20
by Creater0822
Nice that's a bunch of different ways to start things off, thanks a lot!!