/* called by: entrance ctrl of the object 'track'; r( a) T- j0 Q4 T7 V
*/
* }6 [- Z& Q: v7 R" _4 }is0 _2 E& t K7 S# r: t0 b c
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
* K. g* H3 ~9 b# odo6 g3 @: B( _' j% T1 `
Lan := rootfolder.Internal.Tools.AOLlanguage; q) |. q0 O" x0 m4 S4 K
if current = @.Destination -- else return
* G7 V9 Z7 g" I then
$ V" |( T/ I5 w1 J1 l @.Destination := void;% P# Y. @' @1 R5 B: H
if @.occupied then
! g2 R3 P2 n" e }3 c4 ]& S! D O* O part := @.cont;
3 N v0 Z6 u, N* G% ~* {% q @.transpOrder := void; {: n8 d4 h- n1 ?; P/ _3 v! y
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
/ o# e4 m2 H* {7 ?5 C8 M4 X1 ] @,root.eventcontroller.simTime);8 O' \% d/ U! o. _$ ]; F( i4 M
@.HasOrder := false;
! X$ r B8 d0 ?9 I7 e8 d8 ~ @.DrivingHome := true;
3 Q$ B- E5 n t3 a( P' Y3 W rgManager.tryToStartTransOrder;3 D6 w+ `5 {7 D, T/ t$ j( J5 g) d
if @.Destination = void
2 c/ O) M* L' X0 t then -- no transport order for vehicle @
, O, @. H* S, D& x2 s @.Destination :=
% d0 R# }% D5 f# r1 s; }0 s2 r. o rgManager.nearestFreeStation(@,track.~);
* ^9 _) F& x7 e3 } newDirection(@);
K j, q, \& H1 {8 W+ o if @.Destination /= void then: q$ H1 G" j; V; c
@.Destination.NumReservation :=
+ H3 `: A+ ?8 V @.Destination.NumReservation + 1;
1 N0 Z& L! \& l C+ ? B end;& F) U) a' @. B @, }5 o
@.CurrIcon := "drivingHome";
' l$ n8 P' j% y4 D+ I @.DrivingHome := true;
2 W7 D% Y' P3 ? end;" r- z* b! `, v+ R, p9 g
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
/ }7 v1 X9 G) H" [1 j3 F8 K b part := @.transpOrder;- {8 r7 s: l4 ~7 c9 q
part.move(@);-- load part
/ T/ K3 X5 m1 }, R3 _ @.CurrIcon := "load";
3 R1 S- `% U: Q0 k* | GlobalDistObj := part.globDestination;
E2 |$ F: I; y! ]2 L& P assignLObj := rgmanager.rgAssignL;; g8 i9 _% y$ h; Z
row := assignLObj.getRowNo(GlobalDistObj);
6 [. r G1 c _ if Row = -1 then -- since 70( F7 k/ }. |4 o
if lan=1 then
4 { T$ }% K( Z- ` promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),1 y" X: i, @- g, l6 Q
to_str("in der Andockstation: \"",?.~.name,"\""));
, z- s" @7 }( {0 A6 ~ ?) A else, ]) \5 h: [( N4 u4 J4 c
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),# `3 g0 ~8 ]8 {% u9 ^# p! x
to_str("in docking station: \"",?.~.name,"\""));
# L* m1 J8 I/ Z end;
; i+ n5 H- ]; Q% Z8 j9 x else1 ~3 S9 H' b% o1 e( W; C2 ^* m
@.Destination := assignLObj[1,row];% T8 U- G d% P' ?/ b4 d
end; 9 S- o* T7 J* f y4 ?" v
newDirection(@);' J1 n& N, L1 a# O% M& U
@.HasOrder := true;
6 T+ c2 ~ I9 Y) p1 I end;
. W% k2 Z9 k! S% H" b C1 O7 h end;
" t6 P; y7 a& k" W: Y3 a: pend; -- of the method
- s3 Z1 E2 T( d5 \' A4 h1 ^ |