I am writing my master thesis about a Supply Chain, which I want to simulate in Plant Simulation. I have just started using the programm and I have issues finding the right methods for my Use Case even using the help function of the system and the examples of other warehouse Use Cases.
I want to implement a warehouse, that is receiving 5 different parts from 3 different unloading stations and 1 source. Right behind the warehouse comes an assembly station that assembles all 5 parts into 1 main part. Until now I used 5 different buffers for every part and it worked fine, but it is way more accurate modelling the project with a warehouse.
Here is a screenshot of my model:
I have the following problems with the methods of the warehouse:
1. The different parts shall be allocated in different x locations of the warehouse. For example part1 should be allocated in x=1 and then stored in y direction until the maximum yDim of the warehouse is reached or parts are pulled out into the assembly line. The same for parts 2 to 5 accordingly in x=2 to 5. In fact I don't know how to test if my method works correctly and the parts are allocated in the right x Dimension, but it seems not to work, as more parts of one type than the value of yDim are stored in the warehouse at the same time.
Here is the code of the method, which is located at the entrance control of the warehouse:
is x:integer; y:integer; do if @.name="Türen" then x:=1; for y:=1 to lager.yDim loop if lager.pe(1,y)=void then @.umlagern(lager.pe(1,y)); end; next; end; if @.name="Motoren" then x:=2; for y:=1 to lager.yDim loop if lager. pe(2,y)=void then @.umlagern(lager.pe(2,y)); end; next; end; if @.name="Karosserie" then x:=3; for y:=1 to lager.yDim loop if lager. pe(3,y)=void then @.umlagern(lager.pe(3,y)); end; next; end; if @.name="Räder" then x:=4; for y:=1 to lager.yDim loop if lager. pe(4,y)=void then @.umlagern(lager.pe(4,y)); end; next; end; if @.name="Nachfrage" then x:=5; for y:=2 to lager.yDim loop if lager. pe(5,y)=void then @.umlagern(lager.pe(5,y)); end; next; end; end;
For me the method makes sense because I am setting a locked x Dimension to every part and let the parts transfer in y Dimension when a place in the warehouse is empty. But I seem to be very wrong :-D
1. The assembly station shall draw the parts from the warehouse as soon as one MU of every part is in the warehouse. The assembly list is set as follows:
part3:1 and so on...
But now that I have switched to a warehouse this doesn't work anymore. I'm trying to code the methode in a Double-loop. First the method shall search in x=1 for a part which I allocated in x=1. If a part is found it shall transfer it to the assembly station, exit the "for y:=1 to lager.yDim loop" and continue the process for x=2. But this method doesn't work either, the assemly station doesn't receive any parts from the warehouse.
Here is the code of the method that is located at the entrance control of the assembly line:
is x: integer; y: integer do for x:=1 to lager.xDim loop for y:=1 to lager.yDim loop if lager(x,y).belegt then @.umlagern; exitloop; end; next; next; end;
I hope you can help me with this problem.
Solved! Go to Solution.
freelance simulation specialist
From looking at this part of the model I can see a issue that you will have. You are moving the MU using the move command from within the entrance control, which will trigger the entrance control. After testing it (implemented the change Steffen_B recommended) I found that the call stack filled up, so to change that you can disable the entrance control before the move and re enable it after the move, like shown bellow.
lager.EinSt := ""; @.umlagern(lager.pe(1,y)); lager.EinSt := "Lager_Eingang";
Issue this how is now apparent, when you run the model the part is entered into position [1,1] and from there your entrance control moves it to the correct location based on its type, meaning if the part belonged in cell [1,1] then it will be moved to the next free cell (had to add a small flag to do this, if not it fills from [x,500] to [x,1] as the loop keeps on moving the part further down the warehouse).
To allow all of the spaces in the store to be used, I recommend putting another object like a singleproc (Einzelstation) in front of it and use the entrance control from that to move the MU into the warehouse (to act as your store man in effect) and putting MU's into there and not the warehouse from your transfer stations. Doing this and removing the entrance control from the warehouse will also solve the previous issue.
Thank you very much for your answers.
I have now completed the Inbound-method and it aligns the pieces as I wanted them to be aligned.
x=1 (for y=1 to 500 is my part1)
x=2 is part2 etc. (to part 5)
I still have some trouble with the Outbound-Logistik of the warehouse though.
I have found a model on the website from Steffen Bansow where chaotic warehousing is shown. My idea was to use the same method for my outbound logistic searching for parts in a special order ("Zyklustabelle") and then moving them out of the warehouse and into the assembly station with the help of containers. The following Code is used:
is x:integer; y:integer; part:string; found:boolean; do --look for the next partName in the cycleTable part:=Zyklustabelle[1,Zyklustabelle.position]; --look for the part in the stock of the warehouse Lagertabelle.setCursor(1,1); found:=Lagertabelle.find(part); if found then -- read coords from stock x:=Lagertabelle["X",Lagertabelle.cursorY]; y:=Lagertabelle["Y",Lagertabelle.cursorY]; --delete row in the stock-table Lagertabelle.cutRow(Lagertabelle.cursorY); -- increase position in cycle if Zyklustabelle.position = Zyklustabelle.YDim then Zyklustabelle.position:=1; else Zyklustabelle.position:=Zyklustabelle.position+1; end; --take part put from warehouse Lager.pe(x,y).cont.move(Förderhilfsmittel); end; end;
The message now shown is that the identifier "position" is unknown. So the parts are not moved out of the warehouse until it is full.
Why does this error appear and how can I solve it so that my 5 different parts are moved to the container (which is generated in a source after the warehouse) in the specific order given in the "Zyklustabelle"?
I have attached my model, thank you for your help.
Looking at it, the posistion is not avalible as it does not exist, I am guessing that instead you will want CursorY. This is probably as it is meant to be a different data structure and not a Table but for now this is what you can do to change between them.
The method for the exit is called while there is no parts in the stores, so this cant be checked but it should not be much of an issue.
Inside the exit method (Lager_Ausgang) you have got x:=Lagertabelle["X",Lagertabelle.cursorY] and the same for Y but when i check the table there is no column headers in use so this would cause another crash. You got to either enable column headers for the table and put in the headers exactly as they are in your code or to change your code to use column numbers instead.
Hope this is of some help.
freelance simulation specialist