/* called by: entrance ctrl of the object 'track'
7 G; z& G, ^. d/ _4 Z4 J, p*/
% j* J5 A' v8 Z ^8 s5 zis3 ]7 [& i. V" E$ S* `. d" H
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
& f' p, L( p* D0 kdo# g. w- [, D' W7 N0 y; o8 ?& a
Lan := rootfolder.Internal.Tools.AOLlanguage;7 U2 W& q' u# o a/ b( L
if current = @.Destination -- else return
1 F! G" h: b& F& W# x then) k& X; h! H% r
@.Destination := void;4 C V% Z( U' G9 O1 D& S
if @.occupied then9 }0 }5 J( W! z Z
part := @.cont;
6 V6 G6 c8 a7 y: r7 E" d @.transpOrder := void;& e1 T* F7 L3 s3 v) m, s
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
, t/ J3 O9 ^! @ f! j, {) d @,root.eventcontroller.simTime);
2 y: m- ~* c; o8 L @.HasOrder := false;
( S4 d1 U/ S d @.DrivingHome := true;7 [% x6 S7 D/ j; B
rgManager.tryToStartTransOrder;# c# e- d' t2 H; k
if @.Destination = void) _' L1 y0 B& R: x( q
then -- no transport order for vehicle @
9 o5 t* [8 e) w5 r: B1 Z @.Destination :=
; Z* [$ x, J& ~& K v) H7 ` rgManager.nearestFreeStation(@,track.~);5 v- [9 }5 e: g& D# i
newDirection(@); 4 f, i; l% V0 k3 i9 X
if @.Destination /= void then
1 Q- s" a2 Z3 Q# S+ ~ @.Destination.NumReservation :=" O6 o8 X, i+ ^' `0 Y
@.Destination.NumReservation + 1;' W/ v+ @! f' s& {: z; T
end;/ Y/ F, Q) i! r% T/ E; h4 U5 ^. Z z
@.CurrIcon := "drivingHome";: b$ Z3 l7 t* n D
@.DrivingHome := true;
* A, x4 Y' p1 n end;- l' C5 \5 ~: M
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
) P- o- s1 k1 }( T9 h9 a! U part := @.transpOrder;, A6 q% ^8 r7 P# `7 n
part.move(@);-- load part
: m/ T# Y6 N9 K3 R' s; T @.CurrIcon := "load";
' a! z% K4 f4 } GlobalDistObj := part.globDestination;# S$ \) F4 }7 O9 L; x3 p: k
assignLObj := rgmanager.rgAssignL;
9 x) ?6 V8 S# p) u) w row := assignLObj.getRowNo(GlobalDistObj);8 C9 Y% J$ \. }/ k ^1 p
if Row = -1 then -- since 70$ ^" A8 ~! Z" s! K2 f
if lan=1 then+ T+ u* N: b4 V/ P+ r# @
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),4 g' y0 S" P% {& P
to_str("in der Andockstation: \"",?.~.name,"\""));6 ]; _# H# j2 D. E. f
else" a- M' |; w. [' i! [" f
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
% p$ A, G* y# Z5 U/ i! X+ O- N to_str("in docking station: \"",?.~.name,"\""));
" H+ z* {3 o+ S+ V- L end;
4 @+ G( y7 C: ]0 t/ R. R0 { else
9 {' ] I @8 F- l3 j1 ^ @.Destination := assignLObj[1,row];
7 M1 B2 i7 Z1 r/ Y' v end;
) M) s; j' ]5 n newDirection(@);# E% R/ [ P9 J, _$ }; i2 s: x
@.HasOrder := true;
6 z6 m' i; `) U+ V, k, H end;$ ]: D4 a+ H/ ]1 Z: |. f# l
end;" V% ^5 p# T: Y* E
end; -- of the method; m% `7 W9 N9 `1 z+ U$ u
|