/* called by: entrance ctrl of the object 'track'
( j/ z1 _3 e% A2 _7 A*/
; H, y W$ y4 T, z9 |0 h a3 G) ris
0 T: i, Q; Y1 f% l# A9 n6 u part, GlobalDistObj, assignLObj:object;row,Lan:integer;9 W, ~; O/ g$ ]6 V' e, T
do1 b# X; M4 J) c( G8 d
Lan := rootfolder.Internal.Tools.AOLlanguage;- ~% r7 B; e, L4 |4 d% v
if current = @.Destination -- else return
j$ `! m( u% {6 `1 t5 v then
9 `6 Q# n( a" G$ G; e6 M @.Destination := void;
! b5 ]/ o' d7 P; H+ v7 y if @.occupied then$ x2 H9 N/ \) U _/ M5 |' }
part := @.cont;, F( f, k$ h& B
@.transpOrder := void;% ~ L0 @0 j* p* _( s
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
" s4 V9 N/ X- W& G1 x @,root.eventcontroller.simTime);
- t: u- D7 G7 b ]1 E- D @.HasOrder := false;/ t6 _; c: v6 [
@.DrivingHome := true;6 w, j! F2 s: d( i
rgManager.tryToStartTransOrder;
: w, m, I5 g/ W if @.Destination = void
- m( [+ M% l a$ N- s6 M then -- no transport order for vehicle @* O& _' h6 x2 f
@.Destination :=0 q/ m; ? v; F: P+ t m
rgManager.nearestFreeStation(@,track.~);4 T5 T- |1 f' A% C
newDirection(@);
" a' s6 ]* [# ^; F! S- n if @.Destination /= void then
) s- }# c7 y9 x# O @.Destination.NumReservation :=* W& c/ p. V- [# L# ^0 {
@.Destination.NumReservation + 1;8 n/ s) I0 Z$ v( v* ^' j H4 q* `/ T7 @
end;
& p B# h! @2 j( H8 N- D4 M: ?& k @.CurrIcon := "drivingHome";! A* e/ A) ~7 a
@.DrivingHome := true;
' d' U% L4 o) Q5 l T5 v; i8 U end;! D* L8 ?/ W p. U
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
3 [+ ^) G" f+ R. B part := @.transpOrder;
8 F2 o" t! g/ X( S I) p part.move(@);-- load part
1 n/ N ~( S, m. l( v @.CurrIcon := "load";
" y( {& m, x6 J/ J/ W GlobalDistObj := part.globDestination;" M* v) A- z- y3 r
assignLObj := rgmanager.rgAssignL;- o2 ~+ h9 h4 k1 O; Y# Y
row := assignLObj.getRowNo(GlobalDistObj);+ N1 i3 R- I3 ?- e9 K
if Row = -1 then -- since 70
0 Z/ W e& G e/ R9 h3 D if lan=1 then
% _9 O8 b& n( w, Z1 i' v promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),( y# \0 O1 t! D% H8 F7 P" H
to_str("in der Andockstation: \"",?.~.name,"\""));9 ~, ?+ s+ _; T) B
else
7 e% l( V3 Z$ K! L* a1 F v; S; } J promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
5 e& g8 b! x6 e4 W+ _5 S to_str("in docking station: \"",?.~.name,"\"")); 4 p4 a) A! ?! h; O) C+ a
end;
$ ~7 u& W! h9 z/ o else
* y# A" E" h' ^% p @.Destination := assignLObj[1,row];
. K/ C; \5 ?5 L3 q% s" t end;
$ C7 n R8 g9 h- W newDirection(@);
7 r$ q' B- F, G+ s5 b& o; ]* j: V @.HasOrder := true;
5 ^* U5 K$ r6 w4 I end;3 u( ^, w. m5 [* ~
end;
; ]2 J4 C* N+ P, @! E& Cend; -- of the method* Z9 f3 W# S% ?6 Y; [
|