/* called by: entrance ctrl of the object 'track'; p6 l5 C3 a% {7 U2 k. H M2 k
*/; U4 W# B: s0 Z
is
' S5 }1 ?/ t) k$ o; ` part, GlobalDistObj, assignLObj:object;row,Lan:integer;
9 N! q4 [1 f3 s; V& b6 ?do
1 S+ R+ ?, ?* \ Lan := rootfolder.Internal.Tools.AOLlanguage;! W7 ? ^: ~1 O$ ]& z6 z
if current = @.Destination -- else return
0 P5 s; Z3 {$ f1 _# r then
. ^/ @' [9 H* X4 {/ c X- @. u/ I @.Destination := void;
4 F" ^" y5 U. k. t2 U/ H# Z if @.occupied then
' Q# ?0 `1 i! p: c ?6 f! q part := @.cont;
% }& h8 q7 @0 V! V' g! V; W @.transpOrder := void;3 ]& h- R. u: b8 [: O: w
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
U# i3 V9 h) l3 S! R' D" A @,root.eventcontroller.simTime);
; A" j, s E: e4 Z @.HasOrder := false;6 F* f' o" m0 t; ^" Z* {
@.DrivingHome := true;
& D" ^% X" b9 k7 }& u rgManager.tryToStartTransOrder;
5 ^5 y1 K; n* N if @.Destination = void; g/ |3 L. U6 U/ [% s+ u( ]
then -- no transport order for vehicle @
- @, h+ B( t4 h) A4 k @.Destination :=( i% f# C+ p8 b: w9 s' X3 ^0 w
rgManager.nearestFreeStation(@,track.~);
9 s+ Y" @' V$ h& _& n" b& c newDirection(@); 0 R. G) ?/ J8 `0 P
if @.Destination /= void then
# n, a1 j6 c5 K1 J$ {- s. R @.Destination.NumReservation :=( e2 p0 c, N/ I
@.Destination.NumReservation + 1;
/ C5 C9 N( A& T) I7 P) I end;# y5 q: Q5 U, F& A6 T. k
@.CurrIcon := "drivingHome";* f4 o( k2 C( T7 \
@.DrivingHome := true;- V+ J$ T5 W7 y" y' y- D j! A
end;
$ o( t7 }- Q1 Q( Q4 x& R2 p else -- the vehicle @ is empty, both vehicle and part are in the same dock station
~0 u3 N ?6 }7 l# x* k. M& T. v% M part := @.transpOrder;
% b+ ]8 {) P/ w3 q/ A part.move(@);-- load part
4 d' _8 `* q( G2 d* X @.CurrIcon := "load";. }0 U! z. f4 a+ X; _2 f
GlobalDistObj := part.globDestination;* s# U+ t$ h* c2 w; W! F
assignLObj := rgmanager.rgAssignL;
/ n1 t6 `- y. p! M row := assignLObj.getRowNo(GlobalDistObj);
0 [3 }8 ?! H$ e1 A& M if Row = -1 then -- since 70( ~/ o# H& u) u3 w
if lan=1 then
% F( V* D `. s1 c promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
- ~) L# W* w) |, W1 A. q4 ?' \* [ to_str("in der Andockstation: \"",?.~.name,"\""));9 p; z& D' O! B8 T% J8 G
else* V) v" U2 r# k% }! V
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),3 u. M4 X9 `/ C W) F
to_str("in docking station: \"",?.~.name,"\""));
) C6 [$ A6 p! c end;! g# f& J' H% k3 v! V' X; y7 q
else1 w! t; l% Z( M$ p* Q+ G# L+ ?
@.Destination := assignLObj[1,row];
! D0 _/ M# c! h5 @4 n end;
" t0 S$ K* f# T5 r3 O newDirection(@);2 r# p+ L# u* c" q; M3 K
@.HasOrder := true;, M: O* D+ B) p1 A/ y7 t- ]
end;4 r* [2 u4 k, G1 m; R2 h
end; a P* x7 q4 ]1 f
end; -- of the method
$ `3 v' w. [. R2 |9 h4 D' E0 p |