question

tommyhsu avatar image
0 Likes"
tommyhsu asked Natalie White commented

Shared processor constraint and output defination to next flow

I have three process A,B,C, each only have one machine, and the process flow would be A->B->C->B->Queue, I would like to define that C input must already finished A and Queue only can accept that finished C, B is restricted resource(but no need any constraint, first available), how can I setting the A,B,C, if this need process flow ? or Custom code to process it, need support, thanks!

1690440729158.png

FlexSim 23.1.2
shared machine constraint
1690440729158.png (86.5 KiB)
· 2
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 ·
This looks exactly like an exercise I would ask students of my faculty to build a model for. Nice try to let experts doing your exercise. There exists a philosophy of academic integrity here at FlexSim. We help if you can describe what problems do you have. First it would be nice to see what efforts you undertook. There should be some logic elements with labels getting evaluated and set while your model runs.
0 Likes 0 ·
Natalie White avatar image Natalie White commented ·

Hi @tommyhsu, was one of Joerg Vogel'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 comment back to reopen your question.

0 Likes 0 ·
Joerg Vogel avatar image
0 Likes"
Joerg Vogel answered tommyhsu commented

Set a label value on creation that will be evaluated in Send to Port in Processor B. Matching with your conditions: items leave to output port number 2 directly others are sent to output port number one. In a trigger in Processor C you set this label value to be able to be sent to output port number 2 in processor B later.

· 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.

tommyhsu avatar image tommyhsu commented ·

Thanks.

0 Likes 0 ·
Joerg Vogel avatar image
0 Likes"
Joerg Vogel answered

In a Case, where you are not allowed to change first available Send To Port option, you have to create a scenario that restrict access to available input ports. You can do this by closing the input of objects. If an item must enter other_ABCB_Process then you close the input After_first_B if an item enters process B by input port number. You can do this in triggers or upon an event called On Entry of processor B.
Conditions are involving a logical comparison of equality by == .

In a trigger of OnEntry an involved port number is declared by a local variable called port. If you want to get reference of an Object you use a sampler tool in the source code window looking like an eye dropper.

closing and opening of an input is a method of Object Flexscript class API.

if you write source code in a trigger please look for structures in the library tool panel, which you can double click or drag into your code.

5 |100000

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