Automating experiments on different models
-
- Posts: 5
- Joined: Thursday 19 November, 2020 - 21:31
Automating experiments on different models
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?
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?
- HarryBunnik
- Posts: 362
- Joined: Monday 07 February, 2011 - 11:22
Re: Automating experiments on different models
Hi Creator0822,
Yes, that is possible. You can get the current run that the experiment wizard is in, using the following line of code:
So by checking in which run you are, you can multiply the inter-arrival time:
And perhaps this community post is also interesting. It handles about writing away data in such cases.
I hope this helps you! Success!
Harry
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)
Code: Select all
Do(
var([valBasicTime], vbValue, 10),
valBasicTime + 2 * Att([CurRun], refExperimentSupport)
)
I hope this helps you! Success!
Harry
-
- Posts: 5
- Joined: Thursday 19 November, 2020 - 21:31
Re: Automating experiments on different models
Hi Harry,
After looking at the code I've learnt that the 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 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.
After looking at the code I've learnt that the
Code: Select all
Att()
Code: Select all
Att()
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.
- HarryBunnik
- Posts: 362
- Joined: Monday 07 February, 2011 - 11:22
Re: Automating experiments on different models
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!![Wink ;-)](./images/smilies/icon_e_wink.gif)
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
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!
![Wink ;-)](./images/smilies/icon_e_wink.gif)
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
-
- Posts: 5
- Joined: Thursday 19 November, 2020 - 21:31
Re: Automating experiments on different models
Nice that's a bunch of different ways to start things off, thanks a lot!!