/* called by: entrance ctrl of the object 'track', h! v0 e& _! v, W+ _
*/: n0 P% j4 \1 @0 O
is
) g' T0 Q& J1 s- E( ` part, GlobalDistObj, assignLObj:object;row,Lan:integer;# Q" {% U7 h" {* s
do
6 x) d4 ^5 b8 J4 e) w1 \* h% y Lan := rootfolder.Internal.Tools.AOLlanguage;% F, J+ s' e) Q7 d# {- T
if current = @.Destination -- else return
3 T4 o( ], _& b# U. w! ^! H* W then7 M: `5 z6 d5 r# O8 K# A9 G! J$ Y
@.Destination := void;+ G: Y! a2 f* t7 s( _
if @.occupied then; b& J# c9 M$ Y
part := @.cont;) x2 z( S* D W. w$ s' v
@.transpOrder := void;
W- p! p: ^3 F j part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,1 y! B4 j8 H; H( z1 s* r9 s- [9 m6 _
@,root.eventcontroller.simTime);5 U/ |9 _9 z! g6 c) B" b
@.HasOrder := false;
0 L8 q2 Y* K" m0 j; P. C2 u$ \! X @.DrivingHome := true;# Q6 z& C; R/ ]- U0 x
rgManager.tryToStartTransOrder;
7 W/ P/ i% ]; G/ K v if @.Destination = void! U! G- A5 p9 ^5 M
then -- no transport order for vehicle @
: w& n( T. c' [5 H @.Destination :=
3 Y7 x: P& \+ q" E rgManager.nearestFreeStation(@,track.~);1 ~. G- e; A9 }# h0 E! Z$ d1 B2 s
newDirection(@); : V5 e+ z& T, Y0 l3 h y h
if @.Destination /= void then
: F+ h- |" d6 Q* W @.Destination.NumReservation :=
/ X9 X, [5 p6 r @.Destination.NumReservation + 1;
/ k; s1 T9 [* I6 o) Q- [8 Y b* w% m end;
" M2 ]( x6 D& M# j4 a$ P& Q @.CurrIcon := "drivingHome";
; E- _- s7 E, G3 j5 g @.DrivingHome := true;! }1 h; u- ?( z' m' f7 L' W# `
end;
9 q o# u- |$ Z else -- the vehicle @ is empty, both vehicle and part are in the same dock station
& T' n- n( R3 s$ b( _& z* m part := @.transpOrder;5 n* @7 f v$ i7 v% ?
part.move(@);-- load part
" b0 U$ q3 Q1 ?, K' A @.CurrIcon := "load";
) z% w2 M+ F) v9 }$ ~! \4 t GlobalDistObj := part.globDestination;
: S. p; J0 ^: ~6 Z$ Z! {+ E assignLObj := rgmanager.rgAssignL;- H9 @+ [4 i( u
row := assignLObj.getRowNo(GlobalDistObj);
, O# E/ k u* w if Row = -1 then -- since 70
( E) e/ W! H+ T6 { if lan=1 then
' H/ J+ h. h% L F" A. Q7 k promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\"")," E3 S1 g) U4 \4 j) r
to_str("in der Andockstation: \"",?.~.name,"\""));9 C. M. f0 Z0 w0 J+ n: [
else; i- z5 d0 v. D9 Y. X
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),! V! {" B) J: z. B: l3 e! v* Z
to_str("in docking station: \"",?.~.name,"\"")); ' j+ u. w; K# y3 Z0 o
end;
$ Y$ e" A1 c* Q9 W, ~7 \+ C else# h" s6 F; e, U8 ]
@.Destination := assignLObj[1,row];( ?0 c) Y( O9 A8 R# v
end; . i8 T1 y- P% `" |0 W
newDirection(@);) _9 G W% F. b; u. z
@.HasOrder := true;. D, G) I! Z2 h! u6 K- b- M
end;$ Q N" ]3 y2 l; q+ U
end;& `6 k4 a. I/ ]9 L \7 M% n. J
end; -- of the method' m' D& L, m+ H E: B3 M
|