/* called by: entrance ctrl of the object 'track' V. C' k; {. y: j
*/
5 |- _3 j; h! His
: A r$ o" r: R; Q part, GlobalDistObj, assignLObj:object;row,Lan:integer;
; m0 t# Z. G4 N n6 e$ N Sdo
3 w$ K2 ?1 K5 d* t9 ? Lan := rootfolder.Internal.Tools.AOLlanguage;
. m W: W( E4 ^0 m% v2 q* S1 M if current = @.Destination -- else return
. f5 c+ ~! B2 W6 N+ m3 k; u then3 u$ b% [* m! \$ o% }8 {
@.Destination := void;
1 `8 y, [6 Z: g if @.occupied then
( U3 x, h, x2 F" A9 ^# ~ part := @.cont;
g$ K1 C$ P0 {4 E$ \ @.transpOrder := void;
6 y: Y0 Y0 i; {# J0 p# J part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
: H( ?. |% q) K2 f' H; A @,root.eventcontroller.simTime);( h" d [- w+ C! E" h6 w) ^
@.HasOrder := false;0 p0 u9 m3 |; v" s, }
@.DrivingHome := true;
7 ^! s. {! \* Y2 E3 J3 L rgManager.tryToStartTransOrder;- l1 ^) N; N/ a8 H' t
if @.Destination = void
0 o+ T: L, f4 H: T I then -- no transport order for vehicle @7 Y, \ g# }4 j
@.Destination :=
$ ]% S& Y4 F* Q4 ~2 i- `. P0 j rgManager.nearestFreeStation(@,track.~);# I# Z. Y1 A# H+ A* `
newDirection(@); # y' W/ p/ [3 J) B0 j
if @.Destination /= void then
9 K' S5 a9 V/ ^1 P$ w3 e @.Destination.NumReservation :=
: w% L5 z+ G9 A+ {# |0 x. G @.Destination.NumReservation + 1;" \ E [8 L4 N1 Q! R5 a
end;
4 d. Z/ u- w5 X% I& Q @.CurrIcon := "drivingHome";7 Q/ S; Z' @& f# m6 V% w
@.DrivingHome := true;
& G$ _/ V$ }9 |6 }. J5 Y$ q end;0 z- M) W: b% m4 m' ~
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
! \0 C" q! \9 W$ {& z5 v part := @.transpOrder;' q' T/ X1 r, J8 Y+ j
part.move(@);-- load part
2 i; H% Q8 O8 B4 M* X- d' }! n6 V @.CurrIcon := "load";
3 A# B" w) ]6 G h GlobalDistObj := part.globDestination;
( Y6 s: x C* g" S' t; W( u assignLObj := rgmanager.rgAssignL;0 f# T# b/ q* Y! E2 s' N6 h
row := assignLObj.getRowNo(GlobalDistObj);. h' k# X8 } E$ E2 Y' Q
if Row = -1 then -- since 70" T$ v7 ~! q/ R @, @+ Z
if lan=1 then- j$ u: s- R8 D/ G2 u, B
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
" q% T% t V% }8 }. w to_str("in der Andockstation: \"",?.~.name,"\""));
' G) J s2 d* N) I7 S! x else3 Q0 n: {; X$ v: @% g
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
. |0 \, y) N' s2 |( p/ x, | to_str("in docking station: \"",?.~.name,"\"")); : J# e7 N. w8 ^7 Y
end;
. k5 s5 W1 I2 F4 N else
( p3 N0 [1 ?: [* ] R! K( e h @.Destination := assignLObj[1,row];
! u; W; T' Y6 T$ N5 ? end; 0 _3 L/ ?, [5 B: k: N; b
newDirection(@);1 Y M4 U5 X/ }! D
@.HasOrder := true;3 M* N' r( b$ x" C% S1 G
end;
! E) Z3 P3 ~$ r end;1 [7 n; I4 E. e8 ^: M5 s7 `) M: v' m
end; -- of the method& o N( P* @. l) n- x; M* |
|