Cancel
Showing results for 
Search instead for 
Did you mean: 

Min and Max Values for Store

Pioneer
Pioneer

Hello everyone,

 

i would like to code a method which allows me to run my simulation with a default min and max value for my storage. To be more specific: I would like to have a store with a min of 200 MUs and a max of 1900 MUs.

 

Thanks for your help

6 REPLIES

Re: Min and Max Values for Store

Phenom
Phenom

You can limit the  max value through the x/y/z capacity

 

eg x:=1900 , y:=1,z:=1

 

For the min restriction, you can observe the number of Mus ( numMu  attribute)

 

If this value becomes lower than 201, stop pulling mus from the store

Re: Min and Max Values for Store

Pioneer
Pioneer

Hi,

 

thank you for your quick response.

 

Let me specify my question a little bit. My store has a max capacity of 2000 units (x=10, y=20, z=10). The problems not setting a max value. What I need is that my store is restricted to a max capacity of 1900 while my intrinsic max capacity is 2000. Therefore I need some kind of a method (maybe or maybe not) which allows me never reach my intrinsic capacity. The remaining 100 storage places are some kind of extra (not used) storage place (the 100 places are not use but it is nice to have them in times of overproduction).

 

Min Value: Would the code look something like:

 

if store.numMUs < 200

'stop pulling out of store'

end

 

(I don´t know the right the term, actually in the beginning is really hard to figure out which label to use) Is it possilbe still to fill the store while pulling? Is it possible to set a default value for my min capacity (in my case 200) before starting my simulation, so my min capacity is always at a min of 200 units (maybe with a for-loop)?

 

Thanks

 

 

Re: Min and Max Values for Store

Siemens Phenom Siemens Phenom
Siemens Phenom

Hello,

 

there are several ways to implement those constraints depending on your model setup. One such way would be to set up an entrance control for your store with something similar to the subsequent code:

if store.numMU>1899
	store.entranceLocked:=true
end

For those stations that are requesting parts from the store you could implement the following code as an entrance control

 

if store.numMU<201
	waituntil store.numMU>200
end

You could also set this as an exit control for your store, this again depends on your setting. You can also pull parts from the store while filling it, although that does not happen simultaneously, but sequentially. For your default min capacity it also depends again on the setting of your model. You want to have the store filled with 200 parts as the simulation starts or first fill it in the first moments of the simulation?

Kind regards,

Igor
------------------------------------------------------------------------------------------------------
Did you like the answer? Then click the Thumbs Up button.
Did the answer solve your problem? Then accept the answer as solution


Re: Min and Max Values for Store

Pioneer
Pioneer

Hello Igor,

 

thank for your help.

Re: Min and Max Values for Store

Genius
Genius

Hi Igor!

 

I was working with a similar situation where I wanted to have an initial inventory in the Store. In my case, after the simulation starts the Store is filled one by one up to say 200 units (let's continue this example). 

 

What can be done if we want to have 200 units in the Store as soon as the simulation starts? 

I suppose it would be easy by writing it in the INIT method if the store is connected to a source.However, can it still be done if the Store is somewhere in the middle of the value chain?

 

Thanks,

Sanchay

Re: Min and Max Values for Store

Siemens Phenom Siemens Phenom
Siemens Phenom

Hello Sanchey,

 

yes that is possible. You could write into the init method that you mentioned something similar to this

for var i := 1 to 200
	.MUs.Entity.create(Store)
next

Here the store is filled with the quantity of MUs that you specify as the number of iterations of your loop before the simulation starts. The store is then filled with that number of MUs regardless of its position in your model.

Kind regards,

Igor
------------------------------------------------------------------------------------------------------
Did you like the answer? Then click the Thumbs Up button.
Did the answer solve your problem? Then accept the answer as solution