1. One Container from Line2 can only be attached to one Part in the "Assembly" machine. The model is blocked, but I don't how to solve this problem.
2. The capacity of each buffer is 9. Normally, two buffers are full of MUs. For example, if one ContainerA appears in Line2, a PartA from BufferA goes to the "Assembly" machine. Further, if there are less PartA in the buffer, compared with the number of PartB in BufferB, Line1 is called to make one PartA. I am not sure which code I can use. I am a beginner of Plant Simulation. Does anyone know any code please?
Thanks for your help. I use Plant Simulation V12.0.
Solved! Go to Solution.
if you want to assembly one PartA on ContainerA and one PartB on containerB you need to change the assembly list (MU types) of the assembly station depend on the name of the container you create.
You can extend your method runPartType (and you should run it as a entrance control before actions of the assembly station):
is do local assList:table[string,integer]; assList.create; If @.Name = "ContainerA" then .MUs.PartA.Create (Line1_SP); assList[1,1]:="PartA"; assList[2,1]:=1; assembly.assemblyList:=assList; else .MUs.PartB.Create (Line1_SP); assList[1,1]:="PartB"; assList[2,1]:=1; assembly.assemblyList:=assList; end; end;
To fill your buffers the first time you could use a method with the name init. This is called at the start of the experiment:
do while bufferA.full=false loop .MUs.PartA.create(bufferA); end; while bufferB.full=false loop .MUs.PartB.create(bufferB); end; end;
freelance simulation specialist
Thansk for your reply. I add a MU type table in the Assembly machine. It works now, thank you.
For the second question. My idea is that Line1 produces 9 of each parts at the start of the work every day. Those parts wait in the buffer until a container comes in Line2. If it's ContainerB, PartB goes to "Assembly". After a working period, there might be less PartA in BufferA than the number in BufferB. Then, Line1 automatically produces PartA. It's difficult that I know how to make it work. I hope I make it clear.