Cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted

Number of MUs in container

Dear community,

 

one simple question: how can i count the number of MUs present in a container that is partially full?

I need to do a cycle with the correct number of MUs (not capacity of the container) to unload the right amount.

I've tried with attribute explorer and in particulare with numMu and numMuParts but they all give back the capacity of the container and not the real number of place occupied.

Thanks a lot.

7 REPLIES 7

Betreff: Number of MUs in container

Siemens Phenom Siemens Phenom
Siemens Phenom

Hi francescopoli,

 

the attribute 'container.numMu' gives you the real number of movable units in a container.

 

What do you mean with 'the real number of place'?

 

Regards

GG

 

Regards
GG

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

Betreff: Number of MUs in container

Dear GG,

 

my container contains 12 free place each; sometimes, when at the end of the lot, the container can have some free places, for example the last lot can be 8 MUs so 4 places are free.

When it comes to a simtalk coded dismantlestation i've done a method

 

if @.cont.mutype="Fibbia"
	for var i:=1 to @.numMu
		print @.numMu
		@.cont.OP:=@.cont.OP+1
		@.cont.move(?.succ(1))
	next
	@.move(?.succ(2))
elseif @.cont.mutype="Tiralampo"
	for var i:=1 to @.numMu
		print @.numMu
		@.cont.OP:=@.cont.OP+1
		@.cont.move(?.succ(1))
	next
	@.move.succ(2)
elseif @.cont.mutype="Moschettone"
	for var i:=1 to @.numMu
		print @.numMu
		@.cont.OP:=@.cont.OP+1
		@.cont.move(?.succ(1))
	next
	@.move(?.succ(2))
end 

but @.numMU gives me back i:=12 and not, as the example above, i:=8.

Thanks a lot

 

 

 

Betreff: Number of MUs in container

Siemens Phenom Siemens Phenom
Siemens Phenom

Hello francescopoli,

 

can you please provide the simulation model?

 

Regards

 

GG

Regards
GG

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

Betreff: Number of MUs in container

Dear GG,

 

the model is in attach: the frame is slegatura and the method is opened with a breakpoint.

Thanks a lot.

Betreff: Number of MUs in container

Experimenter
Experimenter

Hi,

 

there was no attachment added.

 

Why do you put the "print @.numMU" in the loop? Would put it outside.

 

You can also use a different loop like:

 

while @.empty = false 
...
...
...

Betreff: Number of MUs in container

I've added the model, don't know why did not take the first one.

i put  "print @.numMU" in the cycle to see which is the number of MU when the model stops.

Hope it'll be in attach this time.

Betreff: Number of MUs in container

Siemens Phenom Siemens Phenom
Siemens Phenom

Hello francescopoli,

 

as far as I can see, your model runs well.

 

But there is one bug in your method:

In line 16 of the methode you write: @.move.succ(2)

You have to write: @.move(?.succ(2))

 

Hope this will help.

Regards

GG

Regards
GG

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