/* called by: entrance ctrl of the object 'track'
) U( X7 M# t/ F1 u7 G. _*/: \! @' \, n+ [9 ]; D* a, u
is& E3 L% _* `" y6 _- x
part, GlobalDistObj, assignLObj:object;row,Lan:integer;" g6 t9 Q; |7 {! l5 p% X% X
do# i2 v) a5 {" u6 R7 V. a
Lan := rootfolder.Internal.Tools.AOLlanguage;
; M9 K3 `( i" i5 W$ ^( W9 B if current = @.Destination -- else return* E7 |% |) M. J4 T' y
then
2 X( x8 p% h; Q2 R @.Destination := void;
% Q6 b/ A) k) r/ n$ T1 g5 L: O, Z if @.occupied then. C1 N: I6 B( X( @( c! R# m
part := @.cont;, p: f! D3 C7 U A) F: A0 ~
@.transpOrder := void;8 `8 n, s2 O+ Z; G
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
9 p7 `. N' s" c. t. q! L" V @,root.eventcontroller.simTime);
" E1 R1 G5 I/ W* i @.HasOrder := false;% T* n5 {' W4 R# Q+ X. t
@.DrivingHome := true;
; U" F4 w# m, |" J rgManager.tryToStartTransOrder;- H, o# L3 m- x0 a
if @.Destination = void' L) j! E6 U6 s w$ W
then -- no transport order for vehicle @' _" O4 V5 r( T! d' t
@.Destination :=
$ Q( b4 q- Y' ]9 i- R* d$ p rgManager.nearestFreeStation(@,track.~);
1 w# V% T' T& V1 R5 g! N$ J7 V* { newDirection(@); 4 f) V$ W8 I4 i' g( Z
if @.Destination /= void then
2 v. L9 [" {& M( w# N5 F3 { @.Destination.NumReservation :=0 B3 S- q6 H4 D, ^0 Z( w
@.Destination.NumReservation + 1;* Z* Y+ k u! p0 {7 W% u- e7 h
end; m; i5 \9 H" S8 G
@.CurrIcon := "drivingHome";
; g* S! h- _7 a) _% J. y @.DrivingHome := true;
/ N6 M* M+ z1 s end;
. ]& y8 ?- t) A4 @ else -- the vehicle @ is empty, both vehicle and part are in the same dock station
6 u. V+ m: O4 g/ P part := @.transpOrder;
/ E' W1 B- E+ W/ e& T+ f part.move(@);-- load part8 j1 F4 C' ^/ j7 \& B
@.CurrIcon := "load";) D" m+ p$ Q8 \
GlobalDistObj := part.globDestination;
2 g& V' A4 L& ]" Z/ o2 I assignLObj := rgmanager.rgAssignL;9 {+ `: q* q: F5 p9 f
row := assignLObj.getRowNo(GlobalDistObj);
" k$ P2 ~, A+ V F% J& q. I6 @% G/ Y if Row = -1 then -- since 70
! }. W) y" Y& @; L% b if lan=1 then% q% m9 t5 o+ m5 ^6 S/ S
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),, N# l9 r, @ j' n
to_str("in der Andockstation: \"",?.~.name,"\""));
3 r+ y, |/ S! ^6 B9 _ v' q Z. X4 t else
9 u. O5 Y2 Y6 _* p3 D; T n& Y! g promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),. Y) b. |, P+ E5 N5 y6 o9 I: m
to_str("in docking station: \"",?.~.name,"\"")); 2 J' a) \* W; f0 |* i- S6 G
end;
( T! w0 ^2 @2 J& S2 ` else
+ \- ?, k3 p1 j' A& E' u5 v1 ` e @.Destination := assignLObj[1,row];: a/ j. u2 R' _: I" ^
end;
% d& U+ [ ^' M. s newDirection(@);
. x8 @+ z4 Q8 M d7 j, d) | @.HasOrder := true;
% e. @. Q1 B9 U# H end;
5 G" G. Q8 X4 s: V0 g4 h. h end;* G2 p7 l! G, v( b
end; -- of the method
& v" f" O' ~5 o |