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.
Solved! Go to Solution.
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'?
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
can you please provide the simulation model?
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 ... ... ...
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.