question

Marco Ney avatar image
0 Likes"
Marco Ney asked Joerg Vogel commented

Model Parameterization via Excel or DBase

Hi all,

I am wondering if/how a model can be parameterized reading an Excel sheet (or DBase).

To start the exercise, I read an Excel sheet during model reset into TimeTable.

But how to update the setup & process times of a processor for example ?

I attached a model which shall have each processor updated 'on entry' with a RowID. The RowID is the row in the timetable.

As I don't have access to the global variables using 'free' version, I put my 'global' var (RowID) in the dispatcher. Each source will increment this 'RowID' variable in the dispatcher.

I don't know how to update the setup and process time in the trigger menu of each processor.

I read the RowID from the previous station, next would be to update setup and process times.

....Finally I will have to check when the timetable list is processed and stop the model...

Regards

modelparamviaexcel001.fsm

modelparamviaexcel001.xlsx

FlexSim 19.0.2
process timesetup time
5 |100000

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

1 Answer

Joshua S avatar image
0 Likes"
Joshua S answered Joerg Vogel commented

You can reference the table directly in your process and setup times using

  1. Table("TimeTable")[Row][Col]

so in your model for the setup times it would be

  1. Table("TimeTable")[item.RowID][1]

and for process times

  1. Table("TimeTable")[item.RowID][2]

Then you can create a trigger on the source that checks to see if the Dispatcher label is above the number of rows in your table, and will close it's output port if that condition is met.

Here is your model with the changes, I made all the changes on the bottom line and then deleted the top 2 lines and copied the bottom line 2 times. I got rid of some of the triggers on your objects as well.

The model will stop automatically now since it senses that the 3 sources are closed any nothing else will occur in the model.

You can also use the command stop(); anywhere in the model you can enter code in and it will stop the model.

19192-modelparamviaexcel001-1.fsm


· 2
5 |100000

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