/* called by: entrance ctrl of the object 'track'( e' ?; j: j7 @
*/
* T1 W% R' F! D. e) Xis
7 k4 L) k& L; ^$ g5 v6 L part, GlobalDistObj, assignLObj:object;row,Lan:integer;
0 I$ S- G/ t0 M/ T# Ido
( T" x, O- l: s/ ]( i/ z& P Lan := rootfolder.Internal.Tools.AOLlanguage;) w! V- u. @4 j( J# f) _# R" a
if current = @.Destination -- else return( u4 S1 l0 {0 x
then* D. }$ s0 M7 M* k' v
@.Destination := void;* P& U# B9 g/ c
if @.occupied then1 |' o; \7 j+ k
part := @.cont;
@6 Q: Q) D, f" x& f* D @.transpOrder := void;
' _5 g: o4 r9 ^7 Y' W$ H% P part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,9 Z5 Q i$ [% p1 _0 t& ?, x9 p4 e
@,root.eventcontroller.simTime);! R, m6 L- @& l
@.HasOrder := false;
3 d) ]7 G; C M' ?' k, L2 G @.DrivingHome := true;/ w" c3 f; g5 k# m, ?$ L
rgManager.tryToStartTransOrder; D8 t9 z7 j$ ]' {8 v
if @.Destination = void
% A6 G# A% |% O' H$ U }7 l4 { then -- no transport order for vehicle @
1 j' h% a) P, k5 _) \8 o @.Destination :=8 S. Q; G3 [0 S; _2 N
rgManager.nearestFreeStation(@,track.~);
4 E% A0 \& E# M: v# N newDirection(@); - ~* D# _, c# s# N
if @.Destination /= void then
% J( y+ ?- ?! k1 O! N1 w. M @.Destination.NumReservation :=3 u4 k3 [% n" X5 V$ Y! i, I
@.Destination.NumReservation + 1;
) C; J0 ?& Q! ~) ^6 m* Z5 Z end;
5 B9 Z" ?/ V, B1 h @.CurrIcon := "drivingHome";, k" F0 O9 `4 t: ?/ k! A' f- p
@.DrivingHome := true;( X7 k) E! f+ ]/ M! {' n
end;
4 L1 u; X b9 c else -- the vehicle @ is empty, both vehicle and part are in the same dock station
' F5 {$ X. E% N- t8 ]3 E part := @.transpOrder;
: j5 {( i! r, J" v part.move(@);-- load part
, j( O! _( M: M6 v: Q4 Y' ?$ L @.CurrIcon := "load";# c2 c5 V S6 a0 J1 t9 x
GlobalDistObj := part.globDestination;
5 g4 i1 [9 [% w$ Q' E5 y assignLObj := rgmanager.rgAssignL;
$ P* |* Y: Q8 ?& G row := assignLObj.getRowNo(GlobalDistObj);8 l( F& r8 t% \* S
if Row = -1 then -- since 70
% `! i) v' U1 Z+ o y: J1 u: W if lan=1 then/ e0 A# U* N6 S
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
- f( B( d, [8 Q7 T6 E8 e to_str("in der Andockstation: \"",?.~.name,"\""));
5 o( x; X) I/ Q7 z9 s9 g. P else# J/ O" i' j, n' {# Q2 A7 S
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
! N1 d+ o. _7 ~# q; h to_str("in docking station: \"",?.~.name,"\"")); $ X7 C( B% I! l$ @
end;! Q$ H# q% {# Z' T7 \+ `- D3 }
else
) q5 j' C% @, g* G" O. X- _3 p @.Destination := assignLObj[1,row];
+ q) y- o, v1 c end; ! p! N3 s* `0 M$ v
newDirection(@);; m, O V9 {" v' y% {$ r
@.HasOrder := true;: K% B3 v; {0 V+ `; O" q' x
end;
9 m3 b/ L" [% g% r$ `) ? end;
7 A* I5 d; o$ h, J+ N J, d3 xend; -- of the method# {; I. ~1 D% _+ {( f0 ^
|