/* called by: entrance ctrl of the object 'track'- O; g$ @& ~' J* r% u( G
*// _- L; e0 w* ^/ o% h% {
is
T' C/ p+ k0 h9 Z3 [/ i7 X part, GlobalDistObj, assignLObj:object;row,Lan:integer;7 F" b* q; S: G
do& r) {! C8 d% a9 \& K6 U
Lan := rootfolder.Internal.Tools.AOLlanguage;
5 F4 s5 g# T9 \/ l; X if current = @.Destination -- else return# r8 j2 m. a8 Y) N% T
then
) B) W2 x9 M: w# ]2 J) H$ ^3 n @.Destination := void;$ a, P! u& J4 G7 |3 G* c' m
if @.occupied then
& K1 {% _! E/ m part := @.cont;
$ R% I8 A6 N( w4 k @.transpOrder := void;8 n) g- |0 i$ m& ~4 I
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
( q) p3 Q0 I( s( S: H6 C* L @,root.eventcontroller.simTime);! c: W9 m% M$ m
@.HasOrder := false;
% X _& e: `: C N6 y# S @.DrivingHome := true;
" X- I4 h# @9 Q2 v V) B rgManager.tryToStartTransOrder;
( u# h7 W; e5 E# o6 i. Q if @.Destination = void
7 ~4 R& R; g8 {8 W+ N then -- no transport order for vehicle @" p& [) k- W1 B: ]) [0 [7 y9 J
@.Destination :=
4 I! t9 Q+ I7 j, G. ~ rgManager.nearestFreeStation(@,track.~);
# k" s8 K! |/ p1 N( m2 K newDirection(@);
, y! p& o h) g' F+ F% I5 R if @.Destination /= void then6 P4 P# f' F' w, ^$ F$ ]4 q) [
@.Destination.NumReservation :=
" j( b7 h# u# |! I6 t: K( k @.Destination.NumReservation + 1;3 [8 O+ [$ F) Q# x, X
end;
) D4 ^0 S3 _) f% M @.CurrIcon := "drivingHome";* c3 o& r8 i. D" H' k! ]4 ?7 L3 X
@.DrivingHome := true;
" c% }( f% p# i5 Z1 e3 L end;
$ @& p9 [2 K5 C. i; }4 e else -- the vehicle @ is empty, both vehicle and part are in the same dock station% n2 h$ S$ ? |: t2 ~3 Z
part := @.transpOrder;0 S- k1 \8 ~- W o7 q
part.move(@);-- load part( K: n2 n) X) D% J4 e- J7 |/ M
@.CurrIcon := "load";
& @# C+ O9 z `: h8 ]9 p& [+ k" L) D GlobalDistObj := part.globDestination;# Z' p+ Q% L$ t' F2 R5 B/ ~: c
assignLObj := rgmanager.rgAssignL;0 } @3 q0 w! w n, N
row := assignLObj.getRowNo(GlobalDistObj);
7 t {% x% ]- l/ w if Row = -1 then -- since 70
/ o1 _# x* _9 }1 l; k if lan=1 then
* f J5 E% M4 C8 i promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),# c2 H; x5 y$ m5 P* Y5 n
to_str("in der Andockstation: \"",?.~.name,"\""));
1 | _6 \. ~% f0 c/ i& B else: M- C! B v9 X3 u8 h% T" c7 s
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),' |* U n( H% C& g$ z2 L
to_str("in docking station: \"",?.~.name,"\"")); , X: F9 C4 a% A, d$ ?
end;9 |: C! N" m+ L& X" f
else( u/ g: W* h* ?, D( O( T
@.Destination := assignLObj[1,row];+ i: Q8 G( T: A6 l
end; " s2 D& s+ q0 t" {, [6 h1 L
newDirection(@);
6 K( e* q6 l' n! H) ^0 i @.HasOrder := true;
( {; v/ u& i8 j; D, y end;
, p( b+ d, J: B, c& k9 g end;: `( j" n! R/ ?; p! E7 |" n) n
end; -- of the method
$ l: v) z3 @" k# `1 g# j& e |