/* called by: entrance ctrl of the object 'track'4 B8 ^3 d1 M# c5 E; a4 P" ^
*/" L. L6 V# w. l& K8 g9 M3 Z
is8 q& B6 Z0 @5 D7 R0 E" n/ u
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
6 y. I5 g& h: o1 kdo
1 b$ {- W; W- i! ~ Lan := rootfolder.Internal.Tools.AOLlanguage;
1 k1 N" A2 d8 J. }$ w: O* Z if current = @.Destination -- else return5 ]: l% ^' G- m7 L' T6 a
then
6 h) S, G# s$ J6 R X @.Destination := void;
7 r" ]" \# u$ ^" x if @.occupied then. G/ d8 ^5 [1 e# U \5 U8 g
part := @.cont;5 P2 @* v7 [* \3 ~+ V$ r- K& _6 G
@.transpOrder := void;
7 s5 `# x! N( Z5 p. D part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,, n: M/ }, b6 Z* l
@,root.eventcontroller.simTime);
, ^: l* v! U' ^1 d/ D5 S9 h8 D @.HasOrder := false;
" v# f- b* e/ Q" C7 V @.DrivingHome := true;
3 _" [0 O2 c: W rgManager.tryToStartTransOrder;
1 ^! R4 i5 W/ \% z% [, K if @.Destination = void
8 P3 m2 K! ]: Z6 \/ c% Y then -- no transport order for vehicle @
; v) r* Z2 |6 N( F' { @.Destination :=$ r' R- `: z& H- _! l1 Q* T& k
rgManager.nearestFreeStation(@,track.~);, G. H3 Z( l6 k* Z) L' y' \; C
newDirection(@); ! O$ e$ L8 i2 E+ P. Z
if @.Destination /= void then
4 | N2 r2 N c& W7 O' w @.Destination.NumReservation :=
7 X& q' G/ w# o) `7 Z, {) p- { @.Destination.NumReservation + 1;7 K/ U3 g) h4 @# [1 P7 I& R
end;
& U( l" [0 e3 `% O/ x/ d @.CurrIcon := "drivingHome";6 ~; F* l- L! ?! D/ q
@.DrivingHome := true;- U) A& H! X2 T, h
end;) z6 B9 s, J& |$ {( s) }* V( o
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
/ S {+ L# e/ g# T! P2 | part := @.transpOrder;
( H7 B, @: t. X! d" U+ U0 I+ o5 R; @ part.move(@);-- load part
) i. a3 A0 }6 D, T+ ~ @.CurrIcon := "load";
. n9 {% e5 B, _8 ~0 a) e GlobalDistObj := part.globDestination;
2 O6 D) [$ @3 S assignLObj := rgmanager.rgAssignL;4 i( K* n/ r" F; `
row := assignLObj.getRowNo(GlobalDistObj);
6 r; |7 W& n. F. }( k, T if Row = -1 then -- since 70
% z' q c5 P* {4 w8 v if lan=1 then
1 v, ]/ K8 i/ V5 L promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),! `+ v: X& D1 b/ o" `9 f' X
to_str("in der Andockstation: \"",?.~.name,"\""));
# Y4 G. n0 L( @# o, g5 L else" ?; v4 Q7 q4 x' _: a" x! C% M7 h; ?. C9 U
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),- U# P2 \, Q3 ^9 D' ^6 y
to_str("in docking station: \"",?.~.name,"\"")); I( `' Z7 B0 w8 e! W# o
end;
' j- ^3 X/ O6 f6 H& U6 s+ z) F. L else P6 N* J; ]! ]
@.Destination := assignLObj[1,row];% v9 F2 X) g2 U3 M( A! B1 T
end; ) M4 P) c; ?3 \# I. B1 p
newDirection(@);
/ |* C8 ^- T- V5 [# ]3 j/ D @.HasOrder := true;
0 u6 x+ [1 Z4 N M& [/ T end;
5 x" D7 w1 U: q; ~; M" `5 d1 F) W end;, }" A! X3 W4 m/ o+ k t3 S3 b
end; -- of the method
@9 T# y& z* N |