question

Rob Davies avatar image
1 Like"
Rob Davies asked Mischa Spelt edited

Quickly add rows on arrival table, Flexsim 2017.

On Flexsim 2017, I'd like to update the arrival table to 892 rows, but I don't want to click the [ + ] button 892 time to create enough rows to copy the data in.

Any alternate ways to import arrival data ? Flexsim Healthcare allows you to type number of rows, and then cut and paste, but I don't see that field in Flexsim 7.

FlexSim 17.0.0
hcarrival tablenew rows
dcltp.png (22.4 KiB)
wle2s.png (7.0 KiB)
5 |100000

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

Adrian Haws avatar image
1 Like"
Adrian Haws answered Mischa Spelt edited

There isn't a place where you can input a number to increase the number of rows in a Process Flow Schedule Source activity. The easiest option would be to import your table from Excel.

Then in the Excel Import/Export in the Toolbox you can import from a designated Excel document.

If you still want to define the number of rows in the arrival table you can execute the same code that the activity uses. First, designate the arrivals node in the model tree:

Then run this code in the Script window, changing the value for newArrivals as desired:

treenode arrivals = so();
int newArrivals = 20;
for (int i = 1; i <= newArrivals; i++) {
	treenode arrival = createcopy(last(arrivals), arrivals, 1);
	int newTime = get(rank(prev(arrival), 1)) - get(rank(prev(prev(arrival)), 1)) + get(rank(prev(arrival), 1));
	set(first(arrival), maxof(0, newTime));
}

I will suggest this to the development team as an added feature.


mtei.png (14.0 KiB)
designate-node.png (11.4 KiB)
· 1
5 |100000

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

Mischa Spelt avatar image Mischa Spelt commented ·

If you went so far as to find the arrivals node in the tree, you might as well just right-click it and Explore As Table, which then allows you to set the number of rows directly in the Quick Properties panel. It avoids the scripting and allows you to copy/paste rows.

1 Like 1 ·
exploreastable.png (984.7 KiB)
Joerg Vogel avatar image
0 Likes"
Joerg Vogel answered

Manual > Flexsim Coding > Flexsim Class Reference > Table >addRow

or ...> Table > setSize

5 |100000

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

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.