/* called by: entrance ctrl of the object 'track'
/ F5 j% w4 k/ F# [3 L*/
3 M) `* J9 O5 D) r' Q3 ?9 yis4 h# P4 K8 \! T8 m8 a0 Q2 ~ M
part, GlobalDistObj, assignLObj:object;row,Lan:integer;2 r; M$ G; v1 `; t! p$ }
do
' @+ d- c6 F7 u+ m" c T' h9 O Lan := rootfolder.Internal.Tools.AOLlanguage;& H$ _7 ?# s5 c; v$ i% p
if current = @.Destination -- else return
' p- ]1 b! S" a+ W) Y( h/ s4 z then
1 Y7 d9 y/ [" H: i6 a @.Destination := void;
1 O* ^* k! H- E& i( d4 X' F if @.occupied then
' T# v% X% T$ p' O3 ?1 P8 V H part := @.cont;
3 _. c# z6 [0 E8 L7 Q t: l @.transpOrder := void;
. s2 ^* u' Y: Q" c2 C; I- t part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,; Y* m3 K9 Z1 E0 t2 h4 C- W m
@,root.eventcontroller.simTime);
$ L! v* S7 `. s- w @.HasOrder := false;
9 _% U* X* }- z @.DrivingHome := true;$ T1 [* F0 O# S
rgManager.tryToStartTransOrder;
7 r9 z$ q- ?4 h* r0 X if @.Destination = void
6 i7 v6 J8 S3 ]9 k( J1 X5 B6 H6 j then -- no transport order for vehicle @
5 f N2 B8 x& n @.Destination :=' x1 n+ Z' T; g( v) r$ n S
rgManager.nearestFreeStation(@,track.~);# _3 }. d5 |% D+ r
newDirection(@);
0 _1 l% L& \6 g% y/ O, g( L. g if @.Destination /= void then
4 |- }1 u" |4 E6 I9 @5 J1 N @.Destination.NumReservation :=/ v5 D6 U/ A1 ]/ ?1 l
@.Destination.NumReservation + 1;( g) r* M V& @# ?
end;
! F) g/ Y, O8 n- N @.CurrIcon := "drivingHome";% }6 x1 j, p! q c
@.DrivingHome := true;. c t* v! [$ K' v8 @/ u% w
end;; s9 J- ^ C& f6 g
else -- the vehicle @ is empty, both vehicle and part are in the same dock station8 n2 e9 b9 A' X# Q
part := @.transpOrder;
2 Z5 m% i8 ]: v part.move(@);-- load part: w n: Y' Y c9 O9 I
@.CurrIcon := "load";6 j( `4 n3 y! ]( B9 g+ e& L
GlobalDistObj := part.globDestination;
o& T% f1 C: ^7 E8 C assignLObj := rgmanager.rgAssignL;
& u9 F8 n$ Y! |8 N row := assignLObj.getRowNo(GlobalDistObj);
# ~0 y) |. W7 T if Row = -1 then -- since 707 n9 t& k7 `: ~5 G
if lan=1 then0 B. S+ C0 d: M; @( H
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
8 G2 t; M9 c: i( g1 ]' Y to_str("in der Andockstation: \"",?.~.name,"\""));3 W; k( | U. `& e4 ~. {
else
& O+ q; R7 c6 s8 b; d! u- L promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
! U' ` S* a4 t5 o4 p( V to_str("in docking station: \"",?.~.name,"\"")); # b, C! O* \/ h- l5 g
end;- t8 j% r. L) y* K* S
else1 {1 i6 `5 I4 `
@.Destination := assignLObj[1,row];
6 m3 Y" w% n9 O5 T3 u end;
6 ?9 |, }$ x/ |3 H; A6 ^ newDirection(@);2 K/ d7 P. S. d7 [; x
@.HasOrder := true;* v% L4 H0 P1 K
end;
) ]$ N! H1 s( p; d6 {1 V end;
+ E9 M& H# W/ J' f1 r2 Kend; -- of the method
; x" e! p/ _8 L" x$ s$ |& \ |