/* called by: entrance ctrl of the object 'track'+ E4 S. S @4 @. i; `" d1 J
*/) b8 m( W6 M; ]5 j1 p6 }- m
is4 b" T9 n, q; L/ C) a3 o* E
part, GlobalDistObj, assignLObj:object;row,Lan:integer;4 F' @8 n) _# A' N/ ^
do% n; m$ r- n8 I" o& L
Lan := rootfolder.Internal.Tools.AOLlanguage;0 u- U2 ^$ Y5 }! ~9 O2 u/ H9 @
if current = @.Destination -- else return
' l1 X5 |$ M2 k5 x p! J x then( S# c# n/ B' f* _
@.Destination := void;- Z* A$ d" T( c! w2 a5 c+ M
if @.occupied then) U. U" p4 J# U7 u
part := @.cont;
/ v9 G, Q# |8 Z4 r" R' h9 a @.transpOrder := void;
; ]% ~1 a9 _5 i, s0 R part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,% e+ I$ j3 a6 R$ S2 d& R4 V) j
@,root.eventcontroller.simTime);
, K! k) _$ T( k @.HasOrder := false;
. N, O2 ^% t; w1 y @.DrivingHome := true;% K1 |6 H d, O7 N
rgManager.tryToStartTransOrder;1 i2 u7 [6 S4 M1 t! `9 {. L. n7 @
if @.Destination = void) d1 E4 j- |5 O% ^2 D
then -- no transport order for vehicle @
* q$ k5 u5 Q8 t. @# Q @.Destination :=, D% B; r& w. n
rgManager.nearestFreeStation(@,track.~);
6 r7 j8 e8 d: @/ ], s# P6 r newDirection(@); / H) A7 I6 }5 ], n9 S S5 r
if @.Destination /= void then9 x ~9 F5 F6 Z# d3 k; z6 @; K7 \
@.Destination.NumReservation :=
: ]4 ~; Z% A6 T. \ @.Destination.NumReservation + 1;
, N Q# t/ w/ ~ ]# O' _! N# I end;
2 S/ \) ?7 _) _/ J" r @.CurrIcon := "drivingHome";' G [! j( m3 |1 N! B. V3 q
@.DrivingHome := true;
5 T, I, x$ h. E8 L& Y end;
; Z5 M& Q9 D5 N2 P5 e* _ else -- the vehicle @ is empty, both vehicle and part are in the same dock station. r9 h) B# w. T& y9 J3 I
part := @.transpOrder;
7 [1 T7 a, H' E; g part.move(@);-- load part& @4 S" E/ i, B# r
@.CurrIcon := "load";1 p, [) N; u6 u
GlobalDistObj := part.globDestination;6 m& R: w: e2 s. F6 D1 t7 M
assignLObj := rgmanager.rgAssignL;
+ {' _6 p0 @7 Z/ f( P I* X row := assignLObj.getRowNo(GlobalDistObj);$ g& a! ]4 W+ n, z
if Row = -1 then -- since 70
?2 g8 S2 I# M2 r8 u# m if lan=1 then* d7 C. z9 O5 I7 Q* G$ o
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),* k R8 o7 b* k3 ~7 m$ N, {0 K
to_str("in der Andockstation: \"",?.~.name,"\""));
- T) @$ G+ U" f; x else! m1 D' e! s/ [9 @1 Q
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),% d" k1 O6 B5 {- {
to_str("in docking station: \"",?.~.name,"\""));
/ B" D& [% G: W7 U end;
5 q' u' ] m( b( R5 \6 }0 o else" A/ Z, w; f, a- T8 s$ u1 D) l
@.Destination := assignLObj[1,row];
8 Z7 Q: r! f9 x |8 c end;
' h* I: E: H. x2 {" t" y K newDirection(@);- a9 T7 m- s) M& V; x& T
@.HasOrder := true;" e, U2 H7 U. D$ `
end;! |5 F- F/ q8 R) I6 D# F
end;
1 e( u% O$ ^3 C% oend; -- of the method
) f! Z) J& b* w8 H+ ] |