question

Vaibhav R3 avatar image
0 Likes"
Vaibhav R3 asked Vaibhav R3 commented

What is the flexscript code to assign distributions to Down Time and Up Time?

I have very many Processors with different down times and up times. It will be great if you could provide a demo model with couple of Processors and their up time and down time getting updated during the reset. Thanks.

FlexSim 22.1.2
breakdown
· 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.

1 Answer

Felix Möhlmann avatar image
0 Likes"
Felix Möhlmann answered Vaibhav R3 commented

Rather than update the entries in the MTBF/MTTR directly, it will likely be better to link those to values that can be updated more easily.

Set up an excel import to copy the distributions from excel into a global table (or copy/paste them manually).

1659349361697.png

The import will always set the columns to contain string data (text). Change that to FlexScript after the import.

1659349514187.png

You can then reference the table cell and use the distributions in them in the MTBF/MTTR. In the table format I chose above, each row would supply the values for one MTBF/MTTR.

1659349589134.png


If the distribution type always stays the same and only the numbers change, you can also just import those and read them from the table without having to run the cells as FlexScript.

1659349820008.png


1659349361697.png (3.3 KiB)
1659349514187.png (23.7 KiB)
1659349589134.png (15.9 KiB)
1659349820008.png (28.2 KiB)
· 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.