/* called by: entrance ctrl of the object 'track') H( O# k3 ]/ L2 J
*/
9 V' h; Y$ \5 B7 @is
( B1 B9 o. Q; J9 I! c r part, GlobalDistObj, assignLObj:object;row,Lan:integer; N% J4 h0 i2 B L6 k: s6 | p
do! \/ L- B1 H6 a8 v: z
Lan := rootfolder.Internal.Tools.AOLlanguage;
+ A$ R: _* s& R6 g. L5 }" F9 g if current = @.Destination -- else return
# r* p- O, [4 m D' D then
. J4 a7 W# h6 ]( D- e) ~ @.Destination := void;- D7 y$ W$ B. }, Q# w1 l4 c6 }! O2 j$ r
if @.occupied then6 A# W, u! Q5 P7 Q( e
part := @.cont;: ?' F0 t( Z8 }3 h$ A" `1 q
@.transpOrder := void;
+ y) P! m2 _; Y) `3 {1 ?0 E part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,! i( L" b+ z) ]2 s/ f- F
@,root.eventcontroller.simTime);
1 _$ k; `1 I, V: v. n b6 Q, d @.HasOrder := false;
4 F" i! F# V+ u) l* _" A @.DrivingHome := true;
8 q$ r- R4 s8 u, q3 W* R8 ?5 L* P rgManager.tryToStartTransOrder;
. h/ y, S3 P9 D if @.Destination = void
* B9 W) F+ \; W then -- no transport order for vehicle @
4 Z0 S$ d% w( U6 H8 [ @.Destination :=
F" x: o" X9 K2 g* D3 y( ~9 ~: O R rgManager.nearestFreeStation(@,track.~);/ a$ u, P8 S. i* p; p
newDirection(@);
; r' A, `% F! L if @.Destination /= void then
4 P$ C8 ~% m8 Q$ M @.Destination.NumReservation :=
& V8 s. T# \# l% A5 @! d" L @.Destination.NumReservation + 1;
2 T _# Q* a+ v% } end;+ F: A" j( O; f
@.CurrIcon := "drivingHome";
: `/ I: P; e9 p% s" g6 Z; l @.DrivingHome := true;
0 A3 d7 y" d4 w4 K7 ]" H' H7 s; g end;
# K, g8 j1 w7 X9 W* H else -- the vehicle @ is empty, both vehicle and part are in the same dock station
/ @* p$ x1 G: y9 W# j+ ]/ F* \ part := @.transpOrder;9 F9 Y0 H) N! _& U2 {& ?2 A
part.move(@);-- load part# y9 @ a# q! w. F) w
@.CurrIcon := "load";
( S5 U# F K1 u/ E. Z# k GlobalDistObj := part.globDestination;2 i0 k3 D& e! p4 D, i7 I8 ]& [9 H
assignLObj := rgmanager.rgAssignL;* {* R% e9 J, V% ~. r: o% K
row := assignLObj.getRowNo(GlobalDistObj);
: C8 {) q% ]+ @8 A3 t' ]5 g if Row = -1 then -- since 70
. x9 B* A& b; ]; e2 | if lan=1 then
. x4 y% x+ B- w8 M* G$ F3 [ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
z6 K' e: W2 x- ], n- a to_str("in der Andockstation: \"",?.~.name,"\""));
5 B. x( t/ T2 T& ^" R. Q else
5 y0 y" ] z: m- G. X$ n promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),# l, V( ?) N# _
to_str("in docking station: \"",?.~.name,"\"")); 0 p4 {0 ?) h1 I# p! J
end;
6 ? L. Y0 j+ y; } else4 g& f) d& ^! ?- l7 u3 n. H
@.Destination := assignLObj[1,row];& F8 J5 C! g; O) f
end;
/ F. s; C( Z) W9 u newDirection(@);0 {0 ]0 M! r, N2 `
@.HasOrder := true;) U* F& d d ~! l- ^
end;
3 G+ R' ~# m7 Y1 {4 F6 l end;2 n- z6 Z4 m* c! _9 a9 ^
end; -- of the method
( r0 u% o# [9 [! _( Z" U7 O |