/* called by: entrance ctrl of the object 'track'
) i" o, J9 l5 t6 B" K s*/4 s' H: d/ y$ }( [
is
( e/ h+ k8 p, U( V. C$ T5 p& q: x5 j part, GlobalDistObj, assignLObj:object;row,Lan:integer;( h* t/ e! ?+ z$ ?" ~! H
do' {, a9 F, a6 d* {% u6 N
Lan := rootfolder.Internal.Tools.AOLlanguage;, w f& x+ D$ d
if current = @.Destination -- else return% b. c$ [, H* M, p
then
) O- M/ u# t6 n1 J- F, D @.Destination := void;6 l; w' c9 L. Z" Q& `- ~
if @.occupied then
* m: z4 P! C" L0 F: a part := @.cont;' M1 W [; g0 n$ q _2 V
@.transpOrder := void;
1 U: \$ P: o [" Q' r part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
" k& l$ u3 ^& w @,root.eventcontroller.simTime);
0 ~, N1 ^4 S- z+ ~ @.HasOrder := false;# J4 c8 h. y5 r3 ]" f, P
@.DrivingHome := true;: S0 I; f( j3 j4 H7 M
rgManager.tryToStartTransOrder;0 r" J5 ~" ?& W* _7 O
if @.Destination = void# N1 D- h5 k) ~1 M, P
then -- no transport order for vehicle @. v$ w& X) [% S
@.Destination :=0 W8 R. J: _, P) x
rgManager.nearestFreeStation(@,track.~);
{( j8 d( f1 Y8 B: @' E newDirection(@);
8 y) U/ I/ O9 ~, Q0 R if @.Destination /= void then
! A: B q# O. N @.Destination.NumReservation :=
0 l8 H' O. _ f- D/ t @.Destination.NumReservation + 1;/ U( r- q% |7 H0 B4 g
end;
5 g, N% {8 t8 z @.CurrIcon := "drivingHome";. n( r& k! M! L% }+ g; D
@.DrivingHome := true;
" x/ w9 ]# Y4 O' Q end;" C# W% z9 l4 o9 B/ x7 e B
else -- the vehicle @ is empty, both vehicle and part are in the same dock station0 J. e: Q q: K
part := @.transpOrder;8 i) u6 c- N: a8 K q6 X: \) j9 S7 _
part.move(@);-- load part _/ h+ n0 ^3 Z& ? I: V& v% k
@.CurrIcon := "load";
& ?/ s* N* \6 g* m* _1 W+ f GlobalDistObj := part.globDestination;" X- L4 e/ v" h$ n
assignLObj := rgmanager.rgAssignL;% W6 x9 f8 x9 V0 Q$ V. J
row := assignLObj.getRowNo(GlobalDistObj);# K* `- r" Y0 {7 F9 i! r
if Row = -1 then -- since 70
0 G6 w$ x! R7 ^/ y5 E3 K5 | if lan=1 then
/ u2 f/ m% Y0 B* g promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),, C8 c n2 ^" \9 [3 g4 t
to_str("in der Andockstation: \"",?.~.name,"\"")); p8 y, V" O/ H! U1 `% _" x
else
, P+ {* P" j, A/ N8 \8 S promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
# d: J% o/ E9 V2 p. h% u to_str("in docking station: \"",?.~.name,"\"")); 9 K# ~2 c4 z( E6 K4 D, d
end;
( N3 s9 H, u9 f$ b: f9 N4 { else
1 H8 Z) P, x* K }- g) R @.Destination := assignLObj[1,row];
; o. A6 }; Z5 @& y# T* E end;
! [ G: C; {' J& V: } newDirection(@);8 Y4 }3 b& D% Z
@.HasOrder := true;! M, Z$ N) M0 R. u9 x5 u
end;. Q2 \4 b* F7 e2 d1 \
end;. B* G; ~/ Z; A! b$ k$ K h6 f
end; -- of the method
# [$ O4 G$ F. E# m- ?$ ~, K |