Automating Experimentation

All topics specific to modeling questions in Enterprise Dynamics
Post Reply
giannis
Posts: 10
Joined: Wednesday 04 May, 2011 - 11:53

Automating Experimentation

Post by giannis »

My experimentation is quite extensive so I try to find ways to make things more automated.
That is why I also tried to use the scenario manager. So I have 15 models with different infrastructure that I want to test under the same conditions. My basic variables are different demand rates and the lead times which are saved in corresponding tables in my models. The whole system is an inventory system and I am testing different Inventory policies under different values for the variables mentioned above.

1)I want to ask if and how is it possible to save 4D code in table cells and call them into triggers. For example in my arrival list, that I use to simulate demand, I save the quantity distribution in the atom. Can I instead have it in a table cell and reference the cell from the atom? For example save the distribution in a table named Distribution?

2) Is is possible in cells of a table to reference to cells of other tables?

3) Can there be only one atom ReadExcel in a model? Also can I reference from tables to the excel table? For example I have already created the tables Demand Rated and LeadTimes. The aliases exist in many places in scripts in my model. I wouldn't want to replace the tables. Can I keep the them and instead of saving values in them, use referencing to the ReadExcel table?

My ultimate target is to create one excel file that will be connected to all 15 models and make simultaneous changes to the models. Creating that way an "interface" for my experiments.

Any help is welcome because I am becoming desperate with the size of the experiment!


Greetings
Giannis
Ioannis Goniadis
marlies
Posts: 301
Joined: Monday 17 January, 2011 - 09:28

Re: Automating Experimentation

Post by marlies »

Hi Giannis,

1. Yes, it is possible to save scripts in a table. This can be done in different ways:
a. You lookup the table every time you need the code. E.g. cell(1,1) of Table1 contains the disitribution Uniform(10,20). You can execute this code using the function Execstring: Execstring( Cell(1,1,refTable1, 2)). Note the 4th parameter in the cell function, which makes sure you are reading the cell content as a text. You could use this in the quantity field of the arrivallist. Don't use this function to much in big models as it will slow down the simulation speed.
b. On the beginning of a new simulation run, copy the code from the table into the atom's attribute using the function SetExprAtt. For example: SetExprAtt([CycleTime], Cell(1,1,refTable1, 2), c)
c. In case of the arriallist you can copy the information from the distribution table to tha arrivallist table on the beginning of a new simulation run.

2. When you have a piece of code in a table and you execute it with execstring, that code could contain a reference to another table as well.

3. Instead of using the ExcelRead atom I would suggest using the atom ExcelActiveX. This atom uses faster communication with Excel, you can add more then 1 ExcelActiveX atom to your model and you will be able to add different tables to this atom. You can use the regular table aliases for the tables within the ExcelActiveX atom.
Changing the reference from one table to another should be easy: rename the first one and apply afterwards then give your new table within the ExcelActiveX atom the old reference and everything should work.

Good luck!

Regards,

Marlies
giannis
Posts: 10
Joined: Wednesday 04 May, 2011 - 11:53

Re: Automating Experimentation

Post by giannis »

Marlies thank you for your info

Stupid question how do I copy to the arrival list table my distribution? I thought of editing the field quantity (it accepts 4D scripts) and entered the SetExprAtt command but it did not work?!. Probably because the table is treated not as a matrix of attributes.
Ioannis Goniadis
marlies
Posts: 301
Joined: Monday 17 January, 2011 - 09:28

Re: Automating Experimentation

Post by marlies »

Hi Giannis,

The table is not a matrix of attributes, but of cells. So, if you want to refer to the table in the quantity field of the arrivallist, you could use the ExecString(Cell(x,y,refTable, 2)) option.

I made a small example model for you. Option 1 uses the Execstring option. Option 2 fills the arrivallist data onReset. To use option 2 you will need to go into the atom editor (if possible, depending on the license you have) and check the layout of the table of the arrivallist atom.

Good luck!

Regards,

Marlies
Attachments
example.mod
(26.59 KiB) Downloaded 331 times
giannis
Posts: 10
Joined: Wednesday 04 May, 2011 - 11:53

Re: Automating Experimentation

Post by giannis »

Hi Marlies thanx for the help so far,


I have another question regarding the ActiveX connection. I replaced my parameters tables in the models with ActiveX tables
and it run smoothly untill I closed and reopened the model....then some of the aliases did not work. The strange thing is that the same alias in an arrival list worked whereas in a queue exit trigger not. Could it be because of the rank of the ActiveX atom?
Which is the last of the model? I had some similar problems in the past with table aliases and the rank was the problem.
Actually I tried to change the rank with the 4D interact tool but I got error messages.


Greetings
Ioannis
Ioannis Goniadis
Post Reply