/* called by: entrance ctrl of the object 'track'
* r) v/ G' s# S0 Y: ~; K) G8 c*/ K+ A- D* H; v- P
is; N( ]$ o' o/ K) d4 u1 A1 L1 A
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
5 w L! N* Q; l+ C) m' sdo
- d& ?- ^. ?: d: C+ B Lan := rootfolder.Internal.Tools.AOLlanguage;, }- x, z5 `5 Q3 }
if current = @.Destination -- else return' x& c3 G9 J# Z* O: X+ R0 G
then2 Q. [# |2 w5 }1 Z$ h
@.Destination := void;+ m: `1 O3 t' h9 d( J' {; L2 I
if @.occupied then1 y; ]0 O7 c5 Y( I
part := @.cont;' B* w: j1 S% T, S# k3 y4 `
@.transpOrder := void;
1 h9 v- F: {+ S) Y+ x" m- [+ o, D1 o part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
8 {$ E# h2 W" J) z* h; k @,root.eventcontroller.simTime);( ^" F7 n* k! E# Z) [# h4 V
@.HasOrder := false;9 f$ x( ?! E1 e0 g+ c! B8 H6 j( H6 D
@.DrivingHome := true;0 G7 Q9 H# y1 k, y' M1 L. n
rgManager.tryToStartTransOrder;+ ]* D/ m4 b9 Q
if @.Destination = void
$ U D9 ]4 X- u( r0 j" h7 A6 x6 U then -- no transport order for vehicle @' m3 @. A; S: A1 \+ l7 j
@.Destination :=+ o4 ]- f: m' l$ n( p2 P- e
rgManager.nearestFreeStation(@,track.~);% |5 b; O! ]7 R$ [+ K8 Y/ E. ]
newDirection(@); 8 q: g8 a! o+ o- Q/ n, P
if @.Destination /= void then
5 H" w. [# K2 U @.Destination.NumReservation :=7 x) m; ~+ N _9 J* f" e. X
@.Destination.NumReservation + 1;
( V/ n" n% R, e0 P. W9 Q; \ end;
6 E' G. A- `7 u* d: N @.CurrIcon := "drivingHome";/ E0 y# _! [- E
@.DrivingHome := true;
3 G' M0 B4 _+ ]9 B4 e$ I$ s2 I+ Y# |2 g end;3 u p. N. w. S5 h
else -- the vehicle @ is empty, both vehicle and part are in the same dock station- k! r0 J0 S( w% l* q8 J
part := @.transpOrder;
+ E7 }1 R# s. U5 k" w# y7 J: O \ part.move(@);-- load part0 v( h9 Q3 W4 ^( |! \4 c" P$ L: d- J
@.CurrIcon := "load";- z% {% J+ Y+ t4 n9 Z/ L6 g7 b
GlobalDistObj := part.globDestination;* M% D7 n5 n2 I9 q7 a7 _) F7 n5 o) O
assignLObj := rgmanager.rgAssignL;5 c" X3 ?- d' i2 [1 i
row := assignLObj.getRowNo(GlobalDistObj);, P9 J. K! w6 Q S6 D9 v
if Row = -1 then -- since 709 s c% i x# F& N# m
if lan=1 then
' G' D* Y$ r% R' F+ X promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
; V2 ^$ Y( P3 g2 f& g$ N2 N3 l3 Y to_str("in der Andockstation: \"",?.~.name,"\""));# R( N1 H% L6 W+ A4 h
else2 s1 \, \3 [- b `
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),# I, j, @$ k' a0 s; y" v7 T- ~# q
to_str("in docking station: \"",?.~.name,"\"")); 6 s0 t& I6 Y. y- _
end;
+ F+ C/ _0 ?6 R else
0 Y7 Y& q/ t9 E @.Destination := assignLObj[1,row];
) {, H5 z# d: \/ Y- A+ K7 f. W end; 9 u3 Y9 I% ^" O* n9 I7 I
newDirection(@);4 ^: k- |/ y' H! l1 V# l
@.HasOrder := true;1 C$ H* A$ F0 x! `0 ^( o) ]
end;
9 W1 |) {" ^5 S0 C& X9 N. K end;# x& W% a0 w% c! I8 n
end; -- of the method
2 L. Y$ y5 l' I0 N4 _" w |