/* called by: entrance ctrl of the object 'track'4 n w f) h8 q+ V# q+ A
*/
. f/ z# J) v( Ais
/ b- O2 }. |! S3 i! ^# m part, GlobalDistObj, assignLObj:object;row,Lan:integer;
+ C; I+ Y o; Mdo
! | m8 k9 m/ ]+ |+ U" d, f0 \ Lan := rootfolder.Internal.Tools.AOLlanguage;% I$ E2 ]9 |5 [0 Z3 |) R* g
if current = @.Destination -- else return
9 ^) V4 z! V& T' X8 I, O$ J then9 x5 H/ G: s- i5 g. V
@.Destination := void;
5 _; e) l- t0 B* V if @.occupied then5 u r' _4 e* ^, `. r9 z5 x; ^6 P
part := @.cont;0 T# O* T6 @9 V' e$ J
@.transpOrder := void;9 Z _: W2 a8 @1 `4 |( Y
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
+ Z$ {; E' V z; G# ?( O @,root.eventcontroller.simTime);
0 l2 p, I2 x) n5 b @.HasOrder := false;8 t: V; I, G( N$ m8 D( ]- b
@.DrivingHome := true;$ i9 J9 c' x+ T# N
rgManager.tryToStartTransOrder;; _/ @: }5 M; h/ y% ~
if @.Destination = void
; N3 w. `- {3 d! U X* | then -- no transport order for vehicle @& @2 j4 ]& ?" Q& ~
@.Destination :=
$ Y s; Y* ?% g1 f' A; b7 E- R1 m rgManager.nearestFreeStation(@,track.~);7 f7 ^ R5 w( ^. l) h6 L1 u
newDirection(@); . a/ @. c* Z) U o1 N; S
if @.Destination /= void then
- S" ~/ n% ^* R @.Destination.NumReservation :=
1 {+ j& X/ p' y' R9 k" i9 J @.Destination.NumReservation + 1;
& {9 ^. b( l7 @4 o! F end;" W2 d4 j+ a- m, S, Y
@.CurrIcon := "drivingHome";4 M4 A% R: G* ^9 m
@.DrivingHome := true;0 l" b, `6 r) k2 c) `' d
end;7 L7 w2 ` K4 K" O* e
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
- K, @8 T* g- n part := @.transpOrder;
. L- R1 @" ^6 s6 q8 Z8 j9 ?) S part.move(@);-- load part
( h9 w2 @+ [! \2 `2 q+ v* k; e @.CurrIcon := "load";6 Q: ?' a! [" b7 e# t; V9 R
GlobalDistObj := part.globDestination;
+ a3 Z6 |) ~: C9 b1 A( R2 n& X; T assignLObj := rgmanager.rgAssignL;
0 _- S! J3 l V8 X x# T row := assignLObj.getRowNo(GlobalDistObj);/ N, D$ n( e- ]5 O; j* r& A
if Row = -1 then -- since 70' D( X1 f7 B% v! [9 E6 |2 W* Y
if lan=1 then7 v% \+ q, z* H
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
9 I; b" _9 u# S8 i to_str("in der Andockstation: \"",?.~.name,"\""));2 Y; k! n2 j& a3 n& `* Y W5 z
else
5 {4 ~$ |. t0 A1 B$ Q1 ^ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),3 w `1 r# e6 f/ {9 L
to_str("in docking station: \"",?.~.name,"\"")); % X$ S2 d2 i' q
end;6 |. s# f5 V7 B# } t
else& g$ K1 |' M" n- D
@.Destination := assignLObj[1,row];
$ m9 @: T+ v4 z" w end; 5 ?$ I1 |! ^( ^6 D2 Y( i
newDirection(@);: L0 o6 n6 g7 V5 K
@.HasOrder := true;4 c0 ^: Y) M* U8 d
end;) a4 ], P. K$ c5 m: M* k3 c' W
end;" [- U/ u9 ]+ Q2 H; A; _
end; -- of the method
& }# f; H1 q# w- h$ W |