/* called by: entrance ctrl of the object 'track'
5 t6 \/ P* P5 n4 K*/% U1 h' `6 I) N+ B
is
: S* E m6 Z/ U( C' A part, GlobalDistObj, assignLObj:object;row,Lan:integer;
" d9 w& q9 ]- C9 I. udo
* ]3 L" x" k/ q# y Lan := rootfolder.Internal.Tools.AOLlanguage;( }: S: Y* D1 j7 f( ?
if current = @.Destination -- else return
% O# C1 T8 D( I+ x) W then
: @8 _' r* h0 c5 K* C @.Destination := void;
) J3 F( G: s7 i7 d) \ if @.occupied then1 t) B' S) U3 t, f" W/ d# o
part := @.cont;
5 n4 h( a/ _9 Z' g! n5 e @.transpOrder := void;
4 A: |3 Y7 Z' u3 ^/ L7 g9 f F M part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,! a9 K( q% V: T
@,root.eventcontroller.simTime);
+ T, ^0 Z& O. i( v @.HasOrder := false;
' p" X, p! j4 f# b7 l @.DrivingHome := true;
" p6 K; ^; Z( A+ h6 m8 j6 M. { rgManager.tryToStartTransOrder;( ^3 I2 [9 B+ c) L* l
if @.Destination = void& @* j" `% G, u) K& S1 a
then -- no transport order for vehicle @
J' i3 a. [9 k" b @.Destination :=. I4 l) p0 u/ Z8 I
rgManager.nearestFreeStation(@,track.~);
: n4 U: r" S& t7 [; k- H) a newDirection(@);
0 I1 Z- f; _. g$ a' }( D9 T& X1 D' _& v if @.Destination /= void then
2 Q" T t: L: o- k, z% A0 p2 ^ @.Destination.NumReservation :=- H+ p8 l7 }, f5 p; d0 @
@.Destination.NumReservation + 1;
/ D( K, |" P2 K end;! y9 ]& H/ b3 v$ c9 G! C( O
@.CurrIcon := "drivingHome";+ E# G9 v- F' i g2 V: T; Z- ?! }
@.DrivingHome := true;
U6 |: P& z% o1 G) H' L5 O end;
, w* i3 w: D1 v- d else -- the vehicle @ is empty, both vehicle and part are in the same dock station* W! o$ F" a# \7 M4 p3 m
part := @.transpOrder;
% {' c" J/ c6 q# C. y% o# ~ part.move(@);-- load part
8 J8 ~! C8 I& \9 ]9 M3 d @.CurrIcon := "load";' f1 y: `7 J4 A8 B" `. Q0 b
GlobalDistObj := part.globDestination;, C9 X9 Y$ `5 p* P: u
assignLObj := rgmanager.rgAssignL;* H) A7 L5 f) |& @9 Y6 {
row := assignLObj.getRowNo(GlobalDistObj);! C4 Z5 H/ r, i/ `1 y& a+ ~
if Row = -1 then -- since 70" N9 C1 ~$ M" h$ D6 K1 U3 ?$ q! y
if lan=1 then! d t" Y4 f/ A5 W0 U& G5 J: c/ C1 }
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
, V. b, R V- \ to_str("in der Andockstation: \"",?.~.name,"\""));8 d; J- r4 |! q/ ]
else% n; h: F8 r4 P0 a8 s
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
) h1 r1 J2 `# K6 Y to_str("in docking station: \"",?.~.name,"\"")); , W# x& L. V0 i E* E, ^0 N
end;2 I% Z& [# e0 z! V1 `# L$ ?: q s
else
0 k& W: `( S# U; E1 U: H @.Destination := assignLObj[1,row];' _" J1 F6 I. b) v7 I; b" ^2 g; G
end;
7 Q) E4 Q/ h+ I9 }7 g2 l' ]) S/ S newDirection(@);6 B% y' r' n# s; u5 X) t
@.HasOrder := true;. M4 R. J4 {3 J8 c. i
end;
& m/ F2 T) O+ \& k end;
* {" r- b1 F% B! A0 A8 |end; -- of the method \4 \" h' h& j2 ?' G, g% D4 o% z
|