Cancel
Showing results for 
Search instead for 
Did you mean: 

How to find out what position in the transporter a mu is stored

Builder
Builder

How to find out what position in the transporter a mu is stored?

 

Example:

Transporter capacity = 12

Transporter.xDim = 12

Transporter.Ydim = 1

 

if There´s a mu stored in the position 6 (transporter.contentslist[6,1]), How to identify it through a method?

is there any attribute to catch this information?

 

 

4 REPLIES

Re: How to find out what position in the transporter a mu is stored

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor
to locate a MU on the transporter you can use: <mu>.getStoragePlace(x,y)

to access the MU on a place:

<transporter>.pe(x,y).cont

Steffen Bangsow
freelance simulation specialist  
web: www.bangsow.eu
mail: steffen@bangsow.net

Re: How to find out what position in the transporter a mu is stored

Builder
Builder

in the plant sim v.12 I did not find the function "mu.getStoragePlace(x,y)", is it available from v.13?

 

in the case, the mu is placed in some unknown position of the transporter. I need to identify the x,y position where it´s stored (through method).

Re: How to find out what position in the transporter a mu is stored

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor
getStoragePlace is new in version 13.1

you could try a search algorithm e.g.

local i,k,x,y:integer;
for i:=1 to transporter.xDim loop
for k:=1 to transporter.yDim loop
if transporter.pe(i,k).cont /= void and transporter.pe(i,k).cont = yourMU then
x:=i;
y:=k;
exitLoop 2;

end;
next;

next;

Steffen Bangsow
freelance simulation specialist  
web: www.bangsow.eu
mail: steffen@bangsow.net

Re: How to find out what position in the transporter a mu is stored

Builder
Builder

Good!!!

 

Thanks a lot!