/* called by: entrance ctrl of the object 'track'
6 h# u0 ?/ k" {# d% |* F1 v*/+ X1 n/ E* `! T' x5 c+ ~
is
$ l0 \- _! K, k! Z part, GlobalDistObj, assignLObj:object;row,Lan:integer;
/ |4 V; ]) i4 ido
9 s, [3 ~' L) L3 J Lan := rootfolder.Internal.Tools.AOLlanguage;
' c1 ]2 L% L) W D/ s if current = @.Destination -- else return
8 Y. W) Q: Z/ y2 u+ m# m then3 c- a# d% a+ p u, I/ F0 X
@.Destination := void;
* b* S# r# n# |3 c* [2 d if @.occupied then2 b- h7 ]* x! a) `4 V: @6 W3 {
part := @.cont;
3 ^: g5 }9 v+ { @.transpOrder := void;" E R' y2 O" z0 L- V0 V
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,* h) M! [+ G0 o3 X: M
@,root.eventcontroller.simTime);
" V6 G& N# U% E9 _ L; O @.HasOrder := false;! E+ _; a p \, Z8 j/ [
@.DrivingHome := true;0 c l2 ~9 D" g" A
rgManager.tryToStartTransOrder;; e; Q+ k7 r) S' m/ ^
if @.Destination = void c7 l' o0 A7 o- N9 i
then -- no transport order for vehicle @' [- }! |! s2 c' _& z
@.Destination :=
$ Y1 k1 n# r. B( K rgManager.nearestFreeStation(@,track.~);
8 e' q- a8 {# |$ ]; K newDirection(@);
) ]3 k+ ^) C ~ if @.Destination /= void then
) Z. i3 P% ^7 p) s. ]2 R% J; j @.Destination.NumReservation :=5 R: l6 n9 C2 P1 Q2 p" N
@.Destination.NumReservation + 1;; {7 B: [: A- m9 P0 a
end;
8 d5 J: W5 w* l @.CurrIcon := "drivingHome";8 i5 f/ A2 i) R4 X4 z$ T
@.DrivingHome := true;; }% V" y" ~" h* C: D4 k
end; d( \5 [9 g! D" d; m
else -- the vehicle @ is empty, both vehicle and part are in the same dock station, d5 b- \ A4 t! L) G7 p3 z
part := @.transpOrder;
$ }- w8 n4 P7 `7 P part.move(@);-- load part
; E- Y4 r$ S% S6 q @.CurrIcon := "load";
7 r! M1 g3 U0 `9 K. Z; W, m& L GlobalDistObj := part.globDestination;
0 c( @3 S/ u, l( Z8 \* ` assignLObj := rgmanager.rgAssignL;
+ _9 J) s, s" l6 k- K: p4 T3 M row := assignLObj.getRowNo(GlobalDistObj);" c$ ]1 T# _6 U1 T
if Row = -1 then -- since 701 y4 ], }. k0 E/ Z! K" b! p
if lan=1 then
7 B1 |, Q5 K% h1 K& R promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),. Y: r; O" G# n
to_str("in der Andockstation: \"",?.~.name,"\""));1 e6 d. }2 N5 G+ K
else2 W5 v" C6 y5 A7 }% V8 q
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),- d3 }4 m! J, ~) L" v
to_str("in docking station: \"",?.~.name,"\"")); + y% E1 p3 n- h9 u8 Q" I" x
end;0 Z4 B8 `5 S% E' Y9 J8 Z3 J
else2 g, l# l: D, [" I
@.Destination := assignLObj[1,row];
) s J2 [- Y0 J9 | k. _! m$ |/ t end;
* I. w! ]8 z2 l; F1 X! Y2 y# a! K newDirection(@);7 ^: ] q) i# ^2 H
@.HasOrder := true;' f/ q+ X" j; H3 u4 Z
end;& i6 G% \+ }8 o9 h6 V8 n
end;2 n3 [6 c1 o! q2 }' P# G( c* G
end; -- of the method# q8 H1 d9 \4 E0 O c$ `2 _
|