logic combinner

logic combinner

a4225283
Enthusiast Enthusiast
2,175 Views
39 Replies
Message 1 of 40

logic combinner

a4225283
Enthusiast
Enthusiast

@moehlmann_fe 

 

https://forums.autodesk.com/t5/flexsim-forum/passive-acceptance-of-tasks/m-p/13850922#M98484


Hi sir
I currently have a model I'd like to modify to resemble a linked function, but I'm finding the overall performance a bit off. Additionally, it has some unexplained errors that I'd like to resolve. I'd also like to change the dispatch method to resemble a linked one, where vehicles will only be dispatched after reaching certain points. However, I didn't build this model from scratch, and I'm still working on understanding it.

 

But I don't think I need to use the NextWorkPoint List to complete it. Can I use the point method to make the judgment? As long as I reach the point with the letter T, I need to complete the judgment method like in the connection (usually the letter T represents an arm). If there is a car, I wait 1.5 seconds for work cp. If there is no car, I wait 5 seconds for work cp. But the main problem is that this model will push the task requirements into the RGV TASK list. Now I am wondering if there is a way to determine whether it is the corresponding task after reaching the T point. Wouldn't this way I don't need to change so many things?

 

0 Likes
2,176 Views
39 Replies
Replies (39)
Message 21 of 40

FelixMoehlmann
Collaborator
Collaborator

I can't help you much with what happens after a task is pulled. As I said, not understanding the language makes it really hard to follow what activities are supposed to do and what different routes through the Process Flow represent. If you see something that shouldn't happen, follow the respective token after it pulls a task and try to find what part of the logic is incorrect. 

moehlmann_fe_0-1761736378792.png

 

0 Likes
Message 22 of 40

a4225283
Enthusiast
Enthusiast

Yes, but what I'm trying to say is that before I changed this point to a string, the RGV would successfully go to either WorkForwarding or a location to pick up goods (I'm guessing WorkForwarding). But why, after simply adding the pull condition to make it an array, does it now pick up goods at the Point? I haven't changed any other logic. What else can I do?

To summarize:

Plan A

a4225283_0-1761743027834.png

 

(The drawback is: if some points are not touched, the transport task won't be triggered.)

Plan B, 

a4225283_1-1761743089542.png

because there are more triggering conditions, makes it easier for tasks to be assigned to the RGV.

However, the drawback is that I can't see my RGV traveling to my transport task.

So I'm wondering if I can combine the two. I can still have multiple points triggered, and then go to the Location to transport goods after triggering.

0 Likes
Message 23 of 40

a4225283
Enthusiast
Enthusiast

a4225283_4-1761743478357.pnga4225283_3-1761743443580.pnga4225283_2-1761743423104.png

This travel feature has an ITEM.UP option, which should take him to his location (location to 8), but I don't see a similar function in the model.

 

 

0 Likes
Message 24 of 40

a4225283
Enthusiast
Enthusiast

I think I've solved my problem, but I've noticed that when I set the state, it only briefly enters the set state before going to IDLE, which seems very strange! I'd like to know why. Also, my model is showing a very strange error message! But I don't see anything particularly strange about my model.

 

a4225283_0-1761808362062.png

 

a4225283_1-1761808594567.png

a4225283_2-1761808684323.png

 

 

0 Likes
Message 25 of 40

FelixMoehlmann
Collaborator
Collaborator

It seems you found a bug. If an AGV is stopped upon pre-arriving at its destination and then later resumed, giving an unload task to the AGV after it was resumed will throw an error for some reason.

The only workaround I could find is to simply not stop the AGV if it will unload an item at the CP. In my test I did this by adding a label to the AGV before the travel task and checking for that in the Switch Process Flow. To be safe this should be added to all sections of the Process Flow where items are unloaded.

moehlmann_fe_0-1761814492432.png      moehlmann_fe_1-1761814522382.png

 

 

0 Likes
Message 26 of 40

a4225283
Enthusiast
Enthusiast

How can I effectively solve the problem regarding the state aspect? The timing he calculated is strange.

0 Likes
Message 27 of 40

FelixMoehlmann
Collaborator
Collaborator

You are setting the state of each AGV to 51 (Travel empty with task) if the label "LUL" is not equal to 空 and there are no items on the AGV once per second. I can imagine that this leads to weird results, since it would override other states like "Travel loaded" and "Blocked".

You can use a combination of the OnStateChange and OnMessage trigger to use state 51 instead of "Travel Empty" based on the label.

moehlmann_fe_0-1761822231821.png

 

0 Likes
Message 28 of 40

a4225283
Enthusiast
Enthusiast

I'm a little confused about what you mean, so how do I apply the settings I've defined in the pull list to the car?

 

a4225283_1-1761822626494.png

 

 

0 Likes
Message 29 of 40

FelixMoehlmann
Collaborator
Collaborator

Either you leave them as they are and add a "Breathe" in front of the Pull from List activity, so that the default state change back to idle happens before this new state is set. Or you also use a delayed message.

senddelayedmessage(token.agv, 0, token.agv, stateNum);

 

0 Likes
Message 30 of 40

a4225283
Enthusiast
Enthusiast

its didnt work!!sir

0 Likes
Message 31 of 40

a4225283
Enthusiast
Enthusiast

Hi sir, I've solved it now! But I have a question about the code in the `max wait` method of the list retrieval. It currently gives two states, but I want a similar check in the `Switch stop` condition. For example, when it reaches the next workpoint, if the `having task` label is 1, I should give it a state of 55, etc. I have some common sense to modify, but it hasn't worked.

0 Likes
Message 32 of 40

FelixMoehlmann
Collaborator
Collaborator

As far as I could see, all tokens are send to the sink since none of the AGVs have the "stopagv" label set. The Process Flow should otherwise work. You can simplify it a little bit though. When stopping an object, you choose what state it should be in while stopped. So you can use the correct state right away instead of stopping the object and then switching the state again.

moehlmann_fe_0-1762246484979.png

 

0 Likes
Message 33 of 40

a4225283
Enthusiast
Enthusiast

Dear sir

 

I need to calculate how long it takes from when I generate a task to when I find the corresponding car. Can you give me some ideas?

0 Likes
Message 34 of 40

FelixMoehlmann
Collaborator
Collaborator

As I understand it that would just be the staytime of the token on the RGV task list, no?

You can get that (along with any relevant information of the token) with a relatively simple Statistics Collector.

0 Likes
Message 35 of 40

a4225283
Enthusiast
Enthusiast

What if I need data? Can I collect raw data?

0 Likes
Message 36 of 40

FelixMoehlmann
Collaborator
Collaborator

The statistics collector tracks for how long a value (token) stayed on the list. As demonstrated with the "Type" label you can add any information available on the token to the table. What other data would you want to collect?

0 Likes
Message 37 of 40

a4225283
Enthusiast
Enthusiast

a4225283_0-1763452414680.png

a4225283_1-1763452588851.png

 

I want to know which record this data belongs to! How do I do this? Should I give it data.value.item? Or do I need some other syntax?

 

0 Likes
Message 38 of 40

FelixMoehlmann
Collaborator
Collaborator

As far as I can tell all of the items in the model are just named "Box1" and most don't have labels themselves. If the tokens that get pushed to the task list all have the same labels (currentob, Type, ProductType, DEST), then you can use those.

For the pointer values it makes sense to use the name (data.value.currentob.name). The type labels can be used directly (data.value.Type). Make sure that you set the column to the correct data format (double/string).

0 Likes
Message 39 of 40

a4225283
Enthusiast
Enthusiast

I'd like to understand why my model sometimes experiences unusually long stay times. Is it because I can't find the car, or is there something wrong with the logic?

a4225283_3-1763461854148.pnga4225283_4-1763461859804.png

0 Likes
Message 40 of 40

FelixMoehlmann
Collaborator
Collaborator

Well yes, it is because it can't pull an AGV. That is what this measures after all.

If you have doubts that the logic works correctly, observe what is happening in the model. Choose a row with a long wait time. Set a stop time at the time the task becomes available and look at the station where the item is waiting. Then you will see if idle AGVs drive past (which they shouldn't) or it simply takes a long time, because the station is one of the last on a path and previous stations take up all of the AGVs, for example.

0 Likes