question

chiiiiii avatar image
0 Likes"
chiiiiii asked Felix Möhlmann commented

list.push() ploblem

Hi, I have some questions to ask.

I plan to calculate the starting locations (startstation) of the items waiting to be transported (since my AGV can carry up to four items at a time). Then, I will compare the distances between these locations to determine the optimal sequence for picking up the items and planning the transportation route.

I was advised to use a single list and an attribute (e.g., 0 for load, 1 for unload).

However, I am having some trouble implementing this in custom code.

I set up the following:

List tasklist = Model.find("tasklist");

// Retrieve TaskList

// Push start

Object station = token.startstation;

int operation = 0;

item = token.item;

List("tasklist").push(item, station, operation);


But it did not work as expected. I want to understand why.


Additionally, I have another question and would appreciate some advice.

(For details, please refer to the link: https://answers.flexsim.com/questions/176553/the-question-push-to-list.html )

At the same time, I will attach a simple demo for reference.

rule_base_demo.fsm

In the demo, I use the from-to concept to let the AGV transport materials.

I hope to split it into two attributes (startstation and endstation) and store them in a list.


I really appreciate your help!

FlexSim 25.0.0
push to listpushlist push
rule-base-demo.fsm (119.5 KiB)
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 Felix Möhlmann commented

If you use "List.push(item, station, operation)" then "station" would be the partition ID to which the item is pushed. To retrieve it from the list you would then have to pull from that specific partition.

Maybe that's the issue you were running into.

I took the liberty to overhaul your demo model to remove a lot of unnecessary repetition and those 'Delay-loops' which should really never be needed. I haven't yet encountered a case where I couldn't use an event or sync actions through lists instead.

The new model uses a single Object Process Flow for the machines. They pull items from a partitioned list, then push them to the AGV task list and once they are processed they push them to the item list again. The partition is determine by the "FlowDefinition" table which contains the information which station is next after a given step.

For the AGV I implemented an example of how lists could be used to make the transports more efficient. When the AGV has loaded items it will start moving toward the nearest "EndStation" of items it has loaded. If it comes across a station along its route where it can load another item, it will do so. Though in the current model the transport times are very small compared to the process times, so this case simply never comes up.

Still, I hope this can serve as an inspiration and example of what is possible.

rule-base-demo-fm.fsm


· 7
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 ·
@chiiiiii, it looks like you want to evaluate more values as attributes of an item.

You can add push argurment fields to your list, which you can fill by more push argument values. Alternatively if you want to keep an update value structure you can add labels to your item, which you put as label values onto your list. If you activate Dynamic attribute you can change this value at an item and you update the field also in your list.

0 Likes 0 ·
chiiiiii avatar image chiiiiii commented ·

Hi, thank you very much for your response; it has been extremely helpful to me.

If possible, I still have some questions I would like to ask you.

As I mentioned before, the images I provided were from a simplified demo. In my current model, after a station completes processing, if the next station is still processing, the item can be temporarily stored in the cassette e-rack. Once the next station finishes processing and the processed item is transported to the subsequent station, the stored item can then be transported to its next station.

The method I am using is to record which station processed the item after it has been processed.


I have a questions I would like to ask:

If an e-rack is added to the system, how would you modify the model?

I currently have an idea to add a source and destination for each machine to the e-rack in the FlowDefinition, as shown in the image.

1741850261960.png

However, I don't know how to apply this to the e-rack.

Perhaps add a Decide module to determine the machine's status?

Thank you again for your previous suggestions, and I look forward to your response.

0 Likes 0 ·
1741850261960.png (11.5 KiB)
Felix Möhlmann avatar image Felix Möhlmann chiiiiii commented ·

I would build a separate Process Flow for the racks that hooks into the existing logic. Each rack gets a label that denotes what items can be stored there. A token is created for each machine that the rack acts as a buffer for and pulls items from the respective partition (with a lower priority than the machine itself).

Once the item is in the rack it is pushed to the same partition again. An additional label on the item is used to differentiate between items in a rack and others, so the tokens don't pull items that are already stored in a rack.

rule-base-demo-fm-2.fsm

0 Likes 0 ·
chiiiiii avatar image chiiiiii Felix Möhlmann commented ·

Hi, I sincerely apologize for bothering you again.

I have some questions I would like to ask regarding my model, as there are some special cases that I need to handle. Below is a detailed explanation of the situation:

After processing, machine 2340's input port generates empty boxes (white boxes) that need to be transported to the cassette E-Rack as a temporary storage area (after which they will be destroyed).

Only after the empty box has been transported away can the actual item (brown box) be transported to machine 2340, since the input port of 2340 has a capacity of only 1.

At the same time, after processing, the actual item from 2340 is combined with an empty box (white box) from 2340's output port (which can hold two empty boxes).

Previously, my approach was:

When an item enters machine 2340, it determines which empty box it is being combined with based on the status of the output port’s empty boxes.

A label (outputport1 / outputport2) is assigned to the item to indicate which empty box it is associated with.

Once processing is complete, the corresponding empty box is deleted based on the label on the item.

After the processed item from 2340's output port is transported away, an empty box must be retrieved from the cassette E-Rack to replenish the missing empty boxes at 2340's output port.

Only when both the incoming item from 2130 and the required empty box at 2340's output port are present can machine 2340 proceed with processing.

This is why I created ProcessFlow (PF) for each port to manage this process.

Based on your suggestions, I now need to handle the following issues:

Empty boxes generated by 2340 need to be transported back to the cassette E-Rack queue.

After processing is completed at 2340, the corresponding empty box must be deleted (I suspect this might be the reason why my model is currently unable to execute the travel task).

Once the processed item is transported away, an empty box needs to be retrieved from the cassette E-Rack to replenish the missing empty boxes at 2340's output port.

For machine 2400, there will be two units available.

If 2358 finishes processing and 2400DL is still processing, the item should be sent to 2400SL.

If both 2400DL and 2400SL are processing, the item should be sent to the E-Rack instead.

I would like to ask for your guidance on how to resolve these issues. Although I have some ideas, it might take me a considerable amount of time to experiment and find a solution, so your assistance would be greatly beneficial.

I will be attaching:

My current model, which I modified based on your suggestions but is currently encountering an issue where the AMR cannot find the target machine.
Cassette rule based_multi_load_test.fsm

My previously completed single-load full version of the model, to help provide a clearer understanding of the original structure.
Cassette rule based_multi_load.fsm

I truly appreciate your previous responses, and I sincerely look forward to and appreciate your guidance.

0 Likes 0 ·
Show more comments