/* called by: entrance ctrl of the object 'track'
' S% o$ T7 B+ j$ T0 T*/* s5 g a0 m( C: H; D* h) p
is& y9 G6 i8 |, m2 u
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
5 i6 Q+ h$ K4 ?2 @7 m* ndo/ k( k* t J9 @ k; |4 m1 t
Lan := rootfolder.Internal.Tools.AOLlanguage;
# y' V% g+ \/ y% Q if current = @.Destination -- else return$ O1 B* d; ]/ }' D4 o; m4 z
then5 z; {; p* z% ^* H/ N) y. G) Y* }
@.Destination := void;& W, e8 K. N! v# s" Q% Y
if @.occupied then5 [0 e2 X9 s' `3 h
part := @.cont;
0 j) d: R$ j8 M; ~& E2 m @.transpOrder := void;7 h' p& F! K" L$ Z. |4 J N
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
) _) _) w5 d9 | I5 Y. p+ T. \/ U7 g @,root.eventcontroller.simTime);$ R3 Q/ ]1 r) `( Q
@.HasOrder := false;- d, A( e1 ?3 d6 R) k# [" d
@.DrivingHome := true;
9 k1 p8 i- x% j7 u; k. ]) g rgManager.tryToStartTransOrder;
5 |) |) R; c; O. v! _9 z if @.Destination = void
9 ?1 y5 ?# J, V4 u/ s9 H! ] then -- no transport order for vehicle @
( H* _" [1 r8 Q6 u7 F0 J! ` @.Destination :=
9 p P4 i: J' s) J rgManager.nearestFreeStation(@,track.~); L ]. `' P) H
newDirection(@);
6 T# L5 I1 i0 J if @.Destination /= void then+ Y& y- B' W/ S* a; v
@.Destination.NumReservation :=9 @. a3 a# d* m" Z1 p) U, @* C2 O
@.Destination.NumReservation + 1;
! e5 G7 Z b* o- e' B2 f! U end;. N2 R4 |$ ]5 w g, s/ t; G+ T- b
@.CurrIcon := "drivingHome";* t/ a* z9 k, u
@.DrivingHome := true;; X# E3 w K! Q' [- _3 h- w
end;% O7 ^ e1 Y9 f3 ^; p
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
. d6 C. P/ _8 o( T8 \; u part := @.transpOrder;
& l( r9 Q. _) z1 V- C, {& M! q9 B part.move(@);-- load part) W, w# U4 N4 b( s& d5 e& {* k6 \& c) A
@.CurrIcon := "load";
7 P& w5 H+ E1 l GlobalDistObj := part.globDestination;" E1 y0 j; n' `7 b" r; S% e5 o' X
assignLObj := rgmanager.rgAssignL;' O) t3 M' Q$ s( v1 y
row := assignLObj.getRowNo(GlobalDistObj);$ ^- w2 t& x. c; z7 Z
if Row = -1 then -- since 70: R5 R& N. k; u4 _' R5 d
if lan=1 then9 g% L. ?6 \2 V9 G: u$ Y
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
1 t: I$ E9 ^; |, ^! q# g7 ~ to_str("in der Andockstation: \"",?.~.name,"\""));* m9 C b, A: T/ i+ z
else; [) V, w$ G! E7 T0 c" N
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
, N# C9 b& A! E( N- ^ to_str("in docking station: \"",?.~.name,"\"")); + Y, E/ G& I1 Z5 C
end;2 w+ E8 \- o/ M
else6 L7 a0 D- O! n
@.Destination := assignLObj[1,row];
, N/ l" k3 |; z) r7 Z3 m end;
* L" b& @+ P/ b: @2 d newDirection(@);! V3 @8 P, K$ q7 t
@.HasOrder := true;( z- V+ A% A& V8 ~( J
end;
; t# ^% r6 o% U9 g3 U& n8 y end;9 x4 J- `; I4 N6 x: S
end; -- of the method
3 c/ j' S/ C3 K* ^2 D( v |