/* called by: entrance ctrl of the object 'track'
0 }+ ~8 l. S3 ]+ ~, X4 R/ o5 d*/
9 w# J5 T5 b; n% Y4 Y# `is
& `2 ?8 u' X9 f. T! K part, GlobalDistObj, assignLObj:object;row,Lan:integer; d- x7 }. G* c" b, Q5 R. N
do
: y. i4 c* c5 s" n/ O" S# H Lan := rootfolder.Internal.Tools.AOLlanguage;0 e' T7 E. [* S n P
if current = @.Destination -- else return
: H/ ?4 A& c. u, o then
6 E# l! g+ w6 ^: h7 ] @.Destination := void;+ B; H5 y; e' ~ C# S- D3 {
if @.occupied then2 j& _5 S0 ~) m7 N) W
part := @.cont;3 M- V) u6 B9 W) ?) P: f4 q5 b; y& h
@.transpOrder := void;
$ V; q$ j6 C- T* J( {7 \8 r part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
5 c; z3 }5 I" N0 r @,root.eventcontroller.simTime);5 s: S! o- u1 @0 T' ^
@.HasOrder := false;0 p* H* P* t0 H3 T
@.DrivingHome := true;
2 @, {4 Y. c) l/ N! o. o rgManager.tryToStartTransOrder;
; {( n6 v( r% x1 q if @.Destination = void$ |( x3 ^8 \% M& E$ T' k; f
then -- no transport order for vehicle @1 m4 t1 X3 v) ^7 Q( {8 n; @, j
@.Destination :=
a* Z( p: q% w- p1 F9 w4 ] rgManager.nearestFreeStation(@,track.~);
! r% \# r: [# o' {5 `* e newDirection(@); 2 U% s& ~0 q0 k0 y: Y
if @.Destination /= void then9 Z+ ^# D& a: y% ^; r% R4 Z
@.Destination.NumReservation :=
+ ~+ w6 \6 k3 [$ ?- z @.Destination.NumReservation + 1;
6 @& y4 y7 h7 H1 J! p+ a2 h) x end;. z" ?/ O- ~* q) S1 Q, r
@.CurrIcon := "drivingHome";7 @3 R ?9 [" q1 ~9 W
@.DrivingHome := true;
( d: T6 F1 O, a2 D8 T( ] end;6 t9 ?! m) D- Q6 l6 m, K
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
! w/ H+ n# y1 ]% p; X, L5 _3 O part := @.transpOrder;
" @4 D& Y( z" i) [ part.move(@);-- load part( q/ w5 {. T3 _6 ^
@.CurrIcon := "load";
6 H W! c5 {& B9 D% O9 L8 v2 Q1 } GlobalDistObj := part.globDestination;' r. B# c v/ N6 S
assignLObj := rgmanager.rgAssignL;
9 W5 t$ Z+ \4 N0 h3 q' Z: v row := assignLObj.getRowNo(GlobalDistObj);
' C# y4 F! ^) j1 {/ E9 Q+ v if Row = -1 then -- since 705 k0 X0 G, h3 [& {
if lan=1 then
9 \4 d+ O8 V) P0 J' e B. ? promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),6 c( ^, v$ z( z5 N" b" \
to_str("in der Andockstation: \"",?.~.name,"\""));5 p3 [. g4 W; e% L; Z) g# \
else2 F$ z8 U ~( R f8 ^0 s, [
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),% h6 i+ M! q1 t; k" k7 N
to_str("in docking station: \"",?.~.name,"\"")); ; Y$ V6 b5 A' {8 @, Y: l
end;
3 z: ~8 V* t; U2 p2 j else
' a* t4 F8 Y7 R) n9 v" }# e @.Destination := assignLObj[1,row];
' V5 ~- Z: M+ p3 p( Z end;
" K' U. |6 S, E, i- D! E( ` newDirection(@);
( C C' V f& B9 H9 x4 R @.HasOrder := true;* ^$ }5 G3 d- o# F# F! f
end;5 L0 B$ A6 ~9 M6 G$ A0 @4 ~
end;
* _, {' I: n3 u9 p8 f6 {+ Pend; -- of the method
* Y o1 o! J! h7 x- N2 n |