/* called by: entrance ctrl of the object 'track'8 |8 W# u, o9 Z
*/' X1 V. F% c' e: J: x" R/ Y7 g
is
$ J, |# b' E; ~" Q; w$ _+ u, W% X part, GlobalDistObj, assignLObj:object;row,Lan:integer;* E/ f/ a5 V" K8 Q+ j/ M
do. a4 ^: B% o) d9 H0 K4 h5 b+ U3 O
Lan := rootfolder.Internal.Tools.AOLlanguage;
# Y6 S6 c' d- G5 Q& N: j if current = @.Destination -- else return- L! F$ V* O& b# X1 Q# g
then' d$ J- L3 U2 T; o9 Q9 o
@.Destination := void;/ J/ K- I! Z1 {: d, w1 o
if @.occupied then
9 J' m. C' ]3 P2 {; J part := @.cont;
?+ L$ s9 `# g/ U* c @.transpOrder := void;! ?) K# }9 C+ a0 ^
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,! o$ X' W S Z# T0 F) n' c+ q* M
@,root.eventcontroller.simTime);% i% y. I# z6 D2 p; G; A& n4 d
@.HasOrder := false;+ F8 {6 H; X2 @7 }1 N
@.DrivingHome := true;+ q- c6 f, e% U1 n' Z/ F, ]1 M+ Q
rgManager.tryToStartTransOrder;
; Z% i( t9 V, J if @.Destination = void
5 P2 X& P- S: Z, d then -- no transport order for vehicle @7 c1 V/ I, Y2 B7 K
@.Destination :=. p9 z4 A# [$ N1 \3 |. T2 s
rgManager.nearestFreeStation(@,track.~);
0 `' p# B: K" S newDirection(@);
3 z5 L l$ V1 u7 C1 i if @.Destination /= void then
& u4 a3 J/ y" `+ p" t/ @7 g) T @.Destination.NumReservation :=7 B; F: \! s- ^, u2 p
@.Destination.NumReservation + 1;/ b+ a3 ^& {& P* W) a
end;! x9 A" \) I1 d, [7 y9 L
@.CurrIcon := "drivingHome";7 l6 i; T; L7 ^, a$ c5 E
@.DrivingHome := true;+ E- B1 L8 J& `; r8 t" {
end;. Z+ {: \5 u/ }. P% U' A7 S
else -- the vehicle @ is empty, both vehicle and part are in the same dock station; Q$ X; k( o; j) A
part := @.transpOrder;1 ]4 F1 P% W$ C1 S* ?. {
part.move(@);-- load part( o& v1 T5 c8 Q6 E& F
@.CurrIcon := "load";% X: }+ Y- {; L9 z. W9 Z6 x
GlobalDistObj := part.globDestination;
: W2 l! O3 k8 z* h assignLObj := rgmanager.rgAssignL;
5 ~% t1 O; D. s: @; f row := assignLObj.getRowNo(GlobalDistObj);
' _" k, t3 w# q/ B if Row = -1 then -- since 705 b( B* m' C* a5 u6 w& ~1 w
if lan=1 then
3 j- ^2 `! U3 n4 ~5 v; t1 O* i promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
0 e$ G( a8 L. } ? to_str("in der Andockstation: \"",?.~.name,"\""));
$ D8 d6 [% e* ^/ ?1 x! u' b$ c$ |8 u8 O else, _; f- O, D& h8 v7 d( d% ~: G
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
! w0 G& v, ]# n: q: R1 J% t, Q. E to_str("in docking station: \"",?.~.name,"\"")); ; g9 }$ q3 V& D# u9 [
end;7 w/ h, m% d, r% O/ T
else
$ Q. d, z) x( ` @.Destination := assignLObj[1,row];! |; v. L9 Y; k. j& B! a
end; + z$ A& N- K9 |* L' o
newDirection(@);
/ t" r C8 s0 c* K( P/ Q; P @.HasOrder := true;
; v( O( N$ [. U% K end;) b& I8 c+ r( T
end;; }+ u- e3 V8 ^' r y
end; -- of the method
4 H i3 q/ _+ e& V1 K7 B, o |