/* called by: entrance ctrl of the object 'track'
- v% p" _& r0 u9 i*// G" y( ] j& Z# T
is
% i7 d6 f& f. s; G Z. e part, GlobalDistObj, assignLObj:object;row,Lan:integer;
: p% a3 I8 l Y' udo% m* E5 k c! H; L& Z3 B" g
Lan := rootfolder.Internal.Tools.AOLlanguage;
! X& T/ e4 x5 C+ _2 E$ l# t* C1 G2 m if current = @.Destination -- else return2 }; G, }' k P. A, C, L: b. ^+ W. y$ R
then9 L, ?0 s& p0 E; X2 r7 ~0 A4 }
@.Destination := void;. x ?0 r0 M4 x8 s0 w5 h1 e; d
if @.occupied then4 E2 o5 g7 {/ ~' v) @% Y3 v
part := @.cont;
. U! r7 x" s) F \ @.transpOrder := void;1 e* s7 _# i$ b; ~1 _2 o% }
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
! A. {! X$ F" V$ z! P5 v: s" C" y @,root.eventcontroller.simTime);
% N' H) m# L9 n4 _ @.HasOrder := false;
% v/ C. v O5 h0 Q+ @9 I3 I+ k @.DrivingHome := true;
6 d0 P/ G) X, j) F rgManager.tryToStartTransOrder;
: `) ?/ H5 Q- S" c* P) T! h if @.Destination = void; h5 ]7 l1 u2 _$ x q) P
then -- no transport order for vehicle @; L7 ?; a8 b; [6 h
@.Destination :=7 k8 H: q( l1 G7 `' h) e# K3 P
rgManager.nearestFreeStation(@,track.~);. o1 s* a8 y# g6 p/ M+ ~
newDirection(@); 5 o; N2 \7 b& `
if @.Destination /= void then
* e Y5 Y; ]: d) W3 W @.Destination.NumReservation :=; f# J O' L+ p H) |
@.Destination.NumReservation + 1;% p! P f8 n/ b* `# E" `
end;. I) K% I5 b& \; {1 @+ U
@.CurrIcon := "drivingHome";0 y' o& f+ w2 b5 R" C
@.DrivingHome := true;6 h- N B( |1 r! e
end;! V: ]/ F% J \/ G2 J
else -- the vehicle @ is empty, both vehicle and part are in the same dock station/ Y/ ]/ }( M3 m
part := @.transpOrder;9 I% d2 f2 A: Y1 \
part.move(@);-- load part" o6 O1 ^$ p" X% w# X X9 g
@.CurrIcon := "load";
" _5 @2 n& f5 s7 T! K9 M" N; e GlobalDistObj := part.globDestination;0 A# Z; F# k0 I
assignLObj := rgmanager.rgAssignL;' l+ K7 k5 ^! s: i# P& u& K
row := assignLObj.getRowNo(GlobalDistObj);& d% z1 v7 n& ~
if Row = -1 then -- since 70
! i. y+ ^0 R9 Z if lan=1 then
2 k- ]' @* C2 B; j0 x promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
! b( X& v2 _# a, v* { to_str("in der Andockstation: \"",?.~.name,"\""));; U! r" x/ o' C6 k9 R% Y
else. F9 o# g. m6 e! y
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),7 i0 k y2 W: E W
to_str("in docking station: \"",?.~.name,"\"")); ; D: P; i7 [/ S$ k
end;
; s" I3 V- U* t6 A$ o6 I4 ~+ Q7 }2 ?8 [ else9 y" M% n. {+ y _ E
@.Destination := assignLObj[1,row];' i# l+ t G: f4 m; Y- ^
end; ( Q" N5 E0 x N0 Y+ ~# S
newDirection(@);9 m, o+ x- R, W4 g2 G
@.HasOrder := true;
1 y+ @9 x! g u( c) n end;
a$ l k6 ~$ b6 S5 b S end;' ?! b) v" e* h7 [5 l3 A! }: q/ C
end; -- of the method I. Y5 O( Q7 t( ^" Q# a- t
|