question

Pieter Cecat avatar image
0 Likes"
Pieter Cecat asked Pieter Cecat commented

Limit monthly processor availability to value in global table

Hi fellow FlexSimmers!

I am working on a model (time unit: hours) to simulate a production plan. I have 1 processor and would like to limit its capacity each month (1 month=720 hours) to the sum of 2 values (regular + overtime) defined in a global table (see below):

CAPACITY 1 2 3 4 5 6
Regular 480 480 480 480 480 480
Overtime 0 45 0 120 0 0

For instance:

During the first month (0-720 hours), the processor is available for 480 + 0 = 480 hours. Then it becomes unavailable for processing until the start of the second month (720-1440 hours).

During the second month, the processor is available for 480 + 45 = 525 hours, thus from 720 (end of first month) till 1245 hours, after which it becomes unavailable again until the start of the third month.

Et cetera.

I was thinking of using process flow here but assume there is an easier way for doing this.

Any hints? All help would be appreciated.

Have a good afternoon everyone!

Kindest regards

Pieter

FlexSim 16.0.7
process flowglobal tableprocessorcapacity
· 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.

Pieter Cecat avatar image Pieter Cecat commented ·

@Logan Gold

Hi Logan!

Can you perhaps help me out?

Appreciate your time and help.

Kind regards

Pieter

0 Likes 0 ·
Logan Gold avatar image Logan Gold ♦♦ Pieter Cecat commented ·

@Pieter Cecat,

I think @Kari Payton has the best answer. I tried coming up with another example using Process Flow or a User Event, but either case involves doing an event at a specific time based on the times in your table. Since a Time Table does this for you already, it's the easiest and most straightforward way to do it.

0 Likes 0 ·
Kari Payton avatar image
3 Likes"
Kari Payton answered
@Pieter Cecat

One way you can do this without using process flow is to use a custom time table that is linked to an excel file. Use excel to calculate the start time of the breakdown and the duration of the breakdown. Then link it to a timetable that is referenced by the processor.

1. In the excel file, I made a column to calculate the scheduled down time for the processor. So from that chart above "720 - working hours" for each month. Then for the information needed by the time table, I took the cumulative monthly time - scheduled down to get the start time of the scheduled down. The duration or the breakdown is the same as the scheduled down time.

2. Link the excel file to a time table. Add a new time table toolbox -> add -> Time Table. On the time table, click the button in the top right corner that says "add table to MTEI". Now in your toolbox you should see a reference to Import/Export Excel. There you add the file path for your excel table.

Hope this helps!customscheduleprocessor.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.

Pieter Cecat avatar image
0 Likes"
Pieter Cecat answered Pieter Cecat commented

@Kari Payton

Thanks for your quick and clear reply! I am following your logic and tried to do as you said. However, I cannot seem to add an excel file to my FlexSim. Everytime I push the 'add table to MTEI' button, it returns the following error in the system console:

exception: Exception caught in flexscript execution of VIEW:/active/TimeTable Parameters2843403040/tabcontrol/Table/Add Table to MTEI>OnPress line 9 instruction 34. Discontinuing execution. exception: Exception caught in TreeNode::callMemberFunction() flexscript execution VIEW:/active/TimeTable Parameters2843403040/tabcontrol/Table/Add Table to MTEI>OnPress c: VIEW:/active/TimeTable Parameters2843403040/tabcontrol/Table/Add Table to MTEI

Any idea what I am doing wrong?

Thanks again for your assistance, appreciate it.

Regards

Pieter

· 6
5 |100000

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

Kaspar Chabot avatar image Kaspar Chabot commented ·

Pieter,

If you don't need to change the table very often you don't really need an Excel import/export. You can simply use the calculations the way @Kari Payton made them in Excel and copy paste those values into a TimeTable for the Processor. In my experience, most of the time those FlexScript errors occur when you make a small mistake in setting some parameters or you refer to something that doesn't exist.

1 Like 1 ·
Pieter Cecat avatar image Pieter Cecat Kaspar Chabot commented ·

Hi @Kaspar Chabot

That is what I did for now but unfortunately I need to import large tables from Excel to several Global Tables so then it might come in handy to use the Excel Interface...

Regards

0 Likes 0 ·
Kari Payton avatar image Kari Payton commented ·

@Pieter Cecat post your model and a FlexSim developer can look at it @Sam Stubbs. You can also try deleting the object and the treenode, creating the object again, and restarting the program. Sometimes this works for me but I don't know how to solve flexscript errors.

0 Likes 0 ·
Pieter Cecat avatar image Pieter Cecat Kari Payton commented ·

The Excel Import/Export Interface in general does not seem to work as it also returns an error when I try to add an excel file to a global table, eventhough I was able to do this some months ago (on the same computer and FlexSim version). It would be nice if someone can tell me what is wrong. I have a legal version of Excel installed on my computer so that should not be the issue.

Thanks for your help!

Regards

uncertain-quality-cores.fsm

0 Likes 0 ·
Logan Gold avatar image Logan Gold ♦♦ Pieter Cecat commented ·

@Pieter Cecat,

I'm not sure what happened, but it looks like the ExcelAuto node in your model's tree was changed to be a different node type. So when you try to add a table to the Excel Import through a Time Table or even try to use the Excel interface, FlexSim can't make the necessary changes in the tree that are needed to get the importer/exporter working correctly.

To fix the issue, I deleted the ExcelAuto node in the tree and opened the Excel interface again so that node would be recreated. This seems to have fixed the issue and I am including a fixed model file in this comment (uncertain-quality-cores.fsm).

Let me know if it still doesn't work for you or if it does work and then stops working at a future date. If the latter occurs, let me know what you were doing before the issue reoccurs if you can.

1 Like 1 ·
Show more comments