question

Michael D6 avatar image
0 Likes"
Michael D6 asked Sebastián Cañas commented

Shared Processors

Example Model Resource.fsmAttached is a model that I could use some help to understand better. I made this to demonstrate a simple example of what I want to learn. I have two sources that produce a different colored box. They are sent to queue2 and queue3 based on a random distribution. They then need to be directed to an assigned processor group while waiting in the queue until the processor is available and when complete at the processor all red to the red queue and all green to the green queue. I am having issues with the move and resource allocation. Any help with this model is appreciated.

processorshared resources
5 |100000 characters needed characters left characters exceeded

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

· Write an Answer
Sebastián Cañas avatar image
0 Likes"
Sebastián Cañas answered Sebastián Cañas commented

Hi @Michael D6 ,

The error you got is because you're not referencing properly the Flowitem's label within the last Decide: current.outObjects[item.ProductType].

current.outObjects[#numberofoutputport#] this would mean the object connected as output port depending on the number you have. In this case you don't have anything connected, thus there isn't even a reference to the current object.

Instead I used a conditional decide as shown below:

1631645744422.png

The issues you were facing with the movement of flowitems are mainly because of the lack of synchronization between the events happening in the Process Flow and in the 3D model. I highly recommend you to follow the recommendations in this link of the user manual: https://docs.flexsim.com/en/21.2/ModelLogic/AdditionalConcepts/TroubleshootingProcessFlows/TroubleshootingProcessFlows.html#keywords

I modified your model, in order to have the logic that more or less I understand you want to have. The most important changes are the Wait for Event, which I used so that the token will hold until the process is finished in the processor and the Breath activity, that is a Delay with value 0 so that the tokens waiting for process won't be released all at once. I attached the model. example-model-resource-modified.fsm


· 2
5 |100000 characters needed characters left characters exceeded

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

@Sebastián Cañas this is really helpful, thanks for the revised file and tips. In the event I have more than two "color" boxes, the conditional decide would not necessarily be applicable unless stacked on top of each other. What would be the appropriate decide in that case?
0 Likes 0 ·

@Michael D6 Giving the case you have more than two types of flowitems you could still use the Decide activity, but you would rather use the Connector By Case.

1631648586315.png

The Case Function in this situation would be the token.item.Product Type. The Case would be the value the flowitem has in its label and then you write the number of the connector that send to the desired destination.

More information about this activity can be found here: https://docs.flexsim.com/en/21.2/Reference/ProcessFlowObjects/Basic/Decide/Decide.html#overview

If you are still not familiar with Port Logic you can find more info here: https://docs.flexsim.com/en/21.2/ConnectingFlows/Ports/CreatingPortLogic/CreatingPortLogic.html#type

Very welcome!

0 Likes 0 ·
1631648586315.png (30.0 KiB)

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.