/* called by: entrance ctrl of the object 'track'
% Y2 W/ H' y* U& C9 E*/( {* Q. }% }" y$ w
is
3 {: ?. Y6 }/ _1 x2 D2 k part, GlobalDistObj, assignLObj:object;row,Lan:integer;
2 B: c; q! h- k5 H1 odo
# l: m1 _" l; m+ D0 z3 ~7 V Lan := rootfolder.Internal.Tools.AOLlanguage;( q j3 V, f2 i8 N5 @/ v
if current = @.Destination -- else return4 F. x7 [1 E0 L; t% q. {8 n
then
( W$ i+ ]# r+ S$ R' z3 t+ q8 f @.Destination := void;
v8 b+ }0 Q# z# i: }1 L7 J if @.occupied then
/ O) k- {2 I5 g) v! q T' P part := @.cont;
5 u+ m- |; | T2 h1 S* |1 T* m @.transpOrder := void;
9 d+ T) ?6 w7 } part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
# o3 m2 H4 ~. K0 G# ? @,root.eventcontroller.simTime);
3 X2 P$ {6 f* H. f" H( v @.HasOrder := false;
! k, ^, Y& s- }- Y- z" q) b$ k @.DrivingHome := true;
: Q1 ^/ i' D& d+ b0 z6 Z8 Y rgManager.tryToStartTransOrder;
) y# E+ ~' B' E. U# M5 H7 {4 Z if @.Destination = void) d4 }+ _" y/ x4 p
then -- no transport order for vehicle @
! U& Q( U! q0 G9 U( W9 `/ f/ d @.Destination :=
0 A! c* b1 q9 ?/ x% U6 g rgManager.nearestFreeStation(@,track.~);8 m/ \- f$ V7 v, Y& y% d
newDirection(@); 2 Y) \8 B9 ^, a
if @.Destination /= void then: [5 G1 z |; a$ D
@.Destination.NumReservation :=
. f" J" H( N2 A& v2 ` @.Destination.NumReservation + 1;$ }) l4 i) d0 {8 ]! u
end;
8 X4 N' v) F5 B# X: j1 M- q# }' V @.CurrIcon := "drivingHome";
) z; m. }, |/ W; W1 ? @.DrivingHome := true;6 ]! ~0 \9 i/ G. [
end;
0 a' z! W x$ S3 k else -- the vehicle @ is empty, both vehicle and part are in the same dock station# {0 ]8 D, g; F1 D' N
part := @.transpOrder;. K m/ f. t# ]
part.move(@);-- load part) i' J" M7 ^! Z& `; |
@.CurrIcon := "load";
) h. K( B6 H1 l( w B6 Z, E GlobalDistObj := part.globDestination;# e3 p4 p. z! c8 i) F
assignLObj := rgmanager.rgAssignL;
& R4 w9 O6 x$ `, N) ]$ O }' X row := assignLObj.getRowNo(GlobalDistObj);4 L; s6 L5 s5 ?! T/ V& G5 r! w
if Row = -1 then -- since 70& o; g2 y: O2 n3 r3 W
if lan=1 then" p% N9 s1 D8 B+ ~9 \9 T+ n- C9 H' j
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),: n% t! o6 l* d7 w
to_str("in der Andockstation: \"",?.~.name,"\""));
. d" C, K; ^8 A! c# g else
) ?/ D; b4 b/ P! t) |3 }" K promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
" r' h5 M, v, _; \ to_str("in docking station: \"",?.~.name,"\"")); 9 o- g7 [$ f5 n0 d2 c' f# d
end;3 C# a6 _! E. V# R3 o% Q0 n
else
a6 b+ n4 r, X4 n4 D# L @.Destination := assignLObj[1,row];# Q0 F5 Q' ]% x6 @3 @
end;
+ R( ^! ^' ~3 f5 Q/ Z. w newDirection(@);
) t7 k, @% l Q' p- k0 x7 | @.HasOrder := true;" }) n8 H' i6 s$ i$ M
end;# O- ` L" E' a
end;
/ p0 l; S& M4 ~& y" F" i+ @- b- Uend; -- of the method# A( a5 }( X% d4 e
|