/* called by: entrance ctrl of the object 'track'
" @' F2 V7 E$ ~*/
& D, e2 f8 D1 m" J- o! z4 Cis7 k7 T3 p' _( k* Z {: N
part, GlobalDistObj, assignLObj:object;row,Lan:integer;3 ]% h' Q" x1 U& r* [+ x5 W
do. G8 R4 a& o$ ^% z \& J [
Lan := rootfolder.Internal.Tools.AOLlanguage;8 F7 M4 d2 q9 `3 b
if current = @.Destination -- else return
, L5 Q/ d0 I. k/ S then0 E1 j9 E3 O& u
@.Destination := void;
4 \8 B5 U) x ^7 C8 _ if @.occupied then
6 p2 z( H' G8 ]* P% }. o; y) P' ^ part := @.cont;6 M9 I5 P2 ? w# c# C4 c# E4 @
@.transpOrder := void;
4 \" c7 L7 O! Y3 y: N1 y+ l( m part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
+ e( b, o) m t1 G, |- o* H7 l @,root.eventcontroller.simTime);
/ E2 O1 a* W% s& g6 [: I @.HasOrder := false;# H: [7 w& R9 @8 y, J3 l) J5 b
@.DrivingHome := true;
2 m% c! N8 E4 Z% h- y' f% c rgManager.tryToStartTransOrder;
* |1 r5 ?$ l+ n$ ~7 |) H if @.Destination = void
) F4 I( x7 m. T then -- no transport order for vehicle @5 ^" \1 N2 p8 \4 D, P5 Z7 V# Y) G
@.Destination :=; M5 s; D5 k6 n# D, d/ X
rgManager.nearestFreeStation(@,track.~);! j# Q m2 _. E4 @9 X+ r4 f
newDirection(@); , E8 [' D: R; \$ o4 f3 V
if @.Destination /= void then8 |8 X! P% |- ~( h- O* h
@.Destination.NumReservation :=9 h6 M( H4 K/ n1 a. N/ p
@.Destination.NumReservation + 1;% B) Q% p0 v- P- g. g
end;: k5 s i/ h% [; g
@.CurrIcon := "drivingHome";
% `, g! Z9 V, J( j7 W @.DrivingHome := true;, u5 z4 [4 B( M* P$ ~3 |
end;
/ I1 _8 q6 t: r! I else -- the vehicle @ is empty, both vehicle and part are in the same dock station1 b6 f; P) R7 M: k! s
part := @.transpOrder;. q1 v% S3 I* P0 f
part.move(@);-- load part
$ H! M& y( ~$ E5 I2 m @.CurrIcon := "load";
2 ~ |: b1 n7 r3 J% \, B GlobalDistObj := part.globDestination;
$ E6 t8 n6 ]' s: e8 y$ q# ~ assignLObj := rgmanager.rgAssignL;8 E Y3 `8 ~- M5 T' @; N
row := assignLObj.getRowNo(GlobalDistObj);/ o/ l% s' d% r
if Row = -1 then -- since 70
: s. ^7 }* e h if lan=1 then
5 l0 P. x, j$ N1 S) \( x4 \/ ~6 ~ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),7 |! P/ y8 W2 r% d+ }, o0 I$ X
to_str("in der Andockstation: \"",?.~.name,"\""));' Z1 |# w8 p2 u0 V' X
else' a/ g1 f+ |6 c# l
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
4 i* K0 S( }7 a6 I- q to_str("in docking station: \"",?.~.name,"\""));
# z+ a7 L2 o5 d9 W end;1 z+ E- D0 b1 E9 w5 P) K4 w# w
else
/ x& P6 ~& Q* w& T8 Z @.Destination := assignLObj[1,row];/ Z: |2 J) _$ n( V* l
end; ) ^" f4 z( \2 E) f
newDirection(@);
" O% k6 `/ F* e: k# t @.HasOrder := true;
+ {$ } i$ I4 [# V: @ end;
8 m. m- x7 _6 x# @: b end;
4 O: J. \3 K9 S9 B" Yend; -- of the method4 Q$ r' P% _+ ~ B% y
|