/* called by: entrance ctrl of the object 'track'
3 n' `9 S! M1 u$ x# y*/
5 e( s; c; j4 E) `* U! A& J3 q) iis: t# E! M( j) l( u, R
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
$ g; b& o/ R0 [0 [/ m% gdo
; Y$ g! F4 A1 B& A) E3 @ Lan := rootfolder.Internal.Tools.AOLlanguage;2 I+ a2 H2 A5 V' L3 C1 r! F2 }% T
if current = @.Destination -- else return
, ~ ~9 A! v; U% x then d' ~! i' e1 r p4 O
@.Destination := void;
+ Q3 ]+ o) i V9 L* k if @.occupied then
" _3 Q; c& ~; {: [. X6 E- n/ z! F& a part := @.cont;- Z# d1 ^0 @: k8 @
@.transpOrder := void;7 v( P- G# A/ N" @4 N' u0 `
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
! ?- w/ _+ }' u( B @,root.eventcontroller.simTime);) A$ q9 g+ {" a
@.HasOrder := false;
4 g E' r i. _3 |, R @.DrivingHome := true;
- @; L. P+ H3 W8 E- E- S: G rgManager.tryToStartTransOrder;6 L$ e7 s& s8 r6 R) H- `
if @.Destination = void( e) d; e8 r. {( R; @4 e6 T
then -- no transport order for vehicle @' O: I3 s3 {' S/ S7 p& j- `0 [+ S
@.Destination :=2 f6 h/ N) Y0 K, A+ j; W
rgManager.nearestFreeStation(@,track.~);" m8 ~% l9 u. L# S4 X0 k! {! g3 Y
newDirection(@); - E3 {" s. ^+ M7 `1 d2 r
if @.Destination /= void then
0 m X9 |( o+ ? @.Destination.NumReservation :=
' }2 s4 s7 `2 ~ @.Destination.NumReservation + 1;" D# j/ d3 `3 [1 v$ Z
end;. ?/ D# ]$ g$ \
@.CurrIcon := "drivingHome";
- ~ J# X6 c2 n: o* ^* k0 F0 \) I @.DrivingHome := true;
5 m$ K* I( @8 f! b4 ~* u; O9 { end;
% h, k1 C' A5 @9 t: ?& T else -- the vehicle @ is empty, both vehicle and part are in the same dock station& E2 E/ E Y/ F4 v+ h: q2 c6 \5 W
part := @.transpOrder;# ?5 E0 V; u, d* T6 @' h
part.move(@);-- load part
2 Q: |1 d1 `' A4 i @; \ @.CurrIcon := "load";
' d- F" J R5 K2 o; c GlobalDistObj := part.globDestination;$ P( x6 o$ |5 c
assignLObj := rgmanager.rgAssignL;- u/ q0 t, N$ J* _
row := assignLObj.getRowNo(GlobalDistObj);& @( w: U9 B. y4 ~
if Row = -1 then -- since 70
, V3 y! v' H; n5 r if lan=1 then6 L, n7 K9 f0 n% u) B" ?
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
: d0 n8 I- I3 a% S8 m# N5 ] to_str("in der Andockstation: \"",?.~.name,"\""));
$ F% G* v) x* T- H) p8 l( P else& K7 X1 O2 I! v/ W8 X, e: \
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
; ~' H" H, Z* P8 J to_str("in docking station: \"",?.~.name,"\""));
7 t* ^: x! A0 n& J. _+ T1 | end;
9 V% q$ g) f5 l6 M" I, ? else
* V# s; ^# b( n; {* A @.Destination := assignLObj[1,row];. C. W4 S/ ]3 B
end;
: V- G( C3 B% R% R1 _" ~ newDirection(@);
8 |8 |- U( W6 l1 j7 k @.HasOrder := true;
- B8 t, S+ z7 H2 f' a6 v: f3 | end;4 z p' e* t o9 B
end;
$ Y2 K4 H' Y! t' Y( q! Jend; -- of the method
" ~3 M' k, L# M F# H |