/* called by: entrance ctrl of the object 'track'
% I( s- E) J9 E7 g* V2 o*/
3 t$ D5 t; i. {% @: Nis5 Y. L' j* i8 ^: T' s
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
( V2 p: U4 i0 v9 l& E8 W% v1 q1 Gdo! h( G+ m3 { s1 y
Lan := rootfolder.Internal.Tools.AOLlanguage;5 d, h" X& _9 K) p4 N. o: |
if current = @.Destination -- else return+ p9 d6 R+ \6 w: a3 L# q: j
then
1 b, I* U* l$ L# p @.Destination := void;
( Z/ t L8 t9 X- r, N7 j if @.occupied then
9 Q& I) t. Y$ r+ p* `" F5 b* Y part := @.cont;
1 U+ k2 e6 @8 l' F8 V& k- y @.transpOrder := void;! o; b8 `, r6 E. Y J6 y! W1 X* h
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
1 ^# g- }+ M. j6 `" j2 | @,root.eventcontroller.simTime);
" `2 T Z1 @( n @.HasOrder := false;- W7 Y. X( J+ d1 s) x# i6 v! x, l
@.DrivingHome := true;: U' Z) b$ c7 U8 }' a9 `5 [7 o
rgManager.tryToStartTransOrder;
. a5 } T1 I) M( o* I, S if @.Destination = void
7 L6 ]* }+ H! b4 t: V+ T/ G0 ]/ ~8 V% R then -- no transport order for vehicle @5 i4 b6 H, h+ g M5 N8 c) S% R
@.Destination :=
5 e# P- e0 ~ @3 y0 o6 _$ y rgManager.nearestFreeStation(@,track.~);
, s% S! c& q$ j& ?' M newDirection(@);
$ k f5 q8 s% j- } f2 } if @.Destination /= void then9 g( h. @5 X- Q
@.Destination.NumReservation :=
0 w6 r7 v1 H. ]" x9 B) z; W @.Destination.NumReservation + 1;
/ H2 Y' o0 O" L end;
; X) ?, Z# Y# U @.CurrIcon := "drivingHome";
' c$ i+ `$ h/ m& ]5 l1 h% J @.DrivingHome := true;
4 K9 Z' E" w6 S2 M' Z3 r- ?, | end;, ?7 }/ O, i, M* V/ b
else -- the vehicle @ is empty, both vehicle and part are in the same dock station4 k1 L1 z$ K) F0 x4 b
part := @.transpOrder;( \( |' J( L7 t3 D" M; h6 j& h; E
part.move(@);-- load part
9 o0 ]7 f7 ]% x. e3 ^ @.CurrIcon := "load";
1 m# S+ T3 Q2 a( o5 B1 F6 g6 Z" w GlobalDistObj := part.globDestination;2 P$ S/ ~) N1 e- S$ a) h S
assignLObj := rgmanager.rgAssignL;( n4 j/ H: D! ]1 t: D% e
row := assignLObj.getRowNo(GlobalDistObj);8 f& a9 B& ?& s. F
if Row = -1 then -- since 70
& A9 ^( \/ |/ }' ]! {+ L( j if lan=1 then
; |- Z: P7 u* e) i7 b h promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
: L' K2 L a* Y4 I& o to_str("in der Andockstation: \"",?.~.name,"\""));
: m/ o2 [$ O9 W else
3 P9 r' H9 G$ c# R( m promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
% _3 M+ k2 M# {) |* N to_str("in docking station: \"",?.~.name,"\""));
1 R' l1 @" H& f+ d' \ end;
7 ^# |; f$ W" j/ ^8 O else
1 T! f* z5 u8 I @.Destination := assignLObj[1,row];! R A, @+ ~% R% d& G) [
end;
8 k0 a' W6 c! z' D4 l- D newDirection(@);
' A6 T$ Z) C% |8 ^ @.HasOrder := true;$ H$ E' p( g" h
end;
1 h# n# `0 P/ [5 X end;3 a+ `0 G; |' M7 W
end; -- of the method
7 e* M# W& d# h# K+ I' Y' G6 ~1 ?( r |