question

chao.g avatar image
0 Likes"
chao.g asked Jason Merschat commented

How to read distribution type from excel?

Very simple question, is there a way to read the distribution type as well as the parameters into flexsim model from excel, so that when I want to change the distribution type of several hundreds stations, I don't have to do that one by one.

Thanks,

FlexSim 16.1.1
data input
5 |100000

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

Jeff Nordgren avatar image
1 Like"
Jeff Nordgren answered

@chao.gao

Attached is a sample model that will do what I believe you are asking.

In the model there is a Global Table called "DistributionTypes". It has five rows representing 5 different types of distributions. I assigned each row of the table to a process time in each of the processors. You could have 100 processors that use distribution type 3 (row 3 in the Global Table) so that any time you changed that row in the table, all of the 100 processors would now have that new distribution time. You could import from an Excel worksheet into the Global Table.

The cells in the first column of the Global Table are set to be string values.

chaogaosample1-jn1.fsm


5 |100000

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

Sam Stubbs avatar image
1 Like"
Sam Stubbs answered Jason Merschat commented

As long the string determining the distribution in the table is in the proper FlexScript syntax, you can use the executestring() command. It will execute whatever string you give it as FlexScript.

· 3
5 |100000

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

Jason Merschat avatar image Jason Merschat commented ·

Do you have to use executestring() for any distribution called from a table? I cant get this to work for some reason with either scenario (using the execute or simply calling the string text). Tried applying the returned distribution to a label and then using the label as the delay value...nothing works... I also tried applying the flexsim script assigner to the table, but I got errors everywhere and the model locked up and was unusable.

0 Likes 0 ·
Matthew Gillespie avatar image Matthew Gillespie ♦♦ Jason Merschat commented ·

Could you ask a new question and post a small sample model of what you're trying to do? I would recommend just making a table cell have flexscript data and then using the Table api to get the value of that cell which will execute the flexscript node. If you post a sample model I'll show you how to do that.

0 Likes 0 ·
Jason Merschat avatar image Jason Merschat Matthew Gillespie ♦♦ commented ·

Will do. I am at a client and trying to debug on the fly. I'll try and post a new model with this in it... Thanks!

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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