/* called by: entrance ctrl of the object 'track'
) ~) X4 Q4 R K) I2 b*/& R0 R: C9 Z- \6 W9 O
is
) ]) d. y' B, {/ W. Z6 G part, GlobalDistObj, assignLObj:object;row,Lan:integer;
5 r+ Z) {/ s0 A9 q- ]do
) P& P, w) D+ e7 v Lan := rootfolder.Internal.Tools.AOLlanguage;
4 W5 v2 t: C) I6 U* T Y if current = @.Destination -- else return
" A' _* U* a. a! B# G% Z( j' e then
) o, z7 n$ {# K8 B3 V @.Destination := void;1 C8 X/ F) R! e4 ]4 R: W; S
if @.occupied then5 {. B# o* y8 E( x
part := @.cont;1 j% f g/ u6 X: Z/ e
@.transpOrder := void;. y0 T& l0 e- ~. w, T& T, U
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
* m- |, ]; ^/ {) Q, u6 a% `3 E. C @,root.eventcontroller.simTime);
1 ~- t6 U9 A7 F* t0 s, ^8 J- K @.HasOrder := false;
/ g( X/ Z9 o6 c, S4 P$ s! { @.DrivingHome := true;
/ ]# U' m% P- Z& l" O0 X rgManager.tryToStartTransOrder;8 j: V# W. I6 _, t+ I- @7 O9 l' r& J5 c
if @.Destination = void
5 A) U' u- [* O' d% X then -- no transport order for vehicle @
" U0 T4 ?: t4 j# B; V9 z @.Destination :=
- a( `" Q$ R1 U9 o4 ~ rgManager.nearestFreeStation(@,track.~);6 }6 P- q, L! e/ t& o
newDirection(@); ; d/ |% e: P% N9 ?5 d; g7 D. S. [
if @.Destination /= void then
/ g4 @) w& L0 p9 E @.Destination.NumReservation :=% @2 q! r& q! S8 B2 o0 \* e
@.Destination.NumReservation + 1;
9 O! a: X7 A- c- y+ }' ^ end;
! \; \3 U- P# w( W6 Y4 O+ v5 z/ Z @.CurrIcon := "drivingHome";& \' R8 ]1 c! t
@.DrivingHome := true;2 {6 A' I( u% z4 k6 b
end;
O1 X, x9 I: W: n- }, _$ v- l else -- the vehicle @ is empty, both vehicle and part are in the same dock station
$ `+ P- s) n# A9 a& R+ n; ~% l part := @.transpOrder;! G3 C; W, p) s4 a- ~$ \; {- T1 B
part.move(@);-- load part/ B; v y5 [/ i
@.CurrIcon := "load";
) [' i6 C4 I1 x& `1 M3 f* _ N GlobalDistObj := part.globDestination;, X4 l$ \, e, K, }9 d. g/ ]
assignLObj := rgmanager.rgAssignL;
* N* y. y; O- g: ?6 h row := assignLObj.getRowNo(GlobalDistObj);
8 g6 Q! ?+ y3 @# s' Z- N if Row = -1 then -- since 70. A: u& b+ R2 l+ O) V
if lan=1 then
( N- t: D& N) `2 ]$ w promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),9 X; H7 U( _+ c, d
to_str("in der Andockstation: \"",?.~.name,"\""));
% k7 t3 u# P Z0 ] else! Q( Y4 \$ w5 _, k8 P: b& ]# K
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
* z: z( v7 L& M, S; c; d to_str("in docking station: \"",?.~.name,"\"")); ! {* U* l; P% c; E4 s' ]
end;% o0 N4 j9 t) l# V
else
: l* d- }3 L' R6 q+ a9 Y2 N7 F @.Destination := assignLObj[1,row];
/ z8 t4 R. W3 y- y! ~# d H+ r end; , J; [& ]% y1 x
newDirection(@);# {4 p3 {/ ^, `) P
@.HasOrder := true;) T3 j3 Z" E3 `4 Y9 w& w" L
end;0 P6 q) G1 X- M9 n/ i. [7 U- Y) B
end;
5 _5 X: S3 k' V5 g yend; -- of the method
$ g) H! s) \4 {0 m |