/* called by: entrance ctrl of the object 'track'
! p. L5 H4 E: ~' |. M*/7 D( [/ r) B4 `
is- y+ i! |( u8 L. s$ v" A/ v; y o
part, GlobalDistObj, assignLObj:object;row,Lan:integer;( u" M8 b# g% i) f: F- z
do2 I0 n8 G; d3 R0 c; e. w4 k
Lan := rootfolder.Internal.Tools.AOLlanguage;
' Y! Z) j7 Z6 J3 a9 j: o if current = @.Destination -- else return/ w8 V& Q7 S) u7 [2 Q
then
& [! j% H4 @9 { h/ D @.Destination := void;
9 P3 P* _0 f# z v+ s% v if @.occupied then
3 x( S, M3 G( A) x% k part := @.cont;
$ \# L9 P" A$ V5 B @.transpOrder := void;3 ^% A2 Y$ v7 {- \' Y- O
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,9 g2 b& W8 r* ^: F" U3 X- w
@,root.eventcontroller.simTime);
+ I% g; W* X: ^! } c# y2 d0 A @.HasOrder := false;
; d5 \; S+ l6 C( T1 R @.DrivingHome := true; _/ C1 `' _- l8 n8 r; |- Z
rgManager.tryToStartTransOrder; h& R8 p ~# `' u b6 v; t
if @.Destination = void& g5 V. k* j1 i' y7 r1 c% \
then -- no transport order for vehicle @
' _ ~% h9 b6 C2 ? @.Destination :=/ D1 }- p& w$ N ]3 Y
rgManager.nearestFreeStation(@,track.~);$ d1 Q9 n, G) A+ v& J2 w
newDirection(@);
' P% u1 H0 }! A! q3 N5 {' G if @.Destination /= void then0 U3 T" y; X5 O, f; `0 P
@.Destination.NumReservation :=
3 d4 ^ i9 w. w x9 v @.Destination.NumReservation + 1;' o9 P# a7 c, `) L4 V
end; D3 c% V) u7 [( F' o& W" N: `% \) L% P# D
@.CurrIcon := "drivingHome";
% L: O$ _0 z5 y1 `/ f0 D @.DrivingHome := true;
9 Q2 H/ |! \* @& ~; K/ T3 {3 K end;' O; `0 t& `1 [8 ~7 O- z
else -- the vehicle @ is empty, both vehicle and part are in the same dock station$ K6 q& y3 C d: c/ f5 r
part := @.transpOrder;
3 J- B+ f+ E6 I( V! n part.move(@);-- load part& s, Y5 s: [- J3 Y/ s, d8 F! C
@.CurrIcon := "load";
1 m1 D! I+ N0 @ GlobalDistObj := part.globDestination;
# }( v7 F6 y( |4 X/ T- c$ l1 o: K assignLObj := rgmanager.rgAssignL;
: \; |- C* c5 [+ B0 S row := assignLObj.getRowNo(GlobalDistObj);6 X C. r$ O/ y# d+ u5 M
if Row = -1 then -- since 70
+ u [: a c5 r; U5 i" b4 G4 I r( S if lan=1 then1 |& `' X' j/ [: P7 T
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),' v! | O* l2 t, l
to_str("in der Andockstation: \"",?.~.name,"\""));
8 r& G) p* f) I/ A1 k else
' A7 V; R. @ O$ O7 c3 D6 g# F" M promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),* @# l! L$ I9 s/ n9 w: m, ~1 A
to_str("in docking station: \"",?.~.name,"\"")); + s; b% a8 N7 m
end;
; ~* X$ m( C( B% A/ E; \ else/ O+ i' I2 {' k- Z" ?& `0 C
@.Destination := assignLObj[1,row];! V( Y9 ]- `4 c* X- [
end; ' `% ^6 s+ l$ ]- g- T& Y* k' O
newDirection(@);
( X \ R: x' q4 R @.HasOrder := true;1 _3 s; D( H4 u% a. N8 f
end;0 m, @( q- M" j$ Z. j& Q. \
end;' ]. R5 K e: X
end; -- of the method
$ E4 c; o2 Y- X9 I3 x |