/* called by: entrance ctrl of the object 'track', B7 v5 L0 C5 B# G& u
*/* U2 h9 C/ @1 s. q4 l. h
is
+ |# W6 A3 ~( H" K! N, c part, GlobalDistObj, assignLObj:object;row,Lan:integer;" x; A" C/ C/ G4 D5 d
do
: J$ N1 D) l" Y* E1 D7 Z Lan := rootfolder.Internal.Tools.AOLlanguage;
; u2 z B) |* V/ ?+ G( S if current = @.Destination -- else return0 P0 Y' i4 n" p# v2 u, f; q* ^
then
0 E8 w- `4 V: H X @.Destination := void;
0 b: k( k1 l; M# _% @; h if @.occupied then
$ U3 O+ G6 e3 I0 r& O0 Z part := @.cont;
/ X0 L2 }" A% y6 U; Z$ P) p/ q @.transpOrder := void;
/ P7 m i7 Q7 J8 [; c part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
( x9 {- G8 l" q. f' n @,root.eventcontroller.simTime);
2 U8 _: H( G% I* |4 x$ U% q( j @.HasOrder := false;" ^. a) c7 I7 D. Q! f
@.DrivingHome := true;
; o% M7 {6 _ S& k/ D9 L3 q rgManager.tryToStartTransOrder;
; A: ^" ^8 U& S7 F if @.Destination = void, |& P4 N# |! B& q1 K/ D
then -- no transport order for vehicle @7 Z& Q& v" K" G1 @' N. a
@.Destination :=
5 j! |8 q1 P6 {. B2 V rgManager.nearestFreeStation(@,track.~);5 p2 m8 w! ]3 |5 ~ _
newDirection(@);
2 J( s/ j: D1 D8 F5 Y) W8 |9 L if @.Destination /= void then7 S z$ D% Z$ t# [2 P
@.Destination.NumReservation :=
4 @7 B& A1 p" p& w0 Z1 F7 g @.Destination.NumReservation + 1;: k/ [6 U5 p6 f$ |6 W
end;
) Q1 d: M. B; j2 E7 K0 x @.CurrIcon := "drivingHome";
& b+ M& V$ a. ?' f1 D' X- _/ H) p @.DrivingHome := true;
9 p5 h! c+ k- N( N' J) c$ H end;6 @. [1 q. M/ a5 L: ]# X
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
8 m' ]8 o$ D y' D part := @.transpOrder;
. p( C0 ]1 b' S$ E part.move(@);-- load part/ y# _3 J5 X2 ~5 ~8 r' y# D0 J
@.CurrIcon := "load";: r7 p% i! D4 c/ N0 s
GlobalDistObj := part.globDestination;0 _5 ~, c! l9 W4 C. f
assignLObj := rgmanager.rgAssignL;/ z4 l; e* l- u8 s
row := assignLObj.getRowNo(GlobalDistObj);2 n K j- \: Q- W9 T- f
if Row = -1 then -- since 70
5 ] l1 V7 C5 Y if lan=1 then
* E" o1 ^/ O# Z' a4 @" b% F' K3 W; J promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
# w# x2 Z; M5 n% G to_str("in der Andockstation: \"",?.~.name,"\""));
* b4 S4 U5 N" O4 @2 z else6 G0 ?, |$ i3 Z* `, }& w$ F& N
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
4 d0 q% P( C8 [6 o5 O1 e7 K; @- E to_str("in docking station: \"",?.~.name,"\"")); 3 a. T9 r, v5 `
end;! J8 H, c" C/ |
else
& {5 a4 k% N+ M) d# S# T! p @.Destination := assignLObj[1,row];! X+ x9 J- B% `3 g/ N2 ?' w2 {
end;
; d k; O% k/ a N: w) T newDirection(@);8 ? q! {& N; i! n1 X
@.HasOrder := true;
% D6 o. \: a4 q9 a$ o9 W( U end;4 Z4 t+ k. Q3 k+ ]- @4 g
end;0 Z5 m5 [1 A; J6 z9 \' r% G; D$ p
end; -- of the method
l( B; x% T) X: N |