/* called by: entrance ctrl of the object 'track'
" e h" `% {2 w( G*/
+ p" v! `' [+ Q# ?1 xis. B5 L: t! C7 U$ [* L
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
( q7 C3 w( A" m4 qdo# P4 u+ m9 } m: _, F' u$ x- v
Lan := rootfolder.Internal.Tools.AOLlanguage;0 N0 O' U) j( a" _
if current = @.Destination -- else return
& H% r) g1 N. b2 z then
) W$ N2 X- J9 k' G8 s$ C) L1 M @.Destination := void;4 `* s& S, |5 s& T
if @.occupied then: n5 y; h7 K0 p L7 L& Q- Q
part := @.cont;' f' U/ O. c9 V- a" v
@.transpOrder := void;
* W, A1 P9 m; N1 C) J3 J8 Y% l part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
8 D. Z( Q8 P( T# j @,root.eventcontroller.simTime);. R& o/ J7 B1 {! n6 T6 v' q+ o0 X
@.HasOrder := false;
@# e) Q& G J3 ~3 m( {, Y @.DrivingHome := true;# l7 y- q9 \- S6 n s. c, `8 T3 }
rgManager.tryToStartTransOrder;* Q: n2 B- I) U r8 G9 q; S
if @.Destination = void
1 g& M+ f; u1 V* Y( |& Z then -- no transport order for vehicle @
5 v3 Y2 z/ j0 y& p @.Destination :=
8 R& l6 R6 Q* E rgManager.nearestFreeStation(@,track.~);' f, P0 f7 [) J6 s" F0 t
newDirection(@); 2 E0 Y- s6 d" v9 N- q
if @.Destination /= void then
6 m* C* k( P" M1 q; L0 \0 |1 x @.Destination.NumReservation :=5 t$ U! t6 k0 a2 p
@.Destination.NumReservation + 1;. F4 u1 |/ P* H: Q& _! f" `
end;" j% T4 ]8 t; B
@.CurrIcon := "drivingHome";$ z, m$ }( S- {% M- q" v* B4 ]- g
@.DrivingHome := true;0 T8 q) M: J; x
end;7 R$ E: n5 k, {$ Q% C" s" r
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
, Z& y7 v: A/ {) Z( h part := @.transpOrder;
! L; ~, {, [0 D# w' v# ~2 f part.move(@);-- load part
, ]- e$ G# v5 | [, l0 d @.CurrIcon := "load";$ a$ p+ _) L- o; w
GlobalDistObj := part.globDestination;+ f% r: l" l4 Q( F) M
assignLObj := rgmanager.rgAssignL;9 i, {- B' e$ K! b
row := assignLObj.getRowNo(GlobalDistObj);
1 e' _% u- q, J3 Y9 I if Row = -1 then -- since 70: ^4 T3 l m# w, x l6 T& W7 `' y, i
if lan=1 then; r% s; a$ m: L4 _1 f: x. {. h
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),! S5 X! R# x: ^6 Y; }0 ?) T" C
to_str("in der Andockstation: \"",?.~.name,"\""));, a, X6 ]# }( E6 ~7 N
else
( C4 l/ p0 g! H; l( T promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
$ {& D8 u. {+ _ to_str("in docking station: \"",?.~.name,"\""));
0 j" F w7 E6 R$ M end;
6 W" L1 m+ q3 p' d3 S! ?$ O/ i else7 L1 S! `9 |) |1 ? ^; H& \( {; e
@.Destination := assignLObj[1,row];8 |6 e m- N5 l6 i8 y( t2 N* c! H( G
end;
~! G) U1 z) r- F2 b newDirection(@);1 q) \- \: a `
@.HasOrder := true;, Z$ f9 E- K) Z( O# L
end;
0 u* o% Q/ N) q+ P$ B# C1 A end;
3 X1 @* V. u# d3 X* G% U) mend; -- of the method
: y5 G# h- ?% N- [/ z1 H) j$ \ |