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

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

leona_e
Not applicable
62 Views
2 Replies
Message 1 of 3

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

leona_e
Not applicable

[ FlexSim 17.2.2 ]

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?

0 Likes
Accepted solutions (1)
63 Views
2 Replies
Replies (2)
Message 2 of 3

kari_payton
Not applicable
@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
Message 3 of 3

joerg_vogel_HsH
Mentor
Mentor
Accepted solution

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.