Showing results for 
Search instead for 
Do you mean 
Reply
Solved! Go to solution

create initial stock

Hi,

 

I am new to plant simulation and using it for my university project. I have created a small model and am trying to create initial stock for three parts : Part1, Part2 and Part3. I have defined the maximum stock for the 3 parts in the user defined attributes of the warehouse and want to create stock upto these levels. What should i write in the method Init to do so?

 

I am attaching a photo to explain the same.

4 REPLIES

Re: create initial stock

Why don't you use a source object attached to your warehouse with

"mu selection" set to sequence

and a table -object where you define Part1..Part3 max stock

Re: create initial stock

Hi, 

 

Thanks for the reply.

 

This model is actually a test model. However, in the actual model where i would be working as my project, there is a source that creates parts randomly which will then be processed. The processing times and setup times are important for the project and will be different based on part attributes. I would calculate the throughput times for every part that comes into the inventory and then the parts will be pulled from the store using a method. That is why i wish to create initial stock. 

 

I hope this helps.

 

 

Solution
Solution
Accepted by topic author TR_21
‎10-07-2016 10:22 AM

Re: create initial stock

[ Edited ]

try this

 

var i: integer

for i:=1 to Lager.maximumnumstockpart1 loop
	 .BEs.Part1.erzeugen(Lager)
next

for i:=1  to Lager.maximumnumstockpart2 loop
	obj:=.BEs.Part2.erzeugen(Lager)
next

for i:=1  to Lager.maximumnumstockpart3 loop
	obj:=.BEs.Part3.erzeugen(Lager)
	next

Re: create initial stock

Thank you so much

 

the code worked with some minor changes: 

 

var i: integer

for i:=1 to Lager.maximumstockpart1 loop
.BEs.Part1.erzeugen(Lager)
next

for i:=1 to Lager.maximumstockpart2 loop
.BEs.Part2.erzeugen(Lager)
next

for i:=1 to Lager.maximumstockpart3 loop
.BEs.Part3.erzeugen(Lager)
next