question

Mojtaba E2 avatar image
0 Likes"
Mojtaba E2 asked Ryan Clark commented

How we can create 2 "Conditional Transport" for a fixed resource?

Port 1 >>> Transport 1

Port 2 >>> Transport 2

FlexSim 21.2.0
transporttransportation
· 1
5 |100000

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

Ryan Clark avatar image Ryan Clark commented ·

Hi @Mojtaba E2, was one of Allister Wilson's or Mojtaba E2's answers helpful? If so, please click the "Accept" button at the bottom of the one that best answers your question. Or if you still have questions, add a comment and we'll continue the conversation.

If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always unaccept and comment back to reopen your question.

0 Likes 0 ·
Mojtaba E2 avatar image
0 Likes"
Mojtaba E2 answered Allister Wilson edited

It's OK

I found it

Capture.JPG


capture.jpg (51.2 KiB)
· 1
5 |100000

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

Allister Wilson avatar image Allister Wilson commented ·

Glad you found a solution.

Assuming you actually only have 2 output ports (ie: there's no "conditional" to your transport behaviour, you just want to select the correct transporter) you could also just slightly modify the default value of the transport field.

By default the field contains current.centerObjects[1].

You could instead use current.centerObjects[port] to always select the transporter connected to the same port number as the item is exiting through.


0 Likes 0 ·
Allister Wilson avatar image
0 Likes"
Allister Wilson answered Allister Wilson edited

Assuming your goal is to use several conditions / select different transporters depending on those conditions, you can either :

Use the existing Conditional Transport pickoption :
The condition field can contain any condition you want, including multiple conditions combined with logical ORs ( manual: Writing Logic in FlexSim ), maybe in this case your condition could be something as simple as port <= 2 though.
The Transporter field can also select the desired transporter based on the same (or different) conditions, given you seem to only want 2 cases the ternary operator could help you here ( manual: Writing Logic in FlexSim ), or if you just want to base it on the port number you could use the following expression to select the transporter connected to the same center port number as the item is exiting through : current.centerObjects[port].

Or alternatively if your conditions are more complex, you can edit the code of the Conditional Transport option to better fit your needs by clicking on the button pictured below :
1634545015398.png


If this doesn't answer your question, please post your model or a simplified model demonstrating your exact problem for a more specific answer.


1634545015398.png (24.4 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.

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.