/* called by: entrance ctrl of the object 'track'* g$ J! S8 `5 Q& A: N k& X
*/" G3 L0 _1 t5 g; { j z
is; f4 i1 ]- y3 ]. n0 ]+ A
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
/ ~3 w$ @8 G& ^do0 R3 G9 g; t7 _6 L
Lan := rootfolder.Internal.Tools.AOLlanguage;( c3 M5 T" P$ O5 Z8 y3 G" [
if current = @.Destination -- else return) V1 I+ x) ^) Y# R! v1 G% J
then
0 {6 x/ v. v9 s @.Destination := void;+ d( K, q( W7 S" h- m! I+ K
if @.occupied then
) [5 n1 m \+ \7 P' \4 _5 P; Z/ { part := @.cont;; f5 z" j$ y2 a i7 H6 [$ w
@.transpOrder := void;
2 s4 p* @9 R: a8 i part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,! E; z; N% n% @! m' r# b
@,root.eventcontroller.simTime);
" Y' I! W* N: ?2 D @.HasOrder := false;6 `+ o0 n9 X! a7 J. ~9 c7 i
@.DrivingHome := true;
6 I. G+ i1 O& o3 _( v6 x5 B' J rgManager.tryToStartTransOrder;
7 x v0 V, Z2 m" {( `; ` if @.Destination = void& R3 D2 \3 r* ]( z H
then -- no transport order for vehicle @' `& {4 p3 B7 b+ c6 ~7 I
@.Destination :=
- m, a9 f/ A' B. ?7 V rgManager.nearestFreeStation(@,track.~);
3 s7 A' D. e1 t7 A' r newDirection(@); & w3 r) S% R8 x/ W+ p/ D
if @.Destination /= void then
3 o* t* Q2 B8 P% p. h0 Q8 f! S @.Destination.NumReservation :=, W/ O+ x. a" _5 G. c
@.Destination.NumReservation + 1;3 ]! ]! C3 `7 R. r! e L4 r! J
end;
# W" X! Y( C/ } @.CurrIcon := "drivingHome";0 S) {" J+ V% q `0 ?8 y
@.DrivingHome := true;" K1 [9 G' P1 C" Z
end;& s& g& a+ s" g& V9 p
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
! ?& s( ?8 ^8 `: G: A" p part := @.transpOrder;1 ~/ c, m C+ ~- W# B. P, T
part.move(@);-- load part+ ?5 c0 x& ?: G( Z d j
@.CurrIcon := "load";6 k% T% m: Z5 w1 L2 F Z
GlobalDistObj := part.globDestination;) U+ ?% S6 b* @+ n3 c
assignLObj := rgmanager.rgAssignL;
' Q1 d) W& m4 g6 a$ g& T& |% n+ } row := assignLObj.getRowNo(GlobalDistObj);
/ f* |0 u# B) W5 S5 m0 [7 o if Row = -1 then -- since 70: c0 c4 |+ u" k# c# m
if lan=1 then
! @ T! z* Q: S) N- [ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
0 }: S/ m# I8 l8 Y& r to_str("in der Andockstation: \"",?.~.name,"\""));$ c' r0 \- C3 ^8 B1 H
else
% d% Z, M! O7 I% i/ D: {7 q promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),0 O& Z' [+ ~3 k6 a
to_str("in docking station: \"",?.~.name,"\""));
4 p, ~4 E& |4 e8 |# }, K* ] end;
6 e1 h' @9 ?# ? else. j3 c5 q) l% N0 u1 }9 C
@.Destination := assignLObj[1,row];$ ^. ?' p8 c8 _4 p6 I
end;
" c; D0 D [5 s n4 i& m6 ]6 H7 n newDirection(@);
0 [ D9 E, L& `& p S7 i @.HasOrder := true;1 m) Y8 u, b/ f) y
end;1 A5 n; F3 `% k
end;
9 \7 _, q0 Z8 o# v9 n: }end; -- of the method
% j8 O: J. }3 I5 C" _ h/ v |