/* called by: entrance ctrl of the object 'track'; F# a& {, z! j
*/8 q' x& i v+ m% }
is7 j# ]4 \! i( ~" Q- ~0 Z' ^
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
1 P/ m5 }! V a) O& mdo
]- a9 @6 t$ Q/ J$ [$ P Lan := rootfolder.Internal.Tools.AOLlanguage;
3 p3 B' F2 |4 \2 e7 v- X if current = @.Destination -- else return
' K' F S+ d( F( O8 n) B# @' ] then. A- w# R2 @- g9 E6 T1 l( g
@.Destination := void;9 a5 A* a0 ~9 e s
if @.occupied then
9 n0 n$ C( _% e% b6 i part := @.cont;# u1 s, l5 {2 Q9 a& b
@.transpOrder := void;, N) }2 y8 S) w9 U( v9 f
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,1 N6 j6 y) J2 F6 i% _% \
@,root.eventcontroller.simTime);9 m3 _3 u! p) ~3 D: E2 _ a1 C
@.HasOrder := false;- R$ b* {2 H& b! K) I
@.DrivingHome := true;# |# R# N- u5 _, T
rgManager.tryToStartTransOrder;- M4 p! Y+ R8 d6 A
if @.Destination = void
; U) N1 s+ u; |* u4 U6 P8 g' t then -- no transport order for vehicle @, V5 B& b8 D4 L. j: @/ f; s
@.Destination :=6 @! ]# F6 i \* M8 s
rgManager.nearestFreeStation(@,track.~);
! g& Q! p) Q5 x newDirection(@);
. c. v5 J9 q5 X: N. v3 \5 z5 i if @.Destination /= void then
: r3 ~3 h' V) I; v @.Destination.NumReservation :=
R$ n& d. N$ V. Y @.Destination.NumReservation + 1;# c! K& ^0 ^6 ]7 f( q& h( N
end;: e2 ]% k! k" Z5 F
@.CurrIcon := "drivingHome";- c x& O" r; `) F
@.DrivingHome := true;
! o- G6 d" k. [2 J: z+ _" V ^3 a0 O end;! B' K! r& g: H% q, \
else -- the vehicle @ is empty, both vehicle and part are in the same dock station3 x* i& i; }3 f3 B/ I. c2 T
part := @.transpOrder;# K$ v1 q `' }! K$ i% N
part.move(@);-- load part
# x7 w C* n. n3 H: o+ R7 u @.CurrIcon := "load";- A' W& u& r" n6 U& f8 W) G( ?
GlobalDistObj := part.globDestination;
- u# P+ T# U( u5 T' ?/ p assignLObj := rgmanager.rgAssignL;
7 Y0 f1 J7 X& ]' e/ ?! F6 L; O/ Q row := assignLObj.getRowNo(GlobalDistObj);
$ x/ k |- N& G- G# _- } if Row = -1 then -- since 70/ K4 y% f0 r) @! |8 R4 F$ d
if lan=1 then: [7 G! N; a6 n9 Z0 ?
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
5 g) P2 I4 t2 Z+ P/ ` to_str("in der Andockstation: \"",?.~.name,"\""));" ^% [9 ?. i$ y. U
else# R. ]9 ]. y. s
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),2 X# w0 F7 P3 K0 e/ F
to_str("in docking station: \"",?.~.name,"\"")); 0 b* h- f( L" l7 {- y _, D
end;
6 ^0 t9 Q4 Q" M$ P else. D. f: ?+ V5 ~) [, B/ O
@.Destination := assignLObj[1,row];
& T* b, e1 N; r2 c; h/ z end;
! W& j+ C8 }( X+ @6 _& e+ a" H newDirection(@);
6 l% u# W: ]$ h$ X @.HasOrder := true;5 X2 I' S" o) O. ~. n: {. x# D# }" F8 N
end;9 U2 e. d: U7 P7 R; }6 Z) O
end;
P) p( ^& } B' h7 O7 eend; -- of the method
/ g3 x' \% N5 i) r( z* R |