question

Herwina Richelle Andres avatar image
0 Likes"
Herwina Richelle Andres asked Sam Stubbs commented

Opening/Closing Output via Sending Message

sample-plane2-autosave.fsm

Hi!

The process flow is as follows:

Entities are coming in as units from "Source_Job" going into "Queue3" then to combiner "Pre". Pallets are coming in from a separate source, "Source_Pallet". 10 minutes will be spent in packing the units then will be separated by "Separator2" where each unit will be processed individually on "Processor3". All processed units will be accumulating in "Queue4" and will be packed again in "Post" for 10 minutes then proceed to "Sink_Jobs".

"Pre" would only accommodate a new batch of entities once the previous batch has exited on "Post" and that "Post" would only accept a pallet once all the units has accumulated in "Queue4". This is to eliminate accumulating period on Post and prevent Pre from accepting new jobs while the previous is still being completed. The constraint is that there is only one job at a time existing in the whole plane.

I am trying to control the port on "Source_Pallet", wherein it would only release a pallet once triggered. Triggers would be for "Pre" after the previous job has exited the "Post" and for "Post" once the desired units have been accumulated in "Queue4".

This is how I'm looking to approach the situation. There could be other efficient ways to achieve the same objective.

Hope to hear from you!

Thank you.

Best,

Herwina

FlexSim 7.5.4
openoutput
5 |100000

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

1 Answer

·
Sam Stubbs avatar image
1 Like"
Sam Stubbs answered Sam Stubbs commented

I tried to create an example model that accomplishes what you are asking. I apologize, I had to separate out your objects from the plane to understand the connections. I also removed any logic that was on them and am only simplifying to the triggers you were talking about.

I'm attaching my example below. Essentially what I did, was put an OnExit trigger on your Source_Pallet, that closes the output after every pallet. That port is then reopened by triggers on Pre and Post as you described. Finally in order to get the batching, I simply added batching (of 5) to Queue4. Let me know if this is along the lines you were thinking, or if it still did not address your question.

sample.fsm


sample.fsm (30.4 KiB)
· 4
5 |100000

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

Herwina Richelle Andres avatar image Herwina Richelle Andres commented ·

lot-flow-1.fsmHi @Sam Stubbs .

Thank you for your response.

I have somehow revised your model to perform the 1-job policy. Meaning there should only be 1 job should be in the system from Pre to Post.

Here are the revisions made.

1. Removed openoutput triggers from Pre and Post.

2. Renamed Source_Pallet into Source_Pallet_Pre and added Source_Pallet_Post instead of using one source pallet for both pre and post.

3. Used closeinput for Post on Reset and on Exit.

4. On EndCollecting of Queue4 triggers openinput of Post.

5. OnEntry of Queue15 triggers openoutput for Source_Pallet_Pre.

Now, I will be incorporating the whole system into a plane and would need to set the state of each activity onto the plane. Blocked pallets are not to be accounted. Main activities to be integrated are as follows:

Fixed Resource | Activity | State to be Used

PRE | Processing | PRE

PRE | Waiting for Operator | Waiting for Operator_PRE

Processor3 | Processing | PROCESSING

Processor3 | Waiting for Operator | Waiting for Operator_PROCESSING

POST| Processing | POST

POST | Waiting for Operator | Waiting for Operator_POST

0 Likes 0 ·
lot-flow-1.fsm (31.1 KiB)
Sam Stubbs avatar image Sam Stubbs ♦ Herwina Richelle Andres commented ·

Based on what you were saying, I added all the objects back into a plane and created some custom states on the plane. (For more information on creating custom states, check out this link here.) I then added some custom code in the Pre and Post combiners, in the Pick Operator section.

setstate(node("Plane17", model()), CustomState_Waiting_For_Operator_PRE, 1);
senddelayedmessage(current,0,current,1);

This is the command to set the state of an object. (Using custom made Global Macros to define which number the CustomState_etc. represents, in order to reference that specific state in the command.) This code sets the state to Waiting for Operator, once the object has enters the Pre station. Then sends a delayed message to itself, and on the OnMessage trigger it sets the state to PRE once the Pre station starts processing.

We then set an OnEntry Trigger to the Processor to set its state when objects enter. (Because there is no Operator option for Processor3, we didn't need to use the PickOperator code.

And finally we added the same setup of code to the Post combiner as is on the Pre combiner, in order to get the Waiting for operator states. Then we just added a chart to a dashboard to record these states. (The custom states for the plane we put under the name System State, as opposed to the default setting.)

Here is your model below. Take a look through it and see what we added, and how it was done.

3469-lot-flow-1.fsm

1 Like 1 ·
3469-lot-flow-1.fsm (32.1 KiB)
systemstate.png (13.1 KiB)
Herwina Richelle Andres avatar image Herwina Richelle Andres Sam Stubbs ♦ commented ·

lot-flow-1-plane-customstate-2.fsm

Hi @Sam Stubbs! Thank you for the immediate feedback.

I appreciate the added link you have provided to learn more about setting up the custom state.

My question now would be on the jobs being processed. How do I control the inputs?

As shown from the snapshot, Source_Job contains the arrival schedule of the jobs to be processed by InPROCESS. There are 5 jobs of three different itemtypes, each having different quantities.

1. On PRE

I am trying to accept the jobs in the same sequence as stated in the Arrival Schedule. A change in itemtype would require a different resource (technician) and would take longer PRE time (20 minutes). Else, it would use call for the operator and will take 10 minutes.

It is important to track how many itemtype changes that occurred within the period. GlobalVariable?

2. On InPROCESS

Each ItemType would have a different processing time.

Global Table: InPROCESS and POST

3. On POST

Each ItemType would have a different POST time

Global Table: InPROCESS and POST

Thank you for the help!

Best,

Herwina Richelle Andres

0 Likes 0 ·
Show more comments

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.