question

Leona E avatar image
0 Likes"
Leona E asked Joerg Vogel edited

push to list based on label when item entries a specific processor

Hi everybody,

I try to create a repositioning scenario for my automatical car park. Therefore I added a label by percentage called "Type". There are Type = 1 (97%) and Type = 2 (3%). When a car with Type 2 reaches the last processor in row (row 1_10 or row 2_10), the delay activity should break up and the car should pushed to a list called "Auslagerung Fahrzeuge". In addition the next two following cars (standing for example on the processor row 1_9 and 1_8 should also pushed to the list "Auslagerung Fahrzeuge" no matter what Type.

The list is for the transportation Task. The destination of the car on processor row 1_8 or row 2_8 is the Queue "Warteschlange Ausgang" and the destination of the other two cars is processor 1,2,3 or 4.

Has anyone an idea how to implement this topic?

FlexSim 17.2.2
push to list based on label
car-park-v9.fsm (217.8 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.

Kari Payton avatar image Kari Payton commented ·
@Leona E

To break up a delay activity you can use preemption possibly? There's a short example in the user's manual.

0 Likes 0 ·

1 Answer

·
Joerg Vogel avatar image
1 Like"
Joerg Vogel answered Joerg Vogel edited

The simple hard coded approach consists of pushing the items of the processors to a list. You get the reference to the item by the treenode property "first" on a processor treenode reference.

Object itemToPushX = model().find("row 1_10").first;

Then you push the item to a list called "Auslagerung Fahrzeuge" that you have created in the toolbox.

List("Auslagerung Fahrzeuge").push(itemToPushX);

Instead of pushing the items to the list you can push the destination objects of the items to the list. If you query the list for an entry field containing the item you get as the result the destination.

In the list properties you set an own field in the advanced section. You can put a label of the pushed reference ( e.g. an item) to the list if you set the same name to the label field as you find on the item.

An expression field can evaluate a command or an own source code. "value" is the pointer of the pushed reference for this.

You asked for an evaluated condition, too. This is a decision in a trigger or in a decision activity. You wait for the event, when an item is entering the processor. Then you evaluate a conditional decision wether the value of the label on the token or item matches the condition. If the answer is true the token is sent to the arrow connection on the true exit port number otherwise to the false exit port.

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.