/* called by: entrance ctrl of the object 'track': m9 Y5 r9 _( [2 h
*/1 `/ K3 ^, G, m$ d& r# a. Q6 }! ]
is3 y$ D# E! w# w
part, GlobalDistObj, assignLObj:object;row,Lan:integer;0 [: u( A$ d0 R8 w
do0 ^9 |; a& x$ Q( }3 S
Lan := rootfolder.Internal.Tools.AOLlanguage;
6 z R& G( |% F% }; T if current = @.Destination -- else return
: j% C. O; X$ {7 O then7 R2 E7 t) b0 \2 U; W
@.Destination := void;
& O1 Z; t3 z, C) B4 R) v& b' _ if @.occupied then
7 h2 h# ?5 v" {2 l; [1 ?# K% j part := @.cont;; y O" q7 f/ P( X. u
@.transpOrder := void;8 S" G$ n5 M% ^) B# n. ^% q
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,/ W3 I) _2 v& H, t; p
@,root.eventcontroller.simTime);) Y! W; N5 z6 T6 u v- @
@.HasOrder := false;
7 ^) b3 y0 g2 m! l; Y @.DrivingHome := true;
# G8 |! a |) u- h# b2 c rgManager.tryToStartTransOrder;
4 V; B1 U f# S: X: F% `; @ if @.Destination = void
( D3 O i5 c. u3 ^) z then -- no transport order for vehicle @
* B ]5 ~- G9 I. X1 l @.Destination :=$ F N8 }' K9 p( l3 ]3 F
rgManager.nearestFreeStation(@,track.~);
1 o V2 {2 `- h6 G; }( c; Q6 Z newDirection(@); ( m4 N( `0 N8 @8 h: o
if @.Destination /= void then
. Q2 \$ b- r$ C1 l( E7 v9 d; K( X0 U! t @.Destination.NumReservation :=# `$ l+ `6 w& o0 v+ K, Q
@.Destination.NumReservation + 1;7 [7 B- J. {- N0 n( s
end;
" B" X* |* {+ X d; R @.CurrIcon := "drivingHome";; u6 W- H& M; x6 y* d
@.DrivingHome := true;
9 H) f9 A% z( r3 t# e6 d! T& X end;+ N* g3 k5 _# j" I
else -- the vehicle @ is empty, both vehicle and part are in the same dock station; o+ f8 @1 z% d* I9 U" Q$ ~1 P: E
part := @.transpOrder;: ]# i8 l8 i) Q4 ^
part.move(@);-- load part/ f1 D* |5 @5 N/ U5 r
@.CurrIcon := "load";$ S% l0 w8 ~7 ~ s( x! r
GlobalDistObj := part.globDestination;
; [4 C2 b6 w1 @' U# ? assignLObj := rgmanager.rgAssignL;& M: {9 _+ A& {1 i
row := assignLObj.getRowNo(GlobalDistObj);
( i: v* y( Q( M* y# l" X6 n if Row = -1 then -- since 70
5 S; ?4 l1 r" t9 {* A if lan=1 then( _# W) Q9 J, m6 K7 W
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
9 ^4 h6 o$ z. _( g6 o to_str("in der Andockstation: \"",?.~.name,"\""));
$ W, ~6 @8 p+ U else. ^+ _9 t9 u2 Z/ _' o C
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
' r+ p$ ~7 j& d5 P$ ~ to_str("in docking station: \"",?.~.name,"\""));
; C0 J4 H$ U4 k3 ~6 ] end;
% P2 i+ g: E0 \% Y else0 ]& H: t5 G$ a$ y% L# G: v
@.Destination := assignLObj[1,row];
6 D& u% Z- i; T5 v6 A* w& j end;
3 h8 V T+ v9 E' Y% ~# O4 l: l7 M' J9 G8 [ newDirection(@);: T! U1 w5 U0 }9 z! {- J
@.HasOrder := true;
% U0 Y# m! N% h; ~: H( B, r end;
1 X) R. N! R4 p i, J" n/ ~4 [ end;
6 `+ k, z9 v5 G7 F; Mend; -- of the method/ E% |7 ~5 X+ v! n: E; U4 V* B; W
|