/* called by: entrance ctrl of the object 'track'
n( }8 k7 p9 v/ V*/
- s( f/ z) J+ I2 j9 f& H; \is/ U7 l5 Q8 N* @3 `- I
part, GlobalDistObj, assignLObj:object;row,Lan:integer;; J- v, V0 J2 w8 X7 o
do" z+ E7 m! I+ @# Y; s1 F9 U8 U
Lan := rootfolder.Internal.Tools.AOLlanguage;7 [+ \; I7 f2 E8 ?
if current = @.Destination -- else return
( j% y' `( |, o9 R5 E then3 h; B; r2 t% b5 w
@.Destination := void;( i% }4 A7 R! V
if @.occupied then
3 D+ E$ R- ]9 j$ y part := @.cont;
0 t) U/ `) Q: P# |. S, [( P @.transpOrder := void;
4 C f) u3 v# }8 t& O9 d part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,# l2 u U5 }9 s" F
@,root.eventcontroller.simTime);) b" E# K: d) f: k2 r) R) b/ ^
@.HasOrder := false;5 t# C* o- q; b$ Y
@.DrivingHome := true;4 Q$ u; S) E1 J
rgManager.tryToStartTransOrder;5 r6 r# o. t6 Z
if @.Destination = void- a7 Q8 e2 N& v( F+ d
then -- no transport order for vehicle @
, F4 ~( u; ?: p+ M @.Destination :=: w- ~8 z D1 n/ [( X- D
rgManager.nearestFreeStation(@,track.~);0 `) d+ _3 S& T1 r6 I, Y
newDirection(@); . n5 `7 E2 _# w
if @.Destination /= void then. A$ y W- L8 w/ K9 T5 A$ {
@.Destination.NumReservation :=
8 g, h! X8 D. W( G" s @.Destination.NumReservation + 1;3 N/ k* Y/ D" v
end;$ a X6 b) I" Z2 I
@.CurrIcon := "drivingHome";
; t# F% k# T6 [9 Z2 ^1 I7 p @.DrivingHome := true;- N9 V3 C6 @; ?6 v' L" ^
end;: k y; W4 A5 g" ^4 A0 `& Y3 C
else -- the vehicle @ is empty, both vehicle and part are in the same dock station+ q" J( b! E2 ~
part := @.transpOrder;
' C2 a3 Q0 l0 A- N7 k0 S part.move(@);-- load part M; v) _# D; a, e! A; ]
@.CurrIcon := "load";* e* p" G/ e" I! p2 _
GlobalDistObj := part.globDestination;- L* o0 q. J6 K( _$ K5 N7 Q P
assignLObj := rgmanager.rgAssignL;
% u+ _9 u" y9 u% u4 |3 T row := assignLObj.getRowNo(GlobalDistObj);* O- G5 p- e0 E4 M; P) R: O
if Row = -1 then -- since 70" b* [1 i! ^, [- K3 O5 W
if lan=1 then
3 T4 E1 f" w9 c, w( B promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),1 P: l& l2 }$ ~* {7 t
to_str("in der Andockstation: \"",?.~.name,"\""));
7 J0 _. ^% Q! l8 T$ ]5 ~% { else6 M9 {( I0 j/ M
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
# }* R. U @# p, O3 t/ k to_str("in docking station: \"",?.~.name,"\"")); 6 m% Y* r6 w3 l0 F# N' D/ j
end;* y% |0 `/ }0 O3 e$ ?& }
else Z- C" @: ?0 r9 h( R
@.Destination := assignLObj[1,row];
3 G; b- } j# e5 C: O' y end; ' k3 P* N. I% f; |0 `& W4 z
newDirection(@);
7 m3 l& c% Q$ Q8 D6 k- u- U @.HasOrder := true;4 F: F I' Q% d% S: K
end;/ h0 @8 y5 I* G! r- c
end;- m% G; v9 z9 w: U* C3 k; W: v
end; -- of the method
4 L) T1 n& ?/ o+ [3 P- o |