/* called by: entrance ctrl of the object 'track'
9 D9 N3 _0 g8 D! H, V1 F' u*/# C8 M+ l; h, Q0 l& P7 ^
is
% {5 h7 c8 S, q8 ^% ]# u part, GlobalDistObj, assignLObj:object;row,Lan:integer;
2 J. ~) z0 V8 K k( sdo
/ Q& _" K% f2 x9 P( [/ `+ \. p8 F Lan := rootfolder.Internal.Tools.AOLlanguage;1 D9 ]/ ]* a! F6 I" Z* ~5 Y2 ?
if current = @.Destination -- else return
* Q! u) p/ h' s3 @+ v5 ^ then
/ w# b; \/ g j0 @4 c/ n- ? @.Destination := void;" c& N# q/ m r1 D4 N3 x* S2 D2 g
if @.occupied then
" T9 c. |/ N% ] part := @.cont;$ h, E0 ?- C- e) d! d& o
@.transpOrder := void;
8 T" B, r+ O! q part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,0 Z9 H* h6 K# t
@,root.eventcontroller.simTime);
; \, O' o! O% ? @.HasOrder := false;; T! O! b0 U: A. w+ h% F) Y6 S
@.DrivingHome := true;
+ _& \7 a9 D2 o. g8 Z$ B rgManager.tryToStartTransOrder;
9 E1 x. k# [4 h u. H1 ?5 Y if @.Destination = void9 B# V- |7 `* k, d& [* p
then -- no transport order for vehicle @
: S/ z- g' u4 [: O+ I8 O @.Destination :=
" i& k9 b' i, @' n' {+ g7 v rgManager.nearestFreeStation(@,track.~); \0 W) t/ D3 ?1 }! O& M
newDirection(@); 8 u- V, u) L& E9 I' }& e
if @.Destination /= void then
r. J" Q- B& w2 u @.Destination.NumReservation :=8 r6 O# E; t, l+ s5 M' p' T$ a; _
@.Destination.NumReservation + 1;3 ^* s2 s2 N- w2 s5 G7 n( J
end;
# O. C. O. f) e2 a& I1 X: t7 k @.CurrIcon := "drivingHome";2 E2 J3 {$ [6 M
@.DrivingHome := true;/ y2 y0 R- f7 W# I2 p0 d
end;3 i1 B# v/ q p' G
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
6 W# N: k! b. b' p8 j part := @.transpOrder;2 ~3 r, x7 d w5 N
part.move(@);-- load part
! U8 c; Y6 T4 ?$ F1 @ @.CurrIcon := "load";2 {9 X+ j9 E. r, f
GlobalDistObj := part.globDestination;5 h! ?: c5 G3 {
assignLObj := rgmanager.rgAssignL;
& ]% U9 Z' ]# }( u S row := assignLObj.getRowNo(GlobalDistObj);
5 f8 {& Q# d; W2 `& Z if Row = -1 then -- since 70
/ D1 \0 n7 C4 a. e* n" K( r; q if lan=1 then
* U& f1 V0 z5 F" ?( E5 J- M promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),- q6 L8 b& V/ @, ^( y9 y7 Q# B
to_str("in der Andockstation: \"",?.~.name,"\""));- t# @+ ?7 u8 g' e% \8 H! p
else9 m5 K8 N' q& H+ C/ n# W1 e2 T
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),( t7 c; f, t6 Z- A7 Q* o" b
to_str("in docking station: \"",?.~.name,"\""));
1 J2 _- n! M% P, ]* \ end;/ T8 b. U( v+ _* }" H
else
# g5 }" `9 m7 q: Y# w% R% \ @.Destination := assignLObj[1,row];0 e* p. d% W% }3 C/ t' q# m
end; : L* E7 G. q1 q
newDirection(@);
" q& E3 ]9 p$ v! ?% \ d @.HasOrder := true;
~9 `+ P# _) \5 s6 \/ ~ end;
+ u6 z: F! t2 O end;; ?; f( q5 X+ z9 j7 {3 B) N
end; -- of the method
% v5 s! ?; @4 S; \& t0 x' Y' ]6 A0 n |