/* called by: entrance ctrl of the object 'track'0 @1 `& ~& X- C( [
*/ J; p& d7 x5 P& ]1 u! j
is
3 T: E' n9 y ^6 j( n3 a part, GlobalDistObj, assignLObj:object;row,Lan:integer;
: E8 G- f# q! g$ v, a/ fdo
2 q) l' s) D* A$ U! B Lan := rootfolder.Internal.Tools.AOLlanguage;
9 v; e1 w1 u3 x k* D* K if current = @.Destination -- else return
* y1 g3 v( j( v4 U+ w3 ?( f! D then! h1 d! `4 `/ b+ E f7 L
@.Destination := void;9 ~' v' f; T8 y0 R* y8 v# q
if @.occupied then
0 I; w- |" W) Z/ G& e0 ]! B( \ part := @.cont;
5 t: O0 l; ^( t& T+ ?8 i4 ]) p @.transpOrder := void;
) r7 s K1 h9 M L) N part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
% n( n$ W) H5 @$ \" c @,root.eventcontroller.simTime);
8 I- n8 f" W" ?) f- r. l( u& G @.HasOrder := false;; N% D' O2 q% D" P1 y9 y& I5 D" ~
@.DrivingHome := true;' G1 a* }2 m* O5 X' j8 O x
rgManager.tryToStartTransOrder;
, w$ O. V+ r2 f: L0 [ v# X& F if @.Destination = void
1 f V: B9 d* V6 X# J6 W. z% L1 Z then -- no transport order for vehicle @7 e; V- h' M& B5 J$ S! I
@.Destination :=
8 y* x O' D% n; Z+ J" ^& | rgManager.nearestFreeStation(@,track.~);4 {) e, F2 P U4 n$ ?2 C7 q% y7 R' t1 R
newDirection(@);
. @/ N0 o1 z- Q if @.Destination /= void then3 j$ D* X: l8 s( n! s$ Y, r8 Q4 l1 i
@.Destination.NumReservation :=" q- L$ \( l0 p* ^# r/ T0 {. n
@.Destination.NumReservation + 1;: ?% I4 [4 B$ W3 w3 q" ?5 Y4 A" ?
end;
4 l8 @$ h- A# c! ?& K h @.CurrIcon := "drivingHome";
' ~+ E( c! w& g* w9 r1 ]/ e @.DrivingHome := true;
4 @8 j5 F+ A5 g2 O" |( i end;7 O( u; h" t- p* u: V
else -- the vehicle @ is empty, both vehicle and part are in the same dock station2 a+ r% x2 x' `9 U
part := @.transpOrder;( R& ]. e- g; g% C% `
part.move(@);-- load part
: A/ r" z7 C) T, M7 \* k5 j @.CurrIcon := "load";) h& ?) F" I/ @' e+ ]# W, z' M6 w
GlobalDistObj := part.globDestination;* `2 E& m- c' F6 Z; w
assignLObj := rgmanager.rgAssignL;
% V7 z/ [& n( w+ p' y' N row := assignLObj.getRowNo(GlobalDistObj); h- E2 d$ {: D
if Row = -1 then -- since 707 F. Q- w, C, u8 D, Y
if lan=1 then Y" m, x: `8 d1 L( d9 f
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
7 U# }. w0 l# e% q* S% o M to_str("in der Andockstation: \"",?.~.name,"\""));
) ~; F6 [8 }$ s; i; b, @ else2 Z- b9 R" G4 Q. v E, Z+ V
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
" Y7 ]- u2 A/ E# X4 @0 |6 o to_str("in docking station: \"",?.~.name,"\"")); 8 ~ G& o p6 a; v
end;, b' O" }9 H+ ]" e; U- b/ }
else' o1 s J- z% [3 e" y, W7 U }" c
@.Destination := assignLObj[1,row];, _ L) H9 n6 M8 ?& D& Q2 j" \
end; $ ~. H# @1 m: S; v
newDirection(@);
! r A5 T i: W! T9 ^ @.HasOrder := true;
* \" F. r5 v; W" j% p$ X1 h end;* z: ~) {( @* e
end;5 ?+ @ e: l7 ]1 f# Y" X- s
end; -- of the method
y; ? x( y7 S6 ] |