question

Sebastien avatar image
0 Likes"
Sebastien asked Joerg Vogel edited

Date based Time table for production program ?

Hello !

I would like to define my production program with a time table. I have an unlimited number of products stored in a global table. Now I would like to define in the time table, when product X is produced. I just found state assignment in time tables but no custom property or string. Is it possible to assign a string to a period of time in a time table to define when a product is produced ?

FlexSim 19.0.0
time tablesproduction program
· 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.

Joerg Vogel avatar image Joerg Vogel commented ·

@Sebastian,can you give us an example of your string?

0 Likes 0 ·
Sebastien avatar image Sebastien Joerg Vogel commented ·

@Jörg Vogel

It would something like "XXX-XXXXXX". Just the name of the product.

0 Likes 0 ·
Joerg Vogel avatar image
1 Like"
Joerg Vogel answered Joerg Vogel commented

The time table works a bit different. You can tell in a time table that an object is active or stopped. In your case you want to create a product in a source probably. You control the source by the time table. If the object is stopped when the model run starts you can add source code to the Resume Function. This code changes a label value at the source. And the source will use this label value to set the name of the item.

The steps are.

  1. Create a label at the source that stores the name of the created items.
    e.g. itemName ; string value: XXX-YYYYYY
  2. Insert a OnCreation Trigger in the source
  3. The trigger changes the name of the item to the label value.
    green plus icon > Data > Set Name:
    Object: item
    Name: current.itemName
  4. Add a time table.
  5. Add in the Resume Function a source code line which sets the label value of the downobject.
    downobject.itemName = "XXX-XXXXXX";// line before the return.
· 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.

Sebastien avatar image Sebastien commented ·

Hi @Jörg Vogel,

thank you for your response. I don't know if I understood it correctly but it seems to me that I can only have two different products with your method. If I assign a time table to the source. One product is for the up time and one for down time. But what if I have 100 different products ?

Otherwise I would opt for a Global Table with times and a code in the source checking the model time with the time in the Global Table. But that would look so much better in a Time Table ;)

0 Likes 0 ·
Joerg Vogel avatar image Joerg Vogel Sebastien commented ·

You assume that a timetable is multifunctional. It’s purpose is to stop and resume objects. You can use the source with the style schedule. Then you can set the exact times when one or more items enter your model. A combination of inter arrival and certain intervals is only possible if only a single product type leaves a source at a time. Then you can add more time tables to your model, which all control the source. This is the variant I describe above in my answer.

0 Likes 0 ·
Steven Hamoen avatar image
1 Like"
Steven Hamoen answered Sebastien commented

@Sebastian

Have you take a look at the Date-Time source of process flow? This might solve your problem.

· 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.

Sebastien avatar image Sebastien commented ·

Yes, but I need absolutely an interval between items. I tried with a processor adapting the flow tafter the source but I want something better looking for the final solution. Thank you for your advice.

0 Likes 0 ·
Joerg Vogel avatar image
0 Likes"
Joerg Vogel answered Joerg Vogel edited

You can set the start of the first creation of a product by a sheduled source activity. Then you build a loop structure in process flow to let cycle the token until the inter arrival time elapsed. In each cycle you can create items with different attributes.

create-item-on-schedule-in-inter-arrival-time-styl.fsm

The left side of the process flow depends more on source code and the right on more activities


5 |100000

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