/* called by: entrance ctrl of the object 'track'
/ o9 u' Z4 H5 Q, t& e- f4 ]*/5 B& N0 j- c/ x* N/ T
is
/ V7 W" X6 a4 N+ M1 A8 ]* R5 L part, GlobalDistObj, assignLObj:object;row,Lan:integer;! t4 X$ e1 U% B, k9 H/ A
do
7 a2 q; {1 H# g Lan := rootfolder.Internal.Tools.AOLlanguage;' E4 }% {, O) Y1 E! o* [4 r' ?* ]
if current = @.Destination -- else return
) _! H* d( ^! m8 T o then0 V) Z; W. e: h8 ?% H
@.Destination := void;
# s5 j' V+ P. E2 n _/ i% C if @.occupied then3 g1 P7 g6 L* E# Q4 g( _( `4 ]
part := @.cont;1 U2 b3 w* M, C m
@.transpOrder := void;4 O, v" f3 Q' }# b$ e! E" B! N ^
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
+ x/ u* I# e, S4 a$ a @,root.eventcontroller.simTime);
' _% Y6 x \5 V( U @.HasOrder := false;/ j! T5 N+ W6 T
@.DrivingHome := true;! ?& N/ S2 ^1 j. \* u6 h
rgManager.tryToStartTransOrder;2 }" a0 `; j5 W/ `3 A$ e5 r
if @.Destination = void
$ t5 R- Q" z! N then -- no transport order for vehicle @
1 f; n8 l' G+ n7 Y( L; m @.Destination :=
" V' x: b( ~7 ~9 u/ x! e rgManager.nearestFreeStation(@,track.~);
" ~: s" t8 Q# Q h4 _3 P3 S newDirection(@); 6 t* S7 U# c6 c. ^1 H/ T
if @.Destination /= void then
, l4 I. X, q$ b' _ l @.Destination.NumReservation :=
@( _& w% p7 L6 t+ C @.Destination.NumReservation + 1;
5 }5 C+ X) e2 J end;
; p' M( P+ o1 Y" G. B' J @.CurrIcon := "drivingHome";- M& ~/ z$ U3 @2 c
@.DrivingHome := true;$ E) y) \" j: e! k! G, o+ S
end;
3 t! l1 g; a% Q& l! X, ]/ B else -- the vehicle @ is empty, both vehicle and part are in the same dock station
' ` x' [8 s3 @+ @; B part := @.transpOrder;
4 h6 q2 L% m) q- h- S part.move(@);-- load part
% w* U6 Q# l" ^" B' v1 r2 X @.CurrIcon := "load";
& m8 R" ~' N+ f GlobalDistObj := part.globDestination;
0 N; h- h. @1 c8 s assignLObj := rgmanager.rgAssignL;
2 G6 ~& [, b+ }/ J+ B( b row := assignLObj.getRowNo(GlobalDistObj);
' M% Y9 o3 n7 h- V! ~ if Row = -1 then -- since 70
8 r3 C8 G" \: D! n$ b9 K if lan=1 then
% e4 Q- b0 g B% P* C promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),0 K6 x5 N$ a$ S7 N" a$ _
to_str("in der Andockstation: \"",?.~.name,"\""));; L; c' X" R2 I0 H& Q& w
else
- w: x7 Q5 u0 H. s0 ~7 a& q promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),; S$ Y9 { R7 L
to_str("in docking station: \"",?.~.name,"\"")); 8 g5 P& M, h. d: Y. `6 Y. u
end;$ @1 M$ ?" E* d) ?2 |0 i" v) H
else8 X4 m; Y) J* U4 _: T* s. ?
@.Destination := assignLObj[1,row];0 I8 w! O! v9 w# u% b# G6 z
end; - p0 \/ ?# T+ E/ l1 y3 B' F2 M
newDirection(@);
& ]" [# b$ \% y+ t/ s @.HasOrder := true;( ?0 ?6 J+ t' c7 J) H
end;6 a+ ^; s+ \: `, y" k; o( C7 j9 F' @
end;* I6 M. j, b" E. {% ?) s
end; -- of the method
# {1 K/ b' b: K' u3 x5 q5 i, i |