Decide depending on the state (full or empty) of a fixed resource.

Decide depending on the state (full or empty) of a fixed resource.

jose_ignacio_mn
Not applicable
151 Views
3 Replies
Message 1 of 4

Decide depending on the state (full or empty) of a fixed resource.

jose_ignacio_mn
Not applicable

[ FlexSim 19.1.0 ]

Hi everybody,

I am working with a simulation that is giving me some problems. There is a transporter who is moving batches of boxes to a Separator1. After the separator1, there is a Processor1 and a Combiner1.

What I would like to achieve: when the first batch come, I would like the transporter to unload the batch and then, before releasing, to wait until the processor1 finishes to process all the boxes (PICTURE 1).

However, if it is the second batch the one is coming, the previous batch will be ocuppying the Combiner1, so I would like to release the Transporter, as in other PF I will order to take the first of the batches (PICTURE 2).

I attach some pictures to make it clearer and to show how I tried to do it unsuccessfully.

26355-case-1.png

26356-case-2.png

I was looking for a solution and I thought that setting a "Decide" Acitvity in function of the input port of the combiner would be ok. But it is not working as you can see in the .fsm file.

26357-decide-settings.png

I wonder if someone could help me in this taks, as I have been thinking about it during a long time and I can not find a propper solution.

problema-3.fsm

Thanks in advance.

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

braydn_t
Not applicable
Accepted solution

@José VM

I am a little unsure about exactly what you are trying to accomplish. Here is my understanding:

If the combiner does not have items on the pallet, the forklift should wait by the separator until it does.

If it does have items on the pallet, then it should release.

If that is what you are looking for, then open the decide, and go to the edit code window and put this in:

if(Model.find("Combiner1").subnodes[1].subnodes.length > 1){
	return 2;
}
return 1;


 
Message 3 of 4

benjamin_w2
Not applicable

Hi @José VM,

Was Braydn's answer helpful for you? If so, can you please click accept? If not, how else can we help?

0 Likes
Message 4 of 4

Matthew_Gillespie
Autodesk
Autodesk

@Braydn T your code throws an exception if there is no pallet on the combiner. You should check that the combiner has a first sub node before going down two levels.



Matthew Gillespie
FlexSim Software Developer

0 Likes